Static electricity coming through the power connector

I’m running a Panda II project with audio shield through a 9V wall wart, and it also has a separate grounded 12V wall wart (with the grounds tied) to power some optocoupler connected RGB LED strips.

Occasionally when I pull the chain on my ceiling fan in the office, the Panda II freezes up. Of course this room has carpet and it happens when I’m wearing socks. Obviously static electricity is hitting the Panda through the house AC wiring/ground.

I haven’t had a chance to check debug and see if it’s throwing an exception yet. Possibly I can handle it on the software side, but I was also hoping there might be a hardware fix you guys know of.

This project is going to be permanently mounted in a hard to get to spot for a diorama my brother in law is putting together… and I really want to make it as robust as possible. Any ideas on how I can eliminate this problem?

And for anybody that is curious… he is building a really accurate replica of the Disneyland Pirates of the Caribbean auctioneer scene. I rigged up a remote control for two separate fire light effects and audio. Lighting/audio amp 12VDC is switched by a relay, and the Panda II hibernates when the 12VDC is removed.

Sounds like your fan may not be properly grounded.

If you are comfortable with A/C wiring, check that the ground wire from your fan is attached to the ground wire coming from the switch on the wall. You may also want to check that the ground at the switch on the wall is also connected to the incoming ground wire.

P.S. Make sure you cut the power at the breaker before you go messing around with live wire.

Hmmm… I installed the fan myself, and definitely connected the ground. Of course what I tied to was the stiff non-insulated wire coming out of the ceiling… where that went I don’t know.

You could always replace the metal chain with a nylon cord or something similar as a quick fix, if you believe it is static causing the problem.

Yeah I’m pretty sure that is the problem… I mean, if I pull the chain with no socks on, it’s fine. If I put on socks and shuffle my feet, it happens 9 times out of ten the instant I touch that chain.

Replacing the cord would be fine, but it is going in my sisters house as a permanent installation. I plan to make a little reset button for them if it ever does lock up, but they would need to pull out a ladder to get to it. My goal is for it to run for months on end with no problems.

Does it happen when the 12V wall-wart is not plugged in?

I’ll have to check without the 12V after work… I know it’s something I should have tried already, but I’ve been really short on time this week :-[

I did try a different power supply to the Panda, and it didn’t make a difference. I just didn’t have a spare 12V lying around, and the program hibernates when 12V isn’t present (read through a voltage divider), so I’ll have to disable that function.

I just wonder if either something’s weird with the 12V, or whether there’s some weird ground issue between the two supplies.

If it were me, I’d probably set up a single-supply system. Look up the OKI-78SR, which is a regulated switching power supply in a TO-220 size package. Can be had for under $5 in ones. It’s an awesome device.

That part looks pretty cool. I like how it’s all integrated. I’ve got a PCB I’m designing for a similar project that could use it for sure, so thanks for that! The regulator I spec’d needed external caps, so it’s a little less clean.

I guess I’ll have to see if the 12V supply is causing the problem. It’s a cheap 6A one I got from Amazon. Needed the extra power for the audio amplifier… maybe I’ll hook it up in a different room/different breaker of my house and see if the problem happens there too. Maybe it’s something with the house wiring like you suggest.

I’ll try these ideas tonight. Figured if I posted while I was at work, I might have a bigger pool of ideas to try when I got the opportunity!

The most awesome thing about it is that it’s a SWITCHING regulator, not a linear one. Because of that, heatsinking isn’t an issue, and it’s way more efficient than an LM317 or similar.