Regarding Capsense Library on Arduino

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

Regarding Capsense Library on Arduino

Post by RANJITHTAMIL »

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.

oz
Site Admin
Posts: 542
Joined: Mon May 12, 2008 4:19 pm

Re: Regarding Capsense Library on Arduino

Post by oz »

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 »

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) ?

oz
Site Admin
Posts: 542
Joined: Mon May 12, 2008 4:19 pm

Re: Regarding Capsense Library on Arduino

Post by oz »

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 »

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 »

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?

Michaelsmit
Posts: 3
Joined: Tue Jun 11, 2019 5:54 am

Re: Regarding Capsense Library on Arduino

Post by Michaelsmit »

There is a great deal of data in the Arudino play area under the capSense library.
You can likewise Google around and perceive how others have executed top detecting.
It's an extremely basic idea with a couple of traps, however, including the establishing issue.
My speculation is that a vehicle seat ought to be a simple spot to make top detecting work,
on account of the likelihood of a huge seat sensor, an enormous butt - particularly for Americans,
also, a faraday confines around the entire arrangement, the vehicle.

oz
Site Admin
Posts: 542
Joined: Mon May 12, 2008 4:19 pm

Re: Regarding Capsense Library on Arduino

Post by oz »

Michaelsmit
an enormous butt - particularly for Americans,
LOL

Approximately like "shooting fish in barrel" to use an American (I think) expression.

Use copper foil for the sensor, get the resistor and capacitor right and it should be a piece of cake (very easy).

pb

Post Reply