What is the minimum damaging voltage for 5V Arduino analog inputs? 5.1V?, 5.2V? , ... ?
Hi,
From the datasheet:
Absolute Maximum Voltage on any Pin except RESET with respect to Ground:
-0.5V to VCC+0.5V
More info and links to the datasheets are HERE:
You can safely assume that when the input voltage reaches one or the other of the absolute maximum ratings, damage is already being done.
VCC +0.5volt (or -0.5volt).
So absolute max is already reached at 0.5volt if you forget to turn your Arduino on.
Damage could also come from pin current, not always from pin voltage.
Tell us what you're trying to do.
Leo..
You can safely assume that when the input voltage reaches one or the other of the absolute maximum ratings, damage is already being done.
Although I hesitate to differ with a guy with a name like a gun, I'm from New Haven and I respect Winchester more than Remington
The chips have protection diodes from the pins to the positive and negative supply rails. When the voltage approaches the supply rail voltage + 0.5V those diodes start to conduct.
If the CURRENT is limited (sometimes 'protected' Atmel boards have series resistors to the I/O pins) to a maximum (probably of 20 mA) there will not be damage.
I have been in meetings where there were arguments between the chip designers, quality control and the Specmanship guys trying to sell the chip specifications. The issue was the capacitance added by the protection diodes.
But that was, and I am, Electronics Ancient History.
If the CURRENT is limited (sometimes 'protected' Atmel boards have series resistors to the I/O pins) to a maximum (probably of 20 mA) there will not be damage.
Agreed, but the OP did not mention current limiting.
I prefer to err on the side of caution when advising beginners.
Why are you asking?
.
Thank you all. I need to read the voltages in the range of 0_150V. So, I am using a proper voltage divider. But there is always a possibility of the voltage surge and I am going to use zener for protection. Is it OK to use 5.1 or 5.0 zener or I need like 4.7 zener to be on the safe side. It is important for me because I don't want to sacrifice more resolution then I actually need to. My voltage divider is 10 mA (15K to 500 Ohm).
See figure 2
.
Thank you all again. And special thanks to Leo. I 'd never realized that I can not apply voltages to Arduino pins when the board is off. Fortunately I never did it!
GeneTE:
I 'd never realized that I can not apply voltages to Arduino pins when the board is off. Fortunately I never did it!
Yes you can.
There is an unwritten rule that <= 1mA pin current should be safe.
GeneTE:
I need to read the voltages in the range of 0_150V. So, I am using a proper voltage divider. But there is always a possibility of the voltage surge and I am going to use zener for protection.
Zeners are useless for protection for the same reason as mentioned in post#3.
A clamping diode (schottky) to the 5volt rail COULD work, but schottky diodes leak (zeners also do).
That could make your measurements temp dependent.
There is another/better solution.
Use a 150k:1k divider.
That will bring 0-151volt down to 0-1volt.
That can be measured with (the more stable) 1.1volt Aref.
That will protect the pin, even if the Arduino is off and/or the 1k resistor is disconnected, or -150volt is connected.
That ratio will protect the pin (stay under 5.5volt) to at least 800volt if the Arduino is on.
It might be wise to use a 68k and 82k resistor in series to make a 150k resistor.
Small resistors are not made to have >100volt across.
Some code to try.
It uses 1.1volt Aref and averaging.
Leo..
/*
0 to ~160volt voltmeter for 3.3volt and 5volt Arduinos
uses the stable internal 1.1volt reference
1k resistor from A0 to ground, and 150k resistor from A0 to +supply
100n capacitor from A0 to ground for stable readings
(150k + 1k) / 1k = 151.0 | used in formula
*/
float Aref = 1.075; // ***calibrate here*** | change this to the actual Aref voltage of ---YOUR--- Arduino
unsigned int total; // can hold max 64 readings
float voltage; // converted to volt
void setup() {
analogReference(INTERNAL); // use the internal ~1.1volt reference | change (INTERNAL) to (INTERNAL1V1) for a Mega
Serial.begin(9600); // set serial monitor to this value
}
void loop() {
for (int x = 0; x < 64; x++) { // multiple analogue readings for averaging
total = total + analogRead(A0); // add each value to a total
}
voltage = (total / 64.0) * 151.0 * Aref / 1024 ; // convert readings to volt
// print to serial monitor
if (total == (1023 * 64)) { // if overflow
Serial.println("voltage too high");
}
else {
Serial.print("The supply is ");
Serial.print(voltage, 1); // one decimal place
Serial.println(" volt");
}
total = 0; // reset value
delay(1000); // one second between measurements
}
A 10K (current limiting) resistor in series with the analog input will protect against many situations that exceed the voltage limits, and will not affect analog readings in the valid voltage range.
Add the resistor between the voltage divider tap and the analog input.
jremington:
Add the resistor between the voltage divider tap and the analog input.
That is not needed if you pick the resistor values of the voltage divider with (<= 1mA) fault current in mind.
A safety resistor between voltage source and pin could be needed if you don't use a voltage divider.
e.g. when you want to measure the voltage of a LiPo battery.
Connecting the LiPo directly to a pin could phantom-power the Arduino through the pin protection diodes when you try to turn the Arduino off.
Leo..
Quote from: terryking228
"If the CURRENT is limited (sometimes 'protected' Atmel boards have series resistors to the I/O pins) to a maximum (probably of 20 mA) there will not be damage."
My voltage divider limits the current to ~10mA. So, I don't need any extra protection even if the input voltage is a little more then 5.5V. Right?
GeneTE:
My voltage divider limits the current to ~10mA. So, I don't need any extra protection even if the input voltage is a little more then 5.5V. Right?
Wrong.
So you didn't read (or understand) post#10.
The current through the voltage divider is irrelevant to the Arduino.
It just burns power in the divider.
What matters is the current into the Arduino pin protection diodes.
Leo..
But the resistive voltage divider does provide the current limitation to the Arduino pin. In my case 15K-to-500Ohm voltage divider connected to 150V power source. So, the Arduino pin connected to 150V through the 15K resistor which limits the current to 10mA. What's wrong with this?
GeneTE:
But the resistive voltage divider does provide the current limitation to the Arduino pin. In my case 15K-to-500Ohm voltage divider connected to 150V power source. So, the Arduino pin connected to 150V through the 15K resistor which limits the current to 10mA. What's wrong with this?
VCC+0.5volt is the voltage limit.
Assume the Arduino is off (VCC=0volt).
Then 0.5volt is the max voltage on the pin.
The 500ohm resistor takes 0.5/500= 1mA at that voltage.
The 15k resistor supplies (150-0.5)/15000= 9.97mA
The pin has to take 9.97-1= 8.97mA.
Well above the (unspecified) limit of 1mA.
Now calculate this yourself for a 150k/1k divider.
Leo..
Thank you, Leo. I understand this, but I was referring to terryking228 post on Dec 22, 2016, 07:23 pm:
'If the CURRENT is limited (sometimes 'protected' Atmel boards have series resistors to the I/O pins) to a maximum (probably of 20 mA) there will not be damage.'
So, what is the correct answer: 1 mA or ~20mA?
If more than 1mA is allowed to flow into an IO pin because the voltage exceeds Vcc by 0.5V and the clamp diode kicks in, then the pin can be damaged.
With 150V, 15K, and 500 to Gnd, the pin voltage is 150V*500ohm/(15000 + 500 ohm) = 4.8V. Current flow can be 150V/15500ohm = 9.7mA. If the device is powered up, 0.001mA will flow into the device.
If Vcc is 0 due to the device being powered down, then the clamp diode shorts out the 500 ohm and the diode will try to shunt the 9.7mA until the diode blows, possibly taking other pins with it and wrecking the chip.
GeneTE:
'If the CURRENT is limited (sometimes 'protected' Atmel boards have series resistors to the I/O pins) to a maximum (probably of 20 mA) there will not be damage.'
So, what is the correct answer: 1 mA or ~20mA?
I don't know of any "protected" Arduino boards. You have to look into the specs of those boards.
Common Arduinos (Uno, Mega, Nano, etc) are not "protected".
Protection on the pins could mean less performance.
I would use the unwritten rule of 1mA if not sure.
That includes pins set to "output".
e.g. a pin that outputs a HIGH can source 20mA into a load, but if the load can source more than VCC+0.5volt, you should take the 1mA precaution. At least this seems logical to me.
Leo..