Step 1: Download the CapSense library from Arduino. If you don't have big enough resistors, you can daisy-chain a bunch of them together. The higher the resistance, the higher readings you will get. We have found that you should use at least 1 MOhm, but tried using up to 37,6 MOhm. This will be the connecter with which you interact with to send a signal to your Arduino.Ī resistor. Not really necessary, but makes things a bit easier.ġ x Metal object, like a paperclip, copper plate or a piece of aluminium foil. You could go off and buy a ready-made capacitive sensor from Adafruit or Sparkfun, but where's the challenge in that? Capacitive sensors are easy to make yourself with an Arduino board and some basic electronic components.ġ x Arduino board. When you you put your finger on or near the sensor it creates a delay in the pulse, and this delay is recalculated by the CapSense library and generates a value you can use for triggering etc. When making a capacative sensor with Arduino you will have an output that transmits a pulse, and an input which receives the pulse and compares it to the transmitted pulse.
The sensor itself is only a conductive surface and will start working as a capacitor by the proximity of any other conductive surface, for example by skin (as long as it has a relative negative charge). This creates a delay in the pulse due to the time it takes to charge and discharge the capacitor.Ī capacative sensor works in the same way as a capacitor. When the signal goes to zero, the capacitor discharges. When sending a pulse to the capacitor, it quickly charges. The capacitor can be compared to a small battery. Between these surfaces there is a non-conductive layer wich is called a dielectric. To understand how capacative sensors work, first you have to understand how a capacitor works.Ī capacitor consists of 2 electrical conductive surfaces (also called electrodes), one is connected to the positive pole of the electrical circuit and the other is grounded. Before we move on to the fun (but mostly frustrating) projects you can embark on with capacitive sensing, let's take a quick look at how it really works.