One rule I've learned (the hard way) over the years with electronics is to never short! I'm about as far as you can get on being an expert on the Arduino and what it can take. I tend to put high-value resistors in series to begin with to avoid over-currenting anything. On an Arduino Mega, When placing a 2000 Ohm resistor in series with a 10k Ohm potentiometer's positive or ground leads, I lose about 173 values worth of range. I bit the bullet and removed the resistor, so now there is nothing but wire between the potentiometer, the 5v, ground, and Analog connections, and a quick test showed that I had the full analog range back. However I'm hesitant to dump the full 5 volts into an analog input. So is there any chance of the analog input drawing too much current, from the Arduino's 5v "output" with no resistance (potentiometer fully toward the 5v side)? Right now the board is just plugged into a USB port, but when I "deploy" I'll probably be using a 9v power supply. Will the answer change for that? Or am I just being overcautious? Thanks! Matt
here is a generic app note on AVR ADC (analog in)
in section 2.9 you can see
The input impedance to VCC and GND is typically 100 M?.
A/D input channels have very high input-resistance, so they will not load down your ckt. However, you can blow the Arduino by putting > 5V on an A/D channel [or any other pin]. To help preserve the Arduino for your initial case, move the 2K R to between the pot wiper and the A/D input. Then you'll still get the full range.
HOWEVER, if you apply 9V instead of 5V to the pot, then you run the risk of blowing the A/D again. The usual means of applying > 5V is to use a voltage divider, but they only work correctly if the total resistance is much,much greater than the source resistance, eg, 10K for the pot, so you're in trouble here.
If you're forced to use 9V on the pot, and 10K for the pot value, then you should use an opAmp follower ckt between the pot and the voltage divider.
Thanks for the replies. I'm not entirely sure what it means that ground and +5v have a large input impedance, but it sounds like I won't destroy my board that way at least. I'll keep including the resistor in series between the middle lead and input however just to be cautious as that doesn't affect the voltage readings. Let me clarify however that I would not apply the 9 volts to the potentiometer, only to the board through its DC input jack, then connect the potentiometer to the board's 5v output. I wouldn't expect any different behavior, but wanted to be sure. Thanks!
I’m not entirely sure what it means that ground and +5v have a large input impedance
No, the A/D converter channels have a large input impedance, and won’t load the ckt
being tested, but it’s best to take some measures to keep from applying voltages outside
the range of 0…5V.
If the 5V going into the pot is from the same source as what is powering the Mega, then you don't need to have a resistor between the pot and the ADC.
What is your application?
I'm not entirely sure what it means that ground and +5v have a large input impedance, but it sounds like I won't destroy my board that way at least.
It means that a series resistor (at the Arduino input) won't end-up reducing your signal voltage.
The series resistor and the input impedance form a voltage divider where the voltage is proportional to the resistance (or impedance) ratio. With a 1K or 10K series resistor, essentially zero voltage is dropped across the series resistor and (essentially) all of the voltage is ends-up across the 100M Ohm Arduino input.
When you instead put the 2K resistor in series with the 10K pot, you are creating a 10/(10+2) voltage divider and reducing the voltage by about 17%.
The downside is that a high (total parallel) resistance makes the input more noise-sensitive. So although 1M Ohm would only loose about 1% of the voltage, I'd probably stick with 1K if you feel a series resistor is useful. (Stray EMI can generate a noise current in the input connections... Per Ohm's Law - With a given current, higher impedance means higher voltage.) There is also an input capacitance, which can cause issues when there is a high source impedance.
It's my understanding that the Arduino has internal protection diodes to protect it from voltage spikes. But, I have no idea what the current cabability of these diodes is.... I'm pretty sure if you connect a 12V power supply to an I/O pin, you can blow the protection diode. The series resistor could potentially limit the current and allow the protection diode to safely do it's job.
100M is the worst case input resistance over the full temperature range - the room-temp DC input resistance of any input pin
is likely to be more like 10^10 to 10^11 ohms for CMOS chips - as close to infinite as makes no difference. When AC is involved the
input capacitance will dominate.