Enery Monitoring Shield

From ElectroDragon Wiki

Energy Monitor Shield is an Arduino-compatible expansion card designed for building energy monitoring system with LCD screen and an interface for connecting the wireless transceiver nRF24L01 +.

HDK

Pin Definition

Em-top.jpg
Pins Arduino Description
SCK D13 Common
MISO D12 Common
MOSI DIN Common
SPI LCD Reset D10 SPI_LCD
SPI LCD CS D9 SPI_LCD
NRF24L01 CS D8 NRF24L01
NRF24L01 CE D7 NRF24L01
LCD 5110 Reset D6 5110
LCD 5110 CS D5 5110
SD Card CS D4 SD
LCD 5110 CE, SPI LCD DC/A0 D3 5110
NRF24L01 IRQ D2 NRF24L01
Current Sensor A0, A1, A2 Current Sensor
Button A3 Button


Schematic

Basic functionality

In the basic version (without using Ethernet Shield) may organize monitoring of energy consumption in three different circuits using current sensors.

Information about the current level of consumption can be displayed on the LCD screen.

Device Management can be organized using two buttons on the Shield.

The obtained data can be transmitted by the transceiver nRF24L01 +.

Expansion Capabilities

  • Additionally EM Shield can connect any device using i2c Grove-compatible connector (sensors, displays, etc.).
  • EM Shield was designed to be fully compatible with the Ethernet Shield (Wiznet 5100 + SD) - so you can use these two Schild together to create even more advanced device monitoring electricity (logging on SD-card and presenting data on a web page).


SDK

Quick Start

Arduino Library

Analog read

  • Demo code read A0-A2 analog value, button value from current sensor and print on 5110 LCDs.
* This demo code only demostrate it is working by read analog value, not able to get correct current value
* read a hair dry will get 2.4V~2.55V varying voltage, the amplification Irms should be used for calculation.

Read current

  • Download install Emonlib library from here
  • Connect YHDC 100A SCT-013-000 sensor to the board top jack
  • For a small lamp you can only read little difference on the serial monitor first value Irms, about from 40 to 55, because the sensor has a large sensing range.

Libraries

Necessary libraries

To use EM Shield requires the following libraries:

  • Working with the transceiver nRF24L01+ - RF24
  • Using the display LCD 51110 (supporting SPI) - LCD5110_Graph_SPI
  • Work with current sensors - EmonLib

Requires the libraries that are used when working RF24 and LCD-display:

  • SPI

Features using libraries

Library has used examples of them just to understand how they work.

Initialization RF-module as follows:

...

//RF24 radio(CE,CSN);
RF24 radio(7,8);

...

Initialize LCD-display is as follows:

...

//LCD5110 myGLCD(DC,RST,CS);
LCD5110 myGLCD(5,6,3);

...