Friday, 28 February 2014

Working Sensor

After a lot of delay I have finally managed to get an output reading for my capacitive sensor working. For some reason I was not able to get any kind of output  from the way I had previously built the prototype. I dont know if it was due to how I had laid the pins out or what I had given the Arduino, but for some reason or other It just wouldnt work.

I am now very glad to say however that I have now got numerical output from my Arduino, and the readings are coming in the form of numbers from the sensor pin. These numerical values are printed in the Arduino's serial monitor and as I move my hand closer and further away the numbers increase of decrease accordingly.


The readings output to the Arduino's serial monitor, which increase or decrease depending on the distance from the plate. Currently the readings spike at around 300 when the plate is touched, but still increase and decrease without touch. The values may be low but at least I'm getting values. To increase the distance the sensor picks up the user can be increased by using a higher value resistor. I'm thinking about using a 440K resistor since it will give me a higher reading without overloading the serial port.


Thursday, 20 February 2014

Capacitive Sensor

The Arduino can be used for a multitude of projects. Designed to make it easier for those who are not experts in electronics, the chance to get creative with some electronic prototyping. This is one of the main reasons I felt it would be an ideal tool to use for my major project.

To begin detecting the human body's capacitance, Arduino has a clever library than can be downloaded which turns any pin declared in the sketch into a sensor. For this to work the Arduino must be able to find the libraries one they are installed. As far as I can tell, as long as the file is somewhere on the computer it can find it. But to be sure I have created a libraries folder in myDocuments that the Arduino will use to find all its files. Once done I will compress these files into one folder which also contains my sketch.

Basic example of capacitive sensing sketch. Imports the .h file which calls the function of the .cpp file.
This sketch is set up to read the values passing between pins 2 and 4.

Contained within the libraries folder is a .h and .cpp files, or header and source respectively. These files tell the arduino what to do with the information I give it, in this case, which pins are being used and what serial port to send the values over.

http://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSense