Introduction: Digital Voltmeter Using Arduino

Voltmeter is used to measure voltage in circuit,Analog voltmeter have 5% error, it shows the approximate value ,where the digital voltmeter gives exact value of voltage in circuit.Voltage is measured using voltage divider circuit.this voltage meter can measure both AC and DC value

Step 1: HARDWARE:

Hardware require to measure voltage is voltage divider circuit ,divider circuit consist of resistor ,value of resistor based on the input voltage to be measured to measure 100v voltage measurement ,10k resistor in series with input voltage and 520ohms resistor on end is connected to ground and another end is connected with 10k resistor and zener diode 5.6v is connected at a node to limit voltage

VOLTAGE DIVIDER

Step 2: Digital Voltmeter Output

Step 3: Code Part

int curr_value = 0;

int acc_value = 0;

float disp_res;

float supply = 4.91;

float coeff_v100 = 1.01;

volatile unsigned long last_millis = 0;

void setup()

{

Serial.begin(9600);

}

void loop()

{

V_100();

}

void V_100()

{

Serial.print("V-meter V=<100V");

Serial.println("* Voltmeter mode - Range 0 - 100 V *");

voltage_meas();

}

void voltage_meas()

{

acc_value = 0;

for (int i=0; i <= 15; i++)

{

curr_value = analogRead(A0);

acc_value = acc_value + curr_value;

}

curr_value = int(acc_value/16);

disp_res = ( curr_value*supply*20)/1024*coeff_v100 ;

Serial.print(" V = ");

Serial.print(disp_res, 2);

Serial.print(" V");

Serial.print("* V = ");

Serial.print(disp_res, 2);

Serial.println(" V");

delay(250);

}