How to use shielded cable
Add stability to your project with shielded cable.
The capacitive sensing on the Touch Board and Pi Cap can detect touches through non-conductive materials. This is very useful when you want to hide a sensor behind materials like paper or glass.
However, this also means that it can be set off if someone touches the cable connecting from the sensor to the board. This can be problematic if you only want the sensor to detect the touch interface. Using shielded cable can help you avoid this unwanted side-effect.
In this tutorial, we explain what shielded cable is, what types there are and how it helps. To use this cable you need to be able to solder, so better get your soldering equipment ready!
Step 1 What is shielded cable?
Unlike regular cables, where a wire is covered by a plastic or insulating material, shielded cable has an extra layer of metal shield surrounding the conductive wire (or wires) inside. This is normally either a metal braid or foil, and often has an insulated conductor core running alongside it for easy connection. As the name implies, it helps to shield the cable from interference and reduces the sensitivity of the cables.
On the right, you can see a shielded cable next to an unshielded red cable. Note the metal braid within the shielded cable.
Step 2 Why does shielded cable help?
In an unshielded cable, the wire is not protected by anything other than by an insulative plastic jacket. Capacitive sensing can work through this plastic, so touching the cable can be incorrectly interpreted as a touch.
In a shielded cable, the outer shield creates a barrier that separates the electric field surrounding the central conductor from anything outside (such as a hand). Capacitive sensing works by detecting changes in the electric field surrounding an electrode, so if we create a barrier around the central conductor inside the cable, we have no electric field beyond that barrier (the shield). If we have no electric field, we have no capacitive sensing ability, so touching the cable will not be detected by our system.
Step 3 Types of shielded cable
There are two different types of shielding used within shielded cable – foil and braid. In this picture, the left-hand cable uses foil and the right-hand cable uses braid. For our purposes they both protect equally well and either should work well for your project.
Within the shielded cable there is at least one insulated conductor – for example, the foil cable on the right has three. Depending on how many electrode connections you want to make to the Touch Board, each of these conductors needs to be soldered or attached to the Touch Board.
If you look closely, you can also see an uninsulated conductor sticking out of each cable. They are marked with a white arrow. This is the drain connection to the shield, which allows for grounding the foil or the braid.
Step 4 How to use it
The most important step is to ground the drain wire of the shielded cable. On the Touch Board, you can find a ground connection (labelled GND) next to E11 on the row of pads running down the right-hand side of the board. These pads connect to the same electrodes as the pads running along the top edge of the board. Insert the drain wire through the ground pad and solder it on the backside. Any conductors that you want to connect to the Touch Board need to be similarly soldered to the respective pads. In this example, the red conductor was soldered to E11. On the other end of the cable, you need to attach the conductor wherever you want it to connect to – for example a paperclip, crocodile clip, bulldog clip, straight to your touch interface. You don’t need to solder the drain wire at this end of the cable.
Step 5 Trade-off
Using shielded cable isn’t without its downsides. The cable’s shield adds capacitance to the cable, which decreases sensitivity. The longer the cable, the worse this effect gets. If you’re trying to detect proximity at the end of a run of shielded cable it’s going to be very difficult. As a general rule of thumb, three metres is about the most shielded cable that you’re likely to be able to use for touch applications.
You can visualise this using our Grapher – see this tutorial for how to set it up. When you open the Grapher you can see a difference in when you compare the unshielded and shielded cable. The top image shows an electrode connected with unshielded cable – the bottom image shows the same one connected with shielded cable. As you can see the signal is much lower for the shielded cable making it less sensitive and therefore harder to trigger. One way to improve this is to decrease the threshold values within the code – at the expensive of making the system more sensitive to noise. You can find instructions for this here.
The key to building a successful setup with these tips is experimentation and remembering that everything is a compromise.
Have you built a more robust setup using this tutorial? We’d love to hear about it! Send us your projects to firstname.lastname@example.org.