Go Down

### Topic: ldr pre-process (Read 1 time)previous topic - next topic

#### Sunjaman

##### Mar 23, 2014, 08:03 pm
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

#1
##### Mar 23, 2014, 08:06 pm
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

#2
##### Mar 23, 2014, 08:13 pm
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

#3
##### Mar 23, 2014, 08:22 pm
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

#4
##### Mar 23, 2014, 08:26 pm
i don't want to use arduino for this comparison because there is not enough analog inputs!

#### larryd

#5
##### Mar 23, 2014, 08:27 pm
What is the range of resistance of your ldr?
What is the maximum voltage across the ldr?
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

#### Sunjaman

#6
##### Mar 23, 2014, 08:35 pm
range 1kOhm to 1.3Mohm, in series with an 10k voltage 5 volts

#7
anyone?

#### larryd

#8
##### Mar 23, 2014, 08:54 pm
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.
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

#### TomGeorge

#9
##### Mar 24, 2014, 09:52 am
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....

Go Up