General Information
Sunrise07:38
Sunset18:06
Temp. Outside9,2 °C
Temp. Inside22,7 °C

Usages for today
Gas0,00 m3
Power0,2 kWh
Water0 L

HA Statistics
Devices 292
Device values 1723

Hot Projects

Read about them
on my web log:
Smart meter
Opentherm
Ethernet Doorbell
Audio/Video
Mantis CNC Mill
DIY Wireless Sensors
ZigBee
Arduino

Last pages added:

Opentherm Gateway
Smart meter
Nemef Radaris Evolution
Audio Video

How to measure gas consumption

As most gas meters installed in houses here in Holland have, so does my gas meter have a little mirror inside the "6" on the least significant digit.

I used 2 different method of collecting data for the mirror rotations.
The first one was based on 1-Wire. The current one makes use of an RFXPulse module and a RFXMeter. These 2 devices reside in the fuse cabinet, where our gas meter is located. An RFXCOM receiver, located under the stairs near the entrance, picks up the signals and my HA application does the rest.


Old method


Gas meter with CNY70 sensor in front of the '6' By counting how many times this mirror rotates, it is possible to monitor gas usage with a resolution of 0.01 cubic meters.Sensing the rotation of the last digit is done with a CNY70, a reflective optical sensor. This CNY70 has a light source that emits an IR beam and it has a detector in the same housing as the emitter, that will detect the reflection on the mirror of the "6".

Here you see the CNY70 sitting right before the rightmost counter, where the "6" has a mirror.
The detector side of the CNY70 is connected to a LM741 opamp to amplify the signal, resulting in a nice pulse signal when the mirror passes the CNY70.
(Yellow is the CNY70 output, Green is the LM741 output)
Hobbyboards 1-Wire Dual Counter This pulse signal is being fed to a Dallas 1-Wire DS2423-based counter from Hobbyboards.The DS2423 is being polled by my Home Automation software, that collects the counter value at regular intervals and stores the counter values to a SQL Server table.

New method


CNY70 sensor The CNY70 is now replaced by one that comes from RFXCOM, complete with cable and jack plug. Here you see the sensor in front of the "6".
RFXCOM RFXPulse module The sensor is connected to an RFXPulse module. This module takes care of identifying the pulses. The RFXPulse module is inserted into a RFXMeter, which takes care of the counting and transmitting the counter value. As you can see my RFXMeter contains 3 RFXPulse modules: for Gas, Water and Power.
RFXCOM receiver under the stairs The RF signals from the RFXMeter are received by the RFXCOM receiver. This receiver then transmits the data over my LAN to my Home Automation PC. There the data packets are decoded, the counter values are calculated and stored in a SQL Server table on a regular basis.
Gas usage is stored on a hourly basis, meaning that for every hour that gas has been used in our house, there is a record (row) in the table that holds the data for that gas usage.With this it is possible to create very detailed charts of the gas usage.

More information about the components used:

CNY70 reflective optical sensor

Hobby Boards Dual Counter

Dallas Semiconductor DS2423

RFXCOM RFXMeter with pulse counter