Category Archives: Technology

Arduino based energy and climate monitor – version 2

Some time ago I embarked on a project to build an Arduino-based energy monitor. Many of these have been described on the internet, but I wanted to do it slightly differently. However, after many struggles, trying to get a lot of functionality in a single box (computing running averages, LCD screen with fancy menu system, SD card data logging with RTC time-stamps, record temperature from other sensors connected through RFM12b), I realised that it was getting too complex. Added to that, I short-circuited the VCC and GND, causing the Arduino nano to toast. I managed to remove the nano from the perfboard with a Dremel. After connecting a new Arduino nano I realised it was not the only part that was broke… time to move on!

I decided to take a completely new approach, starting from all things that I had leafed in the process. The RFM12b modules are especially useful, as they allow me to measure and broadcast climate measurements for almost a full year on a single 18650 3.7V LiPo battery. My new design is therefore modular, using RFM12b modules to communicate, and utilises 3.3V where possible. Furthermore, I discovered http://thingspeak.com as a much easier and more user friendly way of data logging and user-interface. I don’t have to walk to the cellar closet to look at the LCD, instead I simply check the current usage on my smartphone.

The new design therefore consists of a single relay station, which receives sensor data on a RFM12b module and forwards it every minute to http://thingspeak.com. Multiple sensor modules are scattered across our house, each recording from a sensor and transmitting a few parameters every minute to the relay station.

Here is a short description of the modules I currently have. In the near future I will post more details, including some photo’s and the source code.

Module 1: Arduino Uno with an Ethershield, connected over i2c to an Arduino pro mini. The pro mini is connected to an RFM12b board and receives data packets from each of the sensor modules. The reason for splitting this over two Arduino’s is that both the Ethershield and RFM12b use SPI. The Ethershield (version 1) does not play nicely with another SPI module. More details are posted here.

P1140007

Module 2: Arduino pro mini (3.3V) with a RFM12b and a LM35 temperature sensor. More details are posted here.

P1130981

Module 3: Arduino pro mini (3.3V) with a RFM12b and a AM2302 humidity and temperature sensor. More details are posted here.

P1130984

Module 4: Arduino pro mini (3.3V) with a RFM12b and a BMP085 barometric pressure and temperature sensor. More details are posted here.

P1130988

Module 5: Arduino pro mini (5V) with a RFM12b and a pair of CNY70 reflective sensors to measure the rotation of the disk of our Ferraris kWh meter and of the last digits of our gas meter. More details are posted here.

P1130989

Module 6: Arduino pro mini (3.3V) with a RFM12b and a pair of DS18B20 temperature sensors to measure the temperature of the outgoing and returning water of our central heating system. More details are posted here.

P1130995

I am planning to reimplement the relay module 1 in the near future. I discovered the ESP 8266 wifi module, which is available for around $3.50 on Ebay. Since it has a serial interface, it should not pose any problem combining with an RFM12b.

Arduino based energy and climate monitor

Last year I started with an Arduino project to monitor the energy in our house. I made considerable progress but also encountered some problems, the main one being that the CRT5000 modules are not sufficiently sensitive to pick up the reflectance of the rotating disk of our KWh meter. ALthough it is not yet finished, let me report on the present status.

All components have been wired up and soldered on a perfboard.

For my work earlier this year I completed the real-time interface between an openEEG-compatible fake-EEG amplifier and Arduino for the BrainGain science fair. In that project I combined the Arduino with RFM12b modules and ethernet. Since it would be fun to also do that on my energy monitor, I upgraded my toy project to an energy and climate monitor. Furthermore, I want to extend it to monitor not only electricity and gas, but also water. And finally I realized that. with all the information to be displayed, I need a button to scroll through the different screens.

The core components are

  • Arduino Nano
  • RTC
  • CRT5000 Infrared reflectance module 2x
  • LC Studio SD card module
  • 1602 LCD
  • CNY70 Infrared reflectance sensor (3x)
  • RFM12b on a RFM12b Board
  • push button

front

inside

Not shown here are the modules I made for the climate measurement and the three CNY70 sensors.

The problem I am presently running into is that the sketch is too large to fit in Arduino memory. Especially the SD card support seems to take a lot of space. I have tried compressing it down, removing all unused and debugging code from the sketch, but it still fails to run robustly. With all parts of the code enabled, the Arduino randomly resets. As a solution I am now considering adding a second Arduino to interface with the SD module.

Arduino kWh and M^3/h energy meter – gathering the components

I am working on an energy meter that is to show the instantaneous electrical power (kWh ) and natural gas usage (M^3/h) in our house. A bit like <a href=”http://juerd.nl/site.plp/kwh”>http://juerd.nl/site.plp/kwh</a>, but with two recordings, data logging to an SD card and with some buttons to switch the display from the instantaneous recording to usage per-minute, per-hour, etc.

I just managed to get all components hooked up to the Arduino nano. See the photo for an impression.

The project includes

  • Arduino Nano
  • RTC
  • CRT5000 Infrared Reflectance 2x
  • SD card module
  • 1602 LCD

I am still waiting for the two pushbuttons. Once those arrive I’ll finalize the electronics and software and transfer it to a perfboard.