Sei sulla pagina 1di 4

Circuit 61 4 Light levels Function As light levels progressively increase, 4 LEDs, green, blue, red, and amber will

l light in sequence. Circuit diagram

SW 1
V R 2 13
LED

9V

4 14

R 8

12 +
R 4

R 5

LED

R 7

10 + R 3

6 5 +

R 6 7

LED

R 2 V R 1 2 3

R 9

LED

+
11
0V

R 1

Components SW1 = Toggle switch R2 = 10k ohm R4 = 10k ohm R6 = 470 ohm R8 = 470 ohm VR1 = 10k ohm LED = 5mm Standard LED R1 = 10k ohm R3 = 10k ohm R5 = LDR R7 = 470 ohm R9 = 470 ohm VR2 = 22k ohm IC1 = 324 (Op-amp)

Operation The LM 324 CHIP contains 4 individual op amps configured as comparators. Operation of a comparator is as follows. When the voltage at + pin is less than the voltage at pin, the output is 0V (low). When voltage at + pin is more than the voltage at - pin, output is (high). Pin outs for the 4 op amps areas follows. OP AMP 1 + INPUT PIN 3 -INPUT PIN 2 OUT PUT PIN 1 OP AMP 2 +INPUT PIN 5 -INPUT PIN 6 OUTPUT PIN 7 OP AMP 3 +INPUT PIN 10 -INPUT PIN 9 OUTPUT PIN 8 OP AMP 4 + INPUT PIN 12 - INPUT PIN 13 OUTPUT PIN 14 The resistor network R1, R2, R3, R4, and VR2 form a voltage divider circuit. For ease of explanation, assume VR2 has been set at 10k ohm. Thus the voltage drops across each resistor will be equal. With input voltage=9V. Thus voltage at top of R1=1.8V (connected to +pin op amp 1). Voltage at top of R2=3.6V (connected to + pin op amp 2). Voltage at top of R3=5.4V (connected to + pin op amp 3) Voltage at top of R4=7.2V (connected to + pin op amp 4). Consider now the LDR (R5) and VR1 in series. They also form a voltage divider circuit.

Remember as the light increases the resistance of the LDR decreases. Thus in dark conditions, the voltage drop across the LDR will be large, so voltage at the junction of LDR and VR1 will be small. Again for ease of explanation, I am going to select hypothetical values of voltages and light ranges. Suppose that in dark conditions the voltage at the top of VR1 is 1.6V. This voltage is applied to all the negative pins of the 4 amplifiers. Consider op amp 1. Voltage on + pin =1.8V Voltage on - pin =1.6V Output (pin 1) is high This is connected via R9 to the cathode of the green LED. The anode of this LED is connected to the top rail (9V), so with output pin high the green LED is unlit. Consider now op amp 2 Voltage - input=1.6V Voltage + input=3.6 V Again output of op amp 2 is high, therefore the blue LED is unlit. Also output of op amp 3 is high, this is connected via R7 to red LED, therefore red LED is unlit. And finally, output of op amp 4 is high, connected via R8 to yellow LED. Therefore yellow LED is also unlit. Consider a hypothetical increase in light level, resistance of LDR falls, so voltage at junction of LDR and VRI increases, to say 3V. This voltage is applied to all Negative inputs. Consider now op amp 1 Positive input=1.8V Negative input=3V The output of op amp now falls to 0V, current can now flow from the top rail through the green LED, and into the op amp. The green LED is now lit.

Consider op amp 2 Negative input =3V Positive input =3.6V, output is still high similarly, outputs of op amps 3 and 4 outputs are high, so LEDs blue, red, and yellow are all unlit. Thus as light increases, the resistance of the LDR will continue to fall. Thus the voltage drop across it will continue to fall and thus the voltage at the top of VR1 will increase and so the output of the op amps will progressively drop to 0V until all LEDs are lit. By adjustment of VR1 the light level at which the first led can be switched on is set. By adjustment of VR2 the range of light levels at which the progressive LEDs will switch on can be set. Note It is most important an LED must have no more than 2 volts dropped across it. Also the current flowing through should not exceed 20mA. When output pins of op amps drop to 0V, voltage on the top rail is 9V, 7V must be dropped across R6, R7, R8, and R9. With 7V dropped across it, and max permissible current flowing through it of 20mA the size of the resistor can be calculated using OHMS LAW. R6=7/0.020 =350ohms (Also R7, R8, and R9). In electronic circuits it is not good policy to have components operating on their top limits, so a resistor value of 390 or 470 ohms should be used. Remember the larger the value of resistor, the less current is drawn from the battery, so the battery will last longer at the expense of LED being a little dimmer.

Potrebbero piacerti anche