I work as a tech guy for an agriculture/tourism farm. I have set up about 60 or so raspberry pis throughout the farm to control lights/props/sound effects/music/video. They are amazing and I have been very pleased with them! The only problem I have encountered is that sometimes the inputs can be pulled low without any button/motion sensor being triggered. It does not happen to all of the pis, but when it does happen it normally occurs when a big power source is turned on (example: a heavy duty air compressor) or some other power issue( example: solenoids in a pre-bought prop, or when there is a bad ac/dc power converter). The weirdest thing about this is that it does not only happen to the raspberry pi sharing an outlet with the air compressor or power adapter.

Here is an example of the most recent incident:

Power Setup: Breaker Box A Input: Drop from power company. output: Breaker Box AA/ Breaker Box AB

Breaker Box AA: Input: Breaker Box A output: Raspberry PI 1/Raspberry PI 2

Breaker Box AB: Input: Breaker Box A output: Raspberry PI 3/Breaker Box ABA

Breaker Box ABA: Input: Breaker Box AB output: Raspberry PI 4/Raspberry PI 5/Raspberry PI 6/Raspberry PI 7

Problem: I had a bad power adapter attached to the outlet at Raspberry PI 5. This resulted in all the inputs at Raspberry PI 3/4/5/6/7 to constantly be pulled low and high. I switched out the power adapter and everything is fine. I am just wondering why it is effecting more than the local raspberry pi because that should not be happening. Other setup variables. I have both raspberrypi B and B+ in that example. I am using python with wiringpi2. I have a 10k resistor going between 3v and the input pin. Then the button connects that with Gnd. The python script then looks for the input to be set to low. It is a very old farm that I work on that has lots of old electric infrastructures. I have had the raspberry pis plugged into Battery backups with surge protecters built in and the
problem still exists.

Any ideas on why the power issues would set the inputs low? Anyone else experience this? Anyone know of any equipment that provide clean power to the raspberry pi?

  • ground loop symptom - most probably causing issues on the "negative" side and messing with the pull down. what kind of power supplies are you using? el cheapo USB? that could be the problem. You need some kind of filtering for that and maybe emf or fly back filter. That is more likley as solenoids and mototor especially high power cause fly back voltage. try and use regualted power supplies. dx.com has some 5Watt 5volt with all sorts of protection and 95% efficient too!
    – Piotr Kula
    Oct 16, 2014 at 20:56

1 Answer 1


As @ppumpkin states this could be ground loops. Strictly each Pi power supply will float WRT ground, but the Pi should be isolated, although if connected to external devices will reflect their state.

Rather than worrying about the actual cause (which you may never find) you should apply normal design principles for working in noisy environments. Such as shielded twisted pair for inputs, Ferrite rings for common mode rejection, common ground points, separating power and signal ground. Using high value (10kΩ) resistors just makes the system more sensitive.

In extreme cases you should use isolation.

This is really NOT a Pi question, and you may get more information on an Electrical Engineering forum.

  • +1 Possibly there are long wires/earth loops as the primary problem. Twisted pairs and lower resistors will help a lot. Capacitors across the resistors will help too assuming the switching speed doesn't need to be very fast compared to the transients. Oct 17, 2014 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.