Arduino Starter Kit - Video 8. Touchy-Feely LampFollow article
In the latest instalment of the Arduino Starter Kit video tutorials, Massimo Banzi builds for us a Touch Sensor Lamp. The lamp is really a LED that gets turned on and off as we touch a sensor - or get close enough to it.
This project is based on the concept of body capacitance, to build and activate a capacitive sensor. Body capacitance is a physical property of the human body that makes it act as a capacitor by storing up an electric charge. Capacitive touch sensors are used in devices such as trackpads and tablet computers and can detect anything that is conductive or has a dielectric different than that of air.
As usual, the circuit is quite simple as most of the decision making is done by the code. The sensor is built by connecting a naked wire to a fibreglass surface coated with copper on one of its sides. The sensor surface is sensitive enough to perceive a touch also on the uncoated side, or when a hand is very close to the surface, also acting as a proximity sensor.
The capacitative sensor is quite complex to handle via code, and Massimo shows us how to use one of the many available libraries to filter the data coming from the sensor, controlling variables such as the number of input samples to be taken to filter out unwanted noise.
If the value returned by the sensor goes over a certain threshold, which is determined experimentally, then the code decides that the sensor has been touched and it can turn on the LED lamp. An open connection via the Arduino serial port allows us to continuously monitor the sensor input so that we can tune our code.