# Voltage divider with ADC simulate this circuit – Schematic created using CircuitLab

I am a newbie and this may not be a tough one. I am using Arduino UNO and trying to find the unknown resistance with the above schematic.

But when no input is connected the ADC pin it gives a random reading and when I connect an input it directly shows 1023 as analog reading. What is the problem here ? And also if I get proper ADC reading, can the unknown resistance value will be properly found with the above voltage divider? The voltage is measured between the ADC pin and Gnd pin. Is that OK?

I would be doing it like: $\large V_{R1} = VCC \times \frac{R_1}{R_1 + R_2}$ and then finding out $\large R_2$

• Please use italics for emphasis and not for the whole post and capitalise "Arduino" and "Uno" properly for readability. If you leave the ADC input floating you can expect random readings due to high input impedance of the ADC. Your formula looks right. – Transistor May 22 '16 at 8:45
• sure next time i ll do...okay so can i use a pull-down resistor to prevent the floating inputs ? – kaya May 22 '16 at 10:05
• First as pointed out by @Neil_UK your ADC is off scale. 1. What is the supply source, i mean its arduino 5v, or 3.3V or some external source? 2. Can you share some details, as in what is the voltage you observe at the ADC pin? Generally Arduino compares against 5V, means 1023 will correspond to 5V at its analog pin, looking at your circuit its highly unlikely unless the resistor is in range of few ohms (or miliohms), which i assume is not the case. So you have to provide test results for us to decipher anything out of it. – Mayank May 22 '16 at 10:26