1
\$\begingroup\$

I'm using this circuit (http://www.edn.com/design/power-management/4427218/Latching-power-switch-uses-momentary-pushbutton) to get latching on/off behavior from a standard momentary switch (an Omron B3S-1000P). We have the momentary switch on a separate PCB and wired to the switching circuitry on the main PCB. The whole system is a microprocessor running off of regulated 3.3V from a li-ion battery.

We've been turning the circuit on and off over and over to see if the RC constant is going to work for our debouncing needs. In doing that, we run in to a problem where we can turn it on fine, but it's really spotty in turning off.

Recently, I think I found the solution: if I monitor the voltage on the 330nF cap it will reach a threshold voltage below which it won't turn the circuit off, and above which it will work fine.

If I then place my hand on or near the PCB containing the momentary switch, the voltage at the positive terminal of the capacitor will start to drop below the threshold and then the circuit won't turn off.

It seems like there's some capacitance from my hand/body that's getting in to the circuit and causing the 330nF to discharge a little bit. It makes sense now that holding my hand on the button PCB, turning it on and off over and over would cause the circuit to work starting working poorly. Wrapping my hand in something insulating (like a plastic bag or piece of rubber) and then turning the button on/off works flawlessly.

My question is: how can I counter my body's capacitance? My first thought was to add a ground plane to the PCB with the switch, but initial tests of holding a grounded lead while pressing the button don't seem to improve anything. Adding another capacitor seems like it would mess up the RC constant of the circuit and change the debounce behavior.

\$\endgroup\$

3 Answers 3

0
\$\begingroup\$

There is nothing discharging the 330n capacitor except your voltmeter and leakage (internal leakage should be minimal unless the capacitor is defective, as should be switch leakage).

Perhaps your SMT board was assembled with high leakage 'no clean' flux and you are experiencing the ill effects of that, from breathing on the board etc. This may appear to be a digital circuit, but leakage resistance of a few M ohms or less could cause it to stop working.

You could stop using that **&&$# (clean the boards you have with strong solvent and a brush) or you could try reducing the resistor to (say) 100K and increase the capacitor to 3.3uF.

\$\endgroup\$
2
  • \$\begingroup\$ Okay -- this gets out of my expertise level. What would the practical effect of changing the cap and resistor be? You'd have the same time constant, and it would draw more current to charge the capacitor, but what other effects would happen? Like what would happen if I did then substituted 33uF cap and 10k resistor? \$\endgroup\$
    – durkie
    Commented Jul 6, 2015 at 1:17
  • \$\begingroup\$ That would double the time to discharge the capacitor when its switched off (10K + 10K from R2 + R5) , so maybe you'd have to start reducing the dummy load resistor R5. \$\endgroup\$ Commented Jul 6, 2015 at 1:54
0
\$\begingroup\$

I'm on my phone and see both your question and the schematic you linked to at the same time.

Try adding a small capacitor from Q2 G-S. I'd try a value of about 1/10 the value of the other cap in the circuit.

The node that goes to Gate of Q2 is fairly high-impedance and susceptible to noise being coupled by your hand. The added bypass cap should reduce or eliminate the problem.

\$\endgroup\$
1
  • \$\begingroup\$ No luck -- I understand your reasoning and I can't argue with it, but it wouldn't turn off at all after connecting a 0.01uF between source (Vs in diagram) and gate (connected to R3 in diagram). I'm using a 0.1uF cap as the main cap in the circuit to reduce debounce delay. I also tried 0.01uF the between gate and ground for the heck of it and it wouldn't turn off in that setup either. \$\endgroup\$
    – durkie
    Commented Jul 6, 2015 at 2:49
0
\$\begingroup\$

I actually got an answer from the designer of this circuit! I tracked him down, and he gave some helpful tips:

  • Does the button work if it's soldered directly to the board? (Yes.)
  • For the button on the separate PCB, does twisting the leads reduce the noise? (Yes -- I could produce a 0.2V drop by touching the button without twisted leads, and 0.04V drop with twisted leads).

So, overall, it was probably just a pretty standard noise issue.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.