In this section we'll learn how to wire up the sensor boards to a Raspberry Pi. For this you will need:
- A capacitive touch sensor (momentary, toggle or 5-pad)
- A solderless breadboard
- Breadboarding/jumper wire
- Pi Cobbler (pick one):
- 40-pin (Pi - A, B, B+, Zero) - Assembled Pi Cobbler Plus
- 40-pin (Pi - A, B, B+, Zero)- Assembled Pi T-Cobbler Plus
- 20-pin (Pi - Rev 1 and 2 only) - Assembled Pi T-Cobbler
- A 10k resistor (no resistors are required for the 5-pad board)
- Apples, potatoes, bananas or another fun object that you can connect the board to
- A Raspberry Pi - All Models except the compute node are supported.
- Power supply, mouse, monitor, monitor cable, keyboard and SD card for the Raspberry Pi
When wiring my boards I prefer to use Adafruit's Pi Cobbler to connect my Raspberry Pi to the breadboard, but you can also use jumper wire to connect to the Raspberry Pi's GPIO instead.
Below there are both 40-pin and 20-pin schematics for modern and older Raspberry Pi models.
The wiring for the momentary and toggle breakouts is not identical. The momentary board uses 4 header pins whereas the toggle board uses 5 header pins. The VCC is in a different position on the two boards.
Below there are both 40-pin and 20-pin schematics for modern and older Raspberry Pi models.
5-Pad Sensor Wiring
The 5-pad capacitive breakout works in the same way as the momentary and toggle breakouts. It has more inputs than the other boards and therefore requires more GPIO pins on the Raspberry Pi.
Although there are 5 inputs on the 5-pad board, only one output can be active and transmitted to the Pi at a time.
Each of the input wires can be connected to objects. I like to use apples and potatoes.
Below there are both 40-pin and 20-pin schematics for modern and older Raspberry Pi models.
LEDs
When you press the pad on the board the LED should light up. You must have your Raspberry Pi switched on and connected to the board in order for this to happen. Even if you're not running any programs that use the GPIOs, the LEDs will still light up as the boards are connected to the power and ground pins on the Pi.If it works, well done, you're ready to move onto creating a Python program that uses the board.
The 5-pad board has 5 LEDs, one for each input.
Connecting to Objects
Each of the boards can be connected to everyday objects that are conductive. This includes fruit, vegetables, plants, metals, animals, conductive fabrics, pencil graphite and conductive paint to name a few.With some objects you may find that the sensor will be activated when your hand is near the object, but not touching it. This is normal and very common with fruits and vegetables that contain a lot of water.
Adafruit also stocks a number of materials which are excellent for connecting your sensors to:
- Bare Conductive paint (also available as a pen)
- Copper tape
- Conductive fabric
-
Conductive thread
-
ITO (Indium Tin Oxide) Coated PET Plastic
Materials that are not conductive will not work. Plastics, wood, fabric and glass are all not conductors.
Text editor powered by tinymce.