Help Calibrating 2 LDRs.

I an building a Light follower and I found it's easier said than done. The LDRs are virtually the same to me but give values as different as 50(in terms of 0-1023) when exposed to same light. I'm using the voltage divider setup using a 10k Ohm resistor in series with the LDR and sensing voltage in the middle.

LDR +5V-------O-----|-------v^v^v^------0V | 10k pin A0

Any idea for calibrating the 2 sensors. I put the other one on A5 to reduce interference. The Indicator LED, Motor Battery, LDR and Arduino all use the same ground rail on the breadboard. Any help is appreciated.

You don't need to use A5, for example A1 is as good as A5.

Those LDR's can have different values, that's how it is. You can add a potentionmeter to the resistor, or add a resistor to the 10k to increase the value of the 10k until both LDR create matching analog values. Increasing the value of the 10k resistor is quick and easy.

It is also possible to solve it in the sketch in software. Since it is a log scale, you need perhaps to do log calculation to get a good match.

Or use the multimap function. You could create a table from 0 to 1023 and a table from 0 to 100%. If you do that for both, they should match. The 0 to 100% doesn't have to be very linear or very specific. You can define yourself what you would consider to be 0%, 50% and 100%. You can add more data points for more precision.

I'll try it and get back to you. Thanks for the reply though.