Home › Forums › Environmental Sensors › Atlas Scientific Dissolved Oxygen Sensor Not Reading
Tagged: -9999.00, Atlas Scientific, Dissolved Oxygen, DO
- This topic has 5 replies, 3 voices, and was last updated 2023-02-28 at 11:18 AM by
Sara Damiano.
-
AuthorPosts
-
-
2023-02-24 at 4:06 PM #17625
I am working on programming a Mayfly Data Logger v1.1. I am using the Simple_Logging program in Visual Studio and the PlatformIO. I am attempting to connect an Atlas Scientific DO sensor to the logger using I2C. I already have an Atlas Scientific pH sensor connected to the Mayfly, and the pH sensor is working fine. The DO sensor is not. It will record the data correctly the first time through the cycle, but will return -9999.00 upon subsequent cycles. If I disconnect the power to the DO EZO between readings, it will run properly and give me the correct reading, but just the once. I am sure it is in the code somewhere, but I am not at all familiar with the PlatformIO programming, so I don’t even know where to start.
Has anyone come across this before? I have both the pH and the DO sensors each connected to an isolator carrier board. The lights on the DO EZO flash at each reading, suggesting the Mayfly is communicating with the DO sensor.
-
2023-02-24 at 4:12 PM #17628
Not sure how to post the code, nor do I know which code to post.
-
2023-02-24 at 6:51 PM #17630
How are you connecting the sensor to the Mayfly (what pins for data and power and what jack), and are you putting the Mayfly to sleep between readings? Is the sensor being powered constantly or are you switching off the power to the sensor between readings?
-
2023-02-25 at 11:13 AM #17631
I have tried various configurations. I have connected it to the I2C Grove slot, and I have connected it to the SDA & SCL pins. As for the power, I have gotten power through the Grove connector, and I have tried giving it power through each of the 3.3v and gnd pins. It performs the same regardless of how I have it connected.
I am using the Simple_logging.ino program as written, so I don’t know if it is going to sleep between readings, but the indicator light on the pH EZO is shutting off between readings, while the DO EZO mostly stays on. I don’t know if that helps. Where would I find the code that controls power?
This is the first time I have used PlatformIO to program an arduino, so I am still trying to figure everything out. I have only ever used the Arduino IDE before.
I really appreciate the help!
-
-
2023-02-27 at 11:10 AM #17634
Most I2C devices don’t like having the power to the device cut and the reapplied, which is why the Vcc pin of the Mayfly’s I2C Grove jack is constantly powered. All the other Grove jacks switch the power on or off, but the I2C jack always has 3.3v, even with the Mayfly is asleep. So if you’re powering your Atlas board from any of the switched sources, try putting it on the constant 3.3v pin. If you’ve already tried that, then it’s probably something in the code that’s causing the issue. I don’t use any of the Atlas products, but a few members here have successfully used them, so perhaps they could share what code and hardware configuration was used? @w3asa @adamgold @fionasouthwell
-
2023-02-28 at 11:18 AM #17642
It’s been a long time since I played with the Atlas sensors, but from my notes, power cycling them can cause the whole logger to crash. If you want to power down Atlas sensors between readings, you need an I2C isolator. See the warning here: https://envirodiy.github.io/ModularSensors/group__atlas__group.html. The simple logging program should put the sensors to sleep and power them down between readings: https://github.com/EnviroDIY/ModularSensors/blob/master/examples/simple_logging/ReadMe.md
-
-
AuthorPosts
- You must be logged in to reply to this topic.