I am using a raspberry pi 3 with an Atlas Scientific DO sensor to try and create a wireless sensor network for an aquaponics system. Everything works fine when I am running the system in my home in a normal outlet. When I try to deploy the system at the growing location however I run into a lot of strange issues. When I run sudo i2cdetect -y 1 I get very inconsistent address listings that fluctuate after each call. Sometimes there are no addresses listed and sometimes the entire i2c bus is filled.

enter image description here

I am wondering if this could be caused by the different voltages that the aquaponics location has in the outlets or interference from all of the other gear that we have setup there. Any information or input would be greatly appreciated. I am looking into voltage regulators first see if this could potentially solve the problem.

I am using the sample code provided with the sensor: here.

Let me know if I can provide any other information!

  • Is the RPi unit and sensor board contained in a project box? with chassis grounding? I see from the sensor board datasheet that there are two modes of operation: UART and I2C ... have you tried the UART mode? Perhaps, the I2C mode is too sensitive to the electrical interference... Perhaps the onboard wifi is causing interference as well... have you tried shutting down the onboard wifi and using an external USB wifi adapter? Dec 5, 2017 at 3:54
  • @RubberStamp Its housed in a cardboard box atm while I try to find a decent water resistant housing. I will definitely try your suggestions, thanks for replying!
    – Justin
    Dec 5, 2017 at 5:43
  • Do you have long wires? If so, are they in twisted groups? Long wires can act as antennae with enough effect to distrupt i2c in some situations.
    – Brick
    Dec 5, 2017 at 21:46
  • No long or twisted wires, other than the jumper wires used to connect the sensor and the power cord used to power the unit.
    – Justin
    Dec 6, 2017 at 6:01

1 Answer 1


The symptoms indicate poor wiring.

The i2cdetect program loops through all possible addresses. It puts an address on the bus. If the SDA line is then pulled low it assumes that that address is live. When no address is live it indicates that the receiving device didn't see its address (SCL or SDA problem). When multiple addresses are (incorrectly) live it indicates that SDA is shorted to ground.

Perhaps water has found its way into your enclosure?

  • I thought it was a wiring issue as well, the only thing that leads me to believe its not is that when I bring the setup home and run it locally it works flawlessly. No weird addresses on the bus at all.
    – Justin
    Dec 5, 2017 at 15:21
  • I am going to setup an additional RP3 with a different sensor and see if I get the same problem.
    – Justin
    Dec 9, 2017 at 21:00
  • This issue has stopped showing up since I cleaned up my wiring. There was no water damage but once I stopped using jumper wires this issue stopped showing up so it had to be a wiring issue. Thanks for your help!
    – Justin
    May 6, 2018 at 18:11

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.