Pushbutton Power Switch issue

So i’m using the pushbutton switch to control the main power on an airplane. Thing is I would rather not have a switch on the plane itself so it can not be accidentally turned off. So what we have done is pin out the two switch pads to a DB9 that is bulkhead mounted on the plane. Then i have an external control box which houses the switch itself. Connecting the two is a traditional serial cable that is about 25’ long. The pololu switch board itself is always connected both to power and the load (servos autopilot etc.)

NOW to the actual problem. First off the switch board works perfectly, when every thing is connected you can control the power with the switch no problem, both on and off. BUT when the cable is connected to the vehicle for the first time in ~10-15 min the switch tends to activate. This will only happen though if a certain amount of time has passed (dunno what it is) because if you plug the cable into the vehicle again relatively soon after that first time it will not spontaneously turn on (upon cable connection), but work exactly as you would expect, a press turns it on another turns it off.

My thought was maybe it was some kind of ESD building up in the cable/control box that looked like voltage to the latching circuit when it is first connected. To try and fix this i put a 10M ohm resistor in parallel with the switch to try and dissipate any ESD charge that might be building up, but that has not seemed to work, still turns on when the cable is plugged in after X minutes. I tried a smaller resistor, 1.5M ohm, wasn’t allowing the circuit to turn itself off so i had to go to the 10M ohm. ESD could still be causing it this was just my first attempt.

Any chance the large amount of metal/wire being connected to the switch pads could suddenly set it off? maybe some kind of inductive load or something that is doing it? and making the pololu switch think the momentary switch had been pressed?


Before getting to your problem, I’d like to caution you about that power switch if you are using it in an application where it is critical that the circuit not turn off. If you have enough noise on your power line, the circuit can get set back to the off state. For instance, on the 3pi robot, if it slams into a wall, it will often turn off, probably because a battery temporarily loses contact with a battery holder terminal. In the something like the 3pi, it’s a useful feature; on the Zumo, we went to a small slide switch controlling a power MOSFET because sumo robots slam into each other all the time, and we wouldn’t want the robot turning off inadvertently.

In case you aren’t aware of what the circuit is, you can look at it here: google.com/patents/US20090237065 . When the circuit is off, it gets turned on by that node going to the switch getting pulled down. I am not sure what is causing the behavior you are describing, but you could narrow it down by connecting just one long wire to that node. Also, is it reliably 10-15 minutes, or is it just a rare thing that happens once in a long time? Is your power supply fluctuating a lot during this time when the switch is supposed to stay turned off?

For your application, do you need the on/off button to be the same? If not, you can have an off button that goes from that node to power and an on button that goes from that node to ground (you might want to add a little resistance in case someone pushes both at the same time). That would let you make the system a lot more robust.

- Jan

We don’t have too much noise on the line so we are not that worried about it turning off though it is a critical application. That being said changing it to two buttons, on and off would be ideal if it makes the system much more robust. Are you talking about connecting two switches to the current board or a different circuit designed for two?

I have not gone out and tested to see how much time it takes but it reliably turns on after “awhile” ~ >10 min. it never fails to turn it on after some correct amount of time has passed. The power supply is a set of large lipo batteries, 2S, so 6.6 nominal volts but more like 7.2-7.4 when fully charged and is not being dawn on at all except by the switch when it is turned off.

I was describing how to use the two separate buttons with the existing circuit (though I have not actually tried it).

- Jan

Okay went through and changed to two buttons rather than one with a 1k resistor inline with the power like you mention, in the event some monkey presses both at once.

Though that makes turning the switch on and off a little more robust the original issue still persists. Today i made a note to test plugging in ONLY the cable without any thing attached to the other side, and the switch still activates. So a simplification of the situation is when the sense node (or what ever you wanna call it) is connected to a large enough conductive source that switch activates. The time dependent thing is still strange, maybe a capacitor between that node and ground? or power?

Managed to fix it, a 10uF electrolytic cap(only because that is what i had sitting around) between the node and ground manages to solve the issue. Though the switch does activate when you plug the power source in this is not an issue for us as the power is always applied to the switch. I tried a few different caps, 10pF 50pF 250pF and 500pF and none of them managed to do the job. I’m sure you could screw around a little more and find something smaller that would work.

thanks for the help, that link to the schematic was really helpful.

You posted that you managed to fix it while I was working on this reply, but here it is in case it gives you some extra ideas.

I’m still not sure what is going on, but I think you can now add a resistor from that node to power (in parallel with the “off” switch). You can start with something like 10k. Basically, the more strongly you pull up that node, the less likely that the switch will turn itself on. With the single-switch case, the concern is that it becomes too difficult to overcome that to ever turn the thing on, but with your separate on switch directly to ground, you should be able to have a lot stronger pull-up and still be able to turn on on purpose.

I think a small capacitor (maybe up to a few hundred nF) there (to either vin or ground) could also help in case you are getting a short spike on that node, whether it’s from ESD or something else.

- Jan