The emonGLCD is an open-source general purpose wireless graphical LCD display unit. Powered by an Atmega328 which is Arduino compatible.

The emonGLCD features a 128x64 GLCD display based on the ST7565 driver. The board has an on-board HopeRF RFM12B wireless module to receive data from the emonTx energy monitoring node or an emonBase (Nanode-RF web-connected basestation) which in turn could be pulled aggregated data from a web-sever to be displayed.
The current firmware examples for the emonGLCD include solar PV monitoring and standard single CT home energy monitor.
Applications
The emonGLCD is a perfect compliment to the new Nanode-RF, sitting on a coffee table in your living room or mounted on the wall it can receive data wireless from a web-connected Nanode-RF. The possibilities are endless.

A few ideas that we have are: aggregating your power consumption with the current UK gird demand and the generation output from UK renewables os you can see when the best time (and in the future the cheapest time) to consume energy, displaying remote sensor data pulled from the web, maybe from Pachube, email, twitter alerts and so on...
Since the emonGLCD and Nanode-RF both have transceiver RF modules, two way communication is possible. The emonGLCD could transmit the current room temperature and light level back to the Nanode-RF for web-based logging and visualisation.
Like the emonTx the emonGLCD has got a JeePort enabling it it be expanded with JeeLabs shields. A useful expansion could be a memory plug for caching large amounts of text and graphics.
emonGLCD demo
Full solar PV monitoring system documentaiton.
1. Build an emonGLCD
Pictorial step-by-step assembly guide
2. Software: Arduino Sketch Examples
Github repo: https://github.com/openenergymonitor/EmonGLCD
Uses Arduino GLCD library written by Adafruit and JeeLabs is required (much credit to them for sharing this work): http://jeelabs.net/projects/cafe/wiki/GLCDlib
Upload using 5V FTDI cable and Arduino IDE. Select 'uno' under tools>board in IDE
3. Extend it
Touchscreen: Nathan Chantrell has been been doing some awesome experimenting with a DS resistive touchscreen layer and RGB PWM backlight. Even a simple touch screen makes menu navigation a doodle. The work is still in development.
Checkout his video of it in action here and check out the source code here
Good tutorial on interfacing a DS touch screen with an Arduino: http://tronixstuff.wordpress.com/2010/12/29/tutorial-arduino-and-the-ds-touch-screen/
Thanks for this Nathan!
Troubleshooting
To improve the contrast of the display and remove vertical lines edit GLCD_ST7565.cpp. Change line 134 to be st7565_Set_Brightness(0x18); instead of 0x15. In latest JeeLabs GLCD lib on git hub this is done in sketch it's self by the line glcd.begin(0x18);
Bugs
Port Map
Push button 1 (top) : Dig15 / ADC1 - high when pressed
Push button 2 (middle): Dig16 / ADC2 - high when pressed
Push button 3 (bottom): Dig19 / ADC5 - high when pressed
DS18B20 temperature sensor: Dig5
LDR light sensor: ADC0 -see bugs page for notes
Tri-color LED Red: Dig8 - not PWM enabled see bugs page
Tri-color LED green: Dig9 - PWM enabled
Please contribute any cool example you write! This page is an open wiki (once logged in).
Reference
![]()
emonGLCD Schematic and board files up on solderpad
Based on Jeelabs.org design.
Revision track
V1.2 - first release
V1.3 -
- LDR moved to ADC4,
- Red LED from Dig 8 to Dig 6 to be on PWM output
- Added two extra push buttons for menu navigation (Dig 16 and Dig19)
- Connected backlight directly to IRQ PWM
- Added two additional menu selection buttons to make three in total
Ideas for the future:
- Built in battery pack + usb chargin circuit
- Provide power input which is not limited to 3.3V
- Female headers to attach LCD
- Touch screen
Licence

The emonGLCD hardware deisgnes (schematics and CAD files) are licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
The emonGLCD firmware is released under the GNU GPL V3 license
The documentation is subject to GNU Free Documentation License
The emonGLCD hardware designs follow the terms of the OSHW (Open-source hardware) Statement of Principles 1.0.

What this basicly means is that you are free to modify, re-distribute and use the design in a personal or commercial environment as long as you attribute OpenEnergyMonitor and make any resulting designs or derivatives available under the same open-source licenses. Read more about open-source...
If you use the emonGLCD design, please consider donating (see bottom of page) to the OpenEnergyMonitor project to help fund ongoing open-source developments. Thank you.
If you have any questions about the emonGLCD, please post in our hardware forum.


CAD?
Hi,
I was wondering where I might find the mechanical drawings (not just eagle CAD) for this? (whether they are 3d or 2d).
props for oshw!
IR sensor in next version
If I may suggest that you foresee an IR sensor port in the next version for a remote control and UI navigation, just like this guy: http://mcmicken.ca/category/home-improvement/
Great item, Implementation of Power Load
Great Item,
where the implementation of the nanonode to managing a disconnects the less important loads to avoid the system being overloaded and switches on the electrical appliances in the most convenient time band ?
I think this is possible if create a little node ( nanonode_power_comsunption ) to get the power consumption of appliance and in the same node the switch off to disconnects the appliance ( like a rele' )
Regards
Francesco.
Re: plug in monitor and control block
Hi Francesco,
We currently don't have such a module. You could make a module to do what you describe using a JeeLabs relay board plugged into an emonTx. This could be controlled remotely via a NanodeRF .
Great item, can't wait to
Great item,
can't wait to get my hands on it :)
One of the screenshots has time being displayed "23:06", how do you take the time? does it have RTC?
Re: emonGLCD RTC
Hi Mharizanov,
Thanks for your comment. There is no RTC onboard. This clock is done in software. In theory the emonGLCD could get the time from a web connected Nanode which in-turn could get it from a time server.
Thanks Glyn, I tried to find
Thanks Glyn,
I tried to find some Nanode NTP code, see my post here: http://forum.jeelabs.net/node/499
It seems that I will have to write my own (if I can at all :) ).
Indeed, it is useless to have relatively expensive RTC when the Nanode can fetch this information from the internet anyway.
Someone pointed me to this
Someone pointed me to this which is for the EtherCard library: https://gist.github.com/1328159
I'm actually looking for some for the EtherShield library though!
Ian
* Arduino ENC28J60
* Arduino ENC28J60 Ethernet shield NTP client
* With extra bits for nanode
*/
#define NANODE
#define DEBUG
// uses RTClib from Jeelabs to provide DateTime functions
// http://cafe.jeelabs.net/software/#index3h1
#include <Wire.h>
#include <RTClib.h>
#include <EtherShield.h>
#ifdef NANODE
#include <NanodeMAC.h>
#endif
// Jan 1
#define SECS_YR_1900_2000 (3155673600UL)
#ifdef NANODE
static uint8_t mymac[6] = { 0,0,0,0,0,0 };
#else
static uint8_t mymac[6] = {
0x54,0x55,0x58,0x10,0x00,0x25};
#endif
// IP and netmask allocated by DHCP
static uint8_t myip[4] = { 0,0,0,0 };
static uint8_t mynetmask[4] = { 0,0,0,0 };
static uint8_t gwip[4] = { 0,0,0,0 };
static uint8_t dnsip[4] = { 0,0,0,0 };
static uint8_t dhcpsvrip[4] = { 0,0,0,0 };
// IP address of the host being queried to contact (IP of the first portion of the URL):
static uint8_t websrvip[4] = { 0, 0, 0, 0 };
#define NUM_TIMESERVERS 5
int currentTimeserver = 0;
// From http://support.ntp.org/bin/view/Servers/StratumTwoTimeServers
byte timeServer[][4] = {
{ 64, 90, 182, 55 } , // nist1-ny.ustiming.org
{ 66, 27, 60, 10 } , // ntp2d.mcc.ac.uk
{ 130, 88, 200, 4 } , // ntp2c.mcc.ac.uk
{ 31, 193, 9, 10 } , // clock02.mnuk01.burstnet.eu
{ 82, 68, 133, 225 } // ntp0.borg-collective.org.uk
};
// Packet buffer, must be big enough to packet and payload
#define BUFFER_SIZE 550
static uint8_t buf[BUFFER_SIZE+1];
EtherShield es=EtherShield();
#ifdef NANODE
NanodeMAC mac( mymac );
#endif
uint32_t lastUpdate = 0;
uint32_t time;
static const char day_abbrev[] PROGMEM = "SunMonTueWedThuFriSat";
void setup(){
Serial.begin(19200);
Serial.println("EtherShield/Nanode NTP Client");
// Initialise SPI interface
es.ES_enc28j60SpiInit();
// initialize enc28j60
#ifdef NANODE
es.ES_enc28j60Init(mymac,8);
#else
es.ES_enc28j60Init(mymac);
#endif
Serial.print( "ENC28J60 version " );
Serial.println( es.ES_enc28j60Revision(), HEX);
if( es.ES_enc28j60Revision() <= 0 ) {
Serial.println( "Failed to access ENC28J60");
while(1); // Just loop here
}
// init the ethernet/ip layer
// es.ES_init_ip_arp_udp_tcp(mymac,myip, 80);
// es.ES_client_set_gwip(gwip); // e.g internal IP of dsl router
lastUpdate = millis();
}
#ifdef DEBUG
// Output a ip address from buffer from startByte
void printIP( uint8_t *buf ) {
for( int i = 0; i < 4; i++ ) {
Serial.print( buf[i], DEC );
if( i<3 )
Serial.print( "." );
}
}
void printHex( uint8_t hexval ) {
if( hexval < 16 ) {
Serial.print("0");
}
Serial.print( hexval, HEX );
Serial.print( " " );
}
#endif
void loop(){
uint16_t dat_p;
uint16_t clientPort = 123;
char dstr[4];
int sec = 0;
int plen = 0;
boolean gotIp = false;
#ifdef DEBUG
Serial.println("Get IP");
#endif
// Get IP Address details
if( es.allocateIPAddress(buf, BUFFER_SIZE, mymac, 80, myip, mynetmask, gwip, dnsip, dhcpsvrip ) > 0 ) {
#ifdef DEBUG
// Display the results:
Serial.print( "My IP: " );
printIP( myip );
Serial.println();
Serial.print( "Netmask: " );
printIP( mynetmask );
Serial.println();
Serial.print( "DNS IP: " );
printIP( dnsip );
Serial.println();
Serial.print( "GW IP: " );
printIP( gwip );
Serial.println();
#endif
/* lastUpdate = millis();
Serial.print("Send NTP request ");
Serial.println( currentTimeserver, DEC );
es.ES_client_ntp_request(buf,timeServer[currentTimeserver++], ++clientPort);
if( currentTimeserver >= NUM_TIMESERVERS )
currentTimeserver = 0;
*/
}
else {
// Failed, do something else....
#ifdef DEBUG
Serial.println("Failed to get IP Address");
#endif
}
// Main processing loop now we have our addresses
while( es.ES_dhcp_state() == DHCP_STATE_OK ) {
// handle ping and wait for a tcp packet
dat_p=es.ES_packetloop_icmp_tcp(buf,es.ES_enc28j60PacketReceive(BUFFER_SIZE, buf));
// Has unprocessed packet response
if (dat_p > 0)
{
time = 0L;
if (es.ES_client_ntp_process_answer(buf,&time,clientPort)) {
Serial.print("Time:");
Serial.println(time); // secs since year 1900
if (time) {
time -= SECS_YR_1900_2000;
DateTime now(time);
Serial.print(now.year(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.day(), DEC);
Serial.print(' ');
int i=0;
while (i<3){
dstr[i]= pgm_read_byte(&(day_abbrev[(now.dayOfWeek()-1) * 3 + i]));
i++;
}
dstr[3]='\0';
Serial.print( dstr );
Serial.print(' ');
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
}
}
}
// Request an update every 20s
if( lastUpdate + 20000L < millis() ) {
// time to send request
lastUpdate = millis();
Serial.print("Send NTP request ");
Serial.println( currentTimeserver, DEC );
es.ES_client_ntp_request(buf,timeServer[currentTimeserver++], ++clientPort);
if( currentTimeserver >= NUM_TIMESERVERS )
currentTimeserver = 0;
}
}
}
// End
Energy Savings Trust Research
In 2009, the UK Energy Saving Trust published a summary report on consumer preferences for energy display designs. It's a useful document for anyone designing an in home energy display.
http://www.cse.org.uk/downloads/file/(CO183)%20The%20Smart%20Way%20to%20Display.pdf
Re: energy saving trust energy display research
Hi Joby,
Thanks for posting. Its a good paper, I read it a few months back when I was doing some research. The software seen running on the display in the photos and video above was a quick mockup to test the function of the dispay. We plan to develop the software side of things soon. The hardware is coming toghether nicely.
The great thing about open-source is that if you or anyone else don't like how the display shows infrormation you can change it and customise it to show the infromation you want to see. It's imposibe to make a display that will please everyone!
The code is up on github. It will run on a JeeNode + Grahpics board hardware http://jeelabs.com/products/graphics-board
All the best, Glyn.
I think you should be aiming
I think you should be aiming towards graph visualization of past few hours. I find this kind of info most usefull, see what I mean: http://chtech.co.za/chtech/Energy_Meter_Features.html
Very interesting display
Very interesting display ideas; and this is a great example of why there will be different needs for domestic and commercial application. Domestic users will be 'turned off' , if you excuse the terrible pun, by any sort of waveform, whereas commercial users may be interested in anything that helps them drill down to help root cause analysis.
Re: energy display ideas
Very true. The type of information which the user desaires to see will be different depending on the user. We plan to initially design our display for domestic users (ourselves!) who possibly have a small PV array.
I think the most important things are:
Room temperature is very linked to energy use as space heating is once of the greatest consumers of energy in our lives. Obviously the fuel used for spaceheating will vary but at least the display can be used as a point of reference when strict thermostat control is being implemented!
Use Case Analysis
Have you done any use case analysis? It might be useful to walk through use case analysis before further work. From my perspective, I think people would really like to see water/gas/electricity in one display. This might be jumping a little too far ahead, but knowing the destination might change the approach from here on. Very impressive work .....
Neat!
That is some cool development ;)
What about the horizontal bar? do you set the maximum or does it "learn" it?
Re: emonGLCD horizontal bar
Thanks Amin,
We'r pretty excited about it. For the demo the bar range was hard coded to max out at 3Kw. Your right, it would need to 'learn', need to think about exactly how this would work. It might not be desirable to have absolutely maximum at the top at this might be a value which is hardly ever reached. Maybe some form of fuzzy logic or running average could be implemented.
The demo in the video was something we put together in an afternoon as a proof of concept. We are planning to re-design to look. Any ideas are welcome. We definitely plan to display some small Kwh/day bar graphs these value would be pulled back from the web.
The code for the demo about is up on github, feel free to have a play. We are not in a position to sell kits yet but we do have 12 PCB's we can make available is anyone is interested.
All the best, Glyn.
PCB's
I'm sure there is still a lot to be developed... for the horizontal bar's maximum, I think there should be some kind of variable called "max" that records the highest value for the last week/month or so, and this should be used as the max.
About your PCB's: where do you get them manufactured?