7Segment power meter

What is it? questionmark

Every 10 seconds my smart home power meter sends out data, this can be captured by a simple serial connection.
This project aims to get the latest data from my Vera3 via wifi.

  1. Every 10 seconds a webpage is requested, this page returns a json object with all the information of my smart meter
    My vera3 get is http://10.0.0.15/port_3480/data_request?id=status&output_format=json&DeviceNum=38
    The response I get is easy to understand in firebug:
    json example
    [Update 2015-10]
    After implementing the Housedb project, a request is made to a specific webpage that only serves the needed information.
  2. This response is forwarded by the ESP8266 over serial to the arduino.
    It is not captured completely by the arduino, as the arduino simply doesn’t have enough memory to work with 1,6 KB  (after all my code and let alone processing through this data).
    So it only captures a specific part of the json string (just counting opening brackets).
    [Update 2015-10]
    As only the needed information is in the response, which is around a hundred bytes large, there is no need for this hack anymore.
  3. The than captured usage is displayed on the 7segment display.

Eagle layout questionmark

seven segment

I have used TPIC6C595 as they are able to drain 12volts (Thanks to http://forum.arduino.cc/index.php?topic=264333)
The complete board was broken into two parts as you can see on the next pictures of the end result
Every resistor next to the TPIC6C595 is 680 ohm.

Arduino and NodeMCU code questionmark

All the code can be found on my github: https://github.com/timdows/AMD/tree/master/SevenSegementDisplay

The lua script makes sure that it is connected to my wifi access-point at home.
The getData function makes sure that the json object is printed back to serial upon request.

The arduino code makes sure that every 10 seconds a new request is made. The json result is parsed via the ArduinoJson class.
It than updates the watt usage on the bigger 7segment and than on the 4 smaller one using the LedControl class.

[Update 2015-10]
The lua script now holds a function getData, that is fired upon receiving “getData()” as a string as input.
The command is now pointing to the 7segment route on my symfony2 Housedb project.

End result board 1 questionmark

SONY DSC
Bottom
SONY DSC
Top

End result board 2

SONY DSC
Top view
SONY DSC
Bottom view of both boards (look at the LM1117 on a heatsink photobomming the picture)

End result when connected

SONY DSC
Placed behind the seven segment panels
SONY DSC
Top view
SONY DSC
Front view

Ideas for the panel

I got some ideas to laser cut a nice panel out of plastic, my first drawing looks like this
Drawn in tinkercad https://www.tinkercad.com/things/j3swRbZ4hiz-seven-segment-surrounding

seven_segment_surrounding

[Update 2015-09]
I got the panel lasercut by laserbeest.nl, now waiting for some small 7segment displays to implement in the bottom parts
IMG_20150907_113902

[Update 2015-10]
After installing the panel and connecting the smaller seven segment displays it now looks like this:

Back of the panel
MAX72xx led drivers
Fully connected
It’s quite hard to make a good photo, the best one is when it is dark around the panel

TODO questionmark

Implement 4 small 7segment displays in the bottom, they will show

  1. Total kWh of today
  2. Total kWh of this week
  3. Total kWh of this month
  4. dono yet (you got suggestions?)

[Update 2015-10]
The 4 smaller 7segments are installed and depicting the following numbers:

  1. Total kWh of this week
  2. Total kWh of last week
  3. Total kWh of this month
  4. Total kWh of last month

Project costs in € or $ questionmark

Object Price
Arduino Pro Mini 5v $ 1.92
ESP8266 $ 2.89
4x TPIC6C595N $ 8.72
4x 4″ 7-segment LED display $ 23
LM1117T $ 0.59
L7805CV $ 0.14
2x MAX7219 8-Digit LED Display $ 5.34
2x heat sink $ 0.38
Other materials $ 2
Total $ 45.01

What could be better questionmark

  1. I found out that LUA takes much easier functions to receive commands from the Arduino, now I’m over enginering it with the amount of characters and splits (arghhh).
    [Update 2015-10]
    This change was implemented in the latest code commit
  2. All the resistors next to the TPIC could be left out and a P16NF06 mosfet should be used. With this it would be made possible to dim the light programatically
  3. Change the arduino code to support pointers in the functions writeSmallSevenSegment and writeSevenSegment

Comments are closed.