วันจันทร์ที่ 30 กันยายน พ.ศ. 2556

How to build an arduino energy monitor - measuring mains current only. :ref http://openenergymonitor.org/emon/buildingblocks/how-to-build-an-arduino-energy-monitor-measuring-current-only?page=1


How to build an arduino energy monitor - measuring mains current only.

This little guide details how to build a simple electricity energy monitor on a breadboard that you could use to measure how much electrical energy you use in your home. It measures current and takes a set value for voltage (if your in the uk 230V) to calculate apparent power all the calculations are done on an arduino, although not as accurate as when a voltage measurement is taken, it is a method commonly used in whole house energy monitors for reasons of simplicity and lower cost. Here's how to do it:

Step One – Gather Components

You will need:
1x Arduino
Current sensing electronics
1x CT sensor yhdc SCT-013-000
1x Burden resistor 18 Ohms if supply voltage is 3.3V or 33 Ohms if supply voltage is 5V.
2x 10kOhm resistors (or any equall valued resistor pair upto 470kOhm)
1x 10uF capacitor
Other
1x A breadboard and some single core wire.
Oomlout do a good arduino + breadboard bundle here £29

Step Two – Assemble the electronics

The electronics consist of the current sensor (which produce signals proportional to the current in the mains) and the sensor electronics that convert these signals into a form the Arduino is happy with.
For a circuit diagram and detailed discussion of sensors and electronics see:
Assemble the components as in the diagram above.

Step Three – Upload the Arduino Sketch

The Arduino sketch is the piece of software that runs on the Arduino. The Arduino converts the raw data from its analog input into a nice useful values and then outputs them to serial.
a) Download EmonLib from github and place in your arduino libraries folder.
Download: EmonLib
b) Upload the voltage and current example:
#include "EmonLib.h"                   // Include Emon Library
EnergyMonitor emon1;                   // Create an instance

void setup()
{  
  Serial.begin(9600);
  
  emon1.current(1, 111.1);             // Current: input pin, calibration.
}

void loop()
{
  double Irms = emon1.calcIrms(1480);  // Calculate Irms only
  
  Serial.print(Irms*230.0);        // Apparent power
  Serial.print(" ");
  Serial.println(Irms);         // Irms
}

c) Open the arduino serial window
You should now see two columns of values. Apparent power on the left and rms current on the right.
Regeneractiv's picture

Re: How to build an arduino energy monitor - measuring current only

Guten Morning!
I translated this tutorial into German. It´s not perfect but I hope it could help someone.-->Link.
Ich hab´ den Tutorial übersetzt, ist sehr schlecht geschrieben, da Deutsch nicht meine Muttersprache ist, aber verständlich sollte es sein... für fragen:
http://electronics.stackexchange.com/questions/23591/ac-current-sensor
http://forum.arduino.cc/index.php/topic,12921.0.html
http://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface
http://openenergymonitor.org/emon/buildingblocks/how-to-build-an-arduino-energy-monitor-measuring-current-only?page=1

ไม่มีความคิดเห็น:

แสดงความคิดเห็น