VOLTMETER USING ARDUINO (BASICS)

Mar 27, 2020

Thumbnail Actual Image

In this video, I'll show you how to build a voltmeter using an Arduino UNO. The tutorial is divided into two parts:

Part 1: Measuring voltage up to 5V

Part 2: Expanding the range to 30V using a voltage divider

Reading Voltage up to 5V

Components Required

  1. 1 x Arduino UNO
  2. 1 x 10KΩ Potentiometer

Setup

  1. Connect the potentiometer as shown in the diagram.
  2. Plug in the Arduino UNO to your computer.
  3. Download and install the Arduino IDE (link in the description).
  4. Open the IDE, type in a simple code, then compile and upload it.
  5. Open the Serial Monitor – you'll see values changing from 0 to 1024 as you turn the potentiometer.

Since these are digital values, we need to convert them into voltage readings. By adding a few more lines of code, we can display the actual voltage on the Serial Monitor.

Circuit Diagram

Circuit diagram Actual Image

Reading Voltage up to 30V

To measure voltages above 5V, we need a voltage divider—otherwise, applying high voltage directly to the Arduino could damage the microcontroller.

  1. 1 x Arduino UNO
  2. 1 x 10KΩ Resistor
  3. 1 x 1KΩ Resistor

Setup

  1. Connect both resistors in series as shown in the diagram.
  2. Take a connection from the middle of the divider to Analog Pin A0 of the Arduino.
  3. Important: Connect the ground of the voltage divider to the ground of the Arduino.

Now, upload the final code and test the circuit. To verify its accuracy, I’ll use a 9V battery as an example.

Circuit Diagram

Circuit diagram Actual Image

Code for this can be found by clicking here

If you like this video hit the SUBSCRIBE button and give a LIKE.

Leave a comment

captcha

Comments (0)

No Comments Yet

Subscribers

423