Regarding Capsense Library on Arduino

Questions about Modern Device and JeeLabs Sensors
Post Reply
RANJITHTAMIL
Posts: 1
Joined: Wed Sep 03, 2014 1:00 am

Regarding Capsense Library on Arduino

Post by RANJITHTAMIL » Wed Sep 03, 2014 1:04 am

Dear Sir Paul Badger,
I've been using capsense library for a touch switch in my project.

I would be much obliged if I could know about
1) the exact working of the library;
2) the units of the time variable that is returned by the variable;
3) what kind of a send signal is being transmitted 'Is it a unit step or clock pulse'.
4) The concept of where the ground plate is? Is our body the ground plate? Even when we are not grounded,the circuit works.

The values vary when we are grounded and when we are not grounded.The values also change with height.

Thus a complete description of what goes around in the library code will be immensely helpful and appreciated greatly .
If there were a manual way of implementing the same capacitive touch switch,how would i go about it,and to solve the issues stated above.

I'm trying to implement a seat switch that gets triggered when a person sits on it.So setting a threshold should be calibrated properly.
Thanks for your consideration.

paul
Site Admin
Posts: 700
Joined: Mon May 12, 2008 4:19 pm

Re: Regarding Capsense Library on Arduino

Post by paul » Sat Sep 27, 2014 1:33 pm

RANJITHTAMIL,

There is a lot information in the Arudino playground under the capSense library.
You can also Google around and see how others have implemented cap sensing.
It's a very simple concept with a few pitfalls though, including the grounding issue.

My guess is that a car seat should be very easy place to make cap sensing work,
because of the possibility of as large seat sensor, a large butt - especially for Americans,
and a faraday cage around the whole deal, the car.

Paul

ranjit
Posts: 1
Joined: Sat Sep 27, 2014 11:35 pm

Re: Regarding Capsense Library on Arduino

Post by ranjit » Sat Sep 27, 2014 11:53 pm

Yes.true. But what is the electronics behind the working of this.Can i get a circuit for charging and discharging paths.Where do we keep the ground plate?
Is there a way we can show the values of the arduino through manual calculation to verify experiment and theoretical values.Can you provide me some useful links to study on capacitive sensing.
In terms of digital signals,how is the whole system working.This is how i thought it worked.First,the send signal is given a 0->1 transition.We start the timer then.Now we digitalRead the value of receive pin and when it reaches the value of digital high(initially receive pin=0),The timer is stopped and the value is fed to the monitor.So at what analog voltage does Receive Pin reach a digital high ? After the timer value is read the send signal is now given a 1->0 transition and we wait for the receive signal to reach digital voltage(again what analogvalue?).
How are the timing values being calculated? Do I use micros or what else do i do? If the sensor is just a single plate,is the delay only dependent on the resistor placed in between them.And in case of human proximity a capacitance is formed,im guessing.In this case,which of the plates is the ground plate?Is the human body the ground plate?
If we were not grounded(i.e.floating),than where would the ground plate be?In which path does it charge to(where is ground) and which path does it discharge through(the path through the resistor all the way through the send pin) ?

paul
Site Admin
Posts: 700
Joined: Mon May 12, 2008 4:19 pm

Re: Regarding Capsense Library on Arduino

Post by paul » Fri Dec 02, 2016 6:29 pm

ranjit,

I realize this question is very old, but I am answering for those who might find the information useful.

You will find many links to capacitive sensing on the internet, many of them probably a tad confusing. There are several techniques in use and many small variations of them. Basically I believe these may be divided into two categories, additive capacitive techniques where a small capacitor and body capacitance fills up a larger capacitor. There were patents that cover that technique. I still hope to implement that in the library some time.

RC techniques where a resistor limits the current to fill up a variable capacitance which includes the sensed capacitance. This is the way the capsense library works.

If you look at the capSense waveform in an oscilloscope I believe it will be very clear as to what is going on with the charging and discharging of the capacitance.

Dudemhccv
Posts: 9
Joined: Wed Sep 20, 2017 12:42 am

Regarding Capsense Library on Arduino

Post by Dudemhccv » Sun Oct 08, 2017 8:23 am

Ok. Thanks for the reply. The documentation is not exactly correct. I will buy the 16 mhz, but Ill have to add a step-up to 5V. For the GPS function is mandatory Arduino mega?

Sonovkwf
Posts: 6
Joined: Wed Sep 20, 2017 7:33 pm

Regarding Capsense Library on Arduino

Post by Sonovkwf » Sun Oct 08, 2017 6:41 pm

Ok. Thanks for the reply. The documentation is not exactly correct. I will buy the 16 mhz, but Ill have to add a step-up to 5V. For the GPS function is mandatory Arduino mega?

Alberthal
Posts: 3
Joined: Wed Jan 04, 2017 11:44 am
Location: Zambia
Contact:

Regarding Capsense Library on Arduino

Post by Alberthal » Sat Jul 14, 2018 1:11 pm

I know one can plug a USB cable from a Arduino Uno into the EV3 Host USB Port and the Arduino will operate properly.

Will it be possible to send and receive data from the Arduino in RobotC for the EV3 by the EV3 USB Host Port?
This is an easier plug to plug connection then hooking up a modified cable I2C connection.

The reason I ask this on the Sensors forum area is because the Arduino CAN act as a smart sensor connection with analog and digital inputs and outputs.

I dont believe sending an Arduino program through the EV3 USB Host port is needed, but sending and receiving data is desirable.

Thanks again.

Post Reply