Pages: [1]   Go Down
Author Topic: Analog input, series resistor needed?  (Read 1881 times)
0 Members and 1 Guest are viewing this topic.
Atlanta, GA
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

here is a generic app note on AVR ADC (analog in)

http://www.atmel.com/images/doc2559.pdf

in section 2.9 you can see

The input impedance to VCC and GND is typically 100 MΩ.


Logged


the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2927
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Atlanta, GA
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2927
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 602
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Facts just don't care if you ignore them.

Offline Offline
Edison Member
*
Karma: 37
Posts: 1355
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
« Last Edit: January 16, 2013, 04:51:50 pm by DVDdoug » Logged

0
Online Online
Shannon Member
****
Karma: 223
Posts: 12746
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: