Thursday, April 26, 2012

IC Voltage Regulator


IC voltage regulators are versatile and relatively inexpensive and are available with fea­tures such as a programmable output, current-voltage boosting, internal short-circuit cur­rent limiting, thermal shutdown, and floating operation for high voltage applications-Voltage regulators comprise a class of widely employed ICs. Regulator IC units contain the circuitry for reference source, comparator amplifier, control device, and overload pro­tection all in a single IC. Although the internal construction of IC is somewhat different from that explained in case of discrete voltage regulator circuits, the external operation is almost the same.
A power supply can be built using a transformer connected to the ac supply line to transform the ac voltage to a desired level, then rectifying the ac voltage, filtering with a capacitor and RC filter, if desired, and finally regulating the dc voltage employing and IC regulator. The regulators can be selected for operation with load currents ranging from hundreds of milli amperes to tens of amperes, corresponding to power ratings from milliwatts to tens of watts.

IC regulators are of the following types.
  1. Fixed output voltage regulators: positive and/or negative output voltage.
  2. Adjustable output voltage regulators: positive or negative output voltage.
  3. Switching regulators.
  4. Special regulators.
Except for the, switching regulators, all other types of regulators are linear regulators. The impedance of the active element of the linear regulator may be continuously varied to provide a desired current to the load, on the other hand, in a switching regulator a switch is turned on and off at a rate such that the regulator provides the desired average current in periodic pulses to the load. The switching regulators are more efficient than the linear regulators. This is because there is negligible power dissipation in switching ele­ments in either the on or off state. Nevertheless, in switching regulators the power dis­sipation is substantial during the switching intervals (on to off or off to on). Also, most of the loads (devices) cannot accept the average current in periodic pulses. Therefore, most practical voltage regulators are of the linear type.
Voltage regulators, especially the switching type, are employed as control circuits in pulse width modulation, push-pull bridges, and series type switch mode supplies. Almost all power supplies make use of some type of voltage regulator IC because they are simple to use, reliable, cheaper in cost, and, above all, available in a variety of voltage and current ratings.
For instance, the LM 309 is a fixed positive regulator with an output of + 5 V, a maximum load current of 1 A, a load regulation of 15 mV, a source regulation of 4 mV, and a ripple rejection of 75 db. For the adjustable regulators, LR and SR are given in percentage rather than millivolts. The table also includes the drop-out voltage, or the minimum permissible difference between the input and output voltages. For example an LM 309 has a drop-out voltage of 2 V. It implies that the input voltage must be at least 2 V greater than output voltage i.e. input voltage must be at least 7 V, because its output voltage is 5 V.New devices can supply load current from 100 mA to more than 5 A. Available in plastic or metal packages, these three-terminal voltage regulators have become extremely popular because they are inexpensive and easy to use. Aside from a couple of bypass capacitors, the new three-terminal IC voltage regulators do not need any external component.
The integrated three-terminal voltage regula­tors typically incorporate many of the functions discussed so far in a single package, as illustrated in figure.
The error amplifier is used to maintain a constant voltage through a negative feedback. The internal voltage reference is tightly controlled during the fabrication of IC. So, the nominal output voltage of most of the three-terminal voltage regulators has tolerances that range from ± 6 % to better than ±2%. The series-pass element is driven by the output of the error amplifier. IF acts as an automatically controlled variable resistor. This resistance varies as required for maintaining the output voltage constant. The series-pass element is typically a BJT that is rated to pass the maximum load current.
The basic connection of a three-terminal voltage regulator IC to a load is shown in figure. The fixed voltage regulator has an unregulated dc input voltage Vin, applied to one input terminal, a regulated output dc voltage, Vout from a   second terminal, with the third terminal connected to ground.

USB Sound Card

Designing and building a USB sound card is no longer a head ache because we have got the PCM 2702 integrated circuit from Texas Instruments. The PCM2702 is an integrated 16 bit digital to analog converter that has two digital to analog output channels. The integrated interface controller of PCM2702 is compliant to the USB 1.0 standards. The IC can handle sampling rates of 48 KHz, 44.1 KHz and 32 KHz. The IC also has a number of useful features like on-chip clock generator, digital attenuator, play back flag, suspend flag, zero flag, mute function etc. The most interesting thing is that this circuit is plug & play and doesn’t need any driver software for Windows XP and Windows Vista operating systems. The circuit gets control data and audio data from the USB through the D+ and D- pins of the PCM2702 all the data transferring is carried out at full speed. The decoded audio signals will be available at the VOUTL and VOUTR pins of the IC. The 12MHz crystal is connected between the XT0 and XT1 pins of the IC. The VBUS (USB bus power) pin and DGND (digital ground) pins of the IC are connected to the +5V and ground pins of the USB respectively. The circuit requires +5V DC and +3.3V DC for operation and both of these voltages can be derived from the USB port using LDO (low drop out) voltage regulators (not shown in circuit).
Notes.
  • +5V DC supply can be derived from the USB port using a +5V LDO regulator.
  • +3.3V DC supply can be derived from the USB port using a +3.3V LDO regulator.
  • Audio signals (output) available at VOUTL and VOUTR requires further amplification for driving low impedance head phones or loud speakers.
  • The PCM2702 is available only in SSOP28 package and requires special care while assembling.
  • Before attempting this circuit please go through the datasheet of PCM2702 and get a clear idea about the device.

12v DC from USB port

Using this circuit we can convert 5V DC from the computer USB port to 12V DC and a circuit like this will find a lot of application in USB powered systems. The heart of this circuit is IC LT1618 which is a constant current, constant voltage boost converter. The IC has a wide input voltage range of 1.8 to 18V DC and output voltage can be up to 35V DC.
In the circuit resistors R1, R2 sets the output voltage. Pin number 9 is the shutdown pin, less than 0.3V to this pin will shut down the IC. Pin number four is the current sense adjust pin. The current sense voltage can be reduced by applying a DC voltage to this pin. If this adjustment is not needed connect this pin to ground and you can omit components R3, R5 and Q1.
Notes :
  • C2 and C3 must be rated at least 15V.
  • Less than 0.3V at the shutdown pin will shutdown the IC.
  • Output voltage is governed by the following equation R1 = R2 (  (Vout /1.263V) -1).
  • This circuit can be used to convert 5v to 12v 

Friday, April 13, 2012

7 Segment Display


Seven segment display is a device that can display decimal numbers and are widely used in electronic clocks, electronic meters, digital display panels and a hand full of  applications where numerical data is  is displayed. The idea of seven segment display is very old and they are in the scenario from early nineteenth century. Seven segment display have seven segments which can be individually controlled (ON/OFF) to display the desired number. Numbers from 0 to 9 can be displayed using  various combinations of the segments and in addition to this the hexadecimal letters A to F can be also displayed using a seven segment display. The seven elements (segments)  are arranged in the form of a square shaped “8″ which is slightly inclined to the right. The slight inclination to the right is given to improve the readability.Some seven segment displays have an additional dot element which can be used for indicating decimal points. The segments may be based on incandescent bulbs, fluorescent lamps, LCD or LED. Here in this article we give stress to the LED seven segment display.
In an LED 7 segment display, as the name indicates the 7 segments plus the dot segment are based on LEDs. When power is given to a particular segment, it glows and the desired digit can be displayed by powering the suitable combination of LEDs. LED seven segment displays are of two types, common cathode and common anode. In a common cathode display, the cathode of all LED segments are tied together as one common cathode pin and the anode terminals are left alone as input pins. In this scheme the common cathode is always connected to ground and the control signals (active high) are applied to the inputs (anode terminals) .In common anode type display, the anodes of LED segments are tied together as one common anode and the cathode terminals are left alone as input. In this configuration the common anode is always connected to a suitable positive voltage and the control signals (active low)  are applied to the inputs (cathode terminals).

USB Lamp

Here is a simple USB powered lamp that can be used to light your desktop during power failures. The circuit operates from the 5 Volts available from the USB port.The 5V from the USB port is passed through current limiting resistor R2 and transistor Q1. The base of transistor Q1 is grounded via R1 which provides a constant bias voltage for Q1 together with D2.The diode D1 prevents the reverse flow of current from battery.C1 is used as a noise filter.Two white LED’s are used here for the lamp, you can also use a 2 V torch bulb instead of LED’s. LED D3  indicates connection with USB port.

NOTE
  • USB port is only able to provide up to 100 mA current.So don’t overload the circuit with more no of LED’s.
  • Before wiring the circuit confirm the positive and ground leads of USB by a multimeter.
  • Switch S1 can be used to turn on the lamp.

Testing A Capactor

This article shows you how to test a capacitor using analogue multimeter. Firstly short the capacitor leads for discharging it completely. Set the multimeter to high resistance mode. Connect the multimeter terminals to the capacitor leads. For electrolytic capacitors the positive terminal of multimeter must be connected to the positive lead of the capacitor and negative terminal of multimeter to the negative lead of capacitor. For other capacitor types, polarity is not an issue.
At the moment you connect the multimeter terminals to the capacitor leads, the multimeter needle will move to zero and then slowly move towards infinity and settle there. This will happen only if the capacitor under test is healthy.
  • If the capacitor under test is short, the multimeter needle will go to zero and remain there.
  • If the capacitor under test is open, the multimeter needle will not move (will remain at the infinity position which is the initial position for analogue multi meters).
  • If the capacitor under test has leakage then the needle will first deflect to zero, and then slowly move towards infinity and will settle at a point before infinity.
This is only a rough test and for complete check up you need to varify the capacitor value using a capacitance meter.

Testing Of Diode

Diodes are one of the components that can be tested very easily.Ordinary diodes as wells as Zener diodes can be checked by using a multimeter. While testing a diode the forward conducting mode and reverse blocking mode has to be tested separately.
Testing ordinary diode using a digital multimeter.
To check an ordinary silicon diode using a digital multimeter, put the multimeter selector switch in the diode check mode. Connect the positive lead of multimeter to the anode and negative lead to cathode of the diode. If multimeter displays a voltage between 0.6 to 0.7, we can assume that the diode is healthy. This is the test for checking the forward conduction mode of diode. The displayed value is actually the potential barrier of the silicon diode and its value ranges from 0.6 to 0.7 volts depending on the temperature.
Now connect the positive lead of multimeter to the cathode and negative lead to the anode. If the multimeter shows an infinite reading (over range), we can assume that the diode is healthy. This is the test for checking the reverse blocking mode of the diode.
testing-diode-using-digital-multimeter

For testing Germanium diodes, the procedure is same but the display will be between 0.25 to 0.3 V to indicate a healthy condition in the forward biased mode. The potential barrier for Germanium diode is between 0.25 and 0.3V.When reverse biased the multimeter will show an infinite reading (over range) to indicate healthy condition.
Testing ordinary diode using  analog multimeter.
To check an ordinary Silicon diode using an analogue multimeter, put the multimeter selector switch in a low resistance position (say 1K).Connect the positive lead of multimeter to anode of the diode and negative lead of multimeter to cathode of the diode. If meter shows a low resistance reading, we can assume that the diode is healthy. This is the test for checking forward biased mode of the diode.
Now put the multimeter selector switch in a high resistance position (say 100K).Connect the positive lead of multimeter to cathode of the diode and negative lead to anode of the diode. If the meter shows an infinite reading, we can assume that the diode is healthy. This is the test for checking the reverse blocking mode of the diode. The meter shows infinite or very high resistance reading because a reverse biased diode has a very high resistance (usually in the range of hundreds of K Ohms).
testing-diode-using-analog-multimeter

Testing Zener diode.
The forward characteristics of a Zener diode is similar to an ordinary diode.So the methods used for testing  forward conducting mode of  any ordinary diode is applicable to the Zener diode too.But in reverse mode, the reverse  breakdown voltage has great significance and it has to be specifically tested.For example a 5.3V Zener diode must start conducting only when the applied reverse voltage just exceeds 5.3V.The reverse  bias mode of Zener diode can be easily tested by using the circuit given below.The resistance R1 can be typically 100Ohms.The multimeter must be in voltage mode.Now slowly increase the output of variable power supply  and at the same time observe the voltage shown in the multimeter. The multimeter display increases along with the increase in power supply voltage until the breakdown voltage. Beyond that the multimeter reading stays put despite of the power supply voltage. This is because the Zener diode is now in breakdown region and the voltage across it will remain constant irrespective of the increase in supply voltage and this constant voltage will be equal to the breakdown voltage. If the reading of multimeter in this instant is equal to the breakdown voltage specified by the manufacturer, we can assume that the Zener diode is healthy.
circuit-for-testing-zener-diode
While carrying out this test, remember not to exceed the input excitation voltage to a point that forces the Zener diode to dissipate more power than it can safely handle. Typically current through the diode should not be allowed to exceed more than 10mA.

Thursday, April 12, 2012

Automatic Battery Charger

Here is a 12 volt Lead Acid battery charger that shut off the charging process once the battery attains full charge. This prevents overcharging of the battery so that, the charger can be left unattended. If the terminal voltage of the battery reduces below the set level, say 13.5 volts, the circuit automatically turns on to the charge mode.Charging current as well as the power to the circuit is obtained from a 0-18 volt 2 Ampere step-down transformer. The low voltage AC is rectified by the bridge rectifier comprising D1 through D4 and made ripple free by the smoothing capacitor C1. For charging purpose, 18 volt DC is used while to power the circuit, 9 volt regulated DC from IC1 is used.
IC2 (CA3140) is used as a simple voltage comparator to drive the relay. Its inverting input gets 4.7 volt reference voltage from the Zener ZD, while the non inverting input gets an adjustable voltage through the POT VR1.So normally, the inverting input pin 2 gets higher voltage from the Zener (as adjusted by VR1) and output of IC2 remains low. T1 then remains off keeping the relay off. The charging current passes to the battery through the NC (Normally Connected) contacts of the relay.
When the terminal voltage of the battery increases to 13.5 volts, pin 3 of IC2 gets higher voltage than pin2 and the output of IC2 becomes high. This activates the relay and the contacts break. Charging current to the battery cut off and the relay remains as such since the battery voltage(13.5V or more) keeps the voltage at pin3 of IC2 is higher than that of pin 2.
Setting: Before connecting the battery, set the input voltage to IC2 using a fully charged battery or variable power supply. Turn the switch S1 to the off position and switch on the power. Then connect a fully charged battery/ variable power supply to test points TP observing polarity. Measure the input voltage to pin 3 of IC2.
Slowly adjust VR1 till the input voltage to pin 3 of IC2 raises to 5 volts. At this point, relay should energize and Red LED turns on. Then connect the battery for charging and switch on S1. If the battery takes charge, current to pin 3 of IC2 will be low since most of the current drain occurs into the battery. This keeps the relay off. When the battery voltage increases above 13.5 volts, no more current passes into the battery, so that the voltage at pin3 of IC2 rises and relay turns on.

8051 Microcontroller Basic

AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory (PEROM) and 128 bytes of RAM. It can be erased and program to a maximum of 1000 times.

In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0. All these ports are 8-bit bi-directional ports, i.e., they can be used as both input and output ports. Except P0 which needs external pull-ups, rest of the ports have internal pull-ups. When 1s are written to these port pins, they are pulled high by the internal pull-ups and can be used as inputs. These ports are also bit addressable and so their bits can also be accessed individually.
Port P0 and P2 are also used to provide low byte and high byte addresses, respectively, when connected to an external memory. Port 3 has multiplexed pins for special functions like serial communication, hardware interrupts, timer inputs and read/write operation from external memory. AT89C51 has an inbuilt UART for serial communication. It can be programmed to operate at different baud rates. Including two timers & hardware interrupts, it has a total of six interrupts.

Pin Diagram: 
Pin Description: 


 Pin No
 Function
 Name
1
8 bit input/output port (P1) pins
P1.0
2
P1.1
3
P1.2
4
P1.3
5
P1.4
6
P1.5
7
P1.6
8
P1.7
9
Reset pin; Active high
Reset
10
Input (receiver) for serial communication
RxD
8 bit input/output port (P3) pins
P3.0
11
Output (transmitter) for serial communication
TxD
P3.1
12
External interrupt 1
Int0
P3.2
13
External interrupt 2
Int1
P3.3
14
Timer1 external input
T0
P3.4
15
Timer2 external input
T1
P3.5
16
Write to external data memory
Write
P3.6
17
Read from external data memory
Read
P3.7
18
Quartz crystal oscillator (up to 24 MHz)
Crystal 2
19
Crystal 1
20
Ground (0V)
Ground
21
8 bit input/output port (P2) pins
/
High-order address bits when interfacing with external memory
 P2.0/ A8
22
 P2.1/ A9
23
 P2.2/ A10
24
 P2.3/ A11
25
 P2.4/ A12
26
 P2.5/ A13
27
 P2.6/ A14
28
 P2.7/ A15
29
Program store enable; Read from external program memory
PSEN
30
Address Latch Enable
ALE
Program pulse input during Flash programming
Prog
31
External Access Enable;  Vcc for internal program executions
EA
Programming enable voltage; 12V (during Flash programming)
Vpp
32
8 bit input/output port (P0) pins
Low-order address bits when interfacing with external memory
 P0.7/ AD7
33
 P0.6/ AD6
34
 P0.5/ AD5
35
 P0.4/ AD4
36
 P0.3/ AD3
37
 P0.2/ AD2
38
 P0.1/ AD1
39
 P0.0/ AD0
40
Supply voltage; 5V (up to 6.6V)
Vcc

Wednesday, April 11, 2012

LM317 Audio Amplifier

You probably know that LM317 IC is used as an adjustable voltage regulator, but did you know it can be used as an audio amplifier? This is a class A audio amplifier built with LM317 that delivers a maximum 1W audio power.
Use a good heatsink for the LM317 IC and adjust the 5K variable resistor so that you have 4.5V on 10Ω resistor (or LM317 pin 2, Vout).

Saturday, April 7, 2012

Gas Leak Detector

Here is a gas leak detector circuit that detects the leakage of LPG gas and alerts the user through audio-visual indications. The circuit operates off a 9V PP3 battery. Zener diode ZD1 is used to convert 9V into 5V DC to drive the gas sensor module.
 The gas leakage circuit uses the SEN-1327 gas sensor module from RhydoLABZ. Its output goes high when the gas level reaches or exceeds certain point. A preset in the module is used to set the threshold. Interfacing with the sensor module is done through a 4-pin SIP header.
Pin details of the gas sensor module are shown in Fig. 2. An MQ-6 gas sensor is used in the gas sensor module. The sensor can also be used to detect combustible gases, especially methane.
Whenever there is LPG concentration of 1000 ppm (parts per million) in the area, the OUT pin of the sensor module goes high. This signal drives timer IC 555, which is wired as an astable multivibrator. The multivibrator basically works as a tone generator.
Output pin 3 of IC 555 is connected to LED1 and speaker-driver transistor SL100 through current-limiting resistors R5 and R4, respectively. LED1 glows and the alarm sounds to alert the user of gas leakage. The pitch of the tone can be changed by varying preset VR1. Use a suitable heat-sink for transistor SL100.