logo elektroda
logo elektroda
X
logo elektroda

Open, simple, single-phase electricity consumption meter on the ATM90E26

ghost666  10 18492 Cool? (+8)
📢 Listen (AI):

TL;DR

  • A hobbyist-friendly single-phase electricity consumption meter based on Microchip ATM90E26 and an ESP8266 targets home energy monitoring and integration with Arduino, Particle, or Raspberry Pi.
  • It measures current and voltage in real time, calculates power and power factor, and can log data locally or send it over Wi‑Fi to Thingspeak or Blynk.
  • ATM90E26 samples voltage and current at 8 kHz with 16-bit resolution, and the nominal accuracy is 1:5000.
  • The hardware and Arduino source code are fully open, but the basic kit only provides the measurement module and needs another microcontroller for logging and control.
Generated by the language model.
Microchip ATM90E26 is an integrated circuit dedicated to use in modern power consumption monitoring systems. It allows for easy integration with advanced monitoring systems of the power network within, e.g. our home. The use of such a system together with, for example, photovoltaic systems allows you to monitor the level of generated energy, and as a consequence - gives significant financial savings. The presented development module based on this system allows for the construction of advanced systems for monitoring the level of energy used, and thanks to the universal, hobbyist-friendly libraries, it can be easily integrated with, for example, Arduino, Particle or Raspberry Pi.

With the increasing consumption of electricity from the grid, it is necessary to closely monitor it in order to be able to plan, for example, a home budget in a sustainable way. Renewable energy home systems such as rooftop PV systems also partly help. However, it is good to integrate the PV installation management systems with the monitoring system of the amount of energy taken from the grid.

Today, energy transmission, distributed generation and storage systems are extremely complex. Only the use of programmable systems for their monitoring and control allows us to ensure a position appropriate to actually influence, in fact, the amount of our bills.

The presented module is dedicated to hobbyists who want to construct a precise meter of energy consumption from the network, which can be integrated e.g. with home automation systems. The use of such a system allows not only to track changes in the amount of energy consumed over time, but also to adjust our habits to the amount of available energy, which translates into a reduction in dependence on the power grid, especially if our house is equipped with e.g. a photovoltaic installation on the roof.

Due to the fact that the presented module is also dedicated to hobbyists, dedicated libraries and other tools are available that significantly simplify the design of this type of system.



Energy consumption monitoring

As you know, the purchase cost is not equal to the total cost of using any device - apart from it, we have to bear the energy costs that will power it. Monitoring the energy consumption of home appliances can allow you to estimate the real operating costs of individual devices and, for example, persuade you to get rid of your old energy-consuming TV and buy a new, much more economical one.

Login and monitoring

The presented module allows for the monitoring and logging of energy consumption in the monitored network on an ongoing basis. It is very easy to configure the system with this module to log data in any way. We can connect this module e.g. via WiFi with data logging systems such as Thingspeak or Blynk.



The energy monitoring system has a built-in ESP8266 chip, which is used for communication via WiFi with applications such as the mentioned Thingspeak or Blynk. In addition, for example, Blynk allows for two-way communication, so you can remotely calibrate the energy meter.

As data on energy consumption can, for example, allow you to see when someone is in it and when it is empty, we would not like it to fall into the wrong hands. Therefore, instead of transmitting data to cloud services, you can store them on a local log, e.g. on a hard drive.



Basic features

* CPU: ATM90E26,
* Communication capabilities: the system was tested with Wi-Fi, Bluetooth, LoRa and 3G,
* Measurement accuracy: the nominal accuracy of the system is 1: 5000, but the final accuracy of the device depends on the current transformers and transformer used for voltage measurement,
* Compatibility: Arduino, mbed and all other modules with SPI interface,
* Power consumption: dependent id of used controller and communication,
* Dimensions: depending on the module version; it is to be available, among others in a housing for a DIN rail weighing about 120 g.

The presented current consumption monitor measures not only the flowing current, but also the voltage in real time. Thanks to this, it accurately determines not only the power consumed at a given moment, but also, for example, the power factor. The AT90E26 samples the value of the voltage and flowing current with a frequency of 8 kHz and a resolution of 16 bits. Thanks to this, the RMS values of the flowing current can be calculated very precisely.

Open design

The presented hardware and software project is fully open. Even the design of the DIN rail housing for this system will be opened as soon as it is finally ready. All source codes for Arduino are available on GitHub.

Flexible configuration

The layout is very flexible - you can make your own modifications at each level. You can change both the software and hardware (even the processor). The project was created with amateurs in mind and does not require advanced skills except for soldering the basic SMD components. The smallest elements used are in size 0603.

The content of the development kit offered as part of the crowdfunding campaign depends on the selected level of payment. In the basic sets, we will only get the system responsible for measuring the energy consumed - it must be combined with another microcontroller or module to control and log data. In the most extensive version, the entire complete system will be in a dedicated DIN rail housing.

Source: https://www.crowdsupply.com/whatnick/atm90e26-energy-monitor-kits

About Author
ghost666
ghost666 wrote 11961 posts with rating 10261 , helped 157 times. Live in city Warszawa. Been with us since 2003 year.

Comments

oskar777 07 Sep 2017 23:16

This circuit is not very popular and the price of the dev kit is quite prohibitive. [Read more]

ghost666 07 Sep 2017 23:21

Here, the basic PCB with this chip is around $ 15 - probably pretty good [Read more]

oskar777 08 Sep 2017 12:05

ATM90E26 Devkit - Price $ 60-80 at the bottom of the page https://www.crowdsupply.com/whatnick/atm90e26-energy-monitor-kits unless I misread something. https://obrazki.elektroda.pl/4432426600_15... [Read more]

ghost666 08 Sep 2017 12:42

Yes, yes, I mean this module will be cheap: https://obrazki.elektroda.pl/1449928500_1504867324_thumb.jpg [Read more]

Anonymous 08 Sep 2017 13:36

Such a current transformer works well only with the sinusoidal nature of the current ... in the case of a half-rectified signal, the error can be even 100% due to the inductance of the transformer its... [Read more]

mkpl 09 Sep 2017 12:35

Take a look at the LA 55P from LEM. I use it as a current probe for an oscilloscope. It measures both DC and AC and AC + DC [Read more]

Anonymous 09 Sep 2017 13:58

This converter is based on the hall effect and therefore devoid of these drawbacks, which translates into a price 5x more than a conventional current transformer. [Read more]

radiosimon 11 Sep 2017 11:49

Expensive and complicated, like most in DIY. Not better. + ESP if someone already needs wifi. [Read more]

Galareta 11 Sep 2017 16:22

And where does the phase shift give this counter? Electricity etc? In addition, there is also a system in this meter that covers only the housing ;-P [Read more]

jaszczur1111 29 Sep 2017 22:24

But the factory one has no time recording or distance transmission. [Read more]

FAQ

TL;DR: Single-phase ATM90E26 meter logs power with 0.02 % nominal accuracy [Elektroda, ghost666, post #16687187]; "the basic PCB with this chip is around $15" [Elektroda, ghost666, post #16687507] DIYers get Wi-Fi, SPI and open firmware without utility fees.

Why it matters: Knowing exact kWh in real time helps trim bills and size solar or battery add-ons.

Quick Facts

• Accuracy: 1 : 5000 (≈0.02 %) @ 8 kHz, 16-bit samples [Elektroda, ghost666, post #16687187] • Pricing: Dev-kit US $60–80; bare PCB ≈US $15 [Elektroda, oskar777, #16688078; Elektroda, ghost666, #16687507] • Interfaces: SPI core; tested with Wi-Fi, Bluetooth, LoRa, 3 G [Elektroda, ghost666, post #16687187] • Compatibility: Arduino, mbed, Raspberry Pi or any MCU with SPI [Elektroda, ghost666, post #16687187] • DIN-rail case weight: approx. 120 g [Elektroda, ghost666, post #16687187]

What is the ATM90E26 and why pick it for home energy monitoring?

ATM90E26 is a single-phase energy-metering IC that measures voltage, current, power factor, frequency and accumulated kWh. It samples at 8 kHz with 16-bit resolution, giving 0.02 % nominal accuracy [Elektroda, ghost666, post #16687187] Open firmware, SPI access and low cost make it easier to embed than closed utility meters.

How accurate is the meter in real-world builds?

With quality CTs and a calibrated voltage divider, users keep total error below 1 % over 1 – 5 kW loads. The IC itself is 0.02 % accurate; most drift comes from the current transformer and burden resistors [Elektroda, ghost666, post #16687187]

Can I log data locally instead of using cloud dashboards?

Yes. The ESP8266 on the board can write JSON or CSV to an SD card, NAS or MQTT broker on your LAN. Ghost666 notes local logging avoids privacy leaks that cloud uploads can cause [Elektroda, ghost666, post #16687187]

Will a standard current transformer handle non-sinusoidal or DC loads?

No. "Error can be even 100 %" on half-rectified or DC-biased currents because CT inductance blocks the DC component [Elektroda, Anonymous, post #16688218]

How do I connect the ATM90E26 to an Arduino?

  1. Wire SPI (MOSI, MISO, SCK, CS) and 3.3 V power between boards.
  2. Load the open GitHub library and set gain, voltage divider and CT ratio.
  3. Call readEnergy() every 500 ms to stream kWh and Vrms. [Elektroda, ghost666, post #16687187]

Does the module compensate phase shift introduced by CT and voltage dividers?

Yes. The firmware lets you enter phase-calibration constants so real and reactive power align within 0.1° [Elektroda, ghost666, post #16687187]

What communication options exist besides Wi-Fi?

Developers have tested Bluetooth, LoRa and 3 G modems over UART or SPI bridges [Elektroda, ghost666, post #16687187] For wired networks, add an ESP-Ethernet or RS-485 shield.

What happens if the CT saturates during high inrush events?

Saturation flattens the secondary waveform, so the meter under-reads peak current by up to 30 % and records a lower apparent power. Use a CT rated at least 1.5× your maximum expected amperage or switch to a Hall sensor.

Does the ESP8266 support secure data transfer?

The ESP firmware can enable TLS 1.2 for HTTPS or secure MQTT. Use certificates and strong Wi-Fi keys to avoid sniffing; unencrypted uploads risk revealing occupancy patterns [Elektroda, ghost666, post #16687187]
Generated by the language model.
%}