hIOTron
Created November 21, 2019 © GPL3+

Arduino Wattmeter - Voltage, Current and Power Consumption

A device can be utilized to measure the power consumed. This circuit can also act as a Voltmeter and Ammeter to measure voltage and current.

Arduino Wattmeter - Voltage, Current and Power Consumption

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
RGB Backlight LCD - 16x2
Adafruit RGB Backlight LCD - 16x2
×1
LM 358 Op Amp
×1
Linear Regulator (7805)
Linear Regulator (7805)
×1
Single Turn Potentiometer- 10k ohms
Single Turn Potentiometer- 10k ohms
×1
Ceramic Disc Capacitor, 0.1 µF
Ceramic Disc Capacitor, 0.1 µF
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Resistor, 20 kohm
Resistor, 20 kohm
×1
Resistor 2.21k ohm
Resistor 2.21k ohm
×1
Resistor, 0.22 ohm
Resistor, 0.22 ohm
×1
Test load
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Run a program

Arduino
#include <LiquidCrystal.h>  

int Read_Voltage  = A1;
int Read_Current  = A0;
const int rs = 2, en = 4, d4 = 9, d5 = 10, d6 = 11, d7 = 12; 
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
float Voltage = 0.0;
float Current = 0.0;
float Power = 0.0;
void setup() 
{
  lcd.begin(16, 2); 
  Serial.begin(9600);

  lcd.print("     Arduino    "); 
  lcd.setCursor(0, 1);
  lcd.print("    Wattmeter   "); 

  delay(2000);
  lcd.clear();

}

void loop() 
{
 
 Voltage = analogRead(Read_Voltage);
 Current = analogRead(Read_Current);

 Voltage = Voltage * (5.0/1023.0) * 6.46;
 Current = Current * (5.0/1023.0) * 0.239;

 Serial.println(Voltage);
 Serial.println(Current);

 Power = Voltage * Current;

 Serial.println(Power);


 lcd.setCursor(0, 0);
 lcd.print("V="); lcd.print(Voltage); 
 lcd.print(" "); 
 lcd.print("I=");lcd.print(Current); 
 lcd.setCursor(0, 1);
 lcd.print("P="); lcd.print(Power); 
 delay(1000);
}

Credits

hIOTron

hIOTron

78 projects • 2 followers
hIOTron is an internet of things based company that offers an IoT Platform, products, IoT Solutions, and IoT Training.

Comments