Tracy Allen capacitor plate
alnajjar1
Posts: 110
I am still working on a touch sensing switch and stumbled on a response from Tracy to a similar question from 2010 in this forum. She suggested connecting a capacitor plate directly to the Stamp pin and Ground. it works really well. the IN value goes to 1 when I touch the plate (a 1/4" plexi plate (3"x3" with AL foil strips on both sides). The problem is stability. In the same post I mentioned, she Tracy suggested hooking an LED to another pin on the stamp. That doesn't seem to stabilize the circuit but rather increase sensitivity. She made additional remarks about 60Hz noise but didn't elaborate on how that impacts the capacitance or the electric field of the plates or the Stamp's response.
I hope she reads this post and shed some more light on how to improve this great and simple solution. It is extremely simple and effective if I can somehow improve stability and reliability.
I read all kind of posts on using qProx, QT113 etc but require additional ICs and circuitry and all pale in comparison to Tracy's simple and elegant solution.
hope to get some insights or other experts ...
Al
I hope she reads this post and shed some more light on how to improve this great and simple solution. It is extremely simple and effective if I can somehow improve stability and reliability.
I read all kind of posts on using qProx, QT113 etc but require additional ICs and circuitry and all pale in comparison to Tracy's simple and elegant solution.
hope to get some insights or other experts ...
Al
Comments
I have tried a de-bounce routine where the code count several "on" before giving a positive reading. This helps somewhat but clunky and not a 100% reliable, there is simple too much noise! I am hoping for an electronic solution to stabilize the circuit. I tried to find the QT113 or QT160 but the only supplier, DigiKey, doesn't have them in stock and after calling them they said there is an indefinite lead time.
I did find a similar chip from (http://www.hobbytronics.co.uk/manufacturer-hobbytronics/touch-switch-ic) but I am not sure this will be the solution..
thanks...
There are a couple of forms of coupling that can happen. In an urban environment, we are bathed in a 60Hz electric field from the surrounding electrical wiring. When you touch a plate or bring a hand next to it, the field couples into the input pin of the Stamp and it bounces up and down through its switching threshold. This can be detected by looking for a string of 0s and 1s at the input, or by the COUNT or PULSIN commands. However if the input pin is not connected to anything at all, it will drift up and down and will give false indications. The solution is to attach a very high resistance leakage path to the input pin. A reverse biased diode or back-to-back pair of diodes can do that, just a few picoamps of leakage, or a multi MΩ resistor if the fields are strong. That can be connected to ground, or, it can be connected to the wiper of a potentiometer if you need a sensitivity adjustment.
The above depends on having a consistent 60Hz electric field. But often that is not the case and what works one day will not work the next, as circuits are activated or deactivated. Just have to try and see. Another approach is to use two plates or interdigitated wires, one driven by something like a 555 timer at some frequency, like 100 Hz, and the other configured as above with a leakage path. When a third plate in the form of a hand links the two, the signal is coupled across. Have to adjust sensitivity to a threshold that is crossed when the hand is present.
The QT sensors used a different principle, Q stands for charge, and T stands for transfer. A switch to a voltage source first charges up the capacitor formed by the plate + unknown body in relation to the rest of the universe, and then that first switch opens and a second switch closes that transfers the charge to a reference capacitor. The unknown capacitance or presence of the body is measured by the rate of charge transfer. It can be done on a Stamp, but requires external parts. Other chips now integrate QT switches or similar techniques for touch pad scanning.
I may have to figure out an IR method or even a mechanical switching, each of which presents significant challenges as well.
many thanks again,
Al
I should add that your BASIC Stamp might want to be well grounded to the ground prong of an outlet. That would give it a stable reference point to the local electric fields.