Alan Meany's Ambient Knowledge

Check out Alan Meany's Ambient Knowledge energy monitor project using the non-invasive Mains AC method, its a really nice idea, from Alan's website:
"Ambient Knowledge is a lamp that glows different colours to display the current consumption in your home. Ambient Knowledge is an Ambient Energy Information Display that provides you with energy information in a visually pleasing, easily accessible convenient, glancable manner. At a quick glance AmbientKnowledge will make you aware of how much energy your house is consuming in a subtle simple approach, with minimal effort needed."

Alan will be exhibiting Ambient Knowledge at Ars Electronica 2010 in Linz, Austria 2nd - 11th of September.

Project Update

This is a joint blog post from Suneil Tagore and Trystan Lea. Last week we met up in North Wales and spent a good part of the week looking at the next step for the openenergymonitor project. We thought about: How it could be organised and described better. How it could be made more useful for other participants/users/developers, and how it could better reflect our ideas for the project and also our activities using the technology.

One of the main aspects that we would like to expand on is the idea of modularity.

Lets say you build a solar hot water controller, the solar hot water controller has the Arduino microcontroller platform at its heart, 1 of the 6 analog inputs and 2 of the 14 digital channels is used for the 3 multiplexed RTD temperature sensors. 1 other digital channel is used for the pump control. That leaves 5 analog channels spare and 11 digital channels. The cost so far has been £20 for the Arduino and between £5-8 for the temperature sensor electronics and pump control. For another £12: the price of a couple of resistors, capacitors a CT sensor and AC-AC adapter: mains AC energy monitoring can be added using only 2 more analog inputs. The mains AC energy monitor and the solar hot water controller share the same arduino and can also share for example an LCD and ethernet connection. This ability to share resources enabled by such a modular system can ultimately yield significant overall benefits in terms of energy efficiency, material efficiency, cost reduction, convenience and usability compared with having a separate device for each energy monitoring and control application.

To make this possible one of the main tasks will be deciding on documentation standards so that each bit of documentation can fit together with the other bits, this will need a bit of thought and work.

Another important element of making modularisation easy to work with will be developing Arduino libraries for the modules so that the software side is straightforward to program and also possibly investigating standardized connections between modules.

To start with we thought it might be best to divide the modules into types:

Input modules

Modules for measuring things, for example: Electricity, Heat, light, wind, fluid flow, etc

Actuator modules

Modules for controlling things, for example electric pumps or dump loads.

Data Modules

Displays, Computer and Internet based graphing

Each module would have a description of what it is and how it works, a list of parts - including possible suppliers, circuit design (if applicable), and a section on how to connect it to an Arduino including details on software and calibration (if applicable).

The next part to the documentation is the builds section: how to bring more than one module together to do something more useful and interesting like a solar hot water controller or a solar hot water controller / energy monitor combo.

After that is case studies. Which brings us on to another important topic. As well as developing this technology we hope to use it in our own homes and also look into how we can use it as a part of a service that we could offer, at the moment one idea in its early stages is to explore offering an energy auditing ,renewable energy feasibility and renewable energy installation service in our local areas. Suneil is just in the middle of his first solar PV installation and is developing a solar monitoring unit for the installation. Both of us taught a wind turbine making course at Atlantic college in south wales this year, and as a part of that we will be installing wind turbine monitoring. The case studies section will document the use of the openenergymonitor project in projects like these. One of the aspects of this is that as we experiment with making a living we hope to help other do the same.

Last but very much not least: the updated website has a section on local manufacturing. One of the main things we would like to explore as a part of this project is the idea of local manufacturing: Being able to make the things we want and need either in our own homes or in labs/workshops and small businesses in our local communities. This is a really exciting idea and emerging possibility that was a large part of the inspiration to do this project.

To learn more about local manufacturing also often called decentralised manufacturing or desktop fabrication have a look at the following projects that are pionnering the idea: RepRap the project to build an open source 3D printer and MIT FabLab’s; 100kgarages; a book by Kevin Karson and more resources on p2pfoundation manufacturing page.

So over the next few weeks there shall be changes a foot on the website as we attempt to organise it along the lines of what we have described above and the project starts to move more along this direction.

We would like to thank Ken Boak who has helped us refine the ideas above, especially those on modularity. Ken Boak is very knowledgeable energy monitoring and sustainable technologies enthusiast, and documents many of his findings on his blog sustainable suburbia.

Please feel free to join in and share your thoughts and ideas on this project. The scope for developing new applications and real world case studies/installations is limitless; posting your findings here is most welcome in this collaborative project. Hope to hear from you soon!

Solar hot water controller

Well its been a while since I last updated, I managed to get some time over the last month to build a solar hot water controller for the navitron evacuated tube system we have installed here on our house, its been a project I wanted to do for a while. I've documented version 1.0 of the design here:

Apart from the usefulness of being able to log data from the solar hot water controller I'm interested in looking at combining data from the solar hot water controller with data from the energy monitor. It would be interesting to see if its possible to calculate accurately how much immersion heating is displaced by the solar hot water system as well as how well the system is working compared with its expected output.

Here is a graph of the different system temperatures plotted with flot

All Power Labs

A couple of weeks ago I visited All Power Labs over in Berkeley CA on the recommendation of Ken Boak who went over there for a workshop in March. All power labs are:

“ incubator for open source energy experiments and distributed manufacturing solutions. We work to generate physical tools and information resources for people exploring alterative energy through DIY innovation and online collaboration. We believe that a bottom up, participatory ecology in energy is just as possible as it has been in computing. And we expect the impact of such creative self-determination will be no less transforming than its been in digital realms.”

Their current main project is called the GEK gasifier, (Gasifiers Experimenters Kit). The GEK gasifier converts biomass (woodchip etc) into wood gas, this gas can then be run in a car or burned for heating or used to generate electricity by running a gas turbine (they have a gas turbine!)+ generator or internal combustion engine + generator. The gasifier+engine+generator combination is called the Power pallet and can produce 10kW.

Bear Kaufmann who is investigating the performance of the system was looking for energy monitoring equipment and so Mario and I went over to see the operation and work with Bear on getting some energy monitoring working.

The generator they are using is a single phase 3-wire generator that is effectively the same configuration as household electrical wiring in the states. The energy monitoring setup therefore consisted of 2 CT sensors for current measurement: one for each leg a step down transformer for voltage measurement.

The power pallet has a gasifier control unit (GCU) which is based on the Atmel ATmega 1280 which is used in the Arduino Mega and so the unit is compatible with and uses the Arduino IDE for programming. The GCU has a lot of things happening on it: it monitors temperatures and pressures and controls things like flow to keep the gasifier working efficiently, there are critical servo updates that happen about every 20ms and so the main challenge of the visit was to try to fit the energy monitoring on to the GCU, to fit the real power, apparent power, powerfactor, vrms, irms sampling and calculation into those 20ms time slots. Up until now I have usually had the arduino dedicate around a second to make these measurements and so the question was could we squash the energy monitoring down and still get accurate results. Luckily we found we could do this, by taking one wavelength long samples and then averaging around 10 of these one wavelength samples to get a more stable result and so now the power output and efficiency of the power pallet can be tested with out a lot of extra equipment just a couple of sensors, resistors and capacitors connected to the GCU.

Here's a test output with different loads:

For more information have a look at Bear's post and write up here:

I will also try to upload the code for single phase 3-wire and the one wavelength sampling soon as I get a chance.

Mains AC: non-invasive version 3.0 up

The documentation for version 3 of the Mains AC: non-invasive energy monitor is up. It can be found here:

The main changes are:


  • 2x 10uF bias stabilizing capacitors added significantly improving accuracy: more info
  • Changed Voltage measurement circuit
  • Power for arduino comes from a seperate transformer to AC voltage measurement transformer.


  • Arduino sketch rewrite, sketch now follows Atmel's AVR 465 app note method, adding:
    • Phase calibration
    • Digital high pass filter to remove offset.


  • Much simplified calibration
There is also new more detailed documentation with this version, including separate pages on:

I've also done a bit of re-arranging of the documentation layout, trying to make the website a little easier to navigate, if you have any suggestions on this they would be very welcome.

Mission Science Workshop Project

I'm currently in San Francisco :) I'm here helping an organisation called Mission Science Workshop, who are interested in developing a course based on the energy monitor for high schools. The idea is to use the arduino and computer based graphing/logging as a platform to make scientific measurements of things like: voltage, current, power, energy, temperature, light, etc, that can be used in workshops to make it possible to see useful, interesting phenomenon and demonstrate the use of computers in science. Mission Science Workshop teach science in a very hands on, experiential way, trying to keep kids curiosity alive and sparking their interest in science. Have a look at their website here:

I'm working with Mario Landau Holdsworth from mission science on the project, he teaches at Mission Science and has a keen interest in Arduino's, energy monitoring, electric cars, mycelia and teaching science in a fun way. He has been very kind to sort out the whole visit.

As a part of the mission science project I gave a short workshop on the energy monitor last Friday. For the workshop I did a bit more work on the energy monitor design and tried to improve the documentation a bit, creating a printable energy monitor guide. I'm going to upload these to the main website today, but here are the printable pdf's for the mean time:
I'm in the San Francisco area until the end of the month, working on the project and going hiking around marin county and hopefully Yosemite, if your in the area, Mario and I will be down at Mission Science building things so let us know if you'd like to come and have a look.

Reducing noise, adding a capacitor

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.

  • 56Ohms gives a current range of 0 to 47Amps (with efergy CT, turns ratio: 1500)
  • 100Ohms gives a current range of 0 to 26Amps (with efergy CT, turns ratio: 1500)

C1 – The bias stabilizing capacitor.

  • Noise decreases as the capacitor size increases.
  • Energy monitor start-up time increases as capacitor size increases – this is the time taken for the capacitor to charge, measured as the time it takes for the current measurement to reach within 20mA of the final value. Only a noticeable delay the first time you put the energy monitor on.
  • Atmel recommends a 10uF capacitor in their AVR465 app note.
  • 10uF works well, I tried a couple of other values and there doesn't seem to be a very noticeable difference at 4.7uF, 1uF, 0.1uF, needs further testing to establish exactly how much difference there is between the values.

Rvd – 2x equal sized voltage divider resistors

  • Increasing the resistor size decreases current consumption in the voltage divider.
  • Increasing the resistor size increases noise due to high impedance.
  • Increasing the resistor size increases the energy monitor start-up time due to charging of C1.
  • 2x 100k resistors and a C1 of 10uF gives a start-up time of 16s.
  • 2x 10k resistors and a C1 of 10uF gives a start-up time of 4s.

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.