Blog Archives

DIY i2c LCD backpack

What do you get when you add all of these parts plus a 16 x 2 LCD together? A do-it-yourself I2C LCD backpack which only needs four connections to an arduino or any other micro controller to work… and only two of those connections are data connections!

Parts for I2C backpack

Based around the MCP23008, which is a I2C 8-Bit I/O Expander, this little board allows me to control a LCD from the I2C bus of an Arduino, and even use those two pins to also talk to a real time clock (RTC) and other I2C devices! This variation of the design allows for the LCD backlight to be controlled digitally, with the contrast being set using the potentiometer and jumpers to allow one of eight hardware addresses to be set. I didn’t come up with this idea

The finished board

And here is a picture of the board nestled on the back of a 16×2 LCD which it now controls.

16 x 2 LCD with I2C controller attached

To finish off, for more information on this design, including schematics so you can create your own, visit the Arduino Playground and this forum article. My variation to this was to use a BS170 mosfet to control the backlight, and add jumpers to allow for the I2C hardware address to be changed. I use the Adafruit LiquidCrystal library to control it using a breadboard Arduino. Has been running 24 x 7 for approx two months without any issues as yet.