Continue to Site

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.

  • 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.

Help: Need Right Light Sensor

Status
Not open for further replies.

DragonKry255

New Member
I am only a beginner in electronics, so I don't know much about light sensing. I need the correct light sensor for the following environment: the area needing to be sensed is about 1/2-1 foot away, there is a reasonable amount of ambient light reflecting onto the surface. When lit, it is noticeably but only somewhat brighter than its unlit state. Do I use a plain photoresistor with a tube to avoid ambient light, or something else?
 
How about a very simple LDR (light dependent resistor). Putting it in a simple potential divider you would see the output voltage changing as the illumination changes. Then, if you wanted, a voltage comparator could be used to determine a threshold for switching on an indicator LED.

Does that help?
 
You kinda lost me. Are you saying use a simple photoresistor and there will always be voltage but the comparator will determine how much is needed to light the LED?
 
Am I correct in thinking this is your problem?

Light source ---- (distance is 1 foot ish)----- SENSOR -> Indicator (LED for example)

Under ambient conditions (light source off) the LED is unlit.
When light source switches on, sensor detects light being greater than the ambience and LED is lit.

Just a side note, what power is your light source? 1 foot is 30cm and in normal daylight you may struggle to register a difference between light source and the sunlight.
 
I believe you want a circuit similar to the attached using a comparator. The attached image was taken from here. Give the link a read down to the attached circuit and try to understand what is going on with the circuit(s).

That should get you started. Note there are actually 2 circuits, one works on dark and the other light. Keep in mind how to modify the circuits for what you want to do. Remember, this is a rough idea.

Ron
 

Attachments

  • Photo Cell CDS.GIF
    Photo Cell CDS.GIF
    4.7 KB · Views: 268
MIMSAR, that is my situation and thank you, Reloadron. Now here is what I will do: I will sample the amount of voltage running through a test circuit when the source is unlit, raise the number slightly, and try to mimic that using resistors on my actual circuit. The comparator will be hooked up to that mimication and the photoresistor. Then it should acurateley detect when the source is lit, right?
 
Last edited:
Yes, if I read you correctly. If you look at the comparator circuit you will see a pair of 10K resistors set up as a voltage divider with the center going to either the + or - input of the comparator chip. The + or - input determines if the output is active above or below a light level. The divider output voltage is the reference voltage the circuit will toggle to. So we could actually place a potentiometer in place of those 2 resistors with the wiper going to the + or - input of the chip. Then we could adjust the reference voltage to our comparator. The Photocell or LDR is also acting as part of another divider providing a level of voltage to the comparator based on light falling on the LDR. I am sure you get the idea. Remember the linked to circuits are only to provide some ideas.

Also, in the link, read a little about "hysteresis". That will figure into things.

Ron
 
Thanks, guys. Too bad Radio Shack doesn't have any LM311 single comparators. Only 339 quads.

Yes but they are cheap enough so use 1/4 of a quad, the LM339 contains 4 comparators and nothing says you need to use all 4. I think Radio Shack also sells pretty cheap LDR photo cells too. Radio Shack isn't the parts house it once was but they still have a few cool things.

Ron
 
Ok. Another question: what's with the supply pins on the duals and quads (Vcc and Vdd)? On the quad, they lead to only two of the four, but on the dual, they lead nowhere.
**broken link removed**

**broken link removed**

And why is the LED going to the comparator from the positive instead of to the negative from the comparator in this image?

**broken link removed**
 
Supply and GND actually are fully distributed. You are only looking at a representation. Just how things are sometimes drawn. Any amp in a dual or quad can be used independent of the others.

Ron
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top