Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Linking two Mayfly Boards Together

Home Forums Mayfly Data Logger Linking two Mayfly Boards Together

Viewing 3 reply threads
  • Author
    Posts
    • #17364
      James_NZ
      Participant

        Hi,

        I am having problems with the interference between MODBUS and SDI12 sensors on a Mayfly v0.5 board.  I can remove either one and the other works perfectly, but together I end up with around 20% -9999 values, usually for the SDI12 CTD.  I am virtually certain this has to do with the home-made modbus wing that I have built for this system.  I would love to upgrade to a Mayfly v1.1 but unfortunately the modbus wings haven’t been developed for those yet, so I am stuck with the system I have.  Given the circumstances, I was thinking that perhaps I could use another Mayfly v0.5 board (I have a few lying around) to record the MODBUS sensor while the original board can focus on the SDI12.

        My question is, would it be possible to power the secondary board via the original board?  I could then possibly use the same battery/solar panel setup.

        Thanks for your help, and apologies if this is a silly question.

        James

         

         

         

         

         

         

      • #17367
        neilh20
        Participant

          Hi James, if you have the spare jumper cable sockets you could try it and it probably will work.

          The challenge is the Mayfly doesn’t have a lot of capacitive buffering and the LiIon battery performs that function.  It might be more reliable to have a battery on each Mayfly and run the solar panel to both.  Of course the boards need to be kept physically isolated so they don’t connect electrically.

          My  node is using a LT500/SDI-12 and a Keller Acculevel/Modbus on Mayfly 0.5B https://monitormywatershed.org/sites/TUCA-Na13/

          Its using a release based on 0.28.5 ~ https://github.com/neilh10/ModularSensors/releases/tag/v0.28.5.release1_210711  and it is built as a working release in https://github.com/neilh10/ModularSensors/tree/v0.28.5.release1_210711/examples/tu_xx01 with src/ms_cfg.h_LT5KA_lte copied to ms_cfg.h

           

        • #17372
          Shannon Hicks
          Moderator

            For the past year we’ve had 8 stations using SDI12 CTD sensors and Yosemitech wipered turbidity sensors together on one prototype Mayfly using the EnviroDIY RS-485 half-shield.  It also works with other generic modbus adapters too. We’ve had no issues with not being able to read the sensors or with dropped readings. I’m attaching the code below so you can see how I arranged my sketch.  I don’t know what modbus sensors you’re using but I assume they are ones already included in our library?

             

          • #17376
            James_NZ
            Participant

              Hi @shicks (and thanks @neilh20),

              Thanks for that.  I am using a Yosemitech Y511-A with a Hydros CTD (Gen 1).  My code is fairly similar to yours.  I notice that you use pin 22 to power the Y511 (line 145) where I have ‘-1’.  I also don’t see the line ‘<span class=”crayon-i”>AltSoftSerial</span> <span class=”crayon-v”>altSoftSerial</span><span class=”crayon-sy”>(</span><span class=”crayon-cn”>6</span><span class=”crayon-sy”>,</span><span class=”crayon-cn”>5</span><span class=”crayon-sy”>)</span><span class=”crayon-sy”>;'</span> in my code.  Do you think this could be causing the problem?

              FYI, more information (and my current code) can be found in this post:

              https://www.envirodiy.org/topic/hydros-ctd-10-regularly-dropping-out-9999/

              Since posting the topic above I have attached ferrite collars to no avail and inspected all sensors and cables for damage (which there is none).  I have also switched the TTL-RS-485 board on the MODBUS wing with another (working) TTL-RS-485, which also doesn’t solve the problem.  I can get a perfect CTD record by removing the MODBUS wing.  The strange thing is that I have 6 other sites with identical code that work perfectly.

              I would love to solve this issue without having to install a secondary board.

              James

               

               

               

               

              • #17384
                Shannon Hicks
                Moderator

                  I use pin 22 on line 145 because I’m using a prototype Mayfly board that is able to generate 12v to directly power the external sensors. If you’re using an external 12v source for your sensors, then it’s fine to put -1 on line 145.  And I’m using a Max13412 RS-485 chip on my modbus adapter, which has auto direction control and internal 5v generation, which makes it easy to connect since it only needs a single 12v supply, but the auto direction control means I can set line 146 to -1 also.  In my experimenting, I found that communicating with this chip using pins 5 and 6 using AltSoftSerial was the most reliable way to do it, so that’s why my code looks like it does.  There’s probably other ways to do it, but this method has been very stable so far.

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