Introduction: Arduino Voltmeter Prototype

In this instructable, I'll show you how to make a simple arduino voltmeter. It can measure voltages in excess of 30VDC depending on how you configure it. The smaller the voltage range you want to measure, the more accurate that your meter will be. This project is going to be apart of a gauss meter that I am making to measure magnetic fields strength as well as magnetic field polarity. This instructable should provide a good base for a large number of different applications that will need the arduino to monitor the voltage level of something.

Step 1: What You Will Need

1. Arduino Uno or similar microcontroller.

2. 128x64 OLED display

3. Two resistors. The values depend on the range of voltages you want to measure

Step 2: Schematic

Wire up your components as shown and choose your resistor values based on the range you want to measure. For example, if you want to measure 0-10V then you could pick R1 as 100k and R2 as 100k. Be sure to measure your resistors before plugging the number into your program to ensure a more accurate measurement.

To calculate your desired voltage range you will need to use the following voltage divider formula.

Vout = (R2*Vin)/(R1+R2)

Vout will need to be 5V for the ADC and Vin will be the max voltage value that you want to measure.

Here are a few voltage range examples:

0-10V : R1=100k, R2=100k

0-15V : R1=100k, R2=50k

0-25V : R1=100k, R2=25k

0-55V : R1=100k, R2=10k

Step 3: Upload the Code

Before you upload the code, you will need to download the U8glib library from here if you are using an OLED display.

Step 4: How It Works

This voltmeter uses the arduino's analog to digital converter on the analog pin and convert 0-5 volts into a value from 0-1023. To measure more than 5 volts, you need use a voltage divider and calculate the voltage in your program. The problem with this is that the arduino's analog to digital converter still only has a resolution of 1024 points so the higher voltage you want to measure, the less accurate your voltmeter will be.

The ADC on the Arduino is a 10-bit ADC, meaning it only has the ability to detect 1,024 discrete analog levels. For my gauss meter I will probably use a microcontroller with a 16-bit ADC for 65,535 discrete levels and a overall more accurate meter.

Only use this voltmeter to measure positive voltages and never hook it up with the wrong polarity. In my gauss meter instructable, the arduino will measure negative and positive values so wait for that to see how to measure negative values.

If I get enough feedback from this, I will make a fully functional multimeter that can measure resistance as well as negative values.

Comments

author
ea00d009 (author)2016-04-24

hi! nice proyect, but, can i use a lcd 16x2 instead the oled display?

author
JGRojas (author)2016-01-22

Good project. Can i use a 1N4007 diode to avoid wrong polarization? Or the resistance of the diode will change the results?

author
Proto G (author)JGRojas2016-01-22

You are better off using an op amp so you can read both positive and negative values. Read up here: http://masteringelectronicsdesign.com/design-a-bip...

You can calculate the resistor values based on the voltage range you want to cover.

author
StingerJack (author)2016-01-18

hey cool project.

author
Proto G (author)StingerJack2016-01-18

Thanks!

author
ThomasK19 (author)2016-01-17

A great way to toast your inputs. Especially with the wrong polarization.

author
Proto G (author)ThomasK192016-01-17

Only with the wrong polarization. I have tested this with 50VDC and had no issues with R1=100k, R2=10K.

About This Instructable

6,007views

92favorites

License:

Bio: Electromechanical Engineer, Product Designer, Maker. I love to make prototypes and teach others in the process. I graduated from UCF and spent two years working ... More »
More by Proto G:Levitating Platform1000W Portable Induction HeaterHow to Make a Metal Key With a 3D Printer
Add instructable to: