LED activated by LDR

Oct 03, 2009 7 Replies

Let's say I have a circuit like this:



formatting link



When I shine the LDR, the LED instead of having only 2 states (on or off), it lights up kind of proportonally to the amount of light I put on the LDR (from weak to fully lit). I know this is how the transistor works, but What can I do to make the LED either light up fully or not? I know I could use a relay (to act as a switch), but I'm pretty sure that would be overkill. Is there another component or circuit configuration that I could use? As you might have guessed I'm pretty newbie in electronics.



Thank you for your help, HEMOglobina


You could use a second transistor to increase the gain of the circuit, or add a hysteresis resistor so that when the transistor switches on, it pulls itself further on.

You could, more or less, duplicate the circuit to make it a differential amp, or comparator.

+9V +9V | | .-. .-. | | | | | | | | +9V '-' '-' | ^ | + .-/ | | |/| V -> | / | - | +9V /'-' | + | | |/ \\| .-. +---------| |--------| | | |> As you might have guessed I'm pretty newbie in electronics.

That's why this group is named sci.electronics.basics.

You'll need the second transistor if you want to give the thing positive feedback.

You'll use less circuit board area if you just use a comparator, with suitable hysteresis to make sure things stay on. They can be had with enough capacity to drive an LED.

You may even be able to use a tiny logic schmitt trigger -- it's easy to find one that'll pull 5mA, that's visible indoors with an old round red through-hole LED, and downright painful with a new high-intensity 0603 surface-mount LED.

www.wescottdesign.com

--- Yes, use a comparator: (View in Courier)

+9V>---------+----+----------+------------+ | | | | | | | [3600] [LDR] | | | | | +---|--[1M]--+ | | | | | | | | | | | | [LED] +----|------+--|+\\ | |K | | | >------+---+ | [POT]-+ GND>---------+----+----------+---|-/U1B SPARE

With the LDR in ambient light, adjust the pot so the LED goes out and then crank it a little bit more in the same direction, maybe 10 degrees or so.

Then when you "shine the LDR" the LED should come on.

The 3600 ohm current limiting resistor is based on a high-efficiency 2mA LED.

If you want to sink more current you can get about 10mA out of one comparator, but it goes out of saturation very quickly after that, which will keep the LED from lighting up.

Alternatively, you could use your transistor to drive the LED, like this:

+9V>---+----+----------+-------+------+ | | | | | | | | [10K] [R] [LDR] | | | | | | +---|----+ | |A | | | | | | [LED] | | | | [1M] | | +----|------+--|+\\ | | C | | | >--+--+----B | [POT]-+-----+ GND>---+----+----------+---|-/U1B SPARE

JF

Oops... The LDR and the 20k are backwards.

They should be like this:

+9V>---------+----+----------+------------+ | | | | | | | [3600] [20k] | | | | | +---|--[1M]--+ | | | | | | | | | | | | [LED] +----|------+--|+\\ | |K | | | >------+---+ | [POT]-+ GND>---------+----+----------+---|-/U1B SPARE

For the transistor output circuit they're OK the way they're shown.

JF

You need a hysteresis circuit..

that would be a comparator type circuit with a (+) feed back to slightly offset the trigger point of the (-) input when switched.

I got there without trying.

I made a linear on at dusk off at dawn circuit. I figured the LEDs wouldn't matter too much - constant current device powering constant voltage drop device - what could go wrong?

Three transistors - two for constant current and two for light sensing (using the pass transistor for both functions).

Turns out the simple current load of 100 milliamps was dropping my supply voltage by 2 tenths of a volt. Instant hysteresis! Once it came on, the lower supply voltage turned in on harder, It had to get really light to turn it off again.

Synergy . . .

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required