USB and serial enabled LCD backpack design overview

From DP

Jump to: navigation , search

Pic-lcd-backpackv5 .jpg

Available for $16.95 at Seeed Studio.

Prototype PCBs are available in the free PCB drawer.

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

Contents

Overview

PIC LCD backpack-v2.jpg

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.

  1. 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
  2. We retained the simple 5volt serial control that all the other guys use too
  3. Software backlight dimming
  4. Optional software contrast adjustment via a hardware hack
  5. Same price as other serial-only LCD backpacks!

Hardware

Cct-LCD-Backpack-PIC-HD44780-v1b.png

Click for a full size schematic image. Schematic and PCB were designed with the freeware version of Cadsoft Eagle. Grab the latest files from the downloads section.

PIC18F2550

LCD-BackPack-MCUpic2-600.jpg

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

HD4478022-600.jpg

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).


Adjustment

HD4478023-600.jpg

The adapter features software and manual backlight adjustment.

Contrast is adjusted manually, but an optional hack can enable software contrast adjustment.

Backlight

HD4478025-600.jpg

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.

HD4478026-600.jpg

The backlight is software dimmable. The PIC hardware pulse-width modulator controls the backlight through transistor (T1) with 1K base resistor (R2).

Contrast

HD4478029-600.jpg

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:

  1. Cut the trace between pads 2 and 3 of the solder jumper (SJ1)
  2. 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.

IO pins

Usb-bp-lcd-io.jpg

USB & Serial LCD Backpack breakout pins
Label Function
RB5 IO (buttons, etc)
RB4 IO (buttons, etc)
VCC +5V output
GND ground
RX serial data in (or IO)
TX serial data out (or IO)
-- --
GND USB ground
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.

PCB

PIC-lcd-backpack-pcb.jpg

We used the freeware version of Cadsoft Eagle to make the schematic and PCB. Grab the latest files from the downloads section.

Lcb-bp-back.jpg

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.

Partslist

PIC-lcd-backpack-HD44780-v1a-brd.png

PIC HD44780 LCD backpack
PartQuantityValuePackage
BACKLIGHT1100RB25P
C1,C2227pfC0805
C31220nFC0805
C410.1uFC0805
CONTRAST110KB25P
D11BAS16JSOD2514X100N
F11500mA fuseRCL_L1812
IC11PIC18F2550_28WSO28W
ICSP10.1" header1X05
J11USBSMDUSB-MINIB
LCD10.1" header1X16
Q1120MHzHC49UP
R1110kR0805
R211KM0805
RB4,RB520.1" header1X01
T11BC818 NPN transistorSOT23-BEC
UART,USB20.1" header1X04

The latest sources and distributors are in the master partlist. See something missing? Please let us know.

Firmware

Usb-lcd-action-smartie.jpg

The firmware is written in C and compiled with the free Microchip C18 compiler. You can download the latest files from our Google Code project page.

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.

.inf installation

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.

Commands

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.

Bootloader

Usblcdbootloader.png

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.

Using it

LCD-Backpack-Action.jpg

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

We'll post the most recent firmware updates on the blog. You can also join the discussion in the forum.

Get one!

Usb-lcd-bp-seeed.jpg

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!