This blog will go through one of the useful applications of npn transistor & the voltage divider circuit. The npn transistor BC547 is configured to work as a switch.
So from the datasheet of BC547 transistor we can see that the maximum value of Vbe(on) is 0.7 V. That means if the base to emitter voltage is less than 0.7 V, no current will flow through collector to emitter of the transistor and it will remain off. When Vbe will be greater than 0.7 V, current will flow from collector-emitter, switching on the transistor. Now if a load is connected to the collector it will be switched on. Now in this circuit we implemented a voltage divider, the output of the voltage divider is connected to the base of the BC547. The voltage divider is the combination of a resistance and LDR.
/The voltage divider circuit
It is a very useful circuit which is implemented in different applications. The combination of R1 & R2 will affect Vout.Vout = Vin.(R2/R1+R2) so if we want to make 5V to 2.5V, R1 must be equal to R2. Here we take R1 = R2 = 1KΩ, and it gives perfect 2.5V.
/The Dark Detector Circuit
Here the output of the voltage divider which is generally a combination of R1 & LDR is connected to the Base of the BC547 & a white LED is connected to the Collector. The 220Ω resistance limits the current and prevents the LED from getting damaged.
When light falls on the LDR the resistance offered by LDR is very low. Let, R1 = 220 KΩ & R(LDR) = 4.6 KΩ. If Vin is 9V then voltage on the Base of BC547 = 0.184 V which is less than 0.7V so the BC547 is now off and the LED will not glow. Now when it is dark the resistance offered by LDR is very high in order of MegaΩ. Suppose practically R(LDR) = 150KΩ so Base voltage of the BC547 is 3.648V which is greater than 0.7V. Now current will flow from C-E of the BC547 & the LED will glow.
There are different sizes of LDR available in the market. Sometimes small LDRs don’t work properly in the circuit, so to increase the sensitivity connect two small LDRs in parallel or change the value of R1 which can be calculated from the Voltage Division formulæ.
FM Transmitters are that type of gadget which gives you the feelings of a RJ. You can make your own short-range radio channel and air any songs, audio clips as well as your voice in the form of radio frequency. The transmission process is done by following steps which are audio pre amplification followed by modulation then transmission. There are two types of modulation Amplitude Modulation(AM) & Frequency Modulation(FM) both are the part of Radio Frequency (RF). 88 MHz to 180 MHz is generally known as the FM Band.
Audio signal from media player, microphones are very low level signal, of the order of mill volts. This extremely small voltage needs to be first amplified. A common emitter configuration of a bipolar transistor produces an amplified inverted signal.
Another important aspect of this circuit is the oscillator circuit. This is a LC oscillator where energy moves back and forth between the inductor and capacitor forming oscillations. It is mainly used for RF application.
When this oscillator is given a voltage input, the output signal is a mixture of the input signal and the oscillating output signal, producing a modulated signal. In other words, the frequency of the oscillator generated circuit varies with the application of an input signal, producing a frequency modulated signal.
Some details about the design of the circuit :
1.Selecting the Vcc : This circuit uses a NPN Bipolar Junction Transistor (2N3904) or you can use BC547 or equivalent. The Vceo of the transistor is 40V so minimum Vcc is 9V.
2.Selecting the Capacitor C1 : The capacitor modulates the current going through the transistor. A large value indicates bass or low frequency whereas small value indicates treble higher frequency. Here 1uF, 25V electrolytic capacitor is used.
3.Selecting L1 & C4 :Here L1 & C4 is the oscillator known as LC oscillator. Frequency of oscillation is obtained from the formula, f = 1/(2Π√LC).
Here is some pictures of my complete and decorated setup :
Previous post describes what a temperature sensor is & about how to test the well known & well available analog temperature sensor in the market, the LM35 temperature sensor.
This article will describe how to interface LM35 with Arduino, a well known open-source development platform. There are many versions of Arduino available in the market. We are using Arduino UNO board here. It contains a micro-controller ATMEGA328, the brain of the platform, six numbers of Analog input pins, 14 numbers of digital pins out of them 6 numbers of pins are PWM ~ (Pulse Width Modulation) pins.
LM35 has three pins, pin no.1 is +Vcc, pin no.2 is Output & pin no.3 is Ground. As it is a analog temperature sensor so the output pin of the LM35 will be connected to the Analog Input pin of Arduino.Other pins to the 5V & GND pin.
The hardware part is done.
Coding part of this is simple. We will use the Serial Monitor to visualize the response of LM35. Later interfacing another display like LCD or 7 segment LED with the arduino we can also make this project more compact.
float temp : “temp” is a float variable
int tempPin = 0 : declaration for the Analog Input pin(A0)
Serial.begin(9600) : declaration for the Baud Rate of the serial port which is 9600.
temp = analogRead(tempPin) : the function analogRead is to read analog data from the tempPin
Serial.print() : To print something in the serial port
temp = temp * 0.48828125
0.48828125 where this number came from??
This is (+Vcc * 1000 / 1024) / 10
Where +Vcc is the supply voltage = +5V, 1024 is 2^10, value where the analog value can be represented by ATmega the actual voltage obtained by VOLTAGE_GET / 1024.
1000 is used to change the unit from V to mV & 10 is a constant as each 10 mV is directly proportional to 1 Celsius in LM35.
So (5.0 * 1000 / 1024) / 10 = 0.48828125.
Now connect the Arduino to the PC, open the arduino software and upload the code to the arduino. Now press Ctrl + Shift + M, this will open the serial monitor & you can see your room temperature. Done!
The LDR is also known as the Photo-resistor or Photo-cell, a light controlled variable resistance which exhibits photo conductivity. Ideally it behaves as a wire having a zero resistance when the incident light intensity increases as well as much higher resistance value when the intensity decreases. So, we can say that under bright light, resistance is very low & in darkness resistance is very high or infinite ideally.
This image shows how LDR looks like. There are different sizes available in the market. It is made of a high resistance semiconductor. The red track on the LDR is a layer of Cadmium Sulphide (CdS). Practically LDRs are not polarized.
Area of Application :
There are a large numbers of applications that can be done by using LDRs such as an automatic street light which turns on itself when the sun sets, a morning alarm which senses the morning light and initiate the alarm, many security applications like the laser alarm, it can also be applied as solar tracker, a line follower robot also uses a LDR to sense the black line etc.
Following images will describe the variance of Resistance as well as the circuit symbol & some test result:
–The most simple circuit that you can do using a LDR–
This simple circuit is the primary stage of LDRs applications later it can be modified as a automatic street light. When LDR is uncovered then LED is in OFF state and when covered LED is in ON state. So it may be a perfect system for street lighting. Here the BC547 transistor is working as a switch. So the results are quite satisfactory…
So, this is how we can use LDR in a circuit. Also we can construct sensors as a physical parameter (light) is being converted to resistance value.
There are varieties of analog temperature sensors around us. The main function of a active analog temperature sensor IC is to provide an output as voltage which is proportional to the temperature of the surroundings. Few of them are LM34, LM35, TMP 35/36/37, MCP9071 etc. These devices does not require any external calibration. A simple ADC (Analog to Digital Conversion) required for digital processing.
Quick overview on the LM35 Analog Temperature Sensor
Low cost, well available Analog Temperature Sensor
It is very interesting to work with new things, when a primary stage of testing success brings mental satisfaction on the work & we go for more advanced implementation which increases the knowledge & allow us to think and face practical.
As LM35 is calibrated directly in ° Celsius (Centigrade), so using only a multimeter it can be used as a digital thermometer for both Basic Centigrade Temperature Sensor & Full-Range Centigrade Temperature Sensor. Fig. 1 & Fig. 2 describes the circuit for those.
The 555 Timer IC(Integrated Circuit) is generally a versatile IC for timer operations. Designing a simple oscillator, timer, pulse generator, flip-flop can be done using this IC, also a well available cheap IC in the original bipolar & also in low power CMOS types. This revolutionary chip was introduced in 1971 by Hans Camenzind under contract to Signetics & became world-wide as electronics hobbyists & engineers found it’s vast area of applications. The IC reduces the space of 25 transistors or 2 comparetors, 2 diodes, 15 resistors. From the internal block diagram, there is three ‘R’ resistances present having value 5 Kilo-Ohm that’s why it is known as the 555 timer.
Pin Functions :
PIN 1 : Pin 1 or the Ground pin is for ground reference voltage (0 V).
PIN 2 : Pin 2 or the Trigger pin goes high and a timing interval starts when this input falls below 1/2 of Control voltage (hence TRIG is typically 1/3 VCC, CTRL being 2/3 VCC by default, if control is left open).
PIN 3 : Pin 3 or the output pin is driven to approximately 1.7 V below +Vcc or GND.
PIN 4 : Pin 4 or the Reset pin, a timing interval may be reset by driving this input to GND, but the timing does not begin again until RESET rises above approximately 0.7 volts. Overrides Trigger which overrides Threshold.
PIN 5 : Provides “control” access to the internal voltage divider (by default, 2/3 VCC).
PIN 6 : The timing (OUT high) interval ends when the voltage at Threshold is greater than that at CTRL (2/3 VCC if Control is open).
PIN 7 : Output which may discharge a capacitor between intervals. In phase with output.
PIN 8 : Positive supply voltage, which is usually between 3 and 15 V depending on the variation.
Modes Of Operation:
There are three modes of operations Monostable Mode, Astable(Free-Running) Mode & Bistable Mode or the Schmitt Trigger.
Monostable Mode :
When the circuit is turned on, the output is LOW and a brief negative pulse
on pin 2 will make the output go HIGH for a period of time determined by
the value of R and C. If pin 2 is low for longer than this period, the output
will remain HIGH while pin 2 is LOW and immediately go LOW when pin 2
Applications : Applications include timers, missing pulse detection, bouncefree switches, touch switches, frequency divider, capacitance measurement, Pulse Width Modulation (PWM) etc.
Astable(Free-Running) Mode :
The capacitor C charges via R1 and
R2 and when the voltage on the
capacitor reaches 2/3 of the supply, pin
6 detects this and pin 7 connects to 0v.
The capacitor discharges through R2
until its voltage is 1/3 of the supply and
pin 2 detects this and turns off pin 7 to
repeat the cycle.
The top resistor is included to prevent
pin 7 being damaged as it shorts to 0v
when pin 6 detects 2/3 rail voltage.
Its resistance is small compared to R2
and does not come into the timing of
Applications : The 555 can operate as an oscillator. Uses include LED and lamp flashers, pulse generation, logic clocks, tone generation, security alarms, pulse position modulation and so on. The 555 can be used as a simple ADC, converting an analog value to a pulse length. E.g. selecting a thermistor as timing resistor allows the use of the 555 in a temperature sensor: the period of the output pulse is determined by the temperature. The use of a microprocessor based circuit can then convert the pulse period to temperature, linearize it and even provide calibration means.
Bistable Mode :
The bi-stable 555 has two steady states. SET turns ON the LED and
RESET turns the LED off. The 555 comes on in reset mode as Pin2 does
not see a LOW to SET the 555.
Applications : The 555 can operate as a flip-flop, if the DIS pin is not connected and no capacitor is used. Uses include bounce-free latched switches.
Example Project :
Here is a simple configuration of the 555 Timer used as a low frequency oscillator. Both values of resistances(R) is 10K & the capacitor value is 10uF,40 V. Or it can be used as a LED flasher circuit having delay of 2.2 seconds between each flash. If one 0f the resistor is replaced by a 10K pot then there will be also an option for reducing or increasing the time interval.
For an electronics hobbyist as well as an engineer the breadboard is the primary platform to deal with. The white dotted board is used to test electronics circuits before soldering it permanently.
Advantages of using the Breadboard:
For testing whether a circuit is working or not.
Experimenting by replacing old components with a new one having different value.
Breadboard reduces time of soldering.
Testing different IC operations in a short time.
Low cost & well available.
How a Breadboard looks like?
This is how the most used Breadboard looks like there are also lot of variations in sizes.
What inside a Breadboard?
The upper & lower both two rows are connected horizontally. They are used as power supply terminals, they are not continuous. The middle portion of both supply terminals are not connected so we have to use jumper wires to make it continuous on both sides.
The other terminals below the supply terminals are connected vertically, these terminals is the prototyping terminal.
Setting up Breadboard for your very first project :
A neat & clean work on Breadboard can give mental satisfaction, make good impression, saves time also it can make all of the connections understandable. So if there is something wrong anyone can correct it easily. Use jumper wires (Single Core) to make connections. Remove insulation of the wire using a wire stripper. Jump terminals as shown below hence you get the upper and lower rows connected. So it will be easy to power components or devices from anywhere of the Breadboard.
Some tips & tricks :
Try to use less jumper wires as possible to make the platform neat & clean.
Place ICs carefully. After placing the IC on the breadboard press it’s both end and then in the middle.
Try to remove sufficient insulator from wire not more not less otherwise two conductors closer to each other can make short circuit.
Remove ICs with care. Use a needle pass it through the middle channel of the breadboard and remove the IC.
The SMPS or the Switched Mode power Supply generally used to drive our Personal Computers. It can also be used to drive other loads also so it is a versatile power supply.
Why SMPS is used in Personal Computers?
In the motherboard of a Personal Computer different sections needs different operating voltages those are +3.3V, +5V, -5V, +12V, -12V DC. The SMPS converts & switches 230V AC supply to those voltages respectively in a very short time so it minimizes the wastage of energy thus the efficiency increases. An ideal SMPS dissipates no power.
Stages of AC to DC conversion & Switching done in a SMPS:
Hacking the SMPS & using it as your own power supply
Using the Switched Mode Power Supply as a workbench power supply is not so difficult. Everyone can use it. Starting from beginner level, if you Plug in the SMPS and you will find it is not running. Well that not means that the device is damaged.
Running the SMPS
Step 1: Go for the ATX Power connector. It is the connector having 20 or 24 pins.
Step 2: There is only a green wire(PS_ON). Now short PS_ON with any of the Black wire(COM/Ground) of the SMPS and Plug it again to AC. Now if the SMPS is working the fan will start rotating. Now you are able to use it as your power supply.
Step 3: Now check the voltages of the different pins using a multimeter.
Step 4: Now use the SMPS as a power supply. I’ve use an old one as my workbench power supply. Here is a simple LED test circuit.