Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Interference between HYDROS CTD and Yosemitech Turbidity Sensor

Home Forums Mayfly Data Logger Interference between HYDROS CTD and Yosemitech Turbidity Sensor

Viewing 4 reply threads
  • Author
    Posts
    • #16198
      James_NZ
      Participant

      Hi all,

      I have a frustrating problem at one of my sites where the turbidity sensor seems to be interfering with CTD readings resulting in -9999 readings for all CTD measurements.  I’m using a DIY MODBUS shield for the turbidity sensor, and when I remove that the CTD reads perfectly.  This puts me in a situation of only being able to read the CTD or turbidity sensor.

      The really annoying thing is that I have tried 3 different Mayfly boards, and the interference disappears with one board, but that board seems to have a problem with the solar regulator so the battery won’t charge!!

      Does anyone have any thoughts?  Perhaps I could hack the code so that the CTD powers up in isolation of the turbidity sensor and they read separately?

      Thanks in advance for your help.

      James

       

       

    • #16201
      Anthony Aufdenkampe
      Participant

      The first explanation that pops to mind is that the DIY Modbus wing has power bleed from the digital pins when the power is turned off.

      Modbus stop bits are high, which leaves the AltSoftSerial transmit pin (5 or 6) at 3.3V when the sensor power shuts down. This then bleeds through RS485 converter (when it is powered off) over to the switched power rails, which then interferes with the startup of some other sensors, such as the MaxSonar. For a solution, see ModularSensors Issue “Add to Modbus an AltSoftSerial “flush” or “end” function, to set pins low #140″ for the coding solution.

      The coding solution is now provided in the complex_loop option shown in the menu_a_la_carte.ino example. Specifically, at the end of every loop, the AltSoftSerial pins need to be set to low before the system is put to sleep, as shown here: https://github.com/EnviroDIY/ModularSensors/blob/292371055ab9d9b884f8fedb7c9587181cf7789d/examples/menu_a_la_carte/menu_a_la_carte.ino#L2928-L2932

      This in turn required an altSoftSerial.begin(9600); statement at the top of every measure loop, as shown here:  https://github.com/EnviroDIY/ModularSensors/blob/292371055ab9d9b884f8fedb7c9587181cf7789d/examples/menu_a_la_carte/menu_a_la_carte.ino#L2850-L2854

      This means that you must use the complex loop every time you use these Modbus Wings.

      Let us know if that solves it.

    • #16207
      James_NZ
      Participant

      Thank you Anthony.  It sounds like this may be the problem.  It seems strange that I have 9 of 10 sites operating perfectly, but this site refuses to play nice.  I will try your solution when I get some time over the Christmas break.

      Have a great Christmas and New Year.

      James

       

       

       

    • #16281
      James_NZ
      Participant

      Hi @aufdenkampe,

      I have followed your advice and I think this is working, i.e., I am no longer having problems with -9999 values for the CTD.

      However, the complex loop code is preventing publication of data to MMW.  I’m sure this is something simple, but I can’t seem to figure it out.

      I have tracked the issue to line 483 where the code checks to see if the modem is connected to the internet, i.e., ‘if(modem.connectInternet())’.  The lights on the modem don’t seem to power up at all, and the loop just continues reading sensor values and storing it on the SD card.  Am I missing something in the setup loop?

      Thanks again for your help.

      James

       

    • #16287
      James_NZ
      Participant

      Okay, after a good night’s sleep I decided to tackle this again and I think I have fixed it.  I simply added a line before the internet connection loop:

      It’s now logging to MMW.  Please let me know if this is fundamentally wrong or will cause problems in the future.

      James

Viewing 4 reply threads
  • You must be logged in to reply to this topic.