Giovanni Carrera
Published © GPL3+


A simple circuit for measuring electrical current with Arduino.

IntermediateFull instructions provided5 hours3,736

Things used in this project

Hardware components

Arduino UNO
Arduino UNO

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires


Read more


Figure 1 - Arduino Ammeter schematic.



The example program is very simple, the values used are relative to my system. To calibrate the Rp1 trimmer, just run the program and turn the trimmer to read zero on the serial monitor with zero input current. If it is not possible to zero the trimmer, it is necessary to slightly modify the Nsh constant to be subtracted from the measurement.
The constant mVtomA is derived from experimental measurements using a good precision ammeter, a power supply and some resistive loads such as car bulbs or wire resistors of adequate power.
/* program ArduAmmeter.ino Arduino current meter
 Giovanni Carrera, rev. 11/07/2019 */

float NtomV;
const float VREF = 1095;// in mV, this value can be read on VREF pin 
const int Nsh = 98;// shift value corresponding to about 100 mV

void setup() {
  analogReference(INTERNAL); // internal ADC reference input = 1100 mV
  NtomV = VREF/1023;// constant of conversion into millivolts

void loop() {
  int val = analogRead(A0)-Nsh;// read the current sensor and remove the shift
  float mvolt = NtomV*val;// convert to millivolt
  float mamp = mvolt/2.17;// convert to milliampere
  Serial.print("Vo = ");
  Serial.print(" mV - Current = ");
  Serial.println(" mA");


Giovanni Carrera

Giovanni Carrera

14 projects • 39 followers
Electronic Engineer