Introduction

Did you know that you can use an Arduino board as a voltmeter and ammeter?

That’s the project we’re proposing today. We’ll be using an LCD screen to display voltage and current values.

Difficulty:

The advantage of this project is that the Multimeter is easy to build, highly accurate and can measure voltages well in excess of 5V.

A second advantage of this project is that it requires very few components.

Materials required

Materials needed for the project :

  • Arduino board
  • 16×2 lcd screen
  • 3 resistors: 500 ohms, 15 kilo-ohms, 1.5 kilo-ohms
  • Connecting wires

Schematic diagram

Here’s the schematic of the simulated project, where we can see that the voltage and current read by the Arduino board is almost the same as that given by the voltage generator:

Program

#include <LiquidCrystal.h> // The library used for the screen

LiquidCrystal lcd(12, 11, 4, 5, 6, 7); // Initialize screen with pins used
// Initialize voltage and current values
float input_voltage = 0.0;
float voltage_reading = 0.0;
float current_reading = 0.0;
// The two resistors used to measure voltage and current
float resistor_A = 15000.0;
float resistor_B = 1500.0;
         
void setup(){
  lcd.begin(16, 2); // Initialize screen
  lcd.clear();
}

void loop () {
  // We place ourselves on the first line for the voltage
  lcd.setCursor(0,0); 
  lcd.print("Tension:");
  lcd.setCursor(8, 0);
  lcd.print(voltage_reading); // We read the voltage
  lcd.setCursor(14, 0);
  lcd.print("V");
   // Move to the second line for the current
  lcd.setCursor(0,1);
  lcd.print("Current: ");
  lcd.setCursor(8, 1);
  lcd.print(current_reading); // We read the current
  lcd.setCursor(14, 1);
  lcd.print("mA");
  
  input_voltage = (analogRead(A0)*5.0)/1023.0; // We read the input voltage
  voltage_reading = input_voltage/(resistor_B/(resistor_A + resistor_B)); // This voltage is modified by resistance_Apport to resistor value
  current_reading = 1000*(voltage_reading/(resistor_A+resistor_B)); // We modify the current in relation to the value of the resistors
}

How do I get the program onto the Arduino board?

To put the program on the board, you’ll need the Arduino Ide software. You take the code and copy it into the software, which then compiles it and uploads it to the board.

If you’re having trouble uploading your program, take a look at our course on uploading!

Bonus: Make a stand-alone Multimeter!

To be able to use your Multimeter autonomously for all your projects, all you need to do is add a 4-battery pack to the arduino board, along with a power-saving switch.

You can also make a box out of cardboard or a 3d printer to protect the circuit from shocks or loose wires.

Do not apply too much voltage when measuring!

We advise you not to put more than 25V and 0.5 A into the Multimeter. This can be dangerous if a short circuit occurs. Arduino Factory declines all responsibility for any injury caused by the Multimeter project.