• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Simple Light/dark sensitive LDR to LED Activator Circuit

alexs415

New Member
Hey,

I need a simple circuit that can activate an LED from a Light Detecting Resistor(LDR). The main problem is i need the LDR to be up to 40feet away on a cable and to be able to activate the LED preferably inside a small box from that distance. I also need this all to run off 12v-dc.

To be honest i'm not that clued up, so the specifications/modelno. of resistors and components that can be purchased off RS would be a great help.

Many Thanks.

Alex
 

Reloadron

Well-Known Member
Most Helpful Member
Hi Alex and welcome to the ETO Forums.

Not a difficult task. I would suggest you start reading this link and as you scroll down the page you will see a few examples of photocell circuits. That should make for a good start.

Ron
 

MikeMl

Well-Known Member
Most Helpful Member
You want the LED on when it is dark, or in sunlight?
 

alexs415

New Member
Thanks for the replys.

So this looks like a simple one.



I just had a look at the LM339 on RS. Does this have 4 comparators built in then?

Regarding the LDR being on a cable up to 40feet away does this affect the circuit? What LDR should i use? and what would the value of R1 be?

Thanks
 

MikeMl

Well-Known Member
Most Helpful Member
You didn't answer my question.

R1 should be whatever resistance the photocell (R2) is with the amount of illumination halfway between light and dark.

I suggest you buy these, hook one to an Ohmmeter at Dawn or Dusk, and then make R1 that resistance.
 

Reloadron

Well-Known Member
Most Helpful Member
The image you posted from the link is actually two circuits. One circuit (Circuit A) the LED is off when when the photocell is dark, The other circuit (Circuit B) the LED is on when the photocell is dark. Resistor R2 in both circuits determines at what level of light or dark the circuit responds to. This brings us around to Mike's question. Do you want the led to turn on with light striking the photocell or when the photocell is dark?

Yes, the LM339 contains 4 comparators on a single chip. However, if only a single circuit is needed then a choice like the LM311 (also in the link) would be a better choice.

I suggest a trip to Radio Shack and buy their part number / catalog number 276-1657 which Mike linked to and then try a few basic test as Mike suggest. If you already have a ohmeter then fine, if not you may want to add a cheap digital multimeter to your Radio Shopping list. You don't need a high priced DMM to get started.

So???????????????? Light or Dark???????????? :)

Ron
 

alexs415

New Member
The LED is on when the photocell receives light. I think i need circuit A.

Thanks Mike, that makes sense. I also need the LED to be on/off not gradual.

With regards back to R1, if i used a potentiometer for this would this then change the sensitivity of when the LED is triggered?


Would i also need to use this circuit since im and running 12v dc?



Thanks
 

MikeMl

Well-Known Member
Most Helpful Member
I suggest just measuring the LDR without it being connected to the comparator.

Do you need a relay? If not, circuit A would work.

Since you are remoting the LDR at the end of long twisted pair wire run, I have a couple of suggestions. First, add some hysteresis to the comparator by connecting a 470K resistor between the comparator output pin and the + pin.

Second, I would add an 10uF 20V-50V electrolytic capacitor between the Vdd pin (+12V) and the Vss pin (gnd).

Third, add a 1uF capacitor between the - pin and gnd.
 
Last edited:

Reloadron

Well-Known Member
Most Helpful Member
I think at this point things would go better if you could explain exactly in some detail what you are trying to do? Just light an LED? Energize a relay to do something? Placing a LDR 40 feet or 100 feet up a pole is not a problem. That part is cake. A strict on or off is also not a problem but, to get it right may require some "hysteresis" as was mentioned in the link. Something else to consider is will this project be battery powered? In the last schematic the relay is energized during darkness. That is all well and fine but during darkness that relay will be energized so the relay coil will draw current. That means if this is a battery project that needs considered.

This is why explaining in detail exacxtly where yu want to go with this would make things much easier.

Ron
 

alexs415

New Member
Basically just light an LED. Its to connect the LDR to a cue light from a camcorder at the end of a crane back to where i'm operating from which can be up to 40feet away so i can see when the camera is cued. Its all mains power and the supply is 12v DC. Do you think the first circuit without the transistor would be sufficient with a few of mike's upgrades?
 

Reloadron

Well-Known Member
Most Helpful Member
The first circuit would be just fine. The resistance between the photo-cell with 40 feet (or more) of added wire won't amount to anything. When doing circuits like this I embed the actual photo-cell and soldered leads in some RTD or epoxy for protection. You want the LED on when the light is on so Circuit A would be the choice. Hit Radio Shack and grab a 5 pack of assorted LDRs and follow Mike's instructions. These are pretty forgiving circuits. Since the light is either there or not (no gradual change like daylight to dark) I wouldn't worry about hysteresis. If you use the LM339 (4 comparators) it would be wise to tie the unused inputs to 12 volts or ground (common).

Ron
 

alexs415

New Member
Perfect, Thanks for all your help.

I will give it ago this week and let you know how i get on!

Regards

Alex
 

alexs415

New Member
Hey guys, one last thing. Where should I put a pot if I want to change the sensitivity of when the LED is triggered? Also what value? Thanks again! Alex
 

Reloadron

Well-Known Member
Most Helpful Member
The pot would be per R1 in the first drawing posted. The pot is in series with the photocell and would be the R1 resistor. You want it so R1 is about 2X or 3X the uncovered value of the LDR. Generally, just guessing dependong on the LDR resistance, about a 500 K to 1 M Ohm pot works.

Ron
 

alexs415

New Member
Hey guys,

Just tried it and no luck :(

I think the problem could be the LED I have brought. It's 12v and when connected directly to my power supply it works.

This is the LED i purchased 8mm 12V Panel Mount LEDs with Plastic Bezel : Panel Mount LEDs : Maplin

I have tested the output of the LM311 and the LDR appears to be working. When covered a very low voltages is output. But when lit the output is around 11.7v(would this be enough)? The pot also seems to work in varying the sensitivity of the LDR when looking at the output.

Any ideas?

Thanks

Alex
 

Reloadron

Well-Known Member
Most Helpful Member
The LEDs you linked to are 12 volts with a series limiting resistor built into them. They are actually (from what I read) about 2 volts (fwd voltage) and 30 mA max LEDs. Have you tried just the LED less the series resistor in the drawings? Make sure the LED polarity id correct.

Ron
 

alexs415

New Member
cheers ron,

I will go out and buy some tomorrow.

I think the 500k pot may be a little to much aswell. As you said though it needs to be 2 or 3 times the uncovered state. Im getting a covered value of 100k and an uncovered of as low as 3k, What do you rekon?

Thanks again

Alex
 

Reloadron

Well-Known Member
Most Helpful Member
cheers ron,

I will go out and buy some tomorrow.

I think the 500k pot may be a little to much aswell. As you said though it needs to be 2 or 3 times the uncovered state. Im getting a covered value of 100k and an uncovered of as low as 3k, What do you rekon?

Thanks again

Alex
That sounds like it could be about right depending on the photo cell. I have a few lying here, one is about 1 Meg dark and 10 K in average room light. The other is only 10 K covered and about 250 ohms in light so depending, they can vary quite a bit, especially from a grab bag. The latter has a part number and is a Silonex 5910 which is from this family. So, they can vary quite a bit. IN your case a 10 K pot may be fine.

Ron
 

Reloadron

Well-Known Member
Most Helpful Member
The center (wiper) would go to ground with one side of the pot.

Ron
 

Latest threads

EE World Online Articles

Loading

 
Top