This document describes a software and hardware solution using the STM32x microcontroller and the STPM01 power meter for measuring mains power consumption, and provides hardware and firmware guidelines to interface the STPM01 with the STM32x microcontroller.
This document describes a software and hardware solution concerning the STM32x microcontroller and the STPM01 power meter for measuring mains power consumption. It provides hardware and firmware guidelines to interface the STPM01 with the STM32x microcontroller. The system described is the first "brick" to build a complex system for distributed load management.
The solution is based on the STM32F103xx microcontroller and the STPM01 with a current transformer. The document details the file organization, hardware description, functional description, and firmware description, including the object-oriented approach used for the power meter management.
| Microcontroller Core | ARM 32-bit Cortex-M3 CPU |
|---|---|
| Microcontroller Frequency | 72 MHz |
| Flash Memory | 932-to-128 Kbytes |
| SRAM | 6-to-20 Kbytes |
| ADC Resolution | 12-bit |
| ADC Channels | 16-channel |
| ADC Conversion Range | 0 to 3.6 V |
| STPM01 Read Speed | 32 MHz |
| STPM01 Write Speed | 100 kHz |
| STPM01 Frequency Support | 50-60 Hz |
The solution is based on the STM32F103xx microcontroller in the LQFP64 package.
The device used to measure the phase AC current is the STPM01 with a current transformer.
The maximum reading speed of the STPM01 is 32 MHz.
The maximum writing speed of the STPM01 is 100 kHz.