Building an emonGLCD
Guide created and maintained by: Ian Chilton - please direct any suggestions or corrections to: ian [at] ichilton [dot] co [dot] uk.
If you get stuck, there is a forum and a lot of other information over at OpenEnergyMonitor.
Here's how to build up an emonGLCD as a step by step guide.
OpenEnergyMonitor is project to develop and build open-source energy monitoring, control and analysis tools. The main focus at the moment is developing an end-to-end open-source energy monitoring system that is Arduino IDE compatible. More information can be found at: http://openenergymonitor.org
emonGLCD is a general purpose wireless graphical LCD display unit. Powered by an Atmega328 with an Arduino bootloader.
The emonGLCD is designed to drive a 128x64 GLCD display based on the ST7565 driver. The board has a built in 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 pull aggregated data from a web-sever to be displayed.
The emonGLCD has an on-board temperate sensor, light sensor and two tri-color ambient indicator LED's.
The pcb is built in an orderly sequence starting with the resistors and small components that are low on the board and then working up to the bulkier parts like connectors. After soldering each component, you need to cut off the excess lead from the bottom using some cutters.
It is very easy to cause shorts which will make the board or specific parts of it not work. What i'd advise is that you take your time during the build, be precise, use minimal solder and carefully check each joint after soldering it. If you suspect any short, check it with a multimeter and fix any shorts there and then, before continuing.
Even if you have been soldering for years, i'd highly recommend these videos to get the right tools and improve your technique:
Layout and identify the components from the kit.
From OpenEnergyMonitor - emonGLCD Build |
From OpenEnergyMonitor - emonGLCD Build |
Ok, we're ready to start. Here is the PCB ready:
From OpenEnergyMonitor - emonGLCD Build |
From OpenEnergyMonitor - emonGLCD Build |
This is where everything should go:
Start with the resistors. Bend each leg of the resistor over 90 degrees, right next to the body. It's recommended that you align them all in the same direction.
First we add the 3x 10k resistors - their colour code is: Brown, Black, Orange, Gold.
From OpenEnergyMonitor - emonGLCD Build |
Add the 3x 100R resistors - their colour code is: Brown, Black, Brown, Gold.
From OpenEnergyMonitor - emonGLCD Build |
Add the 4.7k resistor - it's colour code is: Yellow, Violet, Red, Gold.
From OpenEnergyMonitor - emonGLCD Build |
Add the 2x 22pF ceramic capacitors - they are either blue (as per the photo) or small brown discs labelled 22 and with black tips.
From OpenEnergyMonitor - emonGLCD Build |
Add the 9x 100nF ceramic capacitors - they are labelled 104.
From OpenEnergyMonitor - emonGLCD Build |
Add the 5x 10uF electrolytic capacitors. These must go the correct way round. The PCB is marked with a + symbol to indicate positive lead. The capacitors are marked with a white strip and a short leg to indicate the negative lead and a longer leg to indicate the positive lead.
From OpenEnergyMonitor - emonGLCD Build |
Add the 16Mhz crystal - it can go either way round.
From OpenEnergyMonitor - emonGLCD Build |
Add the 2x LED's. They are Bi-Colour so have 3x legs. The PCB is marked A and B - the shortest leg should be towards 'B' and long leg towards 'A'. Remember that the rear of the case will cover these up so you might want to bend them through 90 degrees so they point upwards. I preferred to leave them so they shine into the back of the case so they are not so bright but still very visible when the case is on.
From OpenEnergyMonitor - emonGLCD Build |
Add the MCP1702 3.3v Voltage Regulator - the flat edge goes towards the bottom of the board as per the markings. Note that it looks identical to the DS18B20 so you'll need to look carefully at the markings under some light to spot which is which.
From OpenEnergyMonitor - emonGLCD Build |
Add the DS18B20 Digital Thermometer - the flat edge goes towards the bottom of the board as per the markings.
From OpenEnergyMonitor - emonGLCD Build |
Add the mini USB socket.
From OpenEnergyMonitor - emonGLCD Build |
Add the Light Dependant Resistor (LDR). Note that this will be covered up by the back of the case so you will want to bend it through 90 degrees and have it pointing upwards rather than flat like I have it in the photo.
From OpenEnergyMonitor - emonGLCD Build |
Add the DIL socket. The notch on the socket should go to the left of the board, as per the markings on the PCB.
From OpenEnergyMonitor - emonGLCD Build |
Add the 6-pin programing header at the bottom of the board. This will be covered up by the back of the case, so if you want to be able to program the device without removing the back, you'll either need to bend out the pins, or you can put it on sticking outwards by laying the pins flat over the pads on the under side of the board and soldering them on top.
From OpenEnergyMonitor - emonGLCD Build |
We now need to check the voltage is correct before we add any of the expensive components. Power the board with either an FTDI programming cable or a mini USB and measure the voltage between the GND and VCC pads on the RFM12B socket. You should get 3.3v. If you get more than this, you should work out what has gone wrong before you continue.
From OpenEnergyMonitor - emonGLCD Build |
Add the RFM12B module. You can see the shapes of the crystal on the PCB. Position the module in place over the pads and gently apply heat and solder the opposite corners to hold it in place so you can solder the remaining pads.
From OpenEnergyMonitor - emonGLCD Build |
Add the antenna by soldering the end to the bottom right pad on the RFM12B module.
From OpenEnergyMonitor - emonGLCD Build |
We can now add the ATMega328 chip. You will need to bend the pins in slightly by resting the chip sidewards on the desk and rolling it fowards to bend the pins in. Do the same with the other side.
From OpenEnergyMonitor - emonGLCD Build |
The next step is to add the backlight. Glyn has put a video together explaining this part:
After following that, it should look like this:
From OpenEnergyMonitor - emonGLCD Build |
From OpenEnergyMonitor - emonGLCD Build |
You should now test the LCD display before soldering it as it is very hard to desolder later if something is wrong. This video explains the process:
The ATMega will come with Arduino Optiboot 4.4 bootloader (select Uno in IDE) but with no sketch uploaded. The correct sketch must be uploaded using Arduno IDE. You should use this sketch to test with.
We are now ready to fit the LCD Display.
First take the display, and place it through the holes on the PCB, but do not solder it yet.
Next, we need to fit the front of the case. Take the plastic spacers and use the screws to go through the front of the case into the spacers, then use the spacers with screw threads to go through the PCB into the spacers with the front, as shown here:
From OpenEnergyMonitor - emonGLCD Build |
Once you have the display in the correct position (just resting very lightly on the backlight), we need to solder it in place. Solder a just a few pins at first, check it's level and aligned and then solder the remaining pins.
From OpenEnergyMonitor - emonGLCD Build |
Now fit the back of the case using the remaining screws.
From OpenEnergyMonitor - emonGLCD Build |
We are now nearly finished!
From OpenEnergyMonitor - emonGLCD Build |
From OpenEnergyMonitor - emonGLCD Build |
If you have a glue gun, place a small amount of glue between the backlight and the PCB to hold it in place.
From OpenEnergyMonitor - emonGLCD Build |
We can now add the stand.
From OpenEnergyMonitor - emonGLCD Build |
From OpenEnergyMonitor - emonGLCD Build |
From OpenEnergyMonitor - emonGLCD Build |
Here is the completed unit running the emonGLCD Tester sketch.
From OpenEnergyMonitor - emonGLCD Build |