The CircuitSetup ATM90E32 Split Single Phase Energy Meter can monitor the energy usage in your entire home in real time. It can easily be hooked up to an ESP8266 or ESP32 to wirelessly transmit energy usage data into a program like EmonCMS. It can also be used to monitor solar power generation to keep track of how much power you are making.
- Save Money!
- See exactly how much money you're spending on energy in real time
- Find appliances that are using too much electricity
- Calculate energy usage for a single room to divide an energy bill fairly among roommates
- View & Gather Energy Data
- View the energy usage of your entire home
- Track solar power generation (ywo units required)
- Calculate how much it costs to charge your electric vehicle
- Remote energy monitoring for vacation or rental properties
- Review and graph historical energy data
- Be Informed!
- Independent of your power utility's meter
- Set up alerts for over or under usage
- Prevent surprises on energy bills
- View usage data in the EmonCMS Android or iOS apps
- Automate notifications with your home automation system like "send my phone a message when the dryer is done", or even "if I leave the house, and the oven is on, send me an alert" (programming required)
- Spend less on energy monitoring hardware!
- Affordable but very accurate
- Save hundreds over popular monitoring systems
- IC: MicroChip ATM90E32
- Connectivity
- SPI Interface to connect to any Arduino compatible MCU
- Two IRQ interrupts, and one Warning output
- Energy pulse output (pulses correspond to four LEDs)
- Zero crossing output
- Real Time Data Sampling
- Two current channels
- One voltage channel (expandable to two voltage)
- Measurement Error: 0.1%
- Dynamic Range: 6000:1
- Gain Selection: Up to 4x
- Voltage Reference Drift Typical (ppm/°C): 6
- ADC Resolution (bits): 16
- Calculates
- Active Power
- Reactive Power
- Apparent Power
- Power Factor
- Frequency
- Temperature
- Other Features
- Can use more than one at a time to measure as many circuits as you want, including solar power generation
- Uses standard current transformer clamps to sample current
- Includes built-in 500mA 3v3 buck converter to power MCU board
- Compact size at only 40 mm x 50 mm
- Current Transformers: SCT-013-000 100A/50mA (select the version of the board with phono connectors) or Magnelab SCT-0750-100 (must sever burden resistor connection on the back of the board since they have a built in burden resistor). Others can also be used as long as they're rated for the amount of power that you are wanting to measure, and have a current output no more than 600mA.
- AC Transformer: Jameco Reliapro 9v
- An ESP32 (ESP8266 or anything else that has an SPI interface & recommended wifi)
- Jumper wires with Dupont connectors, or perf board to connect the two boards.
- The software located here to load onto your controller
- EmonCMS, ThingSpeak or similar
- Clone this repository or [https://github.com/CircuitSetup/Split-Single-Phase-Energy-Meter/archive/master.zip](download all the files via zip file)
- Place the ATM90E32 folder in your Arduino libraries folder (this is usually under Documents > Arduino > libraries)
- We highly recommend using EmonCMS. - EmonESP helps to connect and send data directly to EmonCMS
- Open EmonESP > src > src.ino - you will see a number of files open, but you'll only need to worry about src.ino
- Make sure the CS_pin is set to the pin that you are using on your controller board - the defaults are set
- Upload the src.ino to your ESP (If you get any errors at this point, like a missing library, check the Troubleshooting section on the EmonESP readme)
- Upload files to the ESP in the data directory via SPIFFS - see details on how to do this here
- Follow the directions to configure the Access Point in the EmonESP directions
There are a few options for doing this:
- You can use the EmonCMS.org service, which costs roughly $15 a year with the data that we send from the energy meter (you don't have to send all of the data)
- Install on a computer within your network. To do this, you will need to have apache/php/mysql installed) This can also be done with a Raspberry Pi.
- Install on a remote web server. There are some very cheap ways this can be done if you're familar with setting up web applications.
If you install EmonCMS on a remote web server, or if your home network has a public facing port, this will make it possible to see data on the EmonESP app (Android or iOS) when your phone is outside of your network.
For all but the EmonCMS.org service, you can automatically setup the energy meter device in EmonCMS by installing the device plugin, then uploading this file to the Modules > device > data > CircuitSetup folder.
If you would like to use something other than EmonCMS, you can do that too! Make sure the ATM90E32 library is included in the sketch. See the examples folder for examples of how things could be done using JSON or MQTT.
Connect the pins on the Energy Monitor to your ESP32 or ESP8266. If you have the adapter board, everything should already be connected properly. The following are the default for each, but they can be changed in software if you are using these pins for something else.
For the ESP32:
- 5 - CS
- 18 - CLK
- 19 - MISO
- 23 - MOSI
For the ESP8266:
- D8/16 - CS
- D5/14 - CLK
- D6/12 - MISO
- D7/13 - MOSI
Don't forget to hook up the 3V3 and GND pins!
The energy meter is capable of supplying up to 500mA of 3.3v power to your controller, so no other external power source should be needed. Some ESP32 dev boards may use more than 500mA when trying to initially connect to Wifi. If this is the case you may not be able to connect to wifi. If this happens, we recommend using another power source for the ESP32 - either a 5v DC adapter or a USB phone charger that outputs at least 500mA. It is not recommended to leave USB power plugged into an ESP at the same time as the energy meter's power 3V3 output. This can damage components.
Other pins on your controller can be connected to the WARN and IRQ outputs, but they are not yet implemented in the default software
If your current transformers (CTs) have 3.5mm phono connectors, you hopefully have the version of the Energy Meter with these connections (v1.3 has footprints for both). If you have the screw connectors, the phono connectors will have to be cut off. There should only be two wires regardless. For the screw connector version, be careful to connect the positive to the correct terminal. If these are reversed, things will not be damaged, but the reading will be incorrect or 0.
If your current transformers have a built in burden resistor, be sure to sever the jumpers on the back of the board to disable the 12ohm burden resistor. Alternatively, if you are reading smaller loads and would like more accurate readings, you can insert your own higher value burden resister across the positive and negative screw terminals.
WARNING: High voltage AC power is VERY dangerious! If you are not comfortable working around AC voltage, we strongly encourage you to hire a qualified electrician.
The current transformers clip around the two large wires, usually at the top of the breaker box. DO NOT TOUCH VARE METAL ON THESE WIRES. There is one current transformer for each phase. Make sure the arrows on the top of the CT point in the direction of the current flowing into your house.
The default configuration of the Energy Meter software is set to use the SCT-013-000 100A/50mA current transformers, and the Jameco Reliapro 9v AC transformer. There are also values for the Magnalab current transformers, and the 12v version of the AC transformer located in the src.ino file. Simply change the values under CALIBRATION SETTINGS if you are using a 12v AC Transformer or the Magnalab current transformers. If you are using any of these you likely will not need to calibrate, but if you want to be sure your readings are more accurate then calibration is recommended.
Alternatively, if you have equipment that can read active and reactive energy pulse outputs, CT1-CT4 pins can be used for this. It is recommended that these connections are opto-isolated to prevent interference.
- A multi-meter, or to make it easier and safer, a kill-a-watt or similar.
- A hair dryer, soldering iron, electric heater, or anything else that uses a large amount of current
- A modified power cable that allows you to put a current transformer around only the hot (usually black) wire
- At this point all wires should be connected between your ESP and the Energy Monitor.
- Connect the Energy Monitor to the AC Transformer and plug it in - the ESP and Energy Meter should both have power. If either do not, check your connections.
- Connect your ESP to your computer via USB cable
- Open the Arduino IDE, and go to Tools > Serial Monitor
- Values should be scrolling by. If you do not see anything in the serial window, make sure the correct COM port is selected for your ESP in the Arduino IDE.
- In the Serial Monitor window, view the value for Voltage - take note of this (if you are getting a value above 65k, something is not hooked up or working correctly)
- Take a reading of the actual voltage from an outlet in your house. For the Kill-a-watt, just plug it in, and select voltage. Compare the values.
- Adjust the value for VoltageGain in src.ino by calculating:
New VoltageGain = (your voltage reading / energy monitor voltage reading) * 32428
Test again after adjusting the value and re-uploading the sketch to your ESP. If it is still off, do the procedure again, but replace the 32428 with the value that you changed VoltageGain to.
For calibrating CurrentGainCT1 & CurrentGainCT2:
- In the Serial Monitor window, view the value for Current (if you are getting a value above 65k, something is not hooked up or working correctly)
- Compare what you are seeing for current from the Energy Monitor to the reading on the Kill-a-watt
- Adjust the value for CurrentGainCT1 or CurrentGainCT2 in src.ino by calculating:
New CurrentGainCT1 or CurrentGainCT2 = (your current reading / energy monitor current reading) * 46539
Test again after adjusting the value and re-uploading the sketch to your ESP. If it is still off, do this again, but replace the 46539 with the value that you changed CurrentGainCT1 or CurrentGainCT2 to. It is possible that the two identical current sensors will have different CurrentGain numbers due to variances in manufacturing, but it shouldn't be drastic. Note that the positioning of the CT sensor on the hot wire can have an effect on the current reading.
For more details, see the Calibration Procedure in the Microchip Application notes.