Go Down

Topic: how to read five photosensors (Read 3711 times) previous topic - next topic

hans

hi,

i have a problem with my arduinoboard. i connected five photosensors at the analogin-ports. if i cover one of them (sensor1), its value decreases from about 900 (i read them over the serialport) to 0. if i cover another sensor (sensor2) then, its value decreases to 300-400. sensor1 shows about 6-7 then.



for my project i have to be shure, that their value is always (nearly) the same (uncovered/covered). whats wrong with my circuit?

thanks in advance,
hans

gregben

I'd use 2 x National LM324AN quad op-amps (or similar) to isolate and condition the photosensors. You
will use 5 of the 8 available op-amps as voltage followers (buffers). I'm assuming these are
CDS (Cadmium Sulfide) photoresistors.

Here's a picture of one sensor. The output of the op-amp goes to an analog input on the ATMega8.



The way I've wired it, you will get a low A/D value in darkness, and higher values with more light. You can
try different values for R2, from about 2.2K up to 1M Ohm.

By using a separate op-amp for each photosensor you should get good isolation between them.

It is better to place the op-amps as close as practical to the photoresistors, and run relatively long wires
from the op-amp outputs to the ATMega analog inputs rather than have long wires between the photoresistors
and op-amp inputs. Best of all is to use short wires everywhere, if possible.

CasNet

Quote
hi,

i have a problem with my arduinoboard. i connected five photosensors at the analogin-ports. if i cover one of them (sensor1), its value decreases from about 900 (i read them over the serialport) to 0. if i cover another sensor (sensor2) then, its value decreases to 300-400. sensor1 shows about 6-7 then.



for my project i have to be shure, that their value is always (nearly) the same (uncovered/covered). whats wrong with my circuit?

thanks in advance,
hans


Greetings Hans,

The circuit you've shown should work just fine, so make sure your wiring is correct. All of the photocells should have 1 lead in common to ground and all of the resistors should have 1 lead in common to +5V and each resistor should connect to each photocell and the analog input. There should not be any crosstalk through the power or ground buses, so you shouldn't need to use the buffer amplifier approach, but that might be recommended for other reasons such as scaling or filtering. Hope that helps!

Regards,
David

Go Up