There are several references on how to do this such as;
- CT sensors - Interfacing with an Arduino
- How to build an Arduino energy monitor - measuring mains current only.
For my case, I would like to try it first before start buying a CT sensor.
So I come out with below idea, using toroid inductor/coil for testing.
Live wire 240VAC going through the toroid.
Please take precautionary steps with this.
Arduino and sensor board setup
#include "EmonLib.h" // Include Emon Library EnergyMonitor emon1; // Create an instance void setup() { Serial.begin(9600); emon1.current(1, 500); // Current: input pin, calibration. } void loop() { double Irms = emon1.calcIrms(2000); // Calculate Irms only Serial.println(Irms); // Irms }
Arduino sketch - quick copy/paste code
Hook it up and testing. It will not be accurate, just to get an idea on how it works.
0 comments :
Post a Comment