DIY i2c LCD backpack
|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.