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

fisherba

Forum Replies Created

Viewing 10 posts - 41 through 50 (of 55 total)
  • Author
    Posts
  • in reply to: Newbie Mayfly Setup for RS485 sensor to internet #12448
    fisherba
    Participant

      Hi Neil,

      I spent the day outside yesterday, adding more sensors to two existing stations, which included some RS485 sensors. I’ll share how I did it and that will hopefully help you along!
      The stations are: https://data.envirodiy.org/sites/WSP01/ and
      https://data.envirodiy.org/sites/WSP02/.

      My sensor station added RS485 sensors and a new implementation of hardware I2C for PaleoTerra redox probes (previous probes said they were I2C, but they all had the same address as the Real Time Clock on the Mayfly … and every other RTC, so we had to implement as software I2C, which ate up so many pins). I now have 11 sensors chiming happily away on one Mayfly at each of those stations. We’ll see how the battery holds up, they get a lot of shade.

      How I did this is the subject of a blog post in process. I use PlatformIO as my IDE. What *broke* me and forced me into using PlatformIO was managing libraries for the Modular Sensor sketch. And I don’t regret learning to use PlatformIO at all (but other IDEs exist, I just don’t know them by name… pick one!). The Modular Sensor library is the only way I know how to do all the things we need for environmental monitoring (I’m an end-user, not a coder or an engineer). The Modular library is designed to
      * get multiple sensors to run with energy efficiency,
      * with solar charging and telemetry (Northern Widget hasn’t supported telemetry yet, but they are working on it),
      * and more recently with calculated variables (like water level corrected for atmospheric pressure).

      This sketch is the starting point that does it all:
      https://github.com/EnviroDIY/ModularSensors/tree/master/examples/logging_to_EnviroDIY

      Note: There’s a Keller Modbus sensor in this sketch, that might require slight modifications to get it running for your Keller sensors. Keller was very supportive of @aufdenkampe developing Arduino-framework compatibility for their sensors.

      I see that with Keller sensors you won’t need atmospheric pressure corrected values to log, but for those who would this sketch has that capacity and it’s the base of the example that I’m sharing below:
      https://github.com/EnviroDIY/ModularSensors/tree/master/examples/baro_rho_correction

      This is even more complicated than the logging sketch because in order to calculate variables from two separate sensors, @srgdamiano had to break out some of the functions.

      After you peek at those, then look at one of the sketches that I deployed yesterday. It’s modified from baro_rho_correction and it has some extra stuff in the loop because there’s an energy bleed from the RS485 wing. The bleed happens because when the modbus pins are left high, which happens because modbus stop bits are high, and the power is off to the module (the Wagoneer RS485 widget), it bleeds.

      Here’s the sketch.

      Here’s the PlatformIO ini file that I used to compile/build the sketch, which is how you manage libraries in this IDE.

      That’s a lot to take in… I expect you will have next questions! Meanwhile, this is a good push for me work on the blog post that I hope will help people get started in PlatformIO (or their IDE of choice) and Modular Sensors.

      Beth

      in reply to: GPRSBee #12390
      fisherba
      Participant

        Hi Cal, there’s a thread on GitHub about getting this thing up and running. Looks like others are having trouble as well. Perhaps contributing your debugging will help things along.

        https://github.com/EnviroDIY/ModularSensors/issues/162

        in reply to: BOM #12389
        fisherba
        Participant

          Also, @aufdenkampe has a list of the components he has compiled for his work group. It’s informal not a bill of materials, but it may help you along (it has definitely helped me): https://docs.google.com/spreadsheets/d/1x87AHmmCWmsgMVpbeEhw9iZm5iHPiUoJPuaUpzHsxW0/edit?usp=sharing

          Do I understand correctly that you haven’t used a Mayfly for your previous deployments?

          Beth

          in reply to: BOM #12388
          fisherba
          Participant

            Hi Neil,

            I usually use Adafruit batteries that already have JST 2-pin cables attached. Adafruit also supplies JST cables. Then I get my solar panels from Voltaic and solder a JST connector on one of their bare wire cables.

            Triple check any that you buy on Amazon because some reviewers say they aren’t the right size.

            Let me know if that doesn’t answer your question.

            Beth

            in reply to: GPRSBee #12366
            fisherba
            Participant

              Hi @ckillen, The Bee socket on the Mayfly makes it easy for the Mayfly to hook up with any radio with that connection/communication protocol. The socket can be used for several types of radios, including the 2G one that you have, WIFI radios, and the new XBee3 by Digi, that supports LTE-M communication (https://www.digi.com/pdf/ds_xbee3-cellular-lte-m.pdf). @w3asa, have you looked into this LTE-M radio? I think it will work with my existing hologram.io SIM plans and data rates.

              I think the XBee3 is the route to use if you are no longer covered by 2G. My understanding is that T-Mobile is keeping their 2G coverage until ~2020, but if you don’t have their coverage, it’s not going to expand to cover you in the next couple of years. Here’s a 2G coverage map: https://orion.freeus.com/coverage-map.aspx.

              I’ll keep plugging away on the instructional for logging to data.envirodiy, but it will probably be after September 10… because I have two proposal deadlines before then!

              Beth

              P.S. @ckillen Are you using a sensor with the ADS1115 chip? This is an analog to digital converter that shows up in ~3 sensors in the logging to envirodiy sketch. If not, your error message sounds like you need to “turn it off” by commenting those sensors out. I use “Command-/” after text is selected on my Mac. I suspect PC has a similar keyboard shortcut.

              in reply to: GPRSBee #12350
              fisherba
              Participant

                Hi Cal,

                I have been working on a tutorial, but it’s unfortunately nowhere near complete, and I will be away for the next week. I suggest using the Modular Sensors library on GitHub, where there’s an example called logging_to_EnviroDIY. This is formatted to log to data.envirodiy.org, where you can set up a hosting site for free.
                https://github.com/EnviroDIY/ModularSensors/blob/master/examples/logging_to_EnviroDIY/logging_to_EnviroDIY.ino

                The catch is that it has a lot of library dependencies, which could be difficult to set up depending on your Arduino background.

                Because you are using Hologram, line 106 will be:

                const char *apn = “apn.konekt.io”; // The APN for the gprs connection, unnecessary for WiFi

                The Modular Sensor sketches have a built-in “sensor testing mode”, and when you are in logging mode, watching the serial monitor, the sketch will give you
                the “response code” for your internet connection, which you can look up to see if you have success (201 is the winning response: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes).

                I’m attaching the tutorial text that I have done so far. It’s really in first draft mode, but I hope it can help you.

                Beth

                in reply to: New Mayfly user – upload stopped working #12320
                fisherba
                Participant

                  Hi Dave, the orientation in your photo is correct (and that’s the correct way demonstrated in the thread you linked), so I’m a little bit confused about how yours could be fried. It’s possible that the battery isn’t contacting properly. My experience has been that they are wicked hard to push in (because the early versions weren’t tight enough), so I haven’t had any trouble with the coin battery contacting properly.

                  But in answer to your question, I haven’t repaired the ones in my classroom, but the RTC chip is probably the most feasible chip to repair on the Mayfly. It’s cost is about $7. One of my engineer friends recommended hot air soldering for the removal stage.

                  in reply to: New Mayfly user – upload stopped working #12318
                  fisherba
                  Participant

                    @davejadco-com, glad it’s working. I can’t imagine why the Mayfly wouldn’t receive an upload without the RTC battery. Or with it upside down, for that matter. I had a student insert several the wrong way and we fried the Mayfly RTC, so double check that.

                    You can test this by manually set the RTC, disconnect from a power source (USB or lipo battery connected to one of the JST pins), and then reconnect and see what time shows up when you open the serial monitor. I use the PCsync.ino sketch when I have to set the RTC manually.

                    in reply to: New Mayfly user – upload stopped working #12316
                    fisherba
                    Participant

                      Hi Dave,

                      Sorry you’re having this trouble. I have a couple of possibly not useful pieces of information to see if I can help you. It sounds like you have a connection problem.

                      First, are you using the same download cable as you used the previous day? Some cables are charge only (not data) and I tend to rid my house of those!

                      Second, (kick me if you want, but…) is your Mayfly switched on? The Mayfly has a manual toggle on/off switch and this could cause your error.

                      Third, there’s a switch on the top edge of the board that exchanges between an external power source vs “lipo”, keep that on the lipo option. I have heard of some issue with frying boards that are set to external power when connected to USB (or the wires were backward for that colleague, but you have to be on lipo or it will bypass the programmer).

                      Fourth, have you selected the Mayfly under the “Tools” menu? If it isn’t in the tools menu, you may need to re-install the drivers.

                      Fifth, every time you connect any Arduino board to a new USB port on a Windows machine, it treats it like a new piece of hardware and assigns a new com port number. It looks like you were connected to COM3, but if you are in a different USB hole on your computer, it may now be a different port number. Since you re-installed everything, I’m not sure what the expected behavior is (I’m a Mac user…but I’ve seen this issue with my students).

                      Let me know if any of those ideas help.

                      Beth

                      in reply to: Mayfly and Maxbotix MB7386 Range Issue #12298
                      fisherba
                      Participant

                        Any chance it’s the 5 meter model? From what I’ve seen it’s not possible to tell the difference from the housing. (I’d love to be corrected and learn how to tell if I have that wrong.)

                        Beth

                      Viewing 10 posts - 41 through 50 (of 55 total)