ESP8266 MQTT WIFI energy monitor project

I built an open source printed board using an ATMEL 90E24 energy monitoring chip, and an ESP8266. If precautions are taken and the user is comfortable working with mains voltages, then this solution may be of interest to this group.  I have a couple of these boards monitoring the output of my solar inverter, and the AC input to my battery charger. Because the link is RF,  isolation is achieved, however, the board does have mains voltages present on it, so it should be housed in an insulated electrical box where no one can touch it when it is powered on. The firmware uses MQTT and JSON to send measurement and metering data back to the requester.

 

For project details please visit my Github page at https://github.com/hwstar/HW-AC-Emeter

 

This project should only be attempted by someone having the training, qualifications, experience and equipment to work on live circuits at mains voltage. You must read and understand the warnings in the accompanying documentation. You must not proceed with this project unless you are certain that you are competent to do so.

glyn.hudson's picture

Re: ESP8266 MQTT WIFI energy monitor project

Wow, this looks really interesting. I have recently heard of the 90E24 chip. How are you getting on with this? What are your long term plans for this project? I would love to post a guest blog post on our blog about your developments. 

I like that you have used the ESP8266 and MQTT. How difficult did you find interfacing with the 90E24? Have you experiment with the 3-phase version? 

mharizanov's picture

Re: ESP8266 MQTT WIFI energy monitor project

Lovely project indeed, great potential in this solution. Subscribing to the topic

hwstar's picture

Re: ESP8266 MQTT WIFI energy monitor project

I wanted to build my own measurement devices, because I have an small 1kW solar system and battery bank serving as an offline UPS which provides power to my servers and PC 's during the day, and I wanted to monitor the output of the inverter and the AC  input to the charger.

I chose the 90E24 because it can be had for 1.60USD, has a SSOP28 package which is relatively easy to solder, and it can use an inexpensive shunt resistor as the current measuring device.

There are actually 2 forms of the project, one uses  the ESP8266, and the other uses the Arduino as a  standalone energy monitoring box.

I have no desire to sell this project as a product. I really only wanted to solve a problem, and share my work with the open source/open hardware community.          

The 90E24 interfacing was trivial.   Having to lock and unlock the register banks was the most challenging part of the firmware development.  Also some of the registers have signed values, while others have two's complement values.                              

The big challenge with the 90E24 is accurate calibration without laboratory-grade test equipment. I have only been able to get 1-2% due to the lack of the proper test equipment. The 90E24 is capable of 0.2%.  The mains voltage jumps around quite a bit in my neighborhood especially in the afternoon.  If you have a programmable AC source, and precision loads you can get more stable voltage calibration, and your current calibration will be easier as well.

I have not used the 3 phase version of the part. In my part of the US, we can't get 3 phase power in a residence. It is only available to commercial customers.

I have revision A boards out for fabrication to address the rework requiements on the rev X1 board. These should show up in Early November. Once I have tested these, I will upload the rev A board design and schematic to Github.

 

Steve Rodgers

hwstar

 

   

Sergegsx's picture

Re: ESP8266 MQTT WIFI energy monitor project

Very nice work. Subscribing to the topic also.

glyn.hudson's picture

Re: ESP8266 MQTT WIFI energy monitor project

Great work, might you have any spare PCB's? I would be happy to pay and cover all shippings costs. Looking forward to having a play. 

hwstar's picture

Re: ESP8266 MQTT WIFI energy monitor project

 

I have no assembled boards left, only board blanks. I'm saving the remaining parts for the rev A build. Can you build an smt board? If so, I can send you some board blanks for the cost of shipping.

I have 11 of the rev X1 blanks left. I got 14 from Elecrow, and built 3 of them for my use.

The rev X1 boards will require rework (2 cuts and a jumper). The rework is documented on my Github site.

I have rev A board blanks on their way to me via slowboat from Elecrow, but they won't be here till the beginning of November. These have the rework incorporated, and also bring 3.3V to pin 3 of the serial connector for the ESP8266.

Steve Rodgers

hwstar

glyn.hudson's picture

Re: ESP8266 MQTT WIFI energy monitor project

Hi Steve,

Thanks a lot. Yes, I'm happy to assemble SMT no problem. I have seen the required rework documentation on your github, this should not be a problem. Please PM me your details and I'll send over payment. 

hwstar's picture

Re: ESP8266 MQTT WIFI energy monitor project

 

An update:

I received and tested the revision A design. Testing of 2 boards on the bench is complete with no issues. Rev A incorporates the X1 rework, makes the ground plane clearance 0.016 inches instead of 0.008 inches, removes some of the mode pin pullup/pulldowns and adds 3.3V to pin 3 of the programming connector through a zero ohm resistor.

The Revision A schematic. BOM and board design are now available on my Github site at: https://github.com/hwstar/HW-AC-Emeter

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.