Bump switch grounding problems

About 2 years ago now I posted about some bumpers I made from an under-door seal:

formatting link

Short version: The aluminum door seal mount is the ground, the rubber seal is the bumper, and has foam inside lined with foil, which hooks via a pull-up resistor to an input pin. When the bumper hits something the foil connects to ground, and we can read that we've hit something. This was working.

Since then another baby was born, things got put on hold, and are starting up again. The controller board has moved from an STK500 to one I've built, the bump switches now connect to a TI PCF8574 (i2c IO expander). And this aren't working so well.

So far I've had 2 PCF8574 chips stop working. One failed when, while testing the bumpers, my hand touched the aluminum holder (ie -ground). I'm now wondering if this was such a hot idea.

Can anything be done to make this safer? I had an idea to put diodes on the PCF8674 pins, so nothing can back-feed in (they can only go to ground). Is the danger of static discharge to the ring going to mess things up no matter what ?

-Chris

Reply to
Christopher X. Candreva
Loading thread data ...

I don't know the exact layout of the circuit, so I can't be exact.

One good thing is that static is easily handled, as long as you are not subjecting the thing to a tesla coil. Put a 100K ~ 1M resistor and a .01mf capacitor across the bumper contacts. The resister will discharge static and the capacitor will debounce the contact.

Also, you may want to put a couple clamp diodes.

  • ----------------------------- | | | \ | / 10K | \ | / --- | /_\ | / Contact Switch |_______________|_____________/ o------ | | | | | | | | --- --- \ | /_\ --- .01u / 1M | | | \ | | | / | | | | |

- ----------------------------------------------------

Reply to
mlw

The above looks best with a fixed width font :)

Reply to
mlw

"Christopher X. Candreva" wrote in message news:krjte.709$ snipped-for-privacy@monger.newsread.com...

This definitely sounds like static discharge. Note that the long plastic strip is probably the enemy. If you replaced this with a low conductivity elastomer, you could be okay. However, I know that is probably impractical. There are things you can do to eliminate static discharge. The first line of defense can be good isolation. If you placed an MOV from the sensor to ground, you could cut the discharge voltage from thousands of volts to merely 50 volts, for instance. And, wiring a small inductor in series will snub the current spikes that might be present during discharge, greatly limiting the damage potential. A capacitor from the input wire to ground- typically a 10 nF rated at 100 volts- can swallow the spike left after the MOV. So this strategy can be used, even with Nylon carpeting. I have used it on household robots that are exposed to static discharges and had excellent results. In summary- the input wire should have a voltage limiter (MOV) wired to ground, rated to limit to 50 volts. In parallel with it (but past the MOV), place a 10 nF capacitor, rated at 100 volts. Then place a small inductor (like a ferrite bead on the wire) after that to snub any current spikes. Top it off with a series resistor such as a 10K and you have it. This input should be pretty bullet-proof. The only way to do better easily would be to optically isolate the input instead, but you would still likely want to use this strategy to protect your opto-isolator.

Cheers!

Sir Charles W. Shults III, K. B. B. Xenotech Research

321-206-1840
Reply to
Sir Charles W. Shults III

Actually, as I look think about it, the 1M resistor was the idea, the 10K was an afterthought. You don't need both. What is important is the capacitor and the clamp diodes. The capacitor will debounce the switch and absorb tiny spikes. The clamp diodes don't need o be big, just fast.

This circuit is best as close to the controller as possible. Its job is to protect the controller from the outside world.

Lik I said, if you have the 10K resistor to V+ you don't need the 1M. The high speed clamp diodes protect the circuit.

I'm not sure what kind of spkes you wish to protect yourself from, but it has to be fast enough to clamp the spikes BEFORE damage happens to the controller.

Reply to
mlw

Thanks to both you and Charles . I now feel lucky to have the problem of the man with two watches.[1]

: I don't know the exact layout of the circuit, so I can't be exact.

You have it dead-on in the diagram, my current circuit is the 10k resistor only, with the input pin pick up at the switch.

General question for either method: Is it better to put these closer to the bumper, or can they be on the board with the controller ?

: One good thing is that static is easily handled, as long as you are not : subjecting the thing to a tesla coil. Put a 100K ~ 1M resistor and a .01mf : capacitor across the bumper contacts. The resister will discharge static : and the capacitor will debounce the contact.

I like ths simplicity of this method, as I have 1M resistors but no MOVs. But I'll admit I don't see offhand why the static will go through the resistor and not take the path of least resistance to fry my chips again.

: Also, you may want to put a couple clamp diodes.

Would something like an 1n914 be big enough, or would it need something like then 1n4001 ?

-Chris

[1] A man with a watch always knows what time it is. A man with two watches is never sure.
Reply to
Christopher X. Candreva

: results. In summary- the input wire should have a voltage limiter (MOV) : wired to ground, rated to limit to 50 volts. In parallel with it (but past : the MOV), place a 10 nF capacitor, rated at 100 volts. Then place a small : inductor (like a ferrite bead on the wire) after that to snub any current : spikes. Top it off with a series resistor such as a 10K and you have it.

Is this the general idea ?

Switch /

--/ o------------------------- To Input Pin | | | \ | | MOV / - o \ - 10nF o Inductor/bead / | o | | | ----------------------------Gnd

Reply to
Christopher X. Candreva

Interesing circuit, but the inductor to ground will be a short after any measurable amount of time. You are dealng with a switch, not an R/F circuit.

The MOV is a nice touch as a disaster limiter, but it is basically doing the same job as the clamp diodes do in the circuit I posted. The capacitor likewise.

As for the inductor/capacitor arrangement, look up "band pass filter" in any electronics book. The inductor is almost certainly wrong.

Reply to
mlw

Interesing circuit, but the inductor to ground will be a short after any measurable amount of time. You are dealng with a switch, not an R/F circuit.

The MOV is a nice touch as a disaster limiter, but it is basically doing the same job as the clamp diodes do in the circuit I posted. The capacitor likewise.

As for the inductor/capacitor arrangement, look up "band pass filter" in any electronics book. The inductor is almost certainly wrong.

Reply to
mlw

I, personally, would put the inductor before the MOV an the capacitor. ___ ---

Reply to
mlw

The inductor should be in series with the input, not running to ground. Otherwise, yes- you have it. Note that the type of discharge that can occur on a rug is usually in the range of a couple of thousand volts or more, so a diode can easily get nailed by it. The MOV is essentially bullet proof in that respect.

Cheers!

Sir Charles W. Shults III, K. B. B. Xenotech Research

321-206-1840
Reply to
Sir Charles W. Shults III

Sir Charles W. Shults III wrote: : The inductor should be in series with the input, not running to ground. : Otherwise, yes- you have it.

Like this ?

Switch /

--/ o----------------ooo------- To Input Pin | | ^-Inductor \ | MOV / - \ - 10nF / | | | ----------------------------Gnd

Reply to
Christopher X. Candreva

That's right. As I was drawing te circuit, I thought, "does he have a pull-up?" so I added it, forgetting it negated the need for the 1M. The reason why you need it is to keep some path for electrons to dissipate. Otherwise you are a balloon, a rug, and a very dry day. With regards to the circuit cited in the other branch, the MOV works similarly to the clamp diodes. A MOV is similar to two zener ziodes. I wouldn't be sure that your controller will tollerate 50V at an input if VCC is 5.0 volts. The clamp diodes keep the signal between VCC and ground (assuming you have some good capacitors and power rails.

Also, how much spike are we dealing with? You could add a 1K resistor in line from the switch and you'ld need one hell of a spike to get through it. You would, of course, have an R/C circuit (.01uf and 1K) and it would cause a tiny curve on the rise time, but my guess (too lazy to pick up paper or calculator) is that it wouldn't be noticable.

_____ ___ _

Reply to
mlw

Exactly.

Cheers!

Sir Charles W. Shults III, K. B. B. Xenotech Research

321-206-1840
Reply to
Sir Charles W. Shults III

: Actually, as I look think about it, the 1M resistor was the idea, the 10K : was an afterthought. You don't need both. What is important is the : capacitor and the clamp diodes. The capacitor will debounce the switch and : absorb tiny spikes. The clamp diodes don't need o be big, just fast.

The 10K I took to be the pull-up resistor for the input pin. If I have that right, you would remove the 1M from below:

  • ----------------------------- | | | \ | / 10K | \ | / --- | /_\ | / Contact Switch Input Pin ____|_______________|_____________/ o------ To MCU | | | | | | | | --- --- \ | /_\ --- .01u / 1M | | | \ | | | / | | | | |

- ----------------------------------------------------

Reply to
Christopher X. Candreva

I thought I would follow up this thread with some links I've found (it's been to hot/humid for working in the un air conditioned shop)

This is a general article on ESD, while geared for high speed signals, does mention both the MOV and clamp diode methods, and adds a zener diode method:

formatting link

This is a Nuts'n'Volts article on the subject of protecting your Basic Stamp, including one almost identical to the one we eventually came up with here.

formatting link

Reply to
Christopher X. Candreva

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.