## 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;
// 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.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.setCursor(14, 1);
lcd.print("mA");

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.