Posts

BJT: RC coupled single stage amplifier

Image
  Common emitter RC coupled amplifier. The common emitter RC coupled amplifier is one of the simplest and elementary transistor amplifier that can be made. Don’t expect much boom from this little circuit, the main purpose of this circuit is pre-amplification i.e to make weak signals strong enough for further processing or amplification. If designed properly, this amplifier can provide excellent signal characteristics. The circuit diagram of a single stage common emitter RC coupled amplifier using transistor is shown below. Capacitor C1 is the input DC decoupling capacitor which blocks any DC component if present in the input signal from reaching the Q1 base. If any external DC voltage reaches the base of Q1, it will alter the biasing conditions and affects the performance of the amplifier. R1 and R4 are the biasing resistors. This network provides the transistor Q1’s base with the necessary bias voltage to drive it into the active region. The region of operation where the tran...

Python: Reminder Alerts program

Image
 This program will give you Attention message for every time interval you set in time.sleep(time_in_seconds) import os import time from plyer import notification   if __name__ == "__main__" :     while True :         notification . notify(title = "ATTENTION!!!" ,         message = "Take a break! It has been an hour!" ,          timeout = 10 )         time . sleep( 3600 ) Output:

Voltage follower using Op-amp IC TL082

Image
  What is a Voltage Follower? A voltage follower (also known as a buffer amplifier, unity-gain amplifier, or isolation amplifier) is an op-amp circuit whose output voltage is equal to the input voltage (it “follows” the input voltage). Hence a voltage follower op-amp does not amplify the input signal and has a voltage gain of 1. The voltage follower provides no attenuation or amplification—only buffering. A voltage follower circuit has a very high input impedance. This characteristic makes it a popular choice in many different types of circuits that require isolation between the input and output signal. Below figures shows implementation of Voltage follower in Proteus design suite. You can see how the output voltage is approximately equal to the given input voltages.

Python: Anagram check program

  def anagram (s1, s2):     #s1 and s2 are two strings which are to be checked for anagram     s1 = s1.replace( ' ' , '' ).lower() # s1 is reaasigned with removing spaces and then made all lowercase       s2 = s2.replace( ' ' , '' ).lower() # s2 is reaasigned with removing spaces and then made all lowercase     return sorted (s1) == sorted (s2)  # sorted both s1 and s2 and checked, if equal then returns True else False print (anagram( 'this is right', 'is this right' )) #printed True for anagram and False for not anagram Output: >> True

Python: Finding largest continuous sum in a list/array

 Problem Statement: Given a list of integers (both positive and negative) find the largest continuous sum. e.g.  Input: list1 = [1, 2, -1, 3, 4, 10, 10, -10, -1] Output: 29 Solution: def   largest_cont_sum ( list1 ):     max_sum  =  current_sum  =   0           if   len ( list1 )   ==   0 :          return   " There is no any element in the List "           for  num  in  list1 :         current_sum  =   max ( current_sum  +  num ,  num )         max_sum  =   max ( current_sum ,  max_sum )           return  max_sum list1  =   [ 1 , 2 ,- 1 , 3 , 4 , 10 , 10 ,- 10 ,- 1 ] print ...

Python: Find the missing element

 Problem Statement: Consider array/list of non-negative integers. The second array/list is formed by shuffling the elements of the first array/list and deleting a random element. Given these two arrays/lists, find which element is missing in second array. e.g. list1 = [1, 2, 3, 4, 5, 6] list2 = [2, 5, 4, 6, 3] here missing element is 1. Solution: def   missing_ele ( list1 ,   list2 ):     list1 . sort ()     list2 . sort ()      for  num1 ,  num2  in   zip ( list1 ,  list2 ):          if  num1  !=  num2 :              return  num1      return  list1 [- 1 ] list1  =   [ 1 ,   2 ,   3 ,   4 ,   5 ,   6 ] list2  =   [ 2 ,   4 ,   6 ,   3 ,   5 ] print ( " Missing element is:...

555 Timer as Monostable Multivibrator

Here, I have simulated a Monostable Multivibrator in Proteus design suite.