Risk of using arduino as Votmeter!

hey there, this is a while that i am trying to implement a voltage meter, a safe for chip voltage meter via Arduino. according many published projects through the web with almost same concepts behind them (which some of them are listed below) i have a circuit like this :

every thing looks perfect with micro's ADC and Voltages are reachable from few volts to higher as 35~55 volts.


► but i have One Question?

what happen if a Battery or any other sort of voltage supply Connected in Reverse? i.e GND of a battery to wire which is tagged by + and vice-versa. from official tutorials to general blog posts about arduino as Volt-Meter i did not saw any thing about this probably issuse.

for now i am looking for some Low-Forward-Voltage diodes like 1N5817 to fix it if its really Risky and important. the drop out voltage for low current circuits like this, is a fixed small value (am i true?) and can be added again in CODE for a real value reading.

► References :

tnx.

First, is that battery ONLY connected to measure the voltage or also as power supply to the Arduino?

If it's only connected to measure it's not good but you can fix it. A diode in series would fix it but you get a significant measurement error.

But the problem isn't as bad ass you think. If you have 55V reversed the internal clamp diodes in the ATmega will clamp the voltage to around 0V. But R1 is still in series so 55V / 100k = 0,55mA. Diodes can handle up to 1mA so it should be fine. You can even increase R1 to lower that current. Which would be a good idea as well to lower the voltage to stay under 1,1v. That way you can use the internal 1,1V reference which is a bit more stable than Vcc (the default ref).

If it's only connected to measure it's not good but you can fix it. A diode in series would fix it but you get a significant measurement error.

If a battery is connected in reverse, a negative voltage would be applied to the A0 pin, but the current is limited by R1, so shouldn't the clamping diodes take care of that?

@ElCaron, to quick? :wink:

septillion:
If you have 55V reversed the internal clamp diodes in the ATmega will clamp the voltage to around 0V

:smiley:

Yes g

septillion:
But the problem isn’t as bad ass you think. If you have 55V reversed the internal clamp diodes in the ATmega will clamp the voltage to around 0V. But R1 is still in series so 55V / 100k = 0,55mA. Diodes can handle up to 1mA so it should be fine. You can even increase R1 to lower that current. Which would be a good idea as well to lower the voltage to stay under 1,1v. That way you can use the internal 1,1V reference which is a bit more stable than Vcc (the default ref).

thank you for saying good news -ᴥ^ i learnt much.
yes measurement part is separated from arduino power supply.
as i understand for a 3v battery, a reverse connection does not cause any pain as 3/100K < 1mA then internal diode protects the chip.

septillion:
If it’s only connected to measure it’s not good but you can fix it. A diode in series would fix it but you get a significant measurement error.

how ever for a duplicated protection as you mentioned, by using a diode in series for example with a 1N4148 Diode, voltage drops 0.43 always (until low current flowing), but this value is a little big for measurements less than 0.5 Volts, after searching i found 1N5817 with lower voltage drop, i hope this is OK but also if it is not or there is a better known diode exists for this type of duty i am greedy to know.

Indeed a drop of 0,43V is is huge and indeed crops the lower end resolution. But bigger problem is, it's not constant. It's current dependent (so when measuring different batteries it's voltage dependent) but also highly temperature dependent. So overall, it's a bad solution.

You can back-up the on-chip protection diodes with external schottky diodes (has to be schottky to have a lower on voltage), which will be able to handle larger fault currents. Untimately you may have to worry about large
fault currents raising the 5V rail above 5V (however with large resistors like 100k this isn't likely).

septillion:
Indeed a drop of 0,43V is is huge and indeed crops the lower end resolution. But bigger problem is, it's not constant. It's current dependent (so when measuring different batteries it's voltage dependent) but also highly temperature dependent. So overall, it's a bad solution.

for analogRead and my conversion which gives me an accuracy of 0.01 the value seems fixed at 0.43v from a range of 3V to 9V batteries in physical test. but truly its smaller drop about 0.38v for lower voltages (i.e 1.5v). you are right at all, but if imagine that its the only possible solution then a 0.05v can be ignore able IF the average voltage-drop comes down (0.38 or 0.43 or any value around are BIG)

MarkT:
You can back-up the on-chip protection diodes with external schottky diodes (has to be schottky to have a lower on voltage), which will be able to handle larger fault currents. Untimately you may have to worry about large
fault currents raising the 5V rail above 5V (however with large resistors like 100k this isn't likely).

tnx, 1N5817 is one of them, I'll post the drop Voltage values against schottky @ some range of batteries as soon as purchasing one of them

Okay, and now change the temperature :wink: And what Mark suggests is not to place it in series with the battery but between the analog pin and GND (with the anode pointing to GND).

But really, just use high enough resistors (100k is sufficient high but for a DMM it's still considered low). And the make the reading more stable, add 100nF between analog pin and GND.

You also have to be careful about the ground.

Hand-held multimeters are battery powered and there is no ground,* only + & - or red & black terminals. Bench-top multimeters have isolated power supplies so again, neither probe is connected to the case, power-line ground, or earth ground.

The most likely way to get into trouble with the Arduino is if you’ve got USB connected and the USB ground gets-back to power-line ground through the computer. If the battery (or power source) you’re trying to measure also has a connection to power-line ground and you connect it backwards, you’ll short it out.

This doesn’t add much to what’s already been said, but: [u]Protection Circuits[/u].

for now i am looking for some Low-Forward-Voltage diodes like 1N5817 to fix it if its really Risky and important. the drop out voltage for low current circuits like this, is a fixed small value (am i true?) and can be added again in CODE for a real value reading.

I assume the inexpensive meter I have at home has a series rectifier diode (or a bridge rectifier) for AC because it doesn’t have a low-voltage AC range. I also assume the diode-drop is calibrated-out, but it can’t measure 1/10th of a volt AC. It has to have some other kind of over-voltage protection (I think it’s good up to 600V or so) and of course it can measure reverse (negative) DC. …I have better meters at work and someday I’ll probably get a better meter for home use. (The one I have isn’t super-cheap and the lack of low-AC measurement is it’s only weakness.)

  • There probably is an internal “ground” if you look at the schematic but it’s just a ground reference, and not truly grounded.

septillion:
and now change the temperature

Mark suggests is not to place it in series with the battery but between the analog pin and GND

big thanks for mentioning it :slight_smile:
oh :frowning: temperature
i need to know about temperature influence, is it included in diodes datasheet?

DVDdoug:
The most likely way to get into trouble with the Arduino is if you've got USB connected and the USB ground gets-back to power-line ground through the computer. If the battery (or power source) you're trying to measure also has a connection to power-line ground and you connect it backwards, you'll short it out.

This doesn't add much to what's already been said, but: Protection Circuits.

I assume the inexpensive meter I have at home has a series rectifier diode (or a bridge rectifier) for AC because it doesn't have a low-voltage AC range. I also assume the diode-drop is calibrated-out, but it can't measure 1/10th of a volt AC. It has to have some other kind of over-voltage protection (I think it's good up to 600V or so) and of course it can measure reverse (negative) DC. ...I have better meters at work and someday I'll probably get a better meter for home use. (The one I have isn't super-cheap and the lack of low-AC measurement is it's only weakness.)

  • There probably is an internal "ground" if you look at the schematic but it's just a ground reference, and not truly grounded.

i use separated supplies as you mentioned that risk.
glad to see your shared experiences, so many useful because i want to buy a cheap but good device in future :slight_smile:
unfortunately in my case lower voltages are more important.

In some it is. But that still leaves it’s a function of both current and temperature aka it’s a nightmare (or at least not worth it) to recalculate in the micro.

Just keep the resistors high and use clamp diodes. To Vcc/GND or between the inputs (but stay under Vforward).