- How to make a basic energy monitor
- Detailed System Design
- Accuracy
- AC Power Theory 1
- AC Power Theory 2
- Household wiring
I recently bought a new laptop and when I plugged it in to the mains and connected up the energy monitor via usb and monitored the current of one light the current value it read was much higher than what my reference meter said it should be. I got the following results:
Load description: One light
Energy monitor power supply: Laptop mains connected.
Energy monitor: 1050mA reference meter: 189mA
Load description: One light
Energy monitor power supply: Laptop running off battery.
Energy monitor: 186mA reference meter: 189mA
I loaded up the waveform sampler program to see what was going wrong and saw this when the laptop was connected to the mains:
When the laptop was not connected to the mains the fluctuations largely disappeared.
I then checked to see what the energy monitor would read when powered by an external supply rather than the laptop supply. The energy monitor was now a lot closer to the reference meter than before:
Load description: One light
Energy monitor power supply: External power supply
Energy monitor: 225mA reference meter: 191mA
The laptop is not connected to the mains here.
Load description: One light
Energy monitor power supply: External power supply
Energy monitor: 215mA reference meter: 191mA
The laptop is connected to the mains here but on a separate plug socket.
Interestingly the laptop still produces an effect even when its plugged into another socket not part of the measuring setup. The other thing to note is that the energy monitor current is higher by about 20-35mA with the external power supply than when powered by the laptop running off its battery.
It would clearly be nice to get rid of the noise when the laptop is connected to the mains and the difference in measured current between the different power supplies.
Reading through the Atmel AVR465 application note, they use a 10uF capacitor across the biasing voltage divider to stabilise the DC level. I added the capacitor and low and behold the noise and difference in power supplies disappeared and now the results are much better :) The energy monitor now reads
Load description: One light
Energy monitor power supply: Laptop mains connected.
Energy monitor: 194mA Reference meter: 191mA
Energy monitor power supply: Laptop running off battery.
Energy monitor: 194mA Reference meter: 191mA
Energy monitor power supply: External power supply.
Energy monitor: 193mA Reference meter: 191mA
The laptop is not connected to the mains here.
Energy monitor power supply: External power supply.
Energy monitor: 193mA Reference meter: 191mA
The laptop is connected to the mains here but on a separate plug socket.
The variation between power supplies and the effect of the noisy laptop power supply is significantly reduced.
Here's a screenshot measuring the same lamp as I was measuring above with the energy monitor powered from the laptop connected to the mains but now with the 10uF capacitor across the 2.5V bias:
Very steppy but this is due to the small magnitude of the signal versus the ADC resolution which is expected, the large noise fluctuations have disappeared.
Here's the new circuit diagram:
Component values
CT sensor turns ratio – for the efergy sensor seems to be 1:1500 which means the current in the secondary windings will be 1500 times less than the current in the mains primary winding.
RsensI - Dictates the range that the current can be read over.
C1 – The bias stabilizing capacitor.
Rvd – 2x equal sized voltage divider resistors
I've also removed the 100Ohm current limiting resistor from the above circuit as I'm not sure that it was really doing anything, I put it in there out of general practice, feel free to use one if you like.
Its also worth adding a 10uF capacitor on to the voltage measurement circuit in the same place. I will discuss that in more detail soon along with some other changes to the voltage measurement electronics.