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 - 321 through 330 (of 552 total)
  • Author
    Posts
  • Shannon Hicks
    Moderator

      Are you sure you need to use UART 0 for your incoming data from your deice?  The RX0/TX0 pins on the 20-pin header are directly wired to the main UART 0 of the Mayfly, which are the same pins that are used when programming the Mayfly board via your computer (using either the USB port of the FTDI header).  So if you have a device connected to RX0/TX0 of your Mayfly, and that device is actively sending data to the Mayfly, then you won’t be able to program your Mayfly while that device is connected, or view data on the IDE via the SerialMonitor.  Unless you’re using UART 1 for something else (like a bee module in the Mayfly bee socket) then I would suggest you connect your serial device to UART 1 using the RX1/TX1 pins instead.

      If you want to use one of the other digital pins (the other 20-pin header on the adjacent side of the Mayfly) then you could use one of the pins like D4, D5, D6, D7, D10, D11, or a few others, but only if you aren’t using those pins by something else on your board or in your sketch, and only if you implement SoftwareSerial via libraries.  However, SoftwareSerial has issues and limitations, so it’s better to use a hardware UART instead if it’s free.

      in reply to: Mayfly 16 bit ADC errors #14088
      Shannon Hicks
      Moderator

        I usually leave the ADS1115 in its default gain setting (which is 0.1875 mv per bit), which is more than sufficient for most measurements.  If you do that, you can easily calculate voltage by using these two lines:

        If you’re using a voltage divider, you’ll need to add an additional multiplier that is determined by the ratio if your two resistors, which is where I guess that 4.052 came from.  Did you measure actual resistances of your two resistors, since tolerances can be anywhere from 1% to 20% depending on what resistor you’re using.

        It also looks like you’re using 4.096 as the voltage reference of the ADS1115 in your equation on line 31, and that is incorrect.  The absolute maximum reference voltage of the ADS1115 chip is 4.096v, but it is tied to the Vcc rail of the Mayfly, which is 3.3v, so you cannot measure anything higher than 3.3v with the Mayfly, and you need to use 3.3 as the multiplier in that equation.

        Are you using the 6 AA battery pack to power your Mayfly?  If so, it needs to be connected to the Ext 4-12v pins in the upper right corner of the board (near the FTDI header), and flip the small slide switch to EXT.  You should never plug anything other than a 3.7v Lipo battery into the JST jacks labeled “LIPO BATT” because the onboard charger will attempt to charge the battery whenever a USB cable or solar panel is plugged into the Mayfly.  So if you’re powering the Mayfly with alkaline batteries, it must be connected to the EXT 4-12 pins.

        You can also measure whatever voltage source is powering your Mayfly by simply analog reading A6 which is connected through a voltage divider to the battery providing the power for the Mayfly.  There’s an example sketch here: https://github.com/EnviroDIY/EnviroDIY_Mayfly_Logger/blob/master/examples/battery_measurement/battery_measurement.ino

        in reply to: bulk purchase lead time #14066
        Shannon Hicks
        Moderator

          Amazon isn’t replenishing our inventory as fast as usual, and we definitely prefer people contact us directly for orders over 10 boards or kits so that we can leave the Amazon inventory for people who only need to buy a few at a time.  Email us at mayfly@envirodiy.org and we’ll see what we can do for you.

          in reply to: Mayfly Power Switch Issue #13986
          Shannon Hicks
          Moderator

            Sorry to hear you’re having trouble with your Mayfly logger power switch.  That’s one of the parts I thoroughly test on each board before we ship them out, to make sure there are no problems with the switch.  Occasionally we’ve seen them get flaky like that if the board has been in a moist environment (i.e. the inside of the enclosure was damp or had water in it), which causes some corrosion inside the switch that leads to poor contact of the movable parts inside the body of the switch.  Sometimes all you need to do is cycle the switch back and forth quickly a bunch of times to break down the corrosion.  But if you’re deploying a logger and you don’t want it to stop working sometime later, it’s probably best to replace the switch.  You can just desolder the old one and install a new one.  The part number is JS202011CQN and you can find it at a variety of online electronics suppliers for about $0.40.

            in reply to: Trouble initializing XBee3 LTE-M #13851
            Shannon Hicks
            Moderator

              Cal, that’s an interesting find, thanks for sharing.  I have a couple test boards that I’ve always kept in mode 2 (AT&T) and they’ve never had a problem connecting consistently and instantly.  But we started changing the CP mode on most of our other stations last fall to allow them to connect to Verizon towers as well, and it seems like those are the modules that are having connectivity issues.  So I’ll work with Sara this week to experiment with different CP settings on those stations and see if that improves their situation.

              in reply to: SDI-12 Library #13847
              Shannon Hicks
              Moderator

                That demo sketch is just a sample of how to talk to your sensors, there’s lots of stuff in there that you could trim out if you’re actually trying to collect data at a certain rate.  What type of board are you using?  Are you planning to store the data on a memory card or just print to the computer’s serial monitor?  There’s a 10-second delay on the very last line of the sketch that isn’t needed if you’re trying to cut down on time between samples.  Do you want to take one discrete reading from each sensor each time, or are you interested in taking several readings from each sensor an averaging them to limit the “noise” or variation between readings of each sensor?   Are you sensors going to be powered continuously or do you want to turn them off between readings?  Do you need a timestamp to go along with each data record?

                in reply to: SDI-12 Library #13845
                Shannon Hicks
                Moderator

                  That example goes through the list of available address to see if a sensor is attached that has a corresponding address, so it definitely takes awhile to go through the whole list.  You could rewrite it to only go through the addresses of your sensors and not the entire list.  But your sensors have a 600ms sample time (as stated in the datasheet), so you’ll need to add a little delay after that and then you’ll have the poll time, so I’d allow 1 second for each sensor, and with 8 sensors it’ll take 8 seconds total.  Is that acceptable?

                  in reply to: Stronger cell antenna? #13842
                  Shannon Hicks
                  Moderator

                    A few years ago, we used to put SMA jacks with bulkhead fittings through the Pelican case and use an external weatherproof antenna outside the case.  But the signal loss caused by the extra coax and the bulkhead fitting caused more to lower the overall signal than just using a small antenna inside the Pelican case.   So unless we’re connecting a high-gain or directional antenna to a 900mhz radio module for our on-site radio network, I found it unnecessary to put a cell phone antenna outside the case.  And as Anthony mentioned above, the antenna orientation and proximity to metal or other large objects has more of an influence on your signal strength than the style of antenna.

                    in reply to: Arduino datalogger #13819
                    Shannon Hicks
                    Moderator

                      The code and wiring depends on what kind of sensors you’re talking about connecting to the same pin.  Are you using sensors with SDI-12 or modbus communication?  Are these sensors already included in the many supported sensors in the EnviroDIY ModularSensors library, or are they unique sensors we haven’t used before?

                      in reply to: Logging to ThingSpeak #13793
                      Shannon Hicks
                      Moderator

                        Jim, the 2G modules in your stations is the GPRSbee, made by SODAQ.  You can order it directly from them on their webshop (https://shop.sodaq.com/gprsbee-rev7.html), and they ship quickly from the Netherlands.  They used to be available through other vendors, but not anymore, so we buy them directly from SODAQ.  It come with the antenna and power jumper wire for connecting to the spare LiPo jack on the Mayfly.  Everything else you might need for building your station is in the shopping list found in the EnviroDIY sensor station manual (https://www.envirodiy.org/mayfly-sensor-station-manual/).  The enclosure we include with the starter kit is the RP1095C, available from several electronics parts vendors.

                      Viewing 10 posts - 321 through 330 (of 552 total)