Go Down

Topic: ldr pre-process (Read 375 times) previous topic - next topic

Sunjaman

Hi, is there a passive way to compare (<=>) two ldr's voltages and generate a scaled output before arduino input pin? (In case uno's analog pins is not enough)

robtillaart

what is your goal,
what do you want to measure
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Sunjaman

i have 2 photo resistors. each one in a voltage divider circuit. i want to compare these voltages to know which one is bigger or if they are equal. But i want this measurment to be scaled in a way that arduino can handle it. (0 to 5v, or 0, 2.5, 5)

robtillaart

you can use the analog Read for both but you definitely need to calibrate when they are equal.
The ADC of the arduino is multiplexed and often you have noise on your measurements.
So a difference of lets say 3 point on the 0..1023 scale that can be noise.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Sunjaman

i don't want to use arduino for this comparison because there is not enough analog inputs!

LarryD

What is the range of resistance of your ldr?
What is the maximum voltage across the ldr?
The way you have it in your schematic isn't the same as how you have it wired up!

Sunjaman

range 1kOhm to 1.3Mohm, in series with an 10k voltage 5 volts


LarryD

In that configuration, your input to an analog input will be .5 to almost 5 volts.
You don't want to use an Arduino analog i/p and you want to do it using passive components.
I cannot help you here.
The way you have it in your schematic isn't the same as how you have it wired up!

TomGeorge

Hi, you will have to build some hardware to do the job.
OpAmp will help, but first what do you want out of the comparison.
The arduino analog is only positive  0 to +5V.
A standard differential amplifier will when you compare your two LDR outputs.
If LDR1 is Higher than LDR2 you get a positive voltage out.
If LDR2 is Higher than LDR1 you get a NEGATIVE voltage out.
It can be level shifted so that 2.5V is zero difference, above 2.5V is positive and below 2.5V is negative.
The trick is to do it with a single power supply rather than a balance pos/neg supply.

Tom....... :)
Everything runs on smoke, let the smoke out, it stops running......VK3DMK

Go Up