Wrong readings from voltage divider

The ADC circuit in an Arduino charges a sample-and-hold capacitor to perform a read. If your source impedance is greater than about 10k ohms the sampling circuit can't charge up in time to get a good reading. This is probably the cause of your problem -- even if it doesn't exactly explain it. :slight_smile:

My very first (read kludgy) idea was, since most DMMs input impedance is about 10M ohms, you might just place a 10M ohm resistor in parallel or go down to 500k.

However, maybe your best bet is to isolate the Vdivider by using an op-amp voltage follower.

Unless you have a need to attach the IR sensor to +5V, I would swap the voltage divider so that I am reading the voltage across the sensor instead of the big R.

Let me know if this helps.

BTW, a lot of IR distance detectors (like the Sharp GP2Y0A21YK0F IR Range Sensor) output a voltage proportional to the range, that can be read easily by the Arduino without the voltage divider.