Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

simple sensor touch problem

Status
Not open for further replies.

lonerpl

Newbie level 4
Joined
Nov 22, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,323
Hello,
I am trying to build a project from site:ELM - Simple Touch Sensor (copy and paste it manually if you have problem to open the site)
I have a problem, because I don’t know what value the capacitor Cx should have?(top right image) I think that it is connected with the size of surface of ‘touch area’. When we touch ‘button’, we add some additional capacitive (1-10pF) and automatically we change RC time. How can I solve this problem without oscilloscope?
And the second question: can I build this device on 1 Mhz? I changed OCR0A = 1000000UL / 1024 / 75; so the value of OCR0A is the same as with 8 Mhz.
thanks
 

bjuric

Advanced Member level 4
Joined
May 4, 2011
Messages
115
Helped
32
Reputation
64
Reaction score
30
Trophy points
1,308
Location
Serbia
Activity points
1,980
Cx is representation of capacitance that is created during touch. It doesn't exist as a physical component.
As I understand, you don't care about the actual time, you do a calibration run to get a reference reading, and than resample over and over again, and compare.
 

luben111

Advanced Member level 1
Joined
Mar 2, 2002
Messages
491
Helped
111
Reputation
223
Reaction score
107
Trophy points
1,323
Location
UK
Activity points
3,911
You can measure the capacitance with some multimer if it can detect values in the range 0..200pF. I estimate the capacitor value around 10-15pF and change in the value from 1.5pF max.

You can solve the problem without oscilloscope by measure the times. If you select too big R then the time will be very long, you take some meaningful time to get around 500-1000 clock cycles time which will result during the touch in ~50-100 counts delta.

Don't forget to put dielectric on top of the electrodes - otherwise nothing will work.
 

lonerpl

Newbie level 4
Joined
Nov 22, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,323
I cant understand how to do a calibration run? So do I have to use capacitors with 'button' circuit or not? At the circuit diagram there are no capacitors.
 

bjuric

Advanced Member level 4
Joined
May 4, 2011
Messages
115
Helped
32
Reputation
64
Reaction score
30
Trophy points
1,308
Location
Serbia
Activity points
1,980
luben111 gave you a good advice

I'll just add - output the times measured to an LCD or serial port to get the feeling of time differences with and without touching. This way you can play with different RC values live.

What I meant by 'calibration' run is to sample the button in the beginning when not touched to get the reference value against which you compare.
For more buttons, each button has its own value stored separately.

Also, don't forget to discharge the capacitor before every sampling.
 

luben111

Advanced Member level 1
Joined
Mar 2, 2002
Messages
491
Helped
111
Reputation
223
Reaction score
107
Trophy points
1,323
Location
UK
Activity points
3,911
>>At the circuit diagram there are no capacitors

You actually measure the capacitance of the electrode area relative to GND (it looks like one electrode capacitor but GND is the second electrode). The measured capacitor is not shown on diagram simply because it's not a part of the electrical schematic.
 

Joined
Feb 20, 2012
Messages
111
Helped
23
Reputation
46
Reaction score
21
Trophy points
1,298
Activity points
0
Have you ever considered using mTouch CSM module that some Microchip microcontrollers have. I use it and in my experience it is working very good evet through 1cm of glass :)

i wrote about it here so you can read about it if you havent allready finished your project

https://www.edaboard.com/threads/245851/#post1051938

Good luck in your work
 

luben111

Advanced Member level 1
Joined
Mar 2, 2002
Messages
491
Helped
111
Reputation
223
Reaction score
107
Trophy points
1,323
Location
UK
Activity points
3,911
>>Have you ever considered using mTouch CSM module that some Microchip microcontrollers have

What many engineers don't know is that every Atmel chip can be turned into capacitive sensor if you include in the project the QTouch library (payfree from Atmel site). You can get even mutual capacitance meaurements (to measure array XY of keys).
 

Joined
Feb 20, 2012
Messages
111
Helped
23
Reputation
46
Reaction score
21
Trophy points
1,298
Activity points
0
are you referring to capacitive voltage divider technique?
I haven't tested that one yet. I presume it is less sensitive for extra small capacitance measurement but it is cool that it is possible to to it with any microcontroller with ADC.

have you used it before?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top