Raspberry Pi - Build a GPIO Testing Board
While working on The Pi4J Project, I found the need to have some type of GPIO prototyping board to quickly visualize the state of GPIO pins and control the state of GPIO pins. I purchased a handful of electronics parts and set out to build my GPIO testing board.
The picture below is the final result of building this test board:
Design Goals
My design goals included:
- Support 7 GPIO pins.
- Small/compact footprint.
- Connect to Raspberry Pi via ribbon cable.
- Support for momentary and fix on/off switches.
- Display GPIO state using LEDs.
- Captive screw terminals for connecting GPIO pins to external devices.
- Order the GPIO test IO hardware based on the Pi4J/WiringPi pin numbering scheme.
Supplies / Parts
I purchased most of the parts used in this project on eBay.
- 1 @ 26P ribbon cable (1 meter or less)
- 2 @ 26P female IDC connectors (press-fit)
- 1 @ 26P box header IDC male sockets (right angle or straight)
- 7 @ 1.5 VDC red LED
- 7 @ 220 ohm resistors
- 7 @ 0.3A DC 50V Mini Vertical Slide Switch SPDT 3 Pin PCB
- 7 @ 6mm x 5mm Panel PCB Momentary Tactile Tact Push Button Switch DIP (normally open)
- 4 @ 3pin Block Terminal screw connector 5mm pitch
- Solder (lead-free)
- Scrap wire
Tools Needed
- Wire snips (Hakko CHP170 Micro Cutter, 16AWG Clean Cut)
- Wire strippers (Paladin Tools 1118 GripP 20 Wire Stripper/Cutter, 30-20 AWG)
- Solder Iron (Weller WLC100 40-Watt Soldering Station)
- Digital Multimeter w/ Continuity Testing (Extech MN35 Digital Mini MultiMeter)
Logic
- When a GPIO pin is configured as an OUTPUT pin and its state is set to HIGH, the corresponding LED should be ON. (+3.3 VDC is delivered to the anode lead of the LED)
- When a GPIO pin is configured as an OUTPUT pin and its state is set to LOW, the corresponding LED should be OFF. (0 VDC is delivered to the anode lead of the LED)
- When a GPIO pin is configured as an INPUT pin and the correspondingly momentary switch is depressed or the toggle switch is in the ON position, the LED should be ON and +3.3 VDC is delivered to the GPIO pin on the Pi.
- When a GPIO pin is configured as an INPUT pin and the correspondingly momentary switch is not depressed and the toggle switch is in the OFF position, the LED should be OFF and 0 VDC is delivered to the GPIO pin on the Pi.
Wiring Diagram
The following illustration depicts the wiring schematic used to create this GPIO test board.
(NOTE: The GPIO pin numbering is based on the Pi4J/WiringPi GPIO pin numbering scheme. But of course you can apply whatever GPIO pin numbering scheme to meet your needs.)
Click diagram to enlarge.
Photos
Click any photo to enlarge.
Videos
This is a simple demonstration video of this GPIO test board in action with a simple Java program cycling states on the 7 GPIO output pins.
If you would prefer to have a kit with printed circuit board and all the components included to build a similar GPIO testing board, please see this article:
John Jay's 8 LED & Button Breakout Board