Metering electrical service to the home
This project involves working near and around the electrical service panel. Do not perform these steps unless you are a licensed and qualified electrician. You assume all risk and liability. The information contained here is merely for reference purposes, I do not take any responsibility for the loss of property or life should anyone not follow this warning.
Home energy use accounts for 11% of the total energy consumed nation wide. Typically, homes have a variety of energy services provided to them. These are gas, oil, solar, biomass, geothermal, and electricity. The average home gets 44% of this energy from electrical services. My home is purely electrical service, so I have more motivation to meter my electrical service.
Every home should have a service meter that the provider uses to gauge and bill for services. This meter is typically on the exterior of the home. Reading and tracking the meter is a tedious process and prone to error. Many utilities have since updated the meter reading electronically. However, these electronic readings are available to the home owner.
Most of the work in the project is based largely off of the Open Energy Monitor project, https://learn.openenergymonitor.org/electricity-monitoring/. I’m using similar current sensors that are attached to each circuit breaker leg. I feed the sensor cabling through a conduit attached to the circuit breaker panel to another sensor panel. This keeps my low voltage Arduino and the rest of the circuits isolated from the home mains.
My current sensors have 3 position 1/8th inch stereo jacks on them. I sourced my from Sparkfun and Amazon. Here are links to each one.
Sparkfun 30A Current Sensor – https://www.sparkfun.com/products/11005
Amazon 100A Current Sensor – https://www.amazon.com/dp/B008ASXVL4/ref=cm_sw_r_cp_ep_dp_avm8yb2KFED7P
There are some challenges with directly connecting this sensor to an Arduino. One of the biggest is that this sensor has an AC voltage output. I’ve seen sketches that will take a sample and calculate RMS from peak to peak readings. Another more significant problem is that the output voltage of these sensors can be higher than the input limit of the Arduino. I decided to rectify the AC from the sensor to a DC value, then voltage divide it so the Arduino limit is not reached. I’m able to reliably choose the voltage divider resistor values based off of my circuit breaker and the current sensor ratings. Now the Arduino gets a varying voltage of zero to under 5 volts.
One more added measure of protection are the ferrite core chokes. I’ve placed these on the ends of the current sensor cables feeding into the sensor board. If a high frequency spike should occur, these chokes will filter them and prevent potential damage to the Arduino. Nothing is 100% so I’ve designed my sensor board with DIP sockets for the ATTiny84. If damage does occur, I’ll be able to quickly replace the damaged chip.
The sensor board communicates using the I2C protocol, in line with my venting and heating system covered in earlier posts. I have the sensor board ATTiny84 set to read and store the current sensor values in its registers. My Arduino Uno acts as the I2C bus master and it queries the sensor board for its values. The sensor board doesn’t do anything more that read values, store them, and provide them upon request.
When I designed the sensor board, I chose to limit it to 4 inputs. This allows me to make additions or replacements more cost effective. It also means that I’m able to install for either large or small applications. I’m extremely pleased with how this has turned out.
Once again, thank you for your time and I hope you have enjoyed this.