jerryk
Posts: 30
Joined: Wed Nov 02, 2016 3:26 pm

Transient Voltage Issues

Thu Dec 08, 2016 7:53 pm

Is there a way to protect from voltage transients. Currently anytime I turn on a signal generator, soldering iron, dc power supply, etc I get a voltage transient that finds it way to any breadboard that I am testing or working with. Transients also occur when I use a multimeter to check the voltage at a pin. The transients are between 50 and 300 microseconds in length. If my pi is hooked to the breadboard the transient makes it to the input pins and if I'm running any falling edge detection in python false alarms occur.

I have gone through every wall socket to confirm earth ground and have all new surge protectors. No protectors are daisy chained. A possible smoking gun is I have an alarm circuit that if fed from my security alarm system via cat 5 cable. The eight status pins have either 12v or 6v depending on their state. This cable is around 20 ft in lenght.

I've tried switch debounce without any success and have finally resulted to putting sleep time followed by a check of the pins status at the beginning of any callback function to prevent the false alarms. This seems like the wrong approach.

I have all my devices are plugged into surge protectors and I wonder if there isn't some issue there. I've put a series resistor in front of the input pins with a 10nf capacitor to ground as a filter without any success. I'm new enough to this to know that I'm doing something wrong.

Any thoughts would be appreciated.

Jerry

User avatar
mikronauts
Posts: 2779
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Transient Voltage Issues

Thu Dec 08, 2016 8:20 pm

Your alarm circuits are effectively a long antenna. Is your cable shielded, with the shield grounded?

Running your Pi, and any attached peripherals (monitor, keyboard etc) off a USB battery not connected to the mains may help.

So might a Faraday cage :)

A bit more seriously, that breadboard comes with little antennas for every position.
jerryk wrote:Is there a way to protect from voltage transients. Currently anytime I turn on a signal generator, soldering iron, dc power supply, etc I get a voltage transient that finds it way to any breadboard that I am testing or working with. Transients also occur when I use a multimeter to check the voltage at a pin. The transients are between 50 and 300 microseconds in length. If my pi is hooked to the breadboard the transient makes it to the input pins and if I'm running any falling edge detection in python false alarms occur.

I have gone through every wall socket to confirm earth ground and have all new surge protectors. No protectors are daisy chained. A possible smoking gun is I have an alarm circuit that if fed from my security alarm system via cat 5 cable. The eight status pins have either 12v or 6v depending on their state. This cable is around 20 ft in lenght.

I've tried switch debounce without any success and have finally resulted to putting sleep time followed by a check of the pins status at the beginning of any callback function to prevent the false alarms. This seems like the wrong approach.

I have all my devices are plugged into surge protectors and I wonder if there isn't some issue there. I've put a series resistor in front of the input pins with a 10nf capacitor to ground as a filter without any success. I'm new enough to this to know that I'm doing something wrong.

Any thoughts would be appreciated.

Jerry
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

jerryk
Posts: 30
Joined: Wed Nov 02, 2016 3:26 pm

Re: Transient Voltage Issues

Thu Dec 08, 2016 8:38 pm

The cable is unshielded 4 pair datatwist(r) cable. It runs from the security panel in a closet to my office about 20 ft away. It's ran in the crawl space then surfaces into my office where it terminates in a cat 5 receptacle. There are other phone lines and cat 5 cables that surface in this office through the same hole in the floor.

A typical transient looks like this. They vary in frequency and amplitude but are all very short in duration.
signal.jpg
signal.jpg (60.92 KiB) Viewed 1306 times
Jerry

User avatar
mikronauts
Posts: 2779
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Transient Voltage Issues

Thu Dec 08, 2016 9:23 pm

Try bigger capacitors.

You could do the math to make a proper RC filter (see http://sim.okawa-denshi.jp/en/CRlowkeisan.htm) , or just experiment a bit.

Try 100nF ceramic and 1uF electrolytic.
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

jerryk
Posts: 30
Joined: Wed Nov 02, 2016 3:26 pm

Re: Transient Voltage Issues

Fri Dec 09, 2016 10:56 pm

I did try various capacitor configurations without much if any success. It appears that any jumper wire in the mix is picking up on this electric noise. If I take a free short jumper wire out of my box of jumpers and just connect it to a lead on the oscilloscope hanging loose it picks up the same short transient signals that are triggering these false alarms. Does it come from the mains back up through the oscilloscope or is it RF noise. I'm too new to understand the root cause of this stuff.

The way I have placed the capacitors for filtering is between the series resistor and the gpio pin and the capacitors go to 0v on the pi.

Bottom line is unless I'm arranging the filter components wrong, filtering is not working on what's going on here and each one of these voltage transients are enough to trigger the edge detection functions in my python code.

Your antenna analogy appears to be in play here but when you look at any hard wired home security system the whole thing is many bundles of unshielded wire that form zone loops with any number of reed switched that feed back to a central panel. My breadboard prototype interface is much cleaner than the work done by the alarm company at the panel.

The brief nature of these transients does not get noticed at the security panel and will not even make a hint of a status led blink but are potent enough to get noticed when using edge triggers in programming with the raspberry pi.

Adding a second of sleep time at the beginning of each callback in my program with an if statement to verify if the pin is low has solved the false triggering events and so I can make forward progress.

I'll keep reading up on transient filtering and appreciate your help.

Thanks - Jerry

boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Transient Voltage Issues

Fri Dec 09, 2016 11:11 pm

Transients are some times hard to trace the source Domestic installation are full of stops and starts
It sounds like you will need to go through the elimination stage.

Switch each powered up appliance off ,one at a time Check for transients each time
Try a different power supply
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

james-at-lo-tech
Posts: 45
Joined: Sat Oct 04, 2014 1:07 pm

Re: Transient Voltage Issues

Sat Dec 10, 2016 9:48 pm

Schmitt trigger may help.

Return to “Beginners”