connect the Push-button switches
Note: These instructions are without solder; see the note on soldering on page 3 of the Assembly Instructions PDF.
If installed carefully, jumper wires can be as reliable as solder, with less hassle. The Phase Dock AstroPi RDX Wiring Kit provides jumper wires with quick disconnect crimps.
TIP: The wire color is not important. All the jumper wires will work the same way.
BONUS: Labels lasered inside of the lid make button wire routing easier and minimizes errors.
4A: Create Button Wires
Cut one crimp from the RDX Wiring Kit free with your wire cutters.
Cut as close as possible to the beginning of the quick-disconnect on the crimp; this will make it easier to slide the crimp onto the switch terminals.
Take one of the connector wires from the kit (with female connectors on each end) and—without cutting the wire or damaging the pin connector—remove the plastic insulation from one end.
Take the wire cutters and place them alongside the pin connector inside, being careful not to compress or cut the pin itself.
Gently close down with the wire cutters and cut through the plastic insulation. The insulation will collapse enough so that…you can pull it from the wire, leaving the pin connector intact for the next steps.
Place the pin connector of the wire you just stripped inside the end of the crimp you cut free. Use your pliers to squeeze the crimp around the wire until firmly connected. There’s a bit of an art to this:
- Start with the flanges in the middle of the crimp first.
- Carefully crimp one of the center flanges inward. Do NOT try to crimp both flanges at the same time.
Next, crimp the other center flange inward, making sure to capture the pin connector under the two flanges.
Finally, crimp the large flanges on the end of the crimp, one after another, over on top of each other. This picture shows perfectly crimped center flanges.
Repeat this process to create six button wires.
Now take the heat-shrink insulator tubes and cut 6 pieces 2cm (about 3/4") long.
Gently push the insulator tubes over the end of the wires so that the area where the wire meets the crimp is completely covered.
4B: Make a ground loop wire
This technique is used in the real AstroPi flight units.
Take the long wire from the Wiring Kit. It should be about 1 meter in length. Using a ruler and wire cutter, make five 10cm lengths.
Use the wire stripper to expose at least 1cm of bare wire on each end, then bend the wire into a U shape.
Now, take a white jumper wire and remove the plastic sheath from one end, to expose the connector, just as you did to create a button wire (above).
Hold the connector next to one end of one of your 10cm wire U-shapes.
Insert both wires together into a crimp and compress the crimp until the wires are firmly held together.
Attach the four remaining lengths of wire to create a chain, crimping together a new wire with the exposed bare end of the previous wire.
One bare wire will remain at the end. Put a crimp on that bare wire.
Cut six 2cm (3/4”) long pieces of insulator tube; gently push it over each of the crimped ends of the daisy chain.
Your final chain will include six crimped ends and one white plastic jumper end.
4C: Connect wires to the button terminals
First, connect your ground loop to the buttons.
Find the crimped wire end furthest from the plastic jumper lead and pUll the insulator back onto the wire to expose the quick disconnect.
Start with the button labeled “up” and slide the insulation boot down. Hold the quick disconnect crimp firmly, guide it gently onto the switch terminal and push it all the way onto the terminal.
When the crimp is securely seated, slide the insulation back down over the wire and the crimp.
Repeat to attach one of the ground wire connections to each of the six buttons.
Now, grab the colored wires made earlier. Connect one crimped end to the spare terminal of each button using the same process you used for the ground wires.
Again, pull the insulator up out of the way while seating the quick disconnect make sure it is fully down on the terminal; once secure, push the insulator down to cover the crimp.
4D: Connect the buttons to the Raspberry Pi
Now, you will wire the buttons to the free GPIO pins at the bottom of the header; do not use any pins on the extended header.
Turn the case over so that the Ethernet and USB ports are at the bottom, and the GPIO pins are on the right of the Raspberry Pi.
To finish wiring in the switches, you will connect the remaining terminal on each switch to the correct GPIO pins using the different color jumper wires.
You will connect to 7 of the open GPIO pins (the ones not covered by the header) that are furthest from the header.
The pins in the RED box are used to wire the buttons, with the bottom of the diagram being the pins closest to the USB ports.
Place the lid upside down on your work surface, with the buttons on the left and the square LED display cutout on the right.
Gather the wires together neatly. They will fold into the open part of the case after the Sense HAT is installed.
Set the lid carefully to the side.
Now, go on to Step 5: Install the Sense HAT