Making an Ammeter using Arduino Uno

arduino

  • As part of a hobbyist construction of an Arduino Uno voltmeter, I used a potential divider of 10K ohms and 470K ohms to step down the voltage to a level which the Arduino Uno analog pin can sense (0-5V). Then, the limit of the permissible detectable voltage would be 0-240V, I want to know if there are any precautions that I should be wary of before implementing this.

  • Also, for an Arduino Uno Ammeter, I tried extending the above idea, of introducing a small series element of resistance into the path whose current is to be determined. Now, using the above idea, making two voltage measurements (using the same circuitry) on either side of the test resistor, we can calculate the current by

I = (V1/480K) + (V2/480K) + (V1-V2)/r

where r -> test resistance.

  • Lastly, for an AC Voltmeter, I was thinking to do the usual AC to DC conversion using bridge rectification followed by filtering it with a suitable capacitor, and then followed by stepping down the DC level (as in 1. above) and then feeding it to the Arduino. Could someone guide me as to any yardsticks/limitations of my idea?

Here, too, I would like to know any drawbacks of my idea, or any guidelines I should be following. Also, I am not bent on getting some specific specs, I would also be happy if I could get t detect some range of current as well. I am concerned whether the Arduino has enough resolution to detect such small voltage differences, especially when its (0-1023) corresponds strictly to (0-5V). I would also apologize for any wrong notions and would be glad to be corrected.

Best Answer

One thing to bear in mind:

240V IS DEADLY - USE EXTREME CAUTION

If you are thinking of directly sampling mains voltages, DON'T! (unless you know what you are doing, in which case why are you asking questions here?)

Sampling a range of 0-240V with a 12-bit ADC is not really ideal. You get 0.23v per bit, and as you can usually count the LSB as noise, that is effectively about half a volt resolution. Not really enough to sense anything meaningful from a small current shunt. It'll be like "troll counting" - none, one, lots, many.