Visualizzazione dei post da 2013

Arduino pulse counting with multiple Energy Meters and logging to Emoncms

Disclaimer:Part of the circuit shown runs (by necessity) 220V AC current. If you are not sure what that means and how to avoid getting injured because of it, please keep reading but don't try replicating the project. I am in no way responsible if you manage to get electrocuted but I would be sorry to know that you did it because you tried this at home and you didn't read the disclaimer .....

I have been working on a prototype for an arduino based project aimed at measuring energy consumption using multiple energy meters that can be interfaced to an arduino input pin like this one from finder :

the requirements for this project:

monitor power consumption using multiple counters store the collected data through a net connection to an Open Energy Monitor instance

Such a setup would allow me to monitor multiple power consumption (or production) counters, like house energy consumption and photovoltaic production, or energy consumption in multiple zones of an house.

Arduino I2C communication

While developing my energy monitoring system and my flood control system I decided I wanted to integrate the two in order to be able to monitor the flood control system using one of the sensor nodes of the energy monitor system.

The reasons behind it were:

The sensor node doing the monitoring was already physically near the flood control nodeThe flood control node has support for wireless modules (nRf24) but it is a different technology from what the open energy monitor nodes use (rfm12b)The need to be able to monitor the state of the float switches, the manual override switch (it is in a kids safe area, but not in a 'don't know what this is for, let's try and see' area ...)I wanted to experiment with I2C communications
I2C is a multimasterserialsingle-endedcomputer bus invented by Philips used for attaching low-speed peripherals to a motherboard, embedded system, cellphone, or other electronic device.
In particular I needed to exchange data between an emonTx node:


Arduino Relay Board to drive two flood pumps

I am the unfortunate owner of a house whose connection to the drains works well until rain level exceeds about 20 mm per hour then the drains simply close (thanks to valves we put in order not to have water from the street coming in). This usually happens a couple (ten at most) times per year, with peaks of as much as 50mm in half an hour during summer storms (northern part of Italy, not far from the Alps).
This means that when it does rain the street in front of the house get like this:

and that the area in front of my garage (and my garage and basement) get like this:

in the years I have worked to avoid this from happening but it has always been a trial and error process where when in error I get to work half a day cleaning the mess up.
Things I have tried:

Modify access to the street so that excess water stays in the streetAdd one (and later a backup) sump pump in a drain that collect water when the main drains aren't working. Each pump has a float switch and the switches have …
Open Energy Monitor and home automation
With this post I would like to start putting some content online again, and what better argument than what has been occupying my (really scarce) spare time in the last months.

I'll start with what I wanted to achieve with my home automation project:

Have fun :)Monitor home energy consumptionDetect 'Rogue' energy usagesHave an early warning system for my flood pumps in the basement/garage because when they fail I have anywhere from 5 to 50 cms of water inside when all is said and done.Avoid spending thousands of Euro to accomplish the project Mainly because of the last point, but also because of the potential complexity of finding an existing system that would allow me to achieve all my stated goals, the choice on what hardware and possibly software could be used left the project in a "Would like to do it but it costs too much" state for some time, until I stumbled on the OpenEnergyMonitor web site, that is.