Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Christopher Mendez Martinez
Published © GPL3+

Grove AC current sensor for a DIY Smart Energy Meter

Electrical energy is crucial in our lives, and it is very important to know how we use it in order to be aware of how to do it prudently.

IntermediateFull instructions provided1 hour2,006
Grove AC current sensor for a DIY Smart Energy Meter

Things used in this project

Hardware components

Wio Terminal
Seeed Studio Wio Terminal
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Seeed Studio Fusion PCB/PCBA
Seeed Studio Fusion PCB/PCBA
They manufacture my sensor design

Story

Read more

Schematics

Circuit diagram

Code

Code

Processing
Define the analog input pin you are using in the emon1.current(x,111.1);
Modify the calibration factor until you have an accurate value compared to an AC clamp meter or professional current meter.
// Code based on Emon Library example

#include "EmonLib.h"                   // Include Emon Library
EnergyMonitor emon1;                   // Create an instance

void setup()
{  
  Serial.begin(115200);
  
  emon1.current(A1, 430.5);             // Current: input pin, calibration.
}

void loop()
{
  double Irms = emon1.calcIrms(1480);  // Calculate Irms only
  Serial.print("Current = ");      
  Serial.print(Irms);		       // Irms
  Serial.println(" Amps");           
  delay(2000);
}

Credits

Christopher Mendez Martinez
35 projects • 76 followers
Electronic Engineer and Tech YouTuber who loves automation, programming and sharing his knowledge with everyone.
Contact

Comments

Please log in or sign up to comment.