The emonPi is based on a RaspberryPi + emonPi Shield PCB. The emonPi features a ATmega328p 8-bit microcontroller which is Arduino compatible.
An emonBase functions in much the same way as an emonPi but instead of an emonPi shield PCB it uses an RFM69Pi PCB and has no local energy monitoring capability. The Raspberry Pi on the emonBase runs the same emonSD software as the emonPi.
As the diagram (fig.1) shows the Atmega328 microprocessor communicates with the Raspberry Pi via the internal UART
(/dev/ttyAMA0 serial port. Data is transmitted over serial using the JeeLib packet format. The ATmega328 on the emonPi / RFM69Pi run a modified version of JeeLabs RFM12Demo Sketch.
Inside the emonPi
More technical info See emonPi Resources
The emonPi / RFM69Pi uses the HopeRF RFM69CW RF module to receive data from other wireless nodes (emonTx, emonTH etc) using 433Mhz. Each RF node is required to be on the same network group (default 210) and have an unique node ID. Data is transmitted over serial using the JeeLib packet format. EmonHub python service on the Raspberry Pi requires a corresponding node decoder entry in emonhub config for each RF node. See emonHub in section below.
Energy monitoring on the emonPi and emonTx is achieved using emonLib discrete sampling and the ATmega328’s 10-bit ADC. By default samples are taken once every 5 seconds.
Pulse counting on the emonPi and emonTx uses ATmega328’s second hardware interrupt IRQ1. The first hardware interrupt IRQ0 is used by the RFM69CW. Only one pulse counter input is possible per emonTx/emonPi.
- Read-only root file-system for long SD card lifespan
- emonPi LCD & Update service
- Emoncms with low-write optimisations
- Mosquitto MQTT server
- emonHub service
- LightWave RF MQTT OOK
See emonSD Resources
emonHub (emonpi variant) is pre-installed on emonSD. EmonHub is a python service which receives the data from the emonPi via serial (in JeeLabs packet) format. emonHub decodes the data and publishes it to the emonPi’s localhost Mosquitto MQTT server and (if configured) remotely to Emoncms.org.
Corresponding EmonHub node-decoder entries must be present in emonhub config for each wireless RF node e.g. emonTx, emonTH. See configuring emonhub in the resources: