I’m mainly posting this because @simonf was interested in doing something similar, so may be able to hack my designs to suit what he wants to do, rather from starting from scratch
I will post the code as well, but its rather untidy at the moment, so needs a bit of cleaning before I can do that.
I built the energy monitor for my own use, as I have solar PV on my house and also for my parents and sister to use, as they also have solar PV.
The good thing about the Open Energy Monitor, is that you can use it to detect direction of power flow, by using the power factor.
Generally most homes tend to be inductive, so when the house is drawing power from the grid, the phase of the current flowing into the house is not quite the same as the phase of the voltage.
The Open Energy monitor uses a current clamp to detect the AC current and a step down transformer to detect voltage (and it compares the phase of the voltage and power to calculate the power factor https://en.wikipedia.org/wiki/Power_factor )
Power factor can be negative or positive and is dependent on the direction of the AC current (yes I know AC current goes both ways 50 of 60 times a second… ) and hence gives power flow direction.
Anyway, the Energy monitor displays how much power is flowing and in which direction, i.e when the home is consuming power from the gird or exporting to the gird
I built the “PowerTransmitter” to be dual purpose so it could also be used as a remote display, but I subsequently cut the board down to make it smaller and removed the analog input circuits, so that the display units could go into a smaller box
On the first (and only) batch of PowerTransmitter boards, I made a mistake and the current input track got deleted, as I was rushing to fit over-current protection zeners.
I think I’ve since fixed this problem, but as I had 12 boards (from dirty cheap pcbs’), and only needed 6, I just fixed the boards by adding a wire to the back where the missing track was supposed to be.
But I think I fixed the eagle files.
I also had a problem with the ESP8266, where I’d omitted some pullups and pull downs. I can’t recall if I updated the schematic and PCB to fix this.
The PowerReceiver, is just a cut down PowerTransmitter board. It works OK, but I have not had chance to test the ESP8266 connections.
I have also been working on a PowerController, which is effectively a high power dimmer controller, 40A at 240V, for use with electrical water heaters, to make use of excess solar power (as Feed In Tariffs are very low and its more cost effective to heat water with excess solar power than to sell it back to the gird – at least here in Australia)
However I’ve only got as far as building the high power / high voltage side of this, and have not tested it at all, so I’m not going to post it to github until I know it works
Thanks for the Design Looks good I have had a quick look an the schematic and a noticed something odd.
On the transmit board D1 / D2 both go from ground to IrefV I think one should go from IrefV to VCC. It looks like they clamp the AC waveform within gnd and vcc….
Also I assume R7/8/9 are the missing pull/up-down resistors.
I am going to re-lay the board as I want to use the connectors the same as on my current clamp and do the Hi voltage board as a snap off (That I can POT).
I will double check the circuit.
I think the diodes that look strange are the current input over voltage clamps, one should be a normal diode that conducts if the voltage goes lower 0V, the other one is supposed to be a 3.3v zener which breaks down, if the voltage exceeds 3.3V.
So they both look like they are in parralel, however the normal diode is supposed to handle the forward current, as I think the zener is not designed to operate well in this direction.
But I could be wrong and the normal diode is not needed.
I will check the resistors, as a cant recall if I updated the ESP8266 side of the circuit.
BTW. The layout was spaced out on purpose, as I wasnt building all the boards myself, so I needed to make something which was easy to assemble.
With the nRF905 I hacked someone elses library to get it to work. I will publish the code on github when I get chance.
I connect the ili9341 display via a ribband cable, but you can also solder it on the back of the board facing the opposite direction, so it goes under the Maple Mini, which saves a lot of space, but then requires pillars in the box, to mount the PCB.
I will post a lot more information including photos of installations etc, soon.
I will double check the circuit.
I think the diodes that look strange are the current input over voltage clamps, one should be a normal diode that conducts if the voltage goes lower 0V, the other one is supposed to be a 3.3v zener which breaks down, if the voltage exceeds 3.3V.
So they both look like they are in parralel, however the normal diode is supposed to handle the forward current, as I think the zener is not designed to operate well in this direction.
I connect the ili9341 display via a ribband cable, but you can also solder it on the back of the board facing the opposite direction, so it goes under the Maple Mini, which saves a lot of space, but then requires pillars in the box, to mount the PCB.
No worries
I will try to do a video this evening, showing it working on my test bed, but I will need to set things up again.
I have a 2kW oil filled radiator I use to test the current clamp, (it has 2 x 1 k switchable heating elements and is isnt that inductive, so I use it to configure the relative phase angle between the voltage sense transformer input and the current clamp.
You may have noticed I put in 2 other digital inputs, which I intended to send the pulse output from the electricity meter – but I never got around to wiring this up or writing the software, however I do have an older AVR Arduino based project that uses a photo diode strapped to the pulse LED’s on one of the meters, which I use to read the power being generated by a solar inverter – so I was planning on eventually moving that pulse input onto this new board.
I was going to use the pulse input to compare / verify / calibrate the data from the current clamp, as the mains meter pulses 1000 times per kWH, when (and only when) consuming from the grid. When exporting, my dads electricity meter turns its LED on permanently, but my meter does not flash its LED at all when we are exporting. (I’m not sure what my sisters meter does… I’ve never looked)
One other thing about the electricity meter pulse output (LED etc), is that the electricity meters seem to lag a lot, when switching from consuming to exporting (and vise versa), so I’m not sure if the pulse output also lags. I think some of the meters only sense every 5 seconds, or perhaps only report to the LED every 5 seconds.
Anyway, these two inputs can also be used for outputs, so at one point I was going to attach a beeper to one of them, as I was asked for the unit to beep when the net power flow changed from exporting to importing. (but like the rest of this project, in the end it was not required)
And, I also put a the pins for a AM 433Mhz TX unit like this one http://www.ebay.com.au/itm/RF-Wireless- … Swa-dWhKD6
As I thought I may need to control some remove control mains sockets, based on the amount of solar power that was available.
I think I did some tests with this and got it to work, but in the end it wasn’t needed.
As I made these units for myself and my extended family, I got a lot of requests to add various functions, but quite often, people would change their mind, and like everyone else, I struggle to get enough spare time to do 10% of what I’d like to do.
Hence a lot of the possible features never got implemented.
On an average Day I would have 13KWh of consumption the difference between Pulses and CTs was around 250Wh most of this seemed to be due to ant-creep on the meters (when you change from inflow to outflow) which is what you are probably seeing as a delay. The way the meters work is that you get a pulse for each chargable unit usualy 1Wh if you consume 0,75 Wh then allow your generator to generate the same amount is zeros the counter so you are not charged for the 0,75 but conversely you don’t get paid for exporting it. Before the gestapo on the board jump on me for telling you how to fiddle your meter this is legal there are commercially available devices for doing this you are not stealing electricity merely replacing it (with Generated Power) before it mounts ups to a billable unit. Basically you try to consume exactly what you generate normally by diverting excess generation to the immersion heater. In some countries such as the USA they have net metering which is effectively the same thing on paper they deduct your export from your import before billing you.
My original project transmitted all the data via bluetooth to a PI which displayed the results on a re purposed digital picture frame. This was early Pi days Model A and I found it used to screw up the SD card after a few months (even though the card wasn’t used much). Now my Current cost meter is dead so its time for V2.
I will be able to use those extra inputs to monitor my gas and water consumption I have a optical sensor on the gas meter that pulses one every time the 0,01m3 dial rotates once. I have a water meter I have read a well positioned hall effect sensor should be able to read it.
Where I am in Australia just have one “Smart Meter”, but I also built systems for my relatives in the UK.
I know in the UK, you get paid for power generated, not net power exported, but here in Victoria Australia we only get paid for net export, and the rate is now very poor, 6 cents per kwh, as it got reduced recently (from 26 cents per kwh). (NSW in Aus used to be the same system as the UK, but it may have changed now, as it ends up costing the government or the power companies a lot of money)
So there is no point in anyone having a large array, unless you have an electric water heater, or one of those new new massive Lipo batteries
However I built this system for use by my rellies in the UK, who have electric water heating etc, more than I built it for myself
In the longer term, those big lipo batteries and clever inverters will do away with a lot of the tech that at the moment we have to built to get the most out of our solar arrays, but in the mean time, the best thing I can do is keep a close watch on the power display, and limit out going power, by doing things like putting on the washing machine if we have a lot of excess power, or use it for our heat pump room heater etc etc, and generally turn off any unused devices when we are consuming power.
<…>
In the longer term, those big lipo batteries and clever inverters will do away with a lot of the tech that at the moment we have to built to get the most out of our solar arrays<…>
We often get these sorts of technologies first in Australia, as we are a small market that can be used as a test bed.
Unfortunately, my solar inverted would need to be replaced, as it doesn’t support using a battery, as its only the new systems that seem to have this feature ![]()
I investigated a project with windmills shared purchase of 2WM towers About 3000MWh /Year average house consumption UK is 5MWh/Year. I managed to negotiate net metering for the project with a power company as they need a certain mix of green energy. The plan was to sell the tower to 1000 households or so and they would get 80% of there share of the electricity free essentially Knocked off there consumption before billed. The odd 20% would go to pay for the land use maintenance etc. It was very tax efficient as well. The problem is the current government is they killed the wind industry in favor of their NIMBY supporters.
For most of Australia, the amount we get paid for generation from the panel, is now virtually nothing.
We get less than the cost of generation by the cheap and dirty coal fired stations.
NSW used to have a system like the UK, but it is slowly being phased out.
Victoria, has been reducing the feed in tarrif over time, and has never been based on how much power comes down the cable from the panels.
So there is a big economic benefit here to having a battery, and even Virtual power companies, who use a system of controlling your inverter + battery system, via the net, so that you get paid $$$ if you can export to meet peak demand, when prices go up.
Also many people in the bush have high connection charges, due to the distances, and I think a lot of them will go completely offline in the next 5 years, using batteries and small backup generators.
I have revamped the design and I have 1 concern you said you hadn’t used the ESP8266. I am just wondering if the Maple mini can power the ESP.You have decoupling caps but nothing big enough for the ESP. I was just wondering whether to use an additional regulator? Or at least a couple of meaty caps one near the ESP
I have put the display on the back of the pcb added 2 extra current channels, Improved the analogue reference circuit, swapped the pots for multiturns.
I guess it depends on the regulator on your Maple mini (and also the heat dissipation).
My Baite board seem to have AMS117’s on them http://www.advanced-monolithic.com/pdf/ds1117.pdf
But I don’t know the manufacturer (they may not be made my Advanced Monolithic)
I will solder an ESP8266 to my board this evening, and let you know how it goes.
Re: Swapping pots for multi turn.
Yes. I would do that myself if I made another PCB. I just designed in some single turn ones that I could buy locally, but my dad had to bend some pins to fit the multi turn pots he had in his spares box.
Note.
I’m not sure the original eMon TX unit used pots at all. I have a feeling they relied on making software calibrations. But I thought it was better to add pots on the inputs, as you can then adjust the analogue side to make the most use of the ADC’s
BTW. The reason I had R8 and R6 was because my pot was single turn, I had to just get it to adjust the center point of the voltage range.
If I’d not done had those 2 resistors it would be really hard to manually trim it to 3V for 240V in.
Also.
Now I look at the circuit. I should change the symbol on D2 for a zener. I think what happened was that I added those 2 components in haste, after I’d already submitted the files for production, as DirtyCheap PCB’s allows you to update the files until they are actually allocated to a board house.
And, I forgot to go back and fix that error.
I guess it depends on the regulator on your Maple mini (and also the heat dissipation).
My Baite board seem to have AMS117’s on them http://www.advanced-monolithic.com/pdf/ds1117.pdf
But I don’t know the manufacturer (they may not be made my Advanced Monolithic)
I will solder an ESP8266 to my board this evening, and let you know how it goes.
Now the ESP8266 has good software serial, you could use some GPIO pins instead of the main TX and RX used for programming.
When I designed this board, I don’t think Software Serial had been ported to ESP8266, but I now use it in preference to connecting to the main TX and RX as it makes reprogramming easier.
Albeit Software Serial is slower.


