Darkness sensor circuit with LED that acts as a pseudo-alarm clock. How to make a schematic for this kind of circuit?

Thread Starter

quantumcircuits456

Joined Nov 22, 2019
3
So i need to make a schematic of a darkness sensor circuit with one additional feature. And that additional feature is the triggering of a sound by a buzzer when the LED is not lit. And this buzzer can be manually switched off by the user. So how do i go about this? I planned for my circuit to look something like the one this user had posted https://forum.allaboutcircuits.com/threads/dark-sensor-ldr-circuit.123567/

So my question is, how could i modify this person's schematic to what i am looking for? I need the LED to light up in the dark and the buzzer to trigger when it's bright. The buzzer needs to be able to be switched off manually.

Thanks in advance.
 

Reloadron

Joined Jan 15, 2015
7,501
There is no shortage of ways to go about doing this. The linked circuit is just a transistor version. Once you know the Light and Dark resistances of your sensor, assuming a CDS photocell or LDR (Light Dependent Resistor) you build around that. A big part of all of this is understanding how the circuit you choose works. Just let the circuit drive a simple little inexpensive SPDT (Single Pole Double Throw) relay. The relay can be energized in Light or Dark, however you want. Configure the NO (Normally Open) and NC (Normally Closed) relay contacts to do what you wish. The LED on one contact and audible on the other contact. Place a switch inline with the audible to turn it On/Off when that line is active. You could also drive the buzzer through an additional latching circuit. A Google of "Transistor Photocell Circuits" will bring up a few dozen examples. In most basic circuits swapping the position of the LDR and series resistor will change the circuit from a light to dark sensing circuit. many of the circuits in the link have a relay so that is about all you need. Again, the trick is understanding how the circuits work.

Ron
 

Thread Starter

quantumcircuits456

Joined Nov 22, 2019
3
Sorry Ron. I just started my degree so I'm still new to circuits. I have no idea of most of the things you just said. I dont really know what are things like relay. I just need to do a simple circuit for my assignment (and i can just take one schematic from online). I try not to overcomplicate things now.

Btw, i saw one user in the thread has something what i am looking for. Here's the link to the specific comment.
https://forum.allaboutcircuits.com/threads/dark-sensor-ldr-circuit.123567/
Could someone explain to me exactly what the function of the two transistors are? I know in general transistors either work as amplifiers or switches. But my knowledge in transistors is not so good. So if anyone can explain their purpose in this particular schematic, please tell me.
 

SamR

Joined Mar 19, 2019
5,031
I wish I had made notes. I recently came across a circuit using 2 red LEDs as a V Source to drive a MOSFET gate to turn it on. LEDs produce very little current when exposed to light but ~1.4V and w/ 2 in series? was enough to switch a MOSFET on. First time I saw LED used instead of LDR or PhotoTransistor for a light sensor. Neat trick. Probably somewhere in UTube...

Break it down.
Light sensor. On or Off when dark?
Alarm on light or dark.
What does buzzer do? On when light or dark?
Acknowledge alarm. How to turn alarm off. Auto-reset for alarm?
 
Last edited:

Reloadron

Joined Jan 15, 2015
7,501
Just for the sake of keeping things simple. Here is a very basic two transistor LDR circuit.

LDR Circuit.png

Most LDRs (photocells) decrease resistance with more light striking them. So above R1 and LDR form a series voltage divider circuit. The junction of LDR and R1 is a voltage which will vary based on the light striking the LDR. As LDR resistance decreases the voltage on the base of the first transistor will do what? R1 has a fixed value so as light increases on the LDR what will happen to the voltage on the base of the first transistor? Both transistors in the circuit are just common switching transistors like a 2N2222 or 2N3904. When the first transistor is Off (not conducting any current) R2 pulls the base of the second transistor high turning it on and actually saturated. When that second transistor is On the relay coil is energized and the relay NO contact is closed lighting the LED. R1 could be changed to a variable resistor to change the Light/Dark sensitivity or simply put how much light or dark is light or dark enough to torn the first transistor On or Off? The transistors merely act as switches in this sort of circuit. As I mentioned earlier R1 and the LDR can have their positions reversed. Think about it.

If this is a schoolwork assignment it belongs in a different forum section.

Ron
 

dl324

Joined Mar 30, 2015
16,839
I need the LED to light up in the dark and the buzzer to trigger when it's bright. The buzzer needs to be able to be switched off manually.
If you use a comparator instead of a transistor for threshold detection, you'll have fewer problems with jitter at the trip voltage. Comparators will still have this problem, but it's easier to add hysteresis.
 

Reloadron

Joined Jan 15, 2015
7,501
If you like the Forest M. Mims III circuits he also has circuits using a comparator type design. This is what dl324 is getting at above. While the transistor circuits do work they do have the mentioned drawback. When a circuit, for example, is dark activated there can be a small twilight region where the circuit may begin to oscillate. The way to avoid this is with a comparator circuit using feedback to create what we call "hysteresis". There are also plain comparator circuits in several of Forest M. Mims III notebooks. Here is an example starting on page 32. While he uses a 741 Op Amp a better choice would be a LM339 comparator but keep in mind these booklets gpo back to the 1980s and early 1990s. The chip technology has come a long way.

Ron
 

Dodgydave

Joined Jun 22, 2012
11,284
Here is one using a 555 as a comparator, led comes on in darkness, you can put your buzzer on pins 3 and 8, so when it senses daylight led goes off and buzzer sounds.



713d747a4aad4baf30795a106c101463.png
 
Top