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

Shannon Hicks

Forum Replies Created

Viewing 10 posts - 131 through 140 (of 554 total)
  • Author
    Posts
  • in reply to: PAR issue with Mayfly #17394
    Shannon Hicks
    Moderator

      Which hardware version of the Mayfly board are you using this sketch on?

      in reply to: Mayfly v1.1 technical questions forum thread #17386
      Shannon Hicks
      Moderator

        As long as the cards are formatted for FAT32 and you can read/write to them with other Mayfly boards or Windows devices, then it’s possible the on-board memory card socket on that Mayfly is broken.  Is this a brand new board that you’re using a card in for the first time?  If you’ve got an EnviroDIY vertical microSD adapter you could try putting that on the Mayfly to see if a card will work in there, but sometimes we’ve found that the defect in the on-board socket causes the vertical adapter to also not work properly (because they both essentially share the same pins).  You can email me at mayfly@envirodiy.org and we can arrange the warranty support.

        in reply to: Linking two Mayfly Boards Together #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.

          in reply to: PAR issue with Mayfly #17383
          Shannon Hicks
          Moderator

            I looked at your sketch, it’s based on some really old examples we published many years ago at the beginning of the Mayfly project, but it should still work if you’ve got all the original old libraries.  Many of them have been replaced or updated since then, and major changes were made to the Mayfly board design in recent years, making some of your code slightly incompatible with the Mayfly 1.0 and 1.1 boards.

            But as for the differential ADS1115 analog readings for a self-powered sensor like the SQ-110, your code looks correct.  Have you tried removing the sensor and connecting something with a known voltage (below 3.3v) to see what readings you get?  For example, with the sensor removed from the logger, connect a standard AA battery to the two aux analog pins of the Mayfly so that the Mayfly will read the battery voltage (around 1.6v for a new AA battery).  Your code line 554 would then measure about 8526 bits.  Line 555 would convert that to voltage (in millivolts), which would be 1598.63 mV.  Then line 556 would convert that to quantum flux units by multiplying it by 5, resulting in approximately 7993.  (this is a number way higher than you’d see in the real world because the unamplified quantum sensor has a max output of 800 mV, but simulating an analog sensor by using a single battery is an easy way to test wiring or code to make sure everything is correct before using a real sensor.)

            You could also try connecting a standard voltmeter (like a handheld digital multimeter) to your sensor wires (when not connected to a Mayfly or anything else) on a sunny day and see if it reads close to full scale (500-800 mv).

            in reply to: Turbidity Sensor Information/Questions #17375
            Shannon Hicks
            Moderator

              Thanks for posting your code, I edited your post to put it into the “code formatting” window that you can use when pasting code into our forum.  It’s the little unlabled icon that looks like this:  “<>” in the toolbar above the text entry box.

              Your issue is caused by an error on line 186.  It should look like this:

               

              You can also include another variable to report the Clarivue temperature (because the sensor also reports water temperature) by adding this line to your variable list:

              I haven’t published the official example code for using a ClariVUE10 sensor yet because they haven’t added the sensor to the list of supported sensors on the MonitorMyWatershed website.  Once it gets added to MMW, I will publish the example, but it’s essentially exactly what you have above, minus the ES2 sensor, and with the correct variable declaration that I just posted here.

              in reply to: Turbidity Sensor Information/Questions #17373
              Shannon Hicks
              Moderator

                When you power up the ClariVUE10 sensor, we’ve found that it take a few seconds to warm up before the Mayfly can “see” it.  So when that sketch cycles through all of the available numbers and letters, it usually doesn’t see the ClariVUE until the second loop through.

                So when you first connect the sensor from the factory and run the sketch, it’ll run through one full loop before finding it on address “0”.  Then you can either leave it there or enter another address, in your case “2”.  Then it should go through the loop check again and say that it found the sensor on address “2”.  If you run that sketch at any time or the “c_check_all_addresses” sketch, it should always find the sensor at address 2.  If that’s all correct, then the issue is just with your logging sketch.  You can post it here if you want, just be sure to edit out any personal information like UUIDs or wifi APN info.

                in reply to: Linking two Mayfly Boards Together #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?

                   

                  in reply to: Turbidity Sensor Information/Questions #17370
                  Shannon Hicks
                  Moderator

                    When you changed the SDI12 address of the turbidity sensor to “2”, did you use the same Mayfly board and the  “SDI12/b_address_change” example sketch that comes with our libraries, or did you change the address with a different board or instrument?

                    in reply to: Problems with a combined MH21 Gen1 and Gen2 station #17344
                    Shannon Hicks
                    Moderator

                      The only difference between the Gen 1 and 2 Hydros21 sensors is that the Gen 2 sensors need a little more time to respond to the SDI12 measurement command, which is hardcoded into one line in the MeterHydros21.h file within the ModularSensors library.  If you’re using the most recent version of ModularSensors, then your code will support both generations of sensors.  But the SDI12 library is a separate library from ModularSensors and is very complex and handles things like interrupts and timing that can break if not used correctly, or it could also conflict with other libraries or functions if they’re not compatible.  I didn’t check the rest of your code, but I’ve successfully used over a dozen Hydros21 sensors simultaneously with one Mayfly board before with all the sensors connected to D7, but the most important thing is to verify that each sensor has had its SDI12 address changed individually to a unique number prior to connecting them all to a logger with a sketch that is communicating with all of them at once.

                      in reply to: Problems with a combined MH21 Gen1 and Gen2 station #17342
                      Shannon Hicks
                      Moderator

                        From the sketch, it looks like you’re trying to operate both sensors on the same logger by using a separate data pins for each sensors?  That’s not the correct way to do it because of how the underlying EnviroDIY SDI12 library functions. You should instead put both sensors on the same data line (usually D7).  Each sensor will need its own unique address, and it looks like you’re using 1 and 7 for your addresses, so once the sensors have different addresses, they can share the same data pin with up to 62 total devices, as long as each device has a unique address.  There are 2 identical grove jacks on the latest Mayfly boards for SDI-12 ( D4-7) for people who want to easily connect 2 SDI12 sensors at the same time.  Otherwise you’ll need a grove branch cablelike this one:  https://www.seeedstudio.com/Grove-Branch-Cable-5PCs-pack.html

                        Once you’ve got the 2 sensors connected, then just simply the code by combining the constants named “hydros21Data_x” on lines 149 and 150 of your sketch to just one constant on pin 7 and then make sure the objects on lines 155 and 157 point to that one constant.

                      Viewing 10 posts - 131 through 140 (of 554 total)