So want to use the Uno to read some analog voltages that will vary from 0-10 volts. However, I tried a setup today that gave me strange results. I have attached the very simple circuit. There is a 75 kOhm resistor in series with the A1 analog in pin on the Uno.
In my opinion, the Uno should be seeing a full 12V. There should be almost no voltage drop across the resistor, because the input impedance of A1 is 100 MOhm, more than 1000 times larger than the resistor.
However, when I take a voltmeter and read the drop across the resistor, it reads 6.5 V. If I do the math, that means that the circuit is seeing the analog input of the Uno as having a resistance of 63461 Ohms.
Am I missing something here? I read up on the input impedance of the Uno, and apparently there is some internal capacitance, but I let it sit for a couple minutes and the voltage didn't budge.
There are internal protection/clamping diodes across the I/O pins, and with 75K you aren't going to get enough current to damage the chip, but IMO, it's bad practice to rely on the clamping diodes.
I'm surprised you're getting 6.5V. It should be clamped at just slightly over 5V (assuming there is 5V applied to the chip, and both circuits share a common ground.)
At less than Vcc (5V) your analysis is correct. There should be almost no voltage drop across the 75K resistor. (But you might pick-up some noise with these high impedances.)
Thanks for the reply, I was just wondering that myself. I had been looking at the spec page for the Uno where it said input voltage was from 7-12 V, but that must mean for power.
And I was mistaken, I was getting 5.5V across the Uno, and 6.5 across the resistor, so that aligns more with what you were saying.
Thanks again! I just bought another board from Digikey, will limit the voltage this time :o
You need to use a resistor divider to bring the voltage down low enough that the arduino can read it. No pin on any atmel chip (except the reset pin on some chips) should have a voltage above Vcc or below Gnd applied to it (the datasheet specifies this under absolute maximum ratings)
Even if the chip didn't have those protection diodes, and could somehow survive 12v on the pin, analogRead() couldn't be used to measure voltages higher than Vcc, because the value analogRead returns is on a scale of 0-1023, with Vcc (or the internal voltage reference, if you use that) as the highest point. So anything over Vcc would return 1023.
Is the board no longer working? I would be surprised if that actually damaged the board, since you had that 75k resistor in series with it, so it would only have been putting fractions of a milliamp through the protection diode.
Thanks DrAzzy, that is what I will do. And I haven't tried reading the voltage off the board since that happened, but hopefully it is still alive since the current was very low.