Breaking News

Technology

Thursday, 2 June 2016

capacitive touch sensors on the raspberry-pi assembly-and-wiring

Assembly

Assembling the capacitive touch sensors is very straightforward and can be achieved with minimal soldering.

raspberry_pi_headers.jpg

Headers

Cut the headers and place them onto a solderless breadboard.


  • raspberry_pi_headers.jpg

Headers

Cut the headers and place them onto a solderless breadboard.
  • raspberry_pi_unsoldered.jpg

Place the Board

Place the boards onto the headers and check that they are spaced correctly.
  • raspberry_pi_soldering.jpg

Solder

Solder the pins with a soldering iron. 

To get the momentary and toggle boards to lie flat on the headers, solder a single pin. Reheat the solder on the pin and adjust the board until you are happy with its positioning.
  • raspberry_pi_unsoldered.jpg

Admire

Take a moment to sit back and admire your work.

Wiring

by C. Richardson
In this section we'll learn how to wire up the sensor boards to a Raspberry Pi. For this you will need:

Momentary Board Wiring

raspberry_pi_momentary.png

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.

Toggle Board Wiring

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.
raspberry_pi_toggle.png

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.
raspberry_pi_5pad.png
When using the 5-pad capacitive touch sensor make sure you don't cross the input wires. When the wires touch they will both detect the same touch when either is pressed, which can cause unexpected results.

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:

Materials that are not conductive will not work. Plastics, wood, fabric and glass are all not conductors.
A tip: Although your novel idea of using raspberries with your capacitive touch sensor and your Raspberry Pi may seem like a stroke of genius, the raspberries are very soft and will quickly turn to mush. Try using firmer fruit instead, like an apple or a melon.

No comments:

Designed By Blogger Templates