Phi-panel backpack assembly and keypad options Dr. John Liu 12/16/2012
1. Introduction:... 3 Currently available:... 3 2. Backpack assembly... 4 3. Connecting to a keypad... 6 4. Rotary encoder keypads... 7 5. Directional keypad... 9 6. Matrix keypad... 11 7. Wire wrapping tips... 12
1. Introduction: This document guides you with assembling your phi-panel backpack and connecting it to the various available keypad options and customize your own keypads. Like phi-panel backpacks, these keypad options can be purchased, separately from phi-panel backpack, at my inmojo store: http://www.inmojo.com/store/liudr-arduino-and-physics-gadgets/ Currently available: 1) 16X2 display matrix keypad 2) 16X2 display directional keypad 3) 20X4 display directional keypad 4) 16X2 display rotary encoder keypad 5) 20X4 display rotary encoder keypad Please refer to the images in next sections. Note, the keypad kits don't include the phi-panel backpacks and backpack kits don't include keypad kits. All of these keypads are laser-cut 3mm black acrylic. If you need other colors, please check out ponoko.com for available materials and we can arrange for custom orders. Except for matrix keypad, all other keypads are glossy on one side and matte on the other side and totally reversible so you may decide which finish you like better. All kits come with mounting hardware (M3 screws, nuts and standoffs). If you need a custom laser-cut keypad layout and could use my design service, let me know on my blog: http://liudr.wordpress.com/gadget/phi-panel/ In the next section, I will guide you with phi-panel backpack assembly and then various keypad assembly.
2. Backpack assembly The backpack only takes 10 minutes to 30 minutes to assemble, depending on your soldering skill level. A general trick is to first secure the parts by inserting the pins and bending them away from each other on the other side of the board. This way the parts won't fall off the boards while you solder. The MCU will fit in tightly enough when you bend the pins slightly and press the MCU into the 28-pin socket. The following is a picture of a phi-panel PCB that has all parts prepared for soldering. Note, the board is V 1.5, not the most recent version, so for reference only: Figure 1.1 Preparing the PCB and parts for soldered. Note, the board is V 1.5, not the most recent version, so for reference only. Here are some pictures of the latest version PCB before and after most components are soldered to it: (a) (b) Figure 1.2 Phi-panel backpack PCB V 1.9. (a) Before soldering (b) After most parts are soldered. The detailed assembly instruction are explanation of parts are included in the following table:
Table 1.1 Phi-panel backpack connections PCB V1.9 01230123 (bottom left): S (bottom center) '-' ALL GND (bottom right): Serial connector (right) MCU socket (center) 10K resistor (right of MCU) 150 or 47 Ohm resistor (left of MCU) Crystal 22pF capacitors 100nF capacitor Potentiometer LCD connector These are keypad connections. Solder 8-pin right-angle male header or anything else you prefer. Refer to keypad connection diagrams. Connect the + side of a speaker to this pin and side of speaker to a 300 ohm resistor then to -. To use a keypad kit, connect the 2-pin right-angle male header. See above. Ground, very convenient if you lay out your own buttons since each button needs one GND. No need to connect to if you use keypad kits. Use 6-pin right-angle female connector. Connect TX to Arduino RX, RX to Arduino TX. The MCU should be inserted to the socket with the half circle notch on the right side and circular dot on top right. This is the brown-black-black-red resistor to the right of the MCU. 16X2 LCD typically uses 47 ohm (yellow-purple-black-black) while 20X4 LCD typically uses 150 ohm (brown-green-black-black). To prevent damage, only 150 ohm is included. 16MHz crystal under shiny metal cap. Insert either way just like resistors. No polarity. Two 22pF capacitors on either side of the crystal. No polarity. Insert either way. Marked with 104. Slightly larger than 22pF capacitors. No polarity. Insert either way 10K trim potentiometer. You need to turn it to adjust contrast until you see text. First solder straight male headers to LCD. Only pins 1-6 and 11-16 need to be soldered. Trim all pins on the board that stick above the board. Use electric tape to cover the back side of the backpack. Plug LCD into the backpack, from below, with display facing down. Then solder LCD to the backpack.
The above steps don't have to be taken in sequence except for the LCD connector part. The LCD must be put in as the last step. The following is an assembled kit with 16X2 display: Figure 1.3 Assembled phi-panel backpack with 16X2 display, PCB V 1.9. 3. Connecting to a keypad After you assemble your backpack, you may decide to add some keypad options. The backpack ships with a default firmware that works with 4*4 matrix membrane keypads that I sell as an option to the backpack. Just follow the direction in later part of the document and plug the keypad in. There is no need for any modification. If you will be adding a directional or rotary encoder keypad in the future, you are recommended to order the backpack with the keypad kit. Indicate with an email that you intend to use the keypad kit on the backpack and I will include a 10-pin right angle male header so you can use it to connect to the 8 keypad in and the S and - pins to make ground pin accessible to the keypad. I will also load the right firmware for you if you indicate you want it loaded. In case you purchased them separately, the kit includes a 2-pin right angle male header that you can solder to S and pins on fig. 1.3 so you can get ground from the backpack. If you didn't get those headers, using straight headers is just fine. Please refer to the keypad connection guides in later part of this document. If you want to lay out your own keys, please also refer to the keypad connection guides in later part of this document and use the "ALL GND" for each button. The reason an 8-pin right angle male header is included in the backpack kit instead of 10-pin header, is because I don't want anyone to plug the matrix keypad in the S and - pin and short out the backpack.
4. Rotary encoder keypads Rotary encoders are wonderful for quickly adjusting parameters or picking items from long lists. There are two versions of rotary encoder keypad kits, one for 16X2 displays and one for 20X4 displays. Both kits include the same circuit board. There are 6 buttons in addition to the rotary encoder, which itself has a button when you push the shaft. Since the phi-panel only has 8 pins for keypads, and the rotary encoder takes 3 (Up, down, Enter), only up to 5 out of the 6 buttons can be connected to the panel. You may connect as few as zero additional buttons or as many as 5, out of the 6 buttons. My connection diagram only uses buttons 1-4 and 6 but you may do any combinations you like and cover up the unused buttons with the provided circular pads. For example, you could use the three bottom buttons as three buttons that each sets/resets an option, or use the four buttons on the corners to do 4 set/reset etc. The knob is not included in the kit. I am still trying to find reliable source to buy knobs that don't have the annoying radial line on them. Since a rotary encoder can rotate any amount of angles or revolutions, it really makes little sense to have a line there. If you like, you can counter sink the screw holes and black screws to give your keypad a better look. All hardware are M3 size. (a) (b) Figure 3.1 Rotary encoder keypad with phi-panel backpack. (a) 16X2 version (b) 20X4 version. Notice there are 6 buttons around the rotary encoder. Solder male headers or your own wires and then the encoder and the buttons. (a) (b) Figure 3.2 Populated rotary encoder keypad circuit board front (a) and back (b).
The following table explains how to wire the keypad to phi-panel backpack. Table 3.1 Rotary encoder keypad connections V1.0 Pin/Key name Serial output Menu function Connect to phi-panel E 'B' Enter First 2 D 'D' Down First 1 G "-" or GND U 'U' Up First 0 6 'A' Escape First 3 5 4 '2' Second 0 3 '1' Second 1 2 'R' Left Second 2 1 'L' Right Second 3 It is pretty easy to solder the buttons and the rotary encoder to the board shown above. Either solder wires or solder the row of 10 male headers to the side of the board that has V1.0. Using the male headers is highly recommended. You can later use wire wrap tools to change how you wire up the keypad in case you want some changes or you made a mistake. Refer to the wire wrap section for tips on wire wrapping. Figure 3.3 Backpack keypad connections with 10 pins. The first 8 pins are for keypads. Then the last pin is ground. Note: This picture is from a past version so only for reference.
5. Directional keypad Directional keypads are ideal for menu setups and parameters adjustment, especially when there are multiple columns of items. You may use left and right to jump between columns of list items and up and down to move along a column. The two bottom keys can serve as enter and escape. The two top keys may serve as anything additional. There are two versions of directional keypad kits, one for 16X2 displays and one for 20X4 displays. Both kits include the same circuit board. There are a total of 8 buttons. Since the phi-panel only has 8 pins for keypads, all 8 buttons can be connected to the panel. You may connect as few as up/down/left/right and enter, or as many as all 8 buttons. My connection diagram uses all 8 buttons but you may do any combinations you like and cover up the unused buttons with the provided circular pads. For example, you could use up/down/left/right, enter and escape. The included button caps are black but if you want other colors, there are gray and red. Please indicate your need if you like different colors but there will be a delay for me to back order those other color caps. If you like, you can counter sink the screw holes and black screws to give your keypad a better look. All hardware are M3 size. (a) (b) Figure 4.1 Directional keypad with phi-panel backpack. (a) 16X2 version (b) 20X4 version. Notice there are a total of 4 buttons, with 4 arranged in up/down/left/right arrangement and 4 more. Solder male headers or your own wires and then the buttons. (a) (b) Figure 3.2 Populated rotary encoder keypad circuit board front (a) and back (b).
The following table explains how to wire the keypad to phi-panel backpack. Table 4.1 Directional keypad connections V1.0 Pin/Key name Serial output Menu function Connect to phi-panel 2 '2' Escape Second 1 1 '1' Enter Second 0 R 'R' Right First 3 L 'L' Left First 2 D 'D' Down First 1 U 'U' Up First 0 G G "-" or GND "-" or GND 4 '4' Second 3 3 '3' Second 2 It is pretty easy to solder the buttons to the board shown above. Either solder wires or solder the row of 10 male headers to the side of the board that has V1.0. Using the male headers is highly recommended. You can later use wire wrap tools to change how you wire up the keypad in case you want some changes or you made a mistake. Refer to the wire wrap section for tips on wire wrapping. You are recommended to solder right angle headers to the right of the keypad headers on the backpack to gain access to GND. See Fig. 3.3.
6. Matrix keypad Table 5.1 Matrix keypad connections Connect the membrane keypad connect so that membrane keypad pin 1 aligns to backpack first 0 and membrane keypad pin 8 aligns to backpack second 3
7. Wire wrapping tips To easily connect an optional keypad (except for matrix keypad), you are strongly recommended to wire wrap. Here is some wiki reference: http://en.wikipedia.org/wiki/wire_wrap You are strongly recommended to wire wrap to connect the male headers on the keypad PCB to the backpack's pins so if you want change or correct mistakes, you can do so easily.