Go Down

Topic: jumping light sensor readings (Read 616 times) previous topic - next topic


Hi, all. I am just starting with Arduino (and electronics)... I am trying to use a light sensor to trigger a flash if laser beam is blocked. Unfortunately, I don't know the model of the light sensor, but it seems to me it is not LDR type, but more like a photovoltaic panel (4x4 mm) - it creates potential difference in proportion to light falled onto the sensor. I checked the sensor with MM - it does respond to light and in the dark it is 0 mV and with the beam is ON - about 390 mV. As I understand the sensor should be plugged into Arduino differently than LDR, and the + side directly into A0 and - (via resistor or not) into Ground. Prior to calibration and without mapping to 0-255, when I watch via Serial Monitor for the sensor values - they vary significantly (without the beam - 38-47, with beam - 68-95).  I also expected the difference with/without beam to be larger assuming I have 1024 points of resolution per 5 Volts.  What do I have wrong? Do I have my light sensor connected properly?
Thanks in advance.
P.S. I don't want to smoothen the readings as I'd like to trigger the flash ASAP after the beam is broken.


Thanks for the reply! Though, It doesn't fully explain... MM shows big difference dark/light: 20mV/400mV. MM is inertial and that can mask actual jumping, but it should not have hidden the high background noise that should raise background signal close to 250-300mV to get 45 vs 65 values. In other words, the difference between dark/light is still significant - ~380mV and this difference should have been reflected on the Serial Monitor.
P.S. And I don't have another sensor to try...   :smiley-sad-blue:


By default you're reading the 20-400mV in a 0-5V range with 10 bits of precision. You can change that range to something else (like 1.1V) with analogReference().

You probably have a cadmium sulfide (CdS) sensor which have a kinda slow response. With an IR detector as the target you'd get a better reaction time to when the light is blocked. When you're doing tripwires though, the best solution is to use an IR receiver and a modulated beam; using that setup you could wave a pencil through the beam (almost as fast as you can move it) and get a reliable trip.


The main source of noise will be the high impedance of the photo sensor in the dark.  Try adding a 100k or 1M resistor across its output to reduce this.  The multimeter will both average the noise and will also have an input impedance of perhaps 10M.  The Arduino analog input impedance is much higher.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up