View Full Version : Mystery noise question
09-01-2011, 03:19 AM
Hey guys I have something I can't solve I was hoping someone could shed some light on. I sent a system I make to NY and the client installed it. It is a Propeller based system. There is a home switch that goes to a pin on the Prop, the input has a .1uf on the Prop side and 15' away it has another .1, with a 10k pullup near the Prop to 3v3, off the same Prop supply. The switch is normally closed, shorted to GND. The cable is unshielded cat5. This system has never failed me, but now there is an issue where the switch appears to have noise on it for no obvious reason. They sent it back to me, I checked it and it is fine on my bench. The problem seems to be when connecting a 15' cat5 to the switch, it is picking up noise and the Prop thinks that the switch is getting pressed (opening contact, input would go to 3v3), when in fact the switch is not getting pressed. So with a short cable, the switch works good with no false trigger. However, here is the twist. When one or more other devices get plugged into the system with cat5 of a length of 15', then the switch starts false triggering again. With a 2 foot cat5 on the other devices it does not false trigger. This may be hard to follow without a schematic which I do not have with me. The client said the brain of the system is near a circuit breaker box for the floor. Not sure if there is noise coming off of the breaker box, but I have my system buffered like crazy, caps everywhere you can put one and have run much longer lengths without an issue on installs in all kinds of environments. I was thinking that if the building had a ground problem, or no ground, then maybe my system could be extremely sensitive to some noise, but thats all I can think of. Wouldn't it take a whole lot of noise for the Prop to detect a 1 from noise when the input is dead shorted at the end of the cable? Any thoughts would be highly appreciated.
Phil Pilgrim (PhiPi)
09-01-2011, 03:22 AM
Use a stiffer pull-up. 10K is pretty wimpy in a noisy industrial environment. 470 ohms would not be out of the question.
09-01-2011, 03:51 AM
Thanks Phil, I will put together another system and try that if need be. I was hoping to find a simple in field trick that a basic electrician could do over the phone. For starters, trying to use shielded cat5 with the shield going to the chassis.
09-01-2011, 04:03 AM
I have to agree with Phil that 10K is pretty wimpy in an industrial environment. I use 1K for that sort of thing but 470 ohm would not be out of line. A 15' antenna can pick up quite a bit of noise. A shielded cable grounded at the prop end might help though.
09-01-2011, 04:10 AM
Well, what about the fact that the switch is never even geting pressed, (Normally closed), so the pullup isn't even being allowed to become active since the switch is taking the input to GND? The Prop is seeing noise somehow, false triggering when ther input is at GND at the switch.
Phil Pilgrim (PhiPi)
09-01-2011, 04:18 AM
In that case, I would consider a divided terminator: perhaps 330R pull-up and 560R pull-down at the controller end. The idea is to force the induced noise voltage either to provide some significant current or to give up the fight.
09-01-2011, 04:20 AM
AHA, usually the switch is normally open and closes to ground the pulled up pin. Is the switch grounded at the prop board or near where it is mounted?
09-01-2011, 04:25 AM
I use the switch normally closed, the way the Prop can first determine if the switch is present before doing anything. Normally closed shorts the imnput to GND, when the switch gets pressed, the pullup takes it to 3v3. The switch is connected with the cat5, the distance of the cable is currently several feet.
09-01-2011, 05:01 AM
If the switch is connected to both wires of a twisted pair in the cat5 cable and the grounding is done on the prop board it should have pretty good noise immunity and not be a problem unless there is a great deal of electrical noise. If the grounding is done at the switch end or both ends the problem is most likely a ground loop. Other possibilities are a poor connection, bad switch, broken wire, or ground loops caused by one or both of the switch contacts being grounded by dirt or moisture. Vibration has been known to cause switch contacts to bounce when the switch ages and the spring tension decreases. You really need to test the entire assembly on site to locate the problem.
09-01-2011, 06:16 AM
Wires run in commercial buildings can get all sorts of noise in them. And especially longer runs of wires.
Shielded cable, with one end grounded, can turn many misbehaving electronic gizmos into wonderfully working devices!
They make all sorts of different shielded cable with many different numbers of conductors...
09-02-2011, 02:51 AM
Sounds like substantial interference if its winning a battle with 0.1uF capacitors at each end and a shorted switch - probably wise to try shielded cable and increase the cap at the uController end. Adding a few hundred ohms in series with the signal line at the uController end might help (LPF any RF frequencies).
09-03-2011, 12:55 AM
Don't worry about the pullup. A more aggressive one might help, but might not solve the problem.
The solution is to check the input more than once before accepting that it has changed state. I had this very same problem in a very expensive printer made in the 1980's, which had an external print input (the printer accepted BCD input which was always available from the scale). The whole system was driven by relay logic, and every once in awhile it would print at random. Somehow we had the 6502 source code (!) and I noticed that after reading the inputs, if it saw the print input high it would go to the print routine. I realized even a microsecond pulse might pass that test so using a hex editor and PROLOG UV EPROM programmer I manually added a loop that would not trigger the print function unless the print input was seen 16 times in a row. It fixed the problem.