Using Arduino as a Multimeter

Before I start this, im trying to verify to to display the value of the voltage on a pair of 7-segment displays and round off and not truncate the values. Im not sure how that would work, if somebody can help me that would be appreciated

Also I need to test the voltmeter by using a potentiometer to generate a smoothly varying voltage across the entire 0 – 5V range. And I am going to add a extra red LED to act as a leading decimal point. And change my code so that voltages in the range 0.0 – 0.99V are displayed using an assumed leading “0” ie. using the two digits for two decimal places; voltages of 1.0V and above are displayed.

And in order to test my voltmeter again by using the potentiometer to generate a smoothly varying voltage across the entire 0 – 5V range, taking particular note of the range 0 – 1V. How would I do that?

turn the knob on the potentiometer, probably.

test the voltmeter by using a potentiometer to generate a smoothly varying voltage across the entire 0 – 5V range.

Typically, this implies a drive mechanism with end-stop switches and reverse control.
You could do it with a digital potentiometer and a 2nd Arduino.

“Smooth” will be represented as 1024 discrete values…


Well, you know what you need to do... read an analog voltage and send the (calculated) result to a display.

In order to do that, you will need to wire up a circuit, program an Arduino, and test it.

We don't design projects for folks here. We give guidance, advice, and answers to questions that are specific. Have a look in the Playground, or Google to find some example code, some project ideas, and some tutorials on writing C++ code. Then come back here with some code and any questions you might have.
@Regios287… The link above will be helpful and should get you started. While it is true that senior members here avoid designing projects for the Ops, it is because we want you to think and be articulate - not because we are snobbish. Well, maybe I am snobbish now and again. I answer a lots of questions when I am online - sometimes I forget to be nice.

What I like to do with the Op is to steer you to resources so you can come back with specific questions. We all get the same treatment from time to time… It’s part of the growth experience. Soon, you will feel more like doing the groundwork searching ahead-of-posting. When you do jump in, be prepared to show your code-to-date (all of it) and ask one or more specific questions; example: I’m using my Uno as a digital multimeter, but the display value is jumping around. What is the best smoothing/averaging method?

Good luck,


What I have so far

#define A 19
#define B 18
#define C 2
#define D 1
#define E 0
#define F 20
#define G 21

#define POT 13

// Pins driving common anodes
#define CA1 17
#define CA2 16

float vin;
int ref;
int value;
int value1;

// Pins for A B C D E F G, in sequence
const int segs[7] = { A, B, C, D, E, F, G };

// Segments that make each number
const byte numbers[10] = { 0b1000000, 0b1111001, 0b0100100, 0b0110000, 0b0011001, 0b0010010,
0b0000010, 0b1111000, 0b0000000, 0b0010000 };

void setup() {
  pinMode(A, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(C, OUTPUT);
  pinMode(D, OUTPUT);
  pinMode(E, OUTPUT);
  pinMode(F, OUTPUT);
  pinMode(G, OUTPUT);
  pinMode(CA1, OUTPUT);
  pinMode(CA2, OUTPUT);

void loop() {
  value = analogRead(POT);
  value1 = (5*100*value)/1023;
  A == value1/100;
  B == value - (A * 100) /10;
  digitalWrite(A, HIGH);

Trying to measure the voltage of the pins

analogRead(13)? This is a Mega?