Design Article
Comment
yo3hcv
I've built this circuit with LM2903 comp and MCP1700-1.8 as reference (both from ...
anonymous user
Simple night-light uses a photoresistor to detect dusk
Chau Tran, Analog Devices, Malden, MA; Edited by Paul Rako and Fran Granville
12/15/2011 11:00 AM EST
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.

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.
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.
Navigate to related information


WKetel
12/17/2011 10:04 AM EST
A much simpler circuit would use a two transistor schmitt trigger circuit with the relay in the collector circuit of the 2N3904 second transistor, and a high-HFE transistor like the MPSA13 as the input transistor. It would only need the 2 active devices and five or 6 resistors. Of course, it would need a capacitor or 2 as well, to slow things down.
Sign in to Reply
yo3hcv
10/3/2012 8:44 AM EDT
I've built this circuit with LM2903 comp and MCP1700-1.8 as reference (both from junkbox) and those two costs about 0.5 pounds compared to 2 pounds on AD8214. But this circuit may still be attractive for 65V supply and integrated reference, saving PCB space.
Sign in to Reply
anonymous user
12/19/2011 3:51 AM EST
The suggestion to use a latching relay is not supported by the circuit. To turn a latching relay off you have to reverse the current in the coil or activate a reset coil ( depending on type ). Most people would use a MOSFET to control the lamp/load.
Sign in to Reply
da_in1
12/19/2011 1:10 PM EST
Might want to add a bit of positive feedback around A1 to avoid "chattering" as the comparator A1 is near its switch point. That will avoid an on/off/on/off .. sequence happening just at dusk.
Sign in to Reply
da_in1
12/19/2011 1:28 PM EST
VPS appears to drive the LED directly - perhaps that 10K resistor really is supposed to be in series with the LED ....
Sign in to Reply
anonymous user
12/19/2011 2:45 PM EST
Am I the only finding it strange that every pin of A1 is connected to other pins? That also short circuits the battery.
Sign in to Reply
vandamme
12/19/2011 9:29 PM EST
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.
Sign in to Reply
vandamme
12/19/2011 9:29 PM EST
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.
Sign in to Reply
anonymous user
12/21/2011 3:09 AM EST
Lm393 should do fine.
It took me a while to figure out that the line shorting the connections is the IC outline.
Sign in to Reply
anonymous user
12/22/2011 10:03 AM EST
Edited by Paul Rako and Fran Granville REALLY??
the input of a1 is short!
the 10K attached to Battery is WRONG! and more!!!
Sign in to Reply