Energy Monitor 32 (emon32) is a system for measuring power consumption using current transfomers (CTs). It is based heavily on the work done by OpenEnergyMonitor, particularly the emonTx. It is designed to be compatible with the downstream data requirements of that system.
The emonTx energy monitors are currently based around the ATMega328, as made popular by Arduino, and an extended version, the AVR128DB. These chips are expensive, have few peripherals, and are being pushed to the limit of their data processing capability. The aims of this project are:
- Provide a low cost, high performance energy monitoring system.
- Provide a scalable and modular system.
- Provide an architecture agnostic library to handle energy monitoring functions.
There is also firmware available to enable a complete energy monitoring system.
There are currently two implementations:
Note
The emonPi3 will be available full assembled from the OpenEnergyMonitor shop in 2025.
The firmware is agnostic to the microcontroller used, although a modern 32 bit core is preferred. This implementation targets the Microchip SAMD series - this allows easy porting from small and cheap (SAMD1x) to higher performance and capability microcontrollers, such as the SAMD2x and SAMD5x. The SAMD family has the following useful functions
- Differential ADC (dual channel for SAMD5x)
- Asynchronous event system
- This allows precise sample timing without any interrupt overhead
- Generic serial communication modules
- Flexible clocking system
- High speed clocks are available for the core, and separate clocks for each peripheral
- Clocks and peripherals can be gated when not in use
- USB virtual serial port (SAMD21 and SAMD51 only)
- USB bootloader (SAMD11, SAMD21, SAMD51 only)
If you would like to use a different microcontroller, the following features are recommended:
- Minimum 24 MHz clock
- Timer with 1 us resolution
- DMA (minimum 2 channels)
- 2x UART module
- SPI module
- I2C module
Functions in the main loop are abstacted from the underlying hardware. Implementation specific configuration (for example, configuring the ADC) must be provided.
This project is licensed under the Creative Commons Attribution Sharealike 4.0. Any alterations must be made available immediately, or upon request.
- OpenEnergyMonitor
- Rob Wall of Open Energy Monitor forums for lots of in depth discussion around sampling strategies.
- Rupert on OEM forums for PCB improvements.