Wednesday, August 25, 2010

S.S Display & Manual i/p board

i used ss display and manual i/p board to interface it with 8051 Generic board, of course you can interface it with any other microcontroller. 
ICs required for this board are 74hc573 latch, 74hc238 decoder and 74ls48 BCD2dec converter . For their proper working operation refer to their datasheets.

74hc573 is used to store data so that the previous content on SS is not vanish when we disable LE pin. T0 select the proper latch 74hc238, 3x8 decoder is used. And to convert BCD into decimal, 74ls48 converter is used. Note that latches U1 to U4 are connected with C.C SS, so the output of 74ls48 will only go to these latches. Whereas latches U6 and U8 are connected to DP oF SS and LEDs respectfully. You can emit these latches i used them to distinguish between various mode i.e, digital clock, stop watch, counter and manual input etc.

For manual input DSW1 is used and J2 is the 8-way connector i used to connect it with 8051 Generic board, same for J1 connector. J3 and three switches are used to select the operating mode of this board, you can also emit these.

Note that during programming you have to be aware the J1 connections because this connector is controlling the whole board.


Final Assembly:
oppssss! i lost one ic

Components Required:
U1-U4,U6,U8,              74hc753
U5,                                 74ls48
U7,                                 74hc238
D1-D4,                           LEDs
D5-D8,                           SS C.C
DSW1,                            8-way dip wsitch
J1,                                  4-way jumper
J2-J3,                            8-way connector
Three button or 4-way dip switch
Zero ohm resistors 9 pics
2-way connector for power

Monday, August 23, 2010

8051 Development Board (Generic Board)

8051 Generic Board is my fist project board in 8051 microcontroller course. This board is design for atmel 89c51 ic, please refer to its datasheet for more information.

Now come towards board description:
There are four i/o ports in 89c51, this board is design in such a manner that all ports are byte addressable whare as port3 can also be access bit wise in other world port 3 is also bit addressable. This can be done by proper selecting the jumper j2 and j5 and etc.Note that there are 8 jumpers at port 3 and also 8 jumpers at the u4 & u5 o/p pins are required, whereas in schematic only four are shown.

74ls245 latches are used to decide the direction of data. Switch SW1 is used to select the direction. If SW1 is towards vcc than the data direction is from 89c51 to latch o/p pins. And if SW1 is towards gnd than the direction is from latch to 89c51. For more info please refer to its datasheet.

LED bargraph are used to indicate the status of 89c51 port pins; that is data in or out.
Connectors J1, J4 and etc are used so that we can interface this board with other boards.
Note that only port 0 and port 3 connections are shown in schematic; port 1 and port 2 connection are the same as of port 0, but in that case RP1 is not required. As port 0 needs to be pull up so, resistor pack, RP1, is only required for this port.


Final Assembly:

Component Layout:

Components Required (according to layout):
R1,                10kΩ  Resistor
R2,                100Ω  Resistor
IC1,               89c51
IC2-IC6,      74ls245
Xtal,              11.0592Mhz
C1,C2,           33pF Ceramic Capacitor
C3,                16uF/25v Electrolyte Capacitor
PB,                Push Button
Pwr,              2-way connector
J1-J11,         3-way jumper
J12-J15,       8-way connector
RB1,              10K ohm resistor bank 9 pins
PB2-PB5,     330 ohm resistor bank 9 pins
LED bargraph 4 pics
Zero ohm resistor 2 pics

Sunday, August 22, 2010

Automatic Water Level Sensor & Pump Driver

The circuit is based on a 555 IC (Bipolar or CMOS) for sensing the minimum and maximum water levels and turns a MOSFET on/off which directly controls a 12V DC pump motor. Or, it can power a relay coil to switch high currents/voltages, DC or AC.

‘Trigger’ and ‘Threshold’ pins (2 & 6) are used to detect the maximum and minimum levels, respectively. The two voltage comparator op-amps inside the 555 control the output, turning it on/off. Looking at the circuit diagram you will notice that the ‘Trigger’ pin (2) is marked ‘HIGH probe’, despite being triggered (output goes HIGH) when the voltage drops below 1/3 of the supply voltage and, the ‘Threshold’ pin (6) is marked ‘LOW probe’ while it is ‘reset’ (output goes LOW) when the voltage rises above 2/3 of the supply voltage.
The circuit works as follows:

Three (3) probes are immersed in the vessel. (usually from the top)
One is the ‘GROUND’ probe, going to the level a little lower than the minimum desired level. This is the ‘common’ (or ‘reference’) probe. The LOW and HIGH probes are set at the desired levels.

Now suppose the vessel is EMPTY.
Resistors R2 and R1 (1M) tie the ‘Trigger’ and ‘Threshold’ pins (2 & 6) to the positive (+) rail (supply). In other words, both pins are HIGH. Remember (from above), to make the output of IC1 go HIGH, the trigger pin (2) needs to drop below 1/3 of the supply voltage. (4V with a 12V supply)

Since the trigger pin is still HIGH, the output remains LOW. We need to fill the vessel when IC1’s output is LOW. TR1 is OFF. The GATE of the MOSFET switch (TR2) is connected to the supply rail (+12V) with R4 (10k). TR2 is thus turned on and the pump motor is running.
TR1 (BC547) is connected between the IC1s output (pin 3) and the TR2’s GATE. Its purpose is phase reversal. It means that when IC1’s output is HIGH, TR1 conducts and pulls its collector/TR2’s GATE junction LOW, so TR2 is OFF. Since the pump (or relay coil) is connected between the positive rail (+12V) and TR2’s DRAIN, the pump/relay coil is NOT energized.

Now, back to the condition when the IC1’s output is low, TR2’s GATE is HIGH (+12V) and conducting. The pump is operating and water is being filled. As the water level rises, a water ‘bridge’ is formed between the GROUND (common) probe and the ‘LOW probe’ (Threshold, pin 6) This ‘bridge’ constitutes a low resistance, relative to the high resistance of R2 (1M), bringing the voltage at this pin to a low level (at least below 1/3 supply but actual voltage depend on the conductivity of the water). However, this is IGNORED by IC1 since its output is already LOW (in the ‘reset’ mode).

When the water level reaches the ‘HIGH probe’, a water ‘bridge’ is formed between it and the GROUND probe. Just as with the LOW probe, this ‘bridge’ constitutes a low resistance, relative to the high value of R1 (1M), bringing the trigger voltage to below the required level (1/3 supply voltage) and IC1 triggers, its output going HIGH. Now Tr1 is turned on, the bias voltage/current of TR2 is removed and the pump STOPS. The filling cycle is completed.

As the water level falls, the ‘shorting’ water ‘bridge’ between the GROUND probe and HIGH probe (‘Trigger’, pin 2) is removed and the voltage rises above the 1/3 supply level (+4V).
This is IGNORED by IC1. [This pin needs to drop below 1/3 supply (4V) to trigger IC1. However, as long as the voltage on this pin remains below the trigger level (1/3 of supply), IC1 stays ‘triggered’, its output stays HIGH.] TR1 is conducting and so there is no bias supply to TR2’s GATE and the pump is OFF. Once the water level drops below the LOW probe (‘Threshold’, pin 6), the ‘shorting’ water ‘bridge’ disappears and the voltage rises to 2/3 supply voltage (8V), IC1 ‘resets’. (its output goes LOW)  TR1 is now OFF, having no bias current. Its collector voltage rises to the supply rail and TR2’s GATE is now biased so it is turned on and the pump is operating. This is a new filling cycle.

The circuit will repeat these actions indefinitely, as long as power is applied.

Final Assembly:

Final assembly consist of relay driver and TL power supply  

Components Required:
R1,R2,       1MΩ  Resistor
R3,R4,       10kΩ  Resistor
IC1,            555 Timer
D1,              1N4007
C1,C2,         1.uF Ceramic Capacitor
C3,              100nF Ceramic Capacitor
C4,              100uF/50v Electrolyte Capacitor
TR1,            BC547
TR2,            MTP3055


Thursday, August 19, 2010

Switching Regulator (L296) Power Supply

L296 is a high current switching regulator that can provide up to 4 ampere current and its output voltage range is from 5.1v to 50v. For more information concern its datasheet.

Power supply current can be adjust by changing the value of P1 pot. P2 and P3 pots are used to vary the output voltage. C7-C10 capacitors are used for input voltage filtering whereas C2-C6 are for output voltage filtering purpose. 

Output voltage can be taken across X1-1 and X1-2 terminals or either X1-2 and X1-3 terminals. Note that the maximum input voltage of L296 is 50v so we have to step down ac voltage by using 50v 4amp or appropriate transformer. Don't forget to use heat sink for L296.


Final Assembly:
Components Required:
R1,R3,       10kΩ  Resistor
R2,            15kΩ  Resistor
R4,            3.2kΩ Resistor
R5(R6),     0.1Ω 5watt Resistor
P1-P2,      100kΩ  Pot
P3,            2k Pot
IC1,          L296
D1,           Byw29
D2,           6.8v Zener Diode
B3,           Bridge 5amp or higher
C1,           1.5nF Ceramic Capacitor
C2,           2.2uF/50v Electrolyte Capacitor
C3-C6,     220uF/50v Electrolyte Capacitor
C7-C10,   1000uF/100v Electrolyte Capacitor
C11,          33nF Ceramic Capacitor
C12,          390pF Ceramic Capacitor
C13,          10uF/50v Electrolyte Capacitor
C14,          100nF Ceramic Capacitor
L7,             SFT1240 inductor
Q1,            BC637
mics,          Heat Sink for L296 (optional for bridge rectifier)
                  2-way terminal for input voltage
                  3-way terminal for output voltage

Wednesday, August 18, 2010

Bi-directional DC Motor Control

This simple circuit lets you run a DC motor in clockwise or anti-clockwise direction and stop it using a single switch. It provides a constant voltage for proper operation of the motor. The glowing of D1 through D3 indicates that the motor is in stop, forward rotation and reverse conditions, respectively.

Timer IC2 is wired as a monostable multivibrator to avoid false triggering of the motor while pressing switch SW1. Its time period is approximately 500 milliseconds (ms).

Suppose, initially, the circuit is in reset condition with Q0 output of IC1 being high. Since Q1 and Q3 outputs of IC1 are low, the outputs of IC3 and IC4 are high and the motor doesn’t rotate. D1 glows to indicate that the motor is in stop condition.

When you momentarily press switch SW1, timer 555 (IC2) provides a pulse to decade counter CD4017 (IC1), which advances its output by one and its high state shifts from Q0 to Q1. When Q1 goes high, the output of IC4 at pin 3 goes low, so the motor starts running in clockwise (forward) direction. D2 glows to indicate that the motor is running in forward direction.

Now if you press SW1 again, the high output of IC1 shifts from Q1 to Q2. The low Q1 output of IC2 makes pin 3 of IC4 high and the motor doesn’t rotate. D1 glows (via diode D2) to indicate that the motor is in stop condition.

Pressing switch SW1 once again shifts the high output of IC1 from Q2 to Q3. The high Q3 output of IC1 makes pin 3 of IC3 low and the motor starts running in anti-clockwise (reverse) direction. D3 glows to indicate that the motor is running in reverse direction.

If you press SW1 again, the high output of IC1 shifts from Q3 to Q4. Since Q4 is connected to reset pin 15, it resets decade counter CD4017 and its Q0 output goes high, so the motor does not rotate. D1 glows via diode D1 to indicate that the motor is in stop condition. Thereafter, the cycle repeats.


Final Assembly:

Components Required:
R1,            10kΩ  Resistor
R2,            47kΩ  Resistor
R3-R5,      330Ω (or 680) Resistor
R6-R7,      10kΩ  Resistor
IC1,           CD4017
IC2-IC4,   555 Timer
D1-D3,      LEDs
D4-D5,     1N4007 Diode
C1,           100nF Ceramic Capacitor
C2,           10uF/25v Electrolyte Capacitor
MT1,        DC Motor
SW1,        Push Button
B1,           9v Battery

Logic Probe

This Logic Probe is a low cost circuit analysis and troubleshooting tool for digital circuits like; microprocessor, and microcontroller circuits. The Seven Segment LED (Light Emitting Diode) display will visually show the binary state ("H" for Hi) and ("L" for Low) of the target digital, microcontroller, and microprocessor circuit under test or analysis. 

When the voltage is 2v or less than 2v it will indicate L. And high range is from 3v to source supply.


Components Required:

R1-R2,   1kΩ  Resistor
RP1,       330Ω Resistor Bank
DS1,       Seven Segment CA
IC1,        74ls04
B1,          5v Battery (Error in schematic voltage)

Tuesday, August 17, 2010


Square, sine and triangle waves are produced using an LM348 and passive components. The LM348 is a quad operational amplifier IC package; that is, it contains four separate opamps all in the one IC. They are marked A, B, C & D in the schematic diagram.

Square Wave:
One opamp (LM348:D) is used. The voltage level to pin 13 is set by the resistor divider pair R1 and R2. The input to pin 12 depends on two things; firstly the potential of pin 14, and secondly, the voltage output of opamp C at pin 8. When the input at pin 13 is higher than the input at pin 12 the output goes low. If it is lower then the output goes high. Switching back and forth between the two states causes a square wave to be produced. The time constant (R4+R5)C2 determines the frequency.

Triangle Wave:
You can also consider that opamp D is set up as a bidirectional threshold detector with positive feedback provided by R3. R3 also gives hysteresis. The output provides a bias which tends to keep it in its existing state before allowing switching to take place. The inverting input is set up at about half the opamp output swing voltage by resistors R1 and R2. Accordingly the signal required from opamp C to cause switching is offset from this midpoint voltage by R11/(R11+R3) which is approximately2/3 the voltage from midpoint to swing limit and is symmetrical above and below the switching point.

Opamp C is set up as an integrator. It performs the mathematical operation of integration with respect to time. For a constant input the output is a constant multiplied by the elapsed time, that is, the output is a ramp. Since the input signal goes to the inverting input, a high input will produce a ramp down and a low input will produce a ramp up. The input signal is a square wave symmetrical about the midpoint potential. The current this potential produces through R4 and R5 is constant so the up and down ramps are of equal gradient and the resultant triangular wave is symmetrical. Any increase in the trimpot R5 reduces the current and the integration constant which lowers the gradient of the ramp. The switching levels havenot changed so the frequency reduces while the amplitude remains constant. In a similar way the current depends on the value of integration capacitor. Accordingly the integration constant and hence the frequency vary with the value of the capacitor. (Higher value, lower frequency since the capacitor takes longer to charge.) If C2, for example, is increased to say 680nF then the minimum frequency will be less than 1Hz. The output triangle wave does not require amplification but it does require buffering so that that loading does not affect the waveform generator circuit. It is buffered here with opamp A connected as a unity gain buffer. Unity gain is achieved by directly coupling back the output to the inverting input.

Sine Wave:
A pseudo or imitation sine wave is produced by a wave shaping circuit. A diode is a non-linear device. As the potential difference across it increases the current rises in the characteristic way published in all textbooks. This circuit 'joins together' this characteristic curve to produce an approximation to a sine wave. Two diodes have been joined together as a series pair in order to provide a higher amplitude than would be obtained using only a single diode. The shape of the pseudo sine wave could be improved at any particular frequency by filtering, but filtering will cause distortion at lower frequencies and loss of amplitude at higher frequencies. You can have perfect sine waves at particular frequencies by switching in appropriate filters at those frequencies. 

The sine wave is sensitive to loading and must be buffered. It is also low in amplitude and needs amplification. R9 & R10 set the gain of opamp B by forming a voltage divider between the source and the output. If the wave shaper voltage is 1 volt higher than the reference (at the non-inverting input) the opamp reduces the output voltage until the inverting input voltage set by the divider is equal to the non-inverting voltage. The ratio of the values of R10 to R9 give the gain. The gain here is about 2.


Final Assembly:

Components Required:

R4,   560Ω  Resistor
R7,   820Ω  Resistor
R8,   1kΩ  Resistor
R11,   8.2kΩ  Resistor
R6,   10kΩ  Resistor
R3,   15kΩ  Resistor
R1,   82kΩ  Resistor
R2,   100kΩ  Resistor
R9,   470kΩ  Resistor
R10,   1MΩ  Resistor
R5,   1MΩ  variable Resistor
D1-D4,   1N4004 Diode
IC1,    lm348
C1-C2,  47n ceramic capacitor

Monday, August 16, 2010

White LED Flood Lamp

The circuit is too simple and energy saving design. Its current consumption is practically nil but can provide light like a 20 watt CFL lamp.

The circuit uses capacitive reactance to drop high volt AC to low volt AC. This reduces power loss due to heat dissipation. The value of the AC capacitor can be calculated using the formula X c= 1/ (2 π f C) where, Xc is the reactance in ohms, C the capacitance in farads and f the mains frequency. Xc = Vrms / I where Vrms is the input voltage and I is the current flowing through LEDs. The low volt AC (around 100 volts) dropped by C1 is then rectified by a full wave rectifier formed of D1-D4.

Capacitor C2 act as a ripple remover and buffer. Zener diode ZD regulates DC to 68 volts and prevents excess reverse voltage across the LEDs during the negative half cycles.R1 is a must in the circuit to bleed the stored current from C1 when the circuit in unplugged. C1 can store more than 400 volts for many days if R1 is not connected.

Note! Do not touch any points or trouble shoot when the circuit is connected to mains.


Components Required:

R1,   470KΩ  Resistor 
R2,   100Ω  1w Resistor  
C1,    225k, 400v capacitor 
C2,    1000uF, 100v electrolyte capacitor  
BR1,   1N4007 Diodes or bridge
D2-D21,   ultra bright white LEDs 
D1,   68v 1w Zener Diode