Dark Sensor LDR Circuit

Discussion in 'Homework Help' started by Rip, Apr 28, 2016.

1. Rip Thread Starter New Member

Apr 28, 2016
12
0
How would I go about designing a dark sensor circuit using an LDR and transistors? The LDR value for light is around 7k ohms and when its dark it is around 1M ohm. The transistors are 2N3904. The circuit has a 5V buzzer and a 2V (10mA) LED. The circuit should work as follows: when there is sufficient light falling on the LDR, the transistor should be in saturation and the LED should be lit and when there is not sufficient light falling on the LDR then that transistor is in cutoff and the LED is not lit and the buzzer should sound. How would I go about designing this circuit? Any help is greatly appreciated

2. Marley Member

Apr 4, 2016
144
40
You have correctly stated how the resistance of the LDR changes with light level. So, if you make a potential divider with the LDR and a fixed resistor what will the divided voltage do?

Does your transistor circuit need to sound the buzzer when this voltage is high or low? Is you transistor circuit inverting or non-inverting?

Homework, so better not say more!

3. Rip Thread Starter New Member

Apr 28, 2016
12
0
I'm having trouble designing my alarm circuit. I can get the buzzer to sound when there is not sufficient light, but the LED stays on and I can not figure out how to design the circuit to make the LED shut off when there is not sufficient light. The LDR value for light is around 7k ohms and when its dark it is around 1M ohm. The transistors are 2N3904. The circuit has a 5V buzzer and a 2V (10mA) LED. The circuit should work as follows: when there is sufficient light falling on the LDR, the transistor should be in saturation and the LED should be lit and when there is not sufficient light falling on the LDR then that transistor is in cutoff and the LED is not lit and the buzzer should sound.

Attached is a picture that shows the general design of what I'm doing. The differences are that I am using a 9V source, the LED is right below R1 and the buzzer is where the LED is. The resistor R4 is not in my circuit and R3 is 300k ohms. How can I design this circuit to get the LED to shut off when there is not sufficient light and the buzzer to sound?

File size:
72.1 KB
Views:
9

Apr 5, 2008
15,648
2,346
Hello,

Bertus

5. Rip Thread Starter New Member

Apr 28, 2016
12
0
it shouldn't be in homework help, so if you could please move it. That would be greatly appreciated

6. tracecom AAC Fanatic!

Apr 16, 2010
3,869
1,393
Schematic diagrams are the language of electronics. Make a drawing of what you have built. Hand drawn is okay. Use the drawing you posted in #3 as a reference of how to draw your circuit. There are lots of people who will be happy to help.

Rip likes this.
7. Rip Thread Starter New Member

Apr 28, 2016
12
0
Attached is a copy of the circuit.

File size:
68.5 KB
Views:
9
8. tracecom AAC Fanatic!

Apr 16, 2010
3,869
1,393
Good schematic. Move the resistor and the LED to be parallel with the buzzer. In other words, move the cathode of the LED to the collector of Q2.

9. tracecom AAC Fanatic!

Apr 16, 2010
3,869
1,393
Sorry, I reread your first post. You want the LED to light when it's light and the buzzer to sound in the dark. Correct?

10. Rip Thread Starter New Member

Apr 28, 2016
12
0
Yes, you would be correct

11. Jony130 AAC Fanatic!

Feb 17, 2009
3,957
1,097
Try this circuit

R1 < 100kΩ
Or try your old circuit but you need to replace the 300kΩ resistor with a lower one (lower then 100kΩ). If that want help, try add a resistor in parallel with the LED.

Last edited: May 2, 2016
12. Rip Thread Starter New Member

Apr 28, 2016
12
0
I just tried both of your ways and I could not get it to work. My question is why did you add the 1M ohm resistor R6 to the circuit?

13. Rip Thread Starter New Member

Apr 28, 2016
12
0
Now when I go back to my original design the alarm and LED are both on when the light is on and also when it is off

14. tracecom AAC Fanatic!

Apr 16, 2010
3,869
1,393
Here's a circuit that works even though it is not a good engineering design. Its major attribute is that it's cheap.

15. Rip Thread Starter New Member

Apr 28, 2016
12
0
I just tried the circuit, but it seems to light the LED and it stays on, but the buzzer doesn't sound. Ill mess around with the resistors and see what happens. Thanks for the help

16. Jony130 AAC Fanatic!

Feb 17, 2009
3,957
1,097
But did you try "my circuit"?
This resistor adds some positive feedback (hysteresis), in order to "force" the circuit to work as a bistable circuit (T1 ON -->T2--OFF and vice versa).
The lower the valuer the larger the hysteresis.

EDIT And from what I see you need R1 < 10kΩ (instead 300kΩ)

Last edited: May 2, 2016
17. Rip Thread Starter New Member

Apr 28, 2016
12
0
well I tried your circuit and the LED lights up and the buzzer sounds, no matter if its light or dark. Any suggestions?

18. tracecom AAC Fanatic!

Apr 16, 2010
3,869
1,393
What buzzer are you using and are you sure you have the polarity correct?

19. Rip Thread Starter New Member

Apr 28, 2016
12
0
I'm pretty sure the polarity is right. I do also have 2N3906 transistors, if that could help in any way. The buzzers are sold on amazon and are:
12mm Dia 5 Pcs DC 5V 2 Terminals Electronic Continuous Sound Buzzer
Brand Name Amico
Material Type Plastic
Part Number s14070200am6908
UNSPSC Code 39121432

Last edited: May 2, 2016
20. tracecom AAC Fanatic!

Apr 16, 2010
3,869
1,393
I don't actually have the buzzer you used, so I simply connected a second LED and 1k resistor instead of the buzzer, and the circuit works just as I posted it. So, why doesn't it work for you? Here are some possibilities.

wiring error
erroneous pinout used for Q1, Q2
buzzer connected with reverse polarity
buzzer burner out because it is rated for 5v and you are running it at 9v
buzzer draws more current that Q2 can supply