Pages: [1]   Go Down
Author Topic: ldr pre-process  (Read 223 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

what is your goal,
what do you want to measure
Logged

Rob Tillaart

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

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Rob Tillaart

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

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 64
Posts: 2489
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the range of resistance of your ldr?
What is the maximum voltage across the ldr?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

anyone?
Logged

Offline Offline
Edison Member
*
Karma: 64
Posts: 2489
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Victoria, Australia
Offline Offline
Edison Member
*
Karma: 46
Posts: 1396
Electronics Engineer/Industrial Control
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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....... smiley
Logged

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

Pages: [1]   Go Up
Jump to: