Simple night-light uses a photoresistor to detect dusk
You can adjust this battery-powered circuit for different levels.
Chau Tran, Analog Devices, Malden, MA; Edited by Paul Rako and Fran Granville -- EDN, December 15, 2011
Streetlights, emergency lights, and security lights must automatically turn on when it gets dark. You base the control circuit on the resistance of a photoresistor or another LDR (light-dependent resistor) that varies with light intensity. An LDR’s resistance of several megohms in darkness decreases to a few hundred ohms in bright light (Figure 1). This feature allows a circuit to distinguish between one light bulb and two, direct sunlight or total darkness, or anything in between.
You can use an LDR in a circuit that
detects darkness and turns on an LED
(Figure 2). The circuit uses a high-voltage
threshold-detector IC that features
a current output and operates as a
comparator. The LDR and potentiometer
R3 form one side of a Wheatstone
bridge. Fixed resistors R1 and R2 form
the other side. You can operate the circuit
from a 5 to 65V battery because
the bridge excitation comes from an
on-chip 2.4V series regulator that is
referenced to the supply voltage. The
chip keeps the 2.4V regulation voltage
below the supply voltage. Resistors R1
and R2 form a fixed reference voltage
at the noninverting input of internal
comparator A1. The LDR and R3 form
a variable voltage at the inverting input.
When the light level falls, the voltage
on the inverting input falls below the
reference voltage until the comparator
trips, activating the relay and the LED.
The total voltage across the resistors is always 2.4V. Choose the values for
these resistors based on your desired
threshold voltage using the equation
VTH=−2.4×(R1/(R1+R2))=−2.4×(LDR/
(R3+LDR)), where VTH is the threshold
voltage.
You can reverse the position of the
LDR and potentiometer R3 to switch on
the relay when the light exceeds a preset
level. You can adjust the potentiometer
to preset the switch to any light level,
making it an ideal light sensor. The IC’s
output current is less than 100 nA when
the negative pin’s value is greater than
that of the positive pin. The output
current goes to 1 mA when the positive
pin’s value is greater than that of
the negative pin.
This current drives a
ground-referenced resistor to develop
a logic-level signal at DOUT. The logic
signal is buffered with the NPN transistor
that then drives relay switch S1.
You should use a latching relay, which
uses permanent magnets to hold the
armature in place after the drive current
is removed.
This current drives a
ground-referenced resistor to develop
a logic-level signal at DOUT. The logic
signal is buffered with the NPN transistor
that then drives relay switch S1.
You should use a latching relay, which
uses permanent magnets to hold the
armature in place after the drive current
is removed.When you turn on the LED, the resistance of the LDR may decrease dramatically, and the comparator will switch off, cutting back the output current to nanoamps while the latching relay keeps the light on.
Talkback
-
Edited by Paul Rako and Fran Granville REALLY??
the input of a1 is short!
the 10K attached to Battery is WRONG! and more!!!
Dov Rossitzan - 2011-22-12 07:03:47 PST -
Lm393 should do fine.
It took me a while to figure out that the line shorting the connections is the IC outline.
A. Haider - 2011-21-12 00:09:46 PST -
the 8214 has built in hysteresis, but costs a buck and a half so I'll go with the comparator in my junk box, LM339. And, sorry, nobody likes your output circuit but we'll figure it out.
Jim Van Damme - 2011-19-12 18:29:47 PST -
the 8214 has built in hysteresis, but costs a buck and a half so I'll go with the comparator in my junk box, LM339. And, sorry, nobody likes your output circuit but we'll figure it out.
Jim Van Damme - 2011-19-12 18:29:44 PST -
Am I the only finding it strange that every pin of A1 is connected to other pins? That also short circuits the battery.
Petri Pihkala - 2011-19-12 11:45:38 PST






















