For a limited time, get $5 off with coupon “5energymeter”
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.
With the Split Single Phase Energy Meter you can:
- Save Money!
- See exactly how much money is being spent on energy in real time
- Find appliances that are using too much electricity
- View & Gather Energy Data
- View the energy usage of your entire home
- Or track solar power generation
- Review and graph historical energy data
- View usage data in the EmonCMS Android or iOS apps
- Be Informed!
- Independent of your power company’s meter
- Set up alerts for over or under usage
- Not spend a ton on energy monitoring!
- Built to be inexpensive, but very accurate
- Costs hundreds less than some other solutions
- Uses the Microchip ATM90E32AS
- Samples 2 current channels & 1 voltage channel (expandable to 2 voltage)
- Active Power
- Reactive Power
- Apparent Power
- Power Factor
- Uses standard current transformer clamps to sample current
- Includes built-in buck converter to power ESP8266, or ESP32
- 2 IRQ interrupts, and 1 Warning output
- Energy pulse output (pulses correspond to 4 LEDs)
- Zero crossing output
- SPI Interface
- Measurement Error: 0.1%
- Dynamic Range: 6000:1
- Gain Selection: Up to 4x
- Voltage Reference Drift Typical (ppm/°C): 6
- ADC Resolution (bits): 16
- Compact size at only 40x50mm
What you’ll need:
- 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.
- Software to load on your controller using the Arduino IDE: EmonESP and ATM90E32
- EmonCMS (shown in pictures), ThingSpeak or similar
- Download the ATM90E32 library & place it in your Arduino libraries folder (this is usually under Documents > Arduino > libraries)
- We recommend using EmonCMS. If you agree, download EmonESP
- Open EmonESP > src > 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 this here
- Follow the directions to configure the Access Point on the EmonESP directions
Note: You can use the EmonCMS.org service, which costs a little bit depending on how much data you want to use, or install it on your own server/computer. (if installing on your own computer you will need to have apache/php/mysql installed) If you install it 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.
Connect the pins on the Energy Monitor to your ESP32 or ESP8266. 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 Monitor is capable of supplying power to the ESP, so no other external power source will be needed. You can have USB and the power adapter connected at the same time.
(other pins can be connected to the WARN and IRQ outputs, but they are not implemented in the default software)
Connect Current Transformers:
If your current transformers 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.
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.
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.
For calibration you will need:
- 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.