How to connect 16x2 LCD to PCB? - Page 1
Forum section: electronics / general

author: TopherTheME
author_rank: Regular Contributor
timestamp: December 10, 2010, 09:37:03 pm
content: I have a project that involves a typical 16x2 LCD with a 16x1 pinout that I need to connect using some sort of wire or cable. I would like to just use a 16x1 ribbon cable to connect the two, but the problem is I can't find a 16x1 ribbon cable anywhere! I can't even find the 16x1 connectors that cold be used to make the cable. This is a stupid problem to have.As of right now, my solution is just to recycle an IDE cable for a floppy drive (17x2) but I would prefer not to as I would like to keep this project looking neat and not hacked together. I figure since these LCDs are so common, there must be a better solution out there that people use. What is it?

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: December 10, 2010, 10:00:43 pm
content: I have seen single row IDC connectors which apparently use every other conductor in the ribbon cable but I've never been able to track down a source.For single row 0.1" connections, I have used flat flex cable (with 0.1" track spacing) and "push-in" connectors but I've only done this for 4 or 5 conductors. It looks great but pre-built flat flex cables are difficult to find and somewhat costly.The easy solution may be to use a 16x2 IDC cable and a dual row header on the circuit board. If you connect the pins in parallel, the LCD could plug into either row. This will be the same width cable you'd need anyway with just a little more room used on the circuit board for the dual row header.Jon

author: Balaur
author_rank: Unknown
timestamp: December 10, 2010, 10:20:37 pm
content: Maybe it's not applicable in your case, but I like stacking the LCD on top of the mainboard using:hexagonal spacers (or nuts and long screws that I can cut to size) for mechanical support0.1" break away headers for electrical interface: male header on the LCD and female on the mainboardOne of my standard arrangements is like in the attached picture. (The upper rectangle with the four mounting holes is the LCD).

author: TopherTheME
author_rank: Regular Contributor
timestamp: December 12, 2010, 05:02:41 pm
content: Quote from: Jon Chandler on December 10, 2010, 10:00:43 pmI thought about using flex cable but the cable and connectors is just to expensive and hard to find. After doing some searching I found these on Pololu:http://www.pololu.com/catalog/product/772They sell a 16pin IDC cable for it for just a few bucks so I think I'll just go with this.Never mind. Looks like I can't use that since it uses 5V logic and I'm working with a 3.3V uC.

author: Chris_R
author_rank: Contributor
timestamp: December 12, 2010, 07:36:45 pm
content: Depending on the length and placement of your lcd it may be worth using a shift register so that you can shift in serial data via a 3 wire interface instead of 16.Obviously that means you need to make a small pcb up for the lcd to accommodate the shift register, but depending on how you're placing the lcd, it may be easier eg. I had an lcd interface placed at the front of a machine I worked on, with the control pcb on the back, so I used a 3 wire interface so minimise the number of wire I had trailing around the machine.Here's a pretty good guide which should be able to explain most of what you need to know.http://www.electronics-lab.com/projects/mcu/015/index.html

author: Unknown
author_rank: Unknown
timestamp: December 13, 2010, 01:07:12 am
content: You can use any flat ribbon cable that you can recycle or buy. It does not need to have exactly 16 conductors;it can have more than 16 in which case just remove the spare ones. I dont like IDC cables as they are too thin and therefore break easily. However, if the project will go in a case then no problem. In the past I used multicolour ribbon cable that I cut to length from Farnell. The quickest thing is to apply some hot glue across the solder joints on the lcd and main board as a strain relief. This is done in cheap toys. You can also use a single row of female header connectors and connect the wires on those with some heatshrink. Have a look at this toohttp://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=6831686, a bit of an overkill. You need to examine your mechanical requirements in more depth to decide on a suitable solution.

author: osmosis321
author_rank: Regular Contributor
timestamp: December 13, 2010, 05:23:51 am
content: That's what I've been working on too. I've been giving this exact same problem a lot of thought lately and here's what I've come up with:1) The main board takes in 6VAC, rectifies it and makes 6VDC available via a 2-pin header.2) A daughter board is designed to partially match the PCB outline of the LCD, with the pin headers lined up over each other. The daughter board has a voltage regulator that takes in 6VDC and regulates to 5VDC. An I2C I/O expander creates the signals to interface to the LCD, which means that only six wires are needed to go from my uC board to my LCD.3) Somewhere along the line I need to cross a voltage boundary. Either I run the IO expander at 3.3V or I run it at 5V - as I have a sneaking suspicion that trying to run I2C with two different top rails is entering a world of pain, I'll switch voltagesafterthe expander. That is, the expander runs at 3.3V, and I've used 2x ULN2003 darlington arrays on the outputs to switch the signal levels to 5V.One caveat of doing it this way is you can write to the LCD but not read from it. But I don't need to read from my LCD.

author: scrat
author_rank: Frequent Contributor
timestamp: December 13, 2010, 07:21:12 am
content: Possibly, I'd use an LCD with the holes placed in a double row (although they are less common, I've seen some of them, the connections are usually on the left side).A 0.05" pitch flat cable (like the IDE ones for PCs) can do the job, if fitted into a polarized 2-row connector (similar to the IDE ones, but obviously smaller). Mechanical and electrical fastening between flat cable and connector is ensured by a press down "crimping".It will look more neat than a huge 16-wire 0.1" pitch flat cable, in my oponion, and let you connect-disconnect on the two sides (board and LCD) by means of a simple, cheap and reliable connector.Just look at how the IDE connector is, my words are in poor technical EnglishIf you want to recycle something, then using 40-pin IDE connectors (taking the central part with the "polarization" and cutting away the pins not used on the two sides) doesn't look so ugly.

author: armandas
author_rank: Frequent Contributor
timestamp: December 13, 2010, 07:49:38 pm
content: I'm looking at this combination:1.http://uk.farnell.com/jsp/search/productdetail.jsp?sku=15935102.http://uk.farnell.com/jsp/search/productdetail.jsp?sku=1830755I'm going to use 4-bit interface, so I only need a total of 12 lines. There is a 16-pin version, but using two 6-pin housings is cheaper.

author: TheDirty
author_rank: Frequent Contributor
timestamp: December 13, 2010, 09:50:34 pm
content: Quote from: TopherTheME on December 12, 2010, 05:02:41 pmIt's a standard HD44780 interface. It works fine with 3.3v logic. All you need is the 5V for the backlight.

author: Frant
author_rank: Regular Contributor
timestamp: December 13, 2010, 10:23:11 pm
content: Quote from: TopherTheME on December 12, 2010, 05:02:41 pmThe solutions proposed in several posts here tend to be increasingly complex, so the advantage of having a "standard" (inexpensive) 2-row display actually turns into an obstacle in your project. Therefore, I advise you to consider using a more suitable display. I'd recommend the displays from Electronic Assembly (the EA DOG series,http://www.lcd-module.com/products/dog.html). They are easy to work with: options of parallel or serial interface, 3.3 V or 5 V, a variety of models and versions andnomechanical parts.

author: scrat
author_rank: Frequent Contributor
timestamp: December 13, 2010, 10:37:09 pm
content: Quote from: Frant on December 13, 2010, 10:23:11 pmI bet they cost a little more than a STANDARD display.In some cases, directly soldering on the board could be not an option (i.e. the display has to stay far from the board), otherwise a standard display could be fitted ON the board using a row of simple pins, going through the main and the LCD board.

author: TheDirty
author_rank: Frequent Contributor
timestamp: December 14, 2010, 01:44:43 am
content: It might be worth it to make a serial "backpack" for your LCD. Use a cheap low pincount uC and have it do all the LCD work and just send it power/ground/TX and maybe RX if you want to make sure it's there. You can just throw it on a tiny PCB that solders directly to the LCD with header pins.I made one of these up a while ago, but mine had some crazy stuff on it like a FTDI chip so I could connect it through USB. Just the cheap uC and PCB wouldn't cost you more than about $2 to add to your project and you can almost offset that with the cost saving of a 3 pin connection.

author: Zad
author_rank: Super Contributor
timestamp: December 14, 2010, 04:27:09 am
content: Use a 16x2 ribbon cable and crop the ends off alternate conductors?

author: JohnS_AZ
author_rank: Frequent Contributor
timestamp: December 14, 2010, 03:37:37 pm
content: I just ordered and received one of these ...I haven't assembled it yet so I can't report on it's operation, but it might simplify your projecy.http://shop.moderndevice.com/products/lcd117-kit