Measuring DC electrical energy production from micro-renewables

Just finished writing up a page about measuring DC electrical energy production from micro-renewables. I built is for measuring the output of the wind turbine. Seems to work quite well although I need to do a bit more work on calibration.

Here's a video of it all working, sorry about the rushed and blurry video taking...

Monitoring the output of the wind turbine. from Trystan Lea on Vimeo.

Measuring AC mains energy use the non-invasive current transformer method - part 2

Over the last few weeks I have been working on measuring AC mains energy use using the non-invasive current transformer method. I've updated the website with a page about what I've done and how it works here (there's still some work to be done on the page, but most of the info is there now).

Measuring energy use in a power strip above- but is just as easy to measure whole house electrical energy use by cliping the sensor to the mains input to the house.

Update on progress and a revised aim

First an update on what I've been working on and where I hope to go next.

Over the last few weeks I have been working on monitoring mains AC electricity energy use with the non invasive current transformer method rather than the invasive current sensing resistor method. In my previous post on the current transformer (CT) method I made two errors first the circuit I used was over complicated and secondly the efergy energy monitor seems to be able to estimate real power. Even though the CT method only measures current, I tried to see if it was possible to infer the voltage waveform from the current waveform producing a close estimate of the real power, It seems to have worked quite well. I will upload the details of what I have done soon.

I have also been working on DC energy monitoring for the wind turbine. I built the circuit that I talked about in the previous post. I however managed to blow one of the amps on the LT1495 chip and there seems to be an offset on the other amp which may be due to having blown one side. Id like to find a cheaper amp to replace the LT1495, maybe sacrificing a little on accuracy.

For the next two weeks the wind turbine is going up at two local festivals here in North Wales (Celtic camp and the National Eisteddfod). If your in the area feel free to drop by.

After the festivals I hope to have a look at monitoring the energy captured by the hot water solar panel we have here on our house, at the moment were not sure if it is working properly, it doesn't seem to be heating much water. However its hard to tell; the controller gives the current temperatures of the tank and panel, it would be useful to have graphs of the temperatures over several days and if a flow meter is installed it is possible to measure kWh of heat captured. Hopefully with better information it would be easier to see how well the system is working. It would be great to have a bit of software that analysed the data from the system, compared it to ideal site data and then be able to tell you something like “your system is working at 80% of potential”

All the above applications can all share the same software and similar electronics based on the Arduino. Once one is built, your have a lot of what you need for the others.

Further along the line it could be interesting to investigate possibilities for predicting how much energy it is possible to capture from a wind turbine or a hydro turbine before it is installed at a site using an arduino connected to an anemometer for wind or a river flow meter for hydro. I have also been doing some work with Suneil on trying to characterise how well the generator we built for the wind turbine works. With some detailed data and analysis it might be possible to identify possible improvements. Both the energy prediction and generator development could again share much of the same electronics, software and knowledge required for the energy use and energy capture parts of the project. And finally I would like to look at Internet connectivity, it would be really great to be able to check up on how say the wind turbine is doing from anyware in the world.

And so for the project to encompass all of the above:

"This is a project to develop and build open source energy monitoring and analysis tools for energy efficiency and distributed renewable micro generation."

The project is then divided into 6 areas:

Energy Use
Mains AC electricity and DC.

Energy Capture
Wind turbine, hot water solar, hydro etc.

Energy Prediction
Wind speeds, stream flow...

Energy Technology Development
Tools for the development and building stage rather than the use stage.

Data graphing and analysis and storage.
Using free and open source software

Sharing data with the world
Internet connectivity.

Hopefully this better reflects the direction of the work and will hopefully be a more useful collection of tools for anyone interested.

I will be updating the website soon with the recent work and to reflect the revised aim.

Any comments on the above would be great. Thanks for reading!

Software improvement and examples

I have made a start on rewriting parts of the software to make the code a bit more object orientated and easier to use. I was finding that every time I needed to adapt the software for a different use it was a bit messy.

In the process of doing a the re-write I will be adding examples of each significant part of the whole program working independently.

Have a look on the software page for part 01 - Reading data from the Arduino and conversion of the data to a useful form.

A start on DC current sensing

Now that both the North Wales and Cardiff EWB wind turbines have been built, it would be good to have some sort of laptop based graphical output of the power produced from the wind turbine when its taken up to a site for testing and so I have been looking at how to modify the OpenEnergyMonitor design to do that.

The wind turbine creates 12V DC electricity. It can produce up to around 500W of power, about 40Amps.

I have decided to go along the invasive current sensing route with a sense resistor (also known as a shunt). When dealing with such high currents the sense resistor needs to be quite beefy! Here's a picture of my test setup using a computer power supply to simulate the wind turbine and a 50W halogen as a load. The large block in the middle is the sense resistor.

I'm now on the stage of getting parts for a circuit that will allow the Arduino to read the voltage across the sense resistor.

I came across quite a lot of good circuit examples and advice on the linear technologies website here. Im thinking of following the battery current monitor circuit which can be found in their DC pdf. Here's the schematic:It can measure both current flowing in to the battery when the wind turbine is generating and current flowing out of the battery when there are loads connected.

I will post up the results once its built, I also need to make a load that can vary between 0 and 500W so it can be tested properly, the current plan is to make that load from a mini 12V kettle and a mixture of 50W 20W and 10W halogen bulbs all of which can be turned on and off from the Arduino. Should be fun!

If anyone has any experience with renewables and DC current measuring circuits I would be glad of any suggestions on any of the above.

Non invasive current sensing method

Last year I went out and bought an efergy energy monitor that measures whole house electricity use. It and many other such devices use a sensor called a current transformer to measure the current flowing through the live wire. You just clip it on to the live wire as it enters your house. No meddling with mains wiring required. The picture below shows the efergy sensor that I have clipped in to in this case the neutral wire (live or neutral makes no difference) entering the power strip.

A current transformer works in a similar way to a normal transformer. The primary coil in this case is the mains wire. Opening the sensor up you can see the secondary coil wrapped around the other side of the transformer core.

I found this paper which is about hall sensors but there is an overview of current transformers there too. Their description of how a current transformer works:

“The primary current (AC) will generate a magnetic field that is coupled into a secondary coil by Faraday’s Law. The magnitude of the secondary current is proportional to the number of turns in the coil, which is typically as high as >1000. The secondary current is then sensed through a sense resistor to convert the output into a voltage. ”

The next step is to convert this voltage in to a form usable by the Arduino. The analog inputs on the arduino require a voltage in the range of 0 to 5V and so the voltage needs to be biased by 2.5V and should not have an amplitude of greater than +-2.5V.

There's probably an easier and cheaper way to do this but the HCPL -7520 chip used in the invasive current sensor does the job simply and is what I had on hand. The isolation provided by the chip isn't required in this case and so Vcc1 and Vcc2 can be supplied by the same source. Here's a picture of the circuit and the schematic.

To find a suitable value for the sense resistor I connected up the above circuit to Arduino analog input 0 and the invasive current sensor to input 1 allowing comparison of both waveforms using a slightly modified power sampler program. I know that the current waveform from the invasive current sensing method is correct and so it is possible to calibrate the non invasive method by matching the both waveforms. The voltage across the sense resistor is proportional its resistance multiplied by the current flowing through it and so by trying different values for the sense resistor it is possible to match both waveforms. The closest fixed value resistor I could find that gave matching waveforms was 22Ohms. The current waveforms from both methods match quite nicely:

The graph show the current waveform with a laptop connected. The invasive current measurement is 0.5A rms and the non-invasive method gives 0.445A rms which is quite close, with a potentiometer with a range of about 50 Ohms the sense resistor value could be tuned and the result improved.

So that's current done but to get a value for power we also need a voltage measurement. Unless its possible to infer the voltage waveform from the current waveform, devices like the efergy energy monitor can only be measuring current. So how do we get a power measurement? Apparent power is calculated as the rms voltage x rms current, to read more about power measurment have a look here. The rms voltage is nearly always in the uk 230V however the rms current varies as the load is changed. The current transformer method can measure rms current and so we can calculate a value for apparent power with this method.

My efergy energy monitor however has stopped working (maybe after I tried to work out how it worked by taking it apart) and so I cant compare the results. If I get it to work again, I will post up the results. However the results do agree with the invasive current sensing method and so should be good :)


Hello and welcome to the OpenEnergyMonitor project blog. The OpenEnergyMonitor project is a project to develop and build a free and open source energy monitor. Have a look at the main project site here.

This blog will be used to document progress, share and discuss ideas.