Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 5th August 2008, 09:02 PM   (permalink)
Smile 4066 Analog switch reliability

The sensor is formed by a series of copper trace that do not touch. A resistance material is put over the sensor so, when it is press the resistance is lower and a voltage generated and detected by the Comparator (LM339).
The voltage activates the 4066 analog switch. If I don't used the .047uf capacitor the switching is unreliable. It fluctuates on-off.

With the .047uf cap it works better. It doesn’t fluctuate...but the switching is not fast enough. [I try a small Capacitor value and the erratic on-off behavior continues. A large cap value takes to long to activate the switch. (The 4066 substitutes a piano keyboard - this is how I know that its behavior is not fast enough). I believed this is because of the charging/discharge time of the cap. What can I do to make it switch faster?

(the control input lines off the 4066 are connected to ground. Also the inputs of the LM339.)

Thanks,
Attached Images
File Type: gif electronic_switch.GIF (6.4 KB, 39 views)

Last edited by prprog; 5th August 2008 at 09:04 PM.
prprog is offline  
Old 5th August 2008, 09:21 PM   (permalink)
Default

Instead of the capacitor (and its RC time constant) you may add histeresis to the comparator circuit.

Use a large value resistor between the comparator's output and its "+" input.

If the "+" input is the one attached to the sensor (1MΩ to ground) try 10MΩ, if the "+" input is the reference divider (two 100KΩ) try something like 470KΩ to 1MΩ.
__________________
E Cerfoglio
Buenos Aires
Argentina

Last edited by ecerfoglio; 5th August 2008 at 09:23 PM. Reason: typo - divider's R values
ecerfoglio is offline  
Old 5th August 2008, 10:22 PM   (permalink)
Default

I agree with ecerfoglio. You need hysteresis.
I would try to do it like this. It should work, if the resistance of your touch pad will go low enough. If not, you could try changing the 1Meg to a larger value. I built in lots of hysteresis for noise immunity, but you still might need a small capacitor across your touch pad, because your body will probably pick up noise from the mains.
Attached Images
File Type: gif electronic_switch1.GIF (5.9 KB, 31 views)
__________________
Ron

Roff is online now  
Old 6th August 2008, 01:44 PM   (permalink)
Default

The original circuit had the 100k and 10k resistors as negative feedback. A comparator must never have negative feedback because it is not frequency compensated like an opamp.
A comparator oscillates at a high frequency with negative feedback.
__________________
Uncle $crooge
audioguru is online now  
Old 6th August 2008, 03:49 PM   (permalink)
Default

Quote:
Originally Posted by audioguru View Post
The original circuit had the 100k and 10k resistors as negative feedback. A comparator must never have negative feedback because it is not frequency compensated like an opamp.
A comparator oscillates at a high frequency with negative feedback.
Look again. Pin 3 is Vcc.
__________________
Ron

Roff is online now  
Old 7th August 2008, 04:14 PM   (permalink)
Smile

Quote:
Originally Posted by Roff View Post
I agree with ecerfoglio. You need hysteresis.
I would try to do it like this. It should work, if the resistance of your touch pad will go low enough. If not, you could try changing the 1Meg to a larger value. I built in lots of hysteresis for noise immunity, but you still might need a small capacitor across your touch pad, because your body will probably pick up noise from the mains.
Thanks a lot ecerfoglio (Muchas gracias). I try a small cap .047 uf and the noise was gone. I also try the hysteresis suggestion - but it did not make to much of a difference. In summary it work now, but the switching is not fast enough. Any suggestions?

Thanks,
prprog is offline  
Old 7th August 2008, 04:25 PM   (permalink)
Default

Quote:
Originally Posted by prprog View Post
Thanks a lot ecerfoglio (Muchas gracias). I try a small cap .047 uf and the noise was gone. I also try the hysteresis suggestion - but it did not make to much of a difference. In summary it work now, but the switching is not fast enough. Any suggestions?

Thanks,
Did you try the circuit changes I suggested?
__________________
Ron

Roff is online now  
Old 8th August 2008, 04:52 AM   (permalink)
Smile

Quote:
Originally Posted by Roff View Post
Did you try the circuit changes I suggested?
Yes I did. The results are the same. The new circuit (Roff suggested circuit) works...but still it needs the capacitor on the sensor, which makes its behaviour slower. I am using a .047uf cap.

Thanks.

Last edited by prprog; 8th August 2008 at 04:56 AM.
prprog is offline  
Old 8th August 2008, 05:03 AM   (permalink)
Default

I don't see why the 339 would not be fast enough. Perhaps it is your touch sensor. Maybe it is holding a charge and needs a little load. Just a thought
__________________
Forget injuries, never forget kindnesses.
Mikebits is offline  
Old 8th August 2008, 05:18 AM   (permalink)
Default

Quote:
Originally Posted by Mikebits View Post
I don't see why the 339 would not be fast enough. Perhaps it is your touch sensor. Maybe it is holding a charge and needs a little load. Just a thought
As I said previously, I suspect he is injecting AC picked up by his body from nearby mains wires. You don't see many DC touch switch circuits, possibly for that reason. Perhaps if the application required a toggle function, you could make it work in the presence of mains noise.
__________________
Ron

Roff is online now  
Old 8th August 2008, 03:27 PM   (permalink)
Post

Quote:
Originally Posted by Mikebits View Post
I don't see why the 339 would not be fast enough. Perhaps it is your touch sensor. Maybe it is holding a charge and needs a little load. Just a thought
I did some test just using the sensor, some resistors and the 4066 and there is definetly AC noise pickup by the sensor. (touching the sensor with an rubber eraser does not make it work...but touching it bare hand makes a different behaviour, it works but very noisy . It turn on-off very fast).
The correct behaviour must be to stay on when touch.

How do I set "a little load" on the sensor? (for the comparator circuit)

Thanks a lot.

Last edited by prprog; 8th August 2008 at 03:27 PM.
prprog is offline  
Old 9th August 2008, 01:17 AM   (permalink)
Default

Quote:
Originally Posted by audioguru View Post
The original circuit had the 100k and 10k resistors as negative feedback. A comparator must never have negative feedback because it is not frequency compensated like an opamp.
A comparator oscillates at a high frequency with negative feedback.
It's possible to use a comparator as a poor man's op-amp (with negative feedback) but you need to add a capacitor in the feedback network to prevent oscillation.
__________________
I also post at the following sites:
http://www.stop-microsoft.org http://www.heated-debates.com
Screen name: Aloone_Jonez
Hero999 is offline  
Old 10th August 2008, 01:35 AM   (permalink)
Default

Quote:
Originally Posted by Hero999 View Post
It's possible to use a comparator as a poor man's op-amp (with negative feedback) but you need to add a capacitor in the feedback network to prevent oscillation.
The original circuit had negative feedback which is not wanted and then the uncompensated comparator will oscillate at a high frequency. A capacitor across the feedback resistor will make the oscillation worse because then the closed-loop high frequency gain is reduced to 1.

An opamp is compensated with an internal capacitor that reduces its gain at high frequencies so that it doersn't oscillate when negative feedback is applied. A comparator does not have an internal compensation capacitor so it has phase-shift and plenty of internal gain at high frequencies.
Attached Images
File Type: png LM339.PNG (13.5 KB, 10 views)
__________________
Uncle $crooge

Last edited by audioguru; 10th August 2008 at 01:37 AM.
audioguru is online now  
Old 10th August 2008, 04:25 AM   (permalink)
Default

Quote:
Originally Posted by audioguru View Post
The original circuit had negative feedback which is not wanted and then the uncompensated comparator will oscillate at a high frequency. A capacitor across the feedback resistor will make the oscillation worse because then the closed-loop high frequency gain is reduced to 1.

An opamp is compensated with an internal capacitor that reduces its gain at high frequencies so that it doersn't oscillate when negative feedback is applied. A comparator does not have an internal compensation capacitor so it has phase-shift and plenty of internal gain at high frequencies.
The original circuit didn't have any feedback.
I think Hero means you can add a pole in the loop (cap from output to GND) to stabilize an LM393 which has negative feedback. I don't htink he was implying that that is needed here. I seem to recall trying that and getting some low-level oscillation on the output, but my memory may be faulty.
__________________
Ron

Roff is online now  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Switching problem with 4066 jjjjjj Electronic Projects Design/Ideas/Reviews 4 10th March 2007 02:35 PM
switching with out using analog switch waqar Electronic Projects Design/Ideas/Reviews 3 11th December 2006 06:10 PM
How do I control 4066 with a LDR AllanBertelsen Electronic Projects Design/Ideas/Reviews 7 20th April 2006 10:47 AM
Smal Analog Switch other then MT8816 dereksohail General Electronics Chat 1 21st December 2004 10:16 AM
programming for analog switch waqar Micro Controllers 0 25th April 2003 11:29 AM



All times are GMT. The time now is 05:07 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker