Tags:
create new tag
,
view all tags
---+ Energy Counter Project Everything started with the idea of measuring the energy consumption of my house mainly due to some huge electricity bill that arrived to my mailbox... My solution for the problem is based on three components: 1 Energy Meter 1 Real-time data capture 1 Data storage ---++ Energy Meter My house has a three-phase supply and I need to measure the energy consumption on each phase independently. For my project I've used 3 x !DRS155DC which I've found here http://bg-etech.de/os/product_info.php/products_id/40 but was acquired through amazon.de. <img src="%ATTACHURLPATH%/DRS155D_1.jpg"/><img src="%ATTACHURLPATH%/DRS155D_2.jpg"/> In this module the input phase is connected on connection 1 and the output phase is connected on connection 2. The neutral is connected on connections 4 and 6. The energy measurement is done on connections 20 and 21 (in an upper level) which implements a DIN EN 62053-31 interface AKA [[https://de.wikipedia.org/wiki/S0-Schnittstelle][S0-Schnittstelle]]. In this interface, every time 1Wh is measured by the energy counter, one pulse with a few milliseconds (>30ms) is generated. <img src="%ATTACHURLPATH%/S0-Schnittstelle.jpg"/> The three energy counters were installed on the electrical box close to the main power breaker. <img src="%ATTACHURLPATH%/MetersInstalled.jpg"/> These pulses must be captured in real-time. ---++ Real-time data capture Each one of the three-phase meters will generate one pulse every time 1Wh is measured. These pulses must be counted and recorded. %BR% On my house I have a linux "server" (EEE Box PC) which is used to record the energy consumption but can't, of course, directly capture the pulses from the energy meters. To capture the real-time data I've use an ATmega system in two steps. ---+++ Step 1 - Olimex MOD-IO In order to prototype the real-time data capture I've used and [[https://www.olimex.com/Products/Modules/IO/MOD-IO/open-source-hardware][MOD-IO from OLIMEX]]. <img src="%ATTACHURLPATH%/MOD-IO-2.jpg" /> The MOD-IO board has a lot of features but the most relevant for this application are: * Open source hardware board with ATMega16L-8AU microcontroller * 4-optocoupler isolated inputs with screw terminals * Input status LEDs In this first step each energy meter was connected into one MOD-IO input and a small software generates, through the serial interface, one line for each pulse received. <img src="%ATTACHURLPATH%/diagram_step1.jpg"/> The software doesn't receive anything through the serial interface and its output is something similar to: <verbatim> K 0095714786 2 0095715022 0000001986 0000039514 K 0095715272 1 0095715447 0000002887 0000049680 0 0095715565 0000014099 0000050803 K 0095715815 K 0095716065 </verbatim> * The first field reports in which "phase" an additional 1Wh was measured. * 0,1 or 2 - Phase number * K - Keep-alive sent after 2.5 seconds without measured consumption * The second field reports how much time has elapsed since the MOD-IO startup (in 1/100th of second) - 0095715022 means 11 days 1 hour 52 minutes 30.22 seconds * The third field reports how much time has elapsed since the last pulse - deltaT. Can be used to compute the average power = 360000 / (deltaT) in W - 1986 means 181.3W * The forth field reports how many pulses were already counted since MOD-IO startup This OLIMEX MOD-IO board was just standing on the floor of the electrical box. <img src="%ATTACHURLPATH%/IMG_1202.JPG" /> ---+++ Step 2 - ATmega on DIN rail After the prototyping with OLIMEX's MOD-IO this project needed some professional touch. The ATmega board must be placed directly on the electrical box just like any other standard DIN rail module, side-by-side to the breakers. Some brief search on the Internet didn't show anything as simple as what I need for this project. My requirements were very basic: * Micro-controller based board * A solution as compact as possible (width equivalent to a power breaker would be interesting) * Direct access to the micro-controller GPIOs * Optional - Buzzer to warn on excessive power * Optional - LED to signal each 1Wh measured * Powered by 24V (available from my domotics system) Some solutions are available to integrate Arduino and other similar boards on DIN rails but they are not compact. For this purpose I developed a small board that fits inside a 17.5mm DIN rail module which can be seen on the [[ATmegaOnDin][ATmega on DIN]] page. %BR% This board is powered by 24V, has one LED, one buzzer and one button on it's front plate and has 14 GPIOs and 2 ADC inputs available. In the context of this project, no fundamental difference on the system architecture was need when using the ATmegaOnDIN board. <img src="%ATTACHURLPATH%/diagram_step2.jpg"/> The differences are: * Pulses from energy meters pull the input low - Pull-up needs to be enabled on ATmega inputs * The LED pulses once for each energy counter measurement pulse * The buzzer beeps when the power on, at least, one phase exceeds a predefined limit. No changes on the serial protocol. This picture shows the version 1 of the board installed on the electrical box. <img src="%ATTACHURLPATH%/ATmegaOnDIN_1.jpg"/> * On the top side it's possible to see the connections going to the energy meters. * On the bottom, the UTP cable is connected to an USB to serial (TTL) adaptor * The red and the brown wires are connected to the 24V power distribution * On the front plate: * The green LED is on when internal power is available * The red LED pulses according to energy measurements * The buzzer (just above the push-button) to warn on excessive consumpsion * The push-button is not used in this application -- Main.PedroMaiaAlves - 2015-06-16
Edit
|
Attach
|
P
rint version
|
H
istory
:
r5
|
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2015-06-16 -
PedroMaiaAlves
Home
Site map
Main web
Projects web
Receitas web
TWiki web
WebAlbum web
Projects Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Edit
Attach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback