Capacitive Touch Sensor

  
Inside:
Repository
For this special Halloween project we built a spooky candy bowl that lights up when an unsuspecting trick-or-treater reaches in. While devices like these do exist, many of them use complicated proximity sensors to spring their trap. Here at NerdKits we enjoy doingthings a bit differently, and making it easy for you to undertake it as a DIY project. Our proximity sensor is made using nothing but a NerdKit,
Capacitive Touch Sensor - schematic

two pieces of aluminum foil, and some paper clips! The actual sensor used to detect the presence of a hand in explained in detail in the video, but here is an overview. Our sensor operates on the same principle that a capacitive touch sensor works on your laptop touchpad. These capacitive touch sensors work on the premise that humans are mostly water. When you get near an electric field you alter the capacitance enough to be noticed by the sensor. In our system we set up an RC circuit with a capacitor and a resistor in parallel. We use the MCU to charge capacitor up to 5V (a digital high voltage). Then we turn the pin into an input pin, which essentially disconnects that node. This allows the capacitor to discharge through the resistor. The amount of time it takes the capacitor to discharge will be related to the resistor value times the capacitance. We pick a resistor value large enough that the RC time constant is long enough for us to measure with the MCU. In this case 100K ohms worked great. The sensor in this case is two sheets of aluminum foil, one connected to the MCU pin, and one connected to GND. These two sheets create a capacitor that our MCU is charging and discharging. When your hands move between the two sheets, it alters the electric field, and therefore the capacitance of our tin foil contraption. The capacitor therefore takes longer to discharge, and that is detected by the code on our microcontroller! It...



Leave Comment

characters left:

New Circuits

.