With the recent move to my new home, some curiosity about the consumption of energy, gas and electricity, first and foremost. The heating system is completely new, so there were no historic data about the annual consumption, and with winter time currently, I thought it could be interesting to collect some data and analyze.
The meters are not the best starting point, the electric meter says, manufactured in Western Berlin, e.g., during the period of separation in Germany, pre 1989… The gas meter is a but more recent but the well known old design.
At least, the gas meter has some provisions for digital read-out, probably, a magnetic system, with relatively coarse resolution, and a mirror “6” which aids itself to optical pick-up with 10 Liter resolution.
Here you can see the mirror… the “o” of the “6”.
To pick up the reflection, I used some IR transmitter-receiver pairs, you may take similar from an used computer mouse, I purchased some sets as surplus parts years back.
Now, the next challenge is to get the readings of the meters from the basement and 2nd floor, to the ground floor office that has the web server – to collect the data in one place and to analyze.
This is achieved by NRL24L10 transmitters in the 2.4 GHz band. These transmit to a common receiver that is connected to the web server (running Apache/Ubuntu) via a wired 9.6 kbaud RS232 link.
The transmitters and receiver are controlled by Atmel m328p, from some ready-to-use Chinese controller boards similar to Arduino nano, but the software and use is all avr-gcc, nothing to do with Arduino.
There is no need to deal with the NRL24L10 chip itself, because there are ready-made small boards available cheaply, less than 1 EUR per piece…
For the gas meter mechanical part, a small piece of plastic scrap and a Nylon screw is all that was needed to get a stable signal.
Sure it needs to be positioned well, but it is not a particularly sensitive or critical adjustment.
First, I just transmitted the strength of the reflected light to the server (receiver), and did all the calculation in the receiver, but this has various issues if the transmission of the signal is interrupted for some reasons, like RF interference or some other outage at the receiver end.
So I decided to change to counting the “6” pulses at the transmitter end, and the transmitter will send data every few seconds (including the time stamp of last counter change, and a time stamp synchronization data package every 10s of seconds).
Now it is counting very reliably, and can recover from receiver outages no problem.
The data received are interpolated to 6-minute intervals, i.e. 240 intervals per day.
With the electric meter, the mechanical part is a bit more difficult, as there is no place to attach a screw or anything, so I decided to use a piece of plastic, precision made to fit the front cover recess, and a metal wire (spring bracket) to hold it in place.
At the right positions, openings have been milled so that the wheel can be “seen” by the IR detector (the wheel has a red mark, and 75 rounds per kWh consumed).
It needed some fine adjustment and tuning of the pick up threshold, and an algorithm to avoid false counting by introducing a dead-time after each pick-up event, because with the wheel turning fast, e.g., when 10 kW are drawn, there have been extra counts. This has now all been eliminated by proper adjustment, more margin of the IR detector.
Some examples, with high power consumption in the workshop, i.e., 5 and 10 kW machinery and heaters in operation.
Additionally, the same system is used to record the living room floor temperature, in a corner, which is a pretty good representation of the heating system’s effect on the house. At nighttime, the heating is essentially stopped (13.5 degC as minimum temperature, which requires no heating unless it is a very cold night). The sensor is a DS18B20, which can be directly connected to the microcontroller with no further converters and delivers good accuracy.
It is seen that the regulation has some on/off characteristics, but the temperature stability seem stable enough for the purpose.
If you want to do similar things or need the code, etc, just drop me a line.