User Tools

Site Tools


lecture:wiring_harness

Wiring Harness for the 4x20 LCD Character Panel

On the web pages linked below, we show how to construct a wiring harness to make it easier to connect and move your LCD panel. The wiring harness is designed to fit the fish tank frame.

Fabrication and testing of the wiring harness is divided into these steps:

  • Trimming and soldering header pins to the LCD Panel
  • Constructing the female connector block
  • Finishing the harness
  • Using the panel with an Arduino

Trimming and soldering header pins to the LCD Panel

  • Use your side cutters to carefully cut the header into a segment that has 16 pins. If your side cutters are sharp, you should be able break the header strip cleanly at the indentation between two pins. If you are unlucky, you may break the plastic around the end pin. Don't give up. The plastic is only necessary to hold the pin while you solder it to the board. You can still use the header strip as long as the solder pin at the end is aligned with the hole on the circuit board and is held at the same height (relative to the plane of the board) as the other pins.
  • Insert the header so that the short end of the pins pass through the circuit board.
  • Solder the header from the top.

trim_header.jpg header_before_soldering.jpg soldered_header_annotated.jpg

Constructing the female connector block

Wire harness components

Each team of four students obtained a set of components shown in the following photograph. The number of crimp pins is greater than the four in the photograph. The cable bundle has nine stranded wires, each with a different color of insulation. The wires are 22 AWG and approximately 40 cm (16 inches) long. The bundle is held together with a loosely cinched zip tie. Do not tighten the zip tie until the wiring harness is finished. You may need to adjust the wires so that the ends line up. Furthermore, tightening the zip tie before you finish will make the bundle stiffer, which will make it harder to adjust the orientation of individual wires as they are crimped.

Green and red jumper wire

The green jumper wire is used to electrically connect three ground pins on the female end of the connector. The red jumper wire is used to connect two +5V power pins on the female end of the connector.

Gently fold (do not bend) the green jump wire so that it forms a “U” shape, and cut the green wire in half. The following sketch shows how the red and green jumper wires are connected to the red and green wires in the cable bundle. The long, horizontal red and green wires are the 40 cm wires from the cable bundle. The red jumper cable connects two pins in the female connector block. The two green jumper cables connect three pins in the female connector block.

Crimp the electrical connection for one wire

  • Using the crimp connector as a reference, strip one end of the jumper wire. The bare wire should be a little longer than the tabs closest to the curled end of the crimp connector.
  • The crimping operation will take two squeezes of the crimp tool handles. The first squeeze crimps one pair of tabs onto the bare electrical wire and starts the crimp on the strain relief tabs. The second squeeze secures the strain relief tabs. For these two squeezes, the tabs being crimped are in the black side of the crimp tool.
  • Orient the crimp tool so that you are looking at it from the un-labeled side (no AWG indicator marks showing). The crimp tab surrounding the bare end of the wire should be above the black side of the jaws. The crimp tab surrounding the insulated end of the wire should be above the gray side of the jaws.
  • Carefully close the jaws of the crimp tool by squeezing the handles. Monitor the orientation of the crimp connector and the alignment of the bare wire to the crimp tab. It is very easy for the wire and crimp tabs become misaligned.
  • After the first crimp, release the handles of the tool and slide the wire and crimp connector so that the tabs for the strain relief are aligned with the black side of the crimping tool jaw. Squeeze the handle to crimp the strain relief.

Crimp the electrical connection for two wires

  • Strip one end of each of the two short green jumper wires. This strip should expose a longer section of bare wire — longer than the stripped section for the red jumper wire. As shown in the following sequence of photographs, the bare wire should be long enough to completely fill the space between both pairs of tabs on the crimp connector.
  • After stripping the two lengths of wire, twist them together
  • Lay them in the space between the pairs of tabs
  • Crimp both of the tabs to the bare wire.

Finish ground (green) and power (red) wires

Remember that the double-crimp connections require longer strips of bare wire than the single crimp connection. The result should look like the following photos.

Add crimp connectors to ends of remaining wires

The following pictures show the wires with the finished crimp connectors.

Insert crimp connectors into the cable housing

The last step is to insert the newly formed crimp connectors into the cable housing. This step is easy, but do not rush it because the order and orientation of the pins in the connector block matter.

The following schematic is the wiring diagram for the connector block. The pin positions on the connector block are listed on the left side. Note that the pin number on the connector block is independent of the pin numbers on the Arduino.

The pin number is indicated in two places on the connector block. The following photograph shows the number 1 embossed on the face of the block near the barb socket, which is on the left end of the photograph. The number 16 is embossed on the face of the connector that will mate with the LCD panel.

Finished connector block

The finished connector block should look something like the following photograph. The location of pin 16 and pin 1 are indicated. The four empty sockets in the middle of the connector are not used.

Finishing the harness

Cinching the bundle of wires together with zip ties is the final task in the fabrication of the wire harness.

Using the panel with an Arduino

Basic Commands

  • Create an LCD instance called lcd connected to pins p1 through p6:

LiquidCrystal lcd( p1, p2, p3, p4, p5, p6);

  • Initialize lcd by specifying the number of columns (ncol) and rows (nrow):

lcd.begin(ncol,nrow);

  • Move the insertion point to column jcol and row irow:

lcd.cursor(jcol,irow);

  • Print a string:

lcd.cursor(“Your message here”);

  • Print an integer:

int value= 5; lcd.cursor(value);

  • Print a floating point value, but with display limited to two decimal places:

float value= 5.2;

lcd.cursor(value);

  • Refer to the HelloWorld example that comes with the Arduino IDE for an example implementation. Additional details are provided in the tutorial at the official Arduino site.
lecture/wiring_harness.txt · Last modified: 2015/04/14 20:57 by nathalie