Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
97 lines (64 sloc) 5 KB
layout title description date sidebar comments sharing footer published
page
Technical Overview
emonPi Technical Overview
2015-05-11 12:00
true
false
true
true
true
emonPi Architecture Overview Fig.1 - emonPi Architecture Overview

The emonPi is based on a RaspberryPi + emonPi Shield PCB. The emonPi features a ATmega328p 8-bit microcontroller which is Arduino compatible.

emonPi RaspberryPi Shield PCB

emonPi Raspberry Pi Shield PCB

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.

emonBase: Raspberry Pi + RFM69Pi

emonBase: Raspberry Pi + RFM69Pi

{% linkable_title Hardware Overview %}

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

<iframe width="560" height="315" src="https://www.youtube.com/embed/lc2LzCZnySo" frameborder="0" allowfullscreen></iframe>

More technical info See emonPi Resources

{% linkable_title RF %}

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.

See Fundamental Building block Resources

{% linkable_title Energy Monitoring %}

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.

See Fundamental Building block Resources

{% linkable_title Pulse Counting %}

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.

See Optical Pulse Sensor Resources

{% linkable_title Software Overview %}

By default the Raspberry Pi runs a modified version of Debian Raspbian Jessie Lite. A pre-build SD card image (emonSD) is available to purchase or download) which has everything already set up.

{% linkable_title emonSD features %}

  • Read-only root file-system for long SD card lifespan
  • emonPi LCD & Update service
  • Emoncms with low-write optimisations
  • Mosquitto MQTT server
  • emonHub service
  • Node-RED
  • OpenHAB
  • LightWave RF MQTT OOK

See emonSD Resources

{% linkable_title emonHub %}

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:

See emonHub Resources


See Technical > Resources for further info and support >