0x3333 / apm

Automatic Power Monitoring - Multiple PZEM004T firmware for STM32F103 boards + ESP8266 with Espurna

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

APM - Automatic Power Monitoring

This project is a multiple PZEM004T reader using a Software Serial Driver(Made by me, hightly functional and low CPU usage, Driver.

It uses Opus Framework, a easy to use STM32F1 framework with some drivers build in and ready to use. The RTOS is ChibiosRT, but FreeRTOS can be used.

I'm using some chinese boards with ESP8266 header builtin. The ESP8266 module(ESP-01) is using espurna firmware with a custom driver builtin(See folder, espurna).

board photo

This project is in a working condition(I'm using with 5 PZEM004T) but has not been tested outside my environment.

espurna photo

The protocol between devices is basically a struct sent multiple times with a CRC(The same as PZEM004T). The request is a magic({ 0x42, 0xAA, 0x42, 0x2E }), when received, will respond with the structs with the last measure.

The STM32 firmware will reply instantaneously with the last measurement, so we can have several PZEM004T devices in the espurna firmware without timing issues, and as we are using a high performant Software Serial, we can have several devices without affecting the CPU consumption(Most code is done in IRQ).

If you have any questions, just let me know.

About

Automatic Power Monitoring - Multiple PZEM004T firmware for STM32F103 boards + ESP8266 with Espurna

License:Apache License 2.0


Languages

Language:C 64.2%Language:C++ 28.9%Language:Makefile 6.8%