USB and serial enabled LCD backpack design overview
Small character LCDs can show new mail stats, system performance, news feeds and more. The USB and Serial LCD backpack connects HD44780-compatible character LCD screens to your USB port. It has a few nice features that set it apart from the serial-only LCD backpacks available for the same price:
- USB and serial control of characters LCDs
- Supported in common software (LCD Smartie, LCD Proc) as 'matrix orbital' display
- Adjust backlight from software, optionally contrast
- Couple extra pins for buttons
- 500mA fuse
- USB upgradable
A PIC 18F2550 receives commands from a USB or serial port and displays data on HD44780-compatible character displays. It understands the Matrix Orbital command set supported by popular open source programs like LCD Smartie (Windows) and LCD Proc (Linux).
External displays are common in lots of projects where a secondary display is useful or cool, such as case mods. Almost every open source hardware shop sells some type of display controller. We set out to kick it up a notch, and build the ultimate LCD backpack controller.
- USB control and power is a must for use in a modern PC. We brought it to a MINI-B jack, and also a breakout header for direct internal PC connections
- We retained the simple 5volt serial control that all the other guys use too
- Software backlight dimming
- Optional software contrast adjustment via a hardware hack
- Same price as other serial-only LCD backpacks!
The LCD Backpack uses a PIC18F2550 8bit microcontroller (IC1) with USB. It's powered directly by the USB 5v power supply. For extra protection, we added a 500mA fuse (F1).
Each power pin is decoupled using a 0.1uF capacitor (C4). The internal 3.3v USB power supply (VUSB) gets a 0.22uF capacitor (C3).
An external clock is provided by a 20MHz a quartz crystal (Q1) and two capacitors (C1 and C2).
The ICSP programing connection is brought to a header for easy development. The MCLR (RESET) programming pin is connected to the power supply through a diode (D1) and 10K pull-up resistor (R1). The diode stops the 13volt supply using during programming from damaging the rest of the circuit.
HD44780 LCD compatible header
An HD44780-compatible character display, with our without backlight, connects to the long header on the edge of the PCB. The LCD backpack uses the full 8bit data mode, both read and write are supported.
The pins: are data (D0-D7), Reset (RS), Read/Write (R/W), and Enable (EN).
The adapter features software and manual backlight adjustment.
Contrast is adjusted manually, but an optional hack can enable software contrast adjustment.
The backlight is software dimmable. The dim command sent from control software sets the backlight brightness.
A 100ohm potentiometer, labeled BACKLIGHT, can add a resistor to the backlight if your LCD requires it. Please check the datasheet to see if a resistor is required.
The backlight is software dimmable. The PIC hardware pulse-width modulator controls the backlight through transistor (T1) with 1K base resistor (R2).
Screen contrast is adjusted through a 10K potentiometer (CONTRAST).
An optional hack enables software contrast adjustment. We didn't know if software contrast adjustment would work for every LCD, so we used a solder jumper to make it a hackable feature.
To enable software contrast adjustment:
- Cut the trace between pads 2 and 3 of the solder jumper (SJ1)
- Solder pads 1 and 2 together
The PIC's second pulse-width modulator (CPP2) is now the power source for the contrast. This feature is largely untested.
|RB5||IO (buttons, etc)|
|RB4||IO (buttons, etc)|
|RX||serial data in (or IO)|
|TX||serial data out (or IO)|
|VCC||USB 5V input|
|D-||USB data -|
|D+||USB data +|
Pins along the bottom of the board provide access to extra features. RB4 and RB5 are IO pins with interrupt features for buttons. RX and TX are a 5volt serial UART for normal serial control (or extra IO). The USB connector signals are also brought to a header for direct connection to a computer motherboard.
Here's the back of the board too.
Free PCBs for this project were extremely popular and 'sold out' really fast. It's a moderately easy board to build. All the parts are 0805 or larger, and the PIC is SOIC. We always start with the PIC, then do surface mount passives, and then any through-hole parts. Remember to use lots of flux.
|T1||1||BC818 NPN transistor||SOT23-BEC|
We used the Microchip USB stack to run the 18F2550 as a virtual serial port. Microchip's code is open but not redistributable, so we will port the next release to the Honken-JTR open source USB stack.
The virtual serial port (CDC) is an open standard, it should work on any modern operating system.
You don't need a driver, but you will need a .inf file to tell Windows how to use the device. A suitable .inf is included in the project archive.
The controller implements a (subset) of the serial interface provided by Matrix Orbital Serial LCDs. The Matrix Orbital command set is supported by several computer applications that show news feeds, email notices, and more on an external LCD.
The LCD backpack can be upgraded over the USB connection. It uses a modified version of the Diolan USB PIC bootloader. This bootloader, written in ASM and released under the GPL, enumerates as an HID device. The bootloader app is included in the project archive.
LCD Smartie is a Windows application that shows news, email, system information, and more on an external LCD screen. The USB and Serial LCB backpack works with LCD Smartie in 'Matrix Orbital' mode. LCD Smartie is free, open source (GPL) software.
LCD Proc is a similar utility for Linux.
Taking it further
Here's some ideas for the future:
- Port the firmware to the open source USB stack
- Test software LCD contrast control
- Move USB jack to other side, behind the LCD body
Get one for $16.95 at Seeed Studio. That's the same price as other serial backpacks, but with all the latest features.
Your purchases at Seeed Studio keep the open source project coming, we sincerely appreciate your support!