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 - 481 through 490 (of 552 total)
  • Author
    Posts
  • in reply to: Mayfly for remote monitoring #1974
    Shannon Hicks
    Moderator

      What kind of distance are you trying to cover with your radios? There are a variety of Xbee options that will work for short distances (several hundred meters), but there are also models for transmitting over a kilometer or more. There are different models for different regions of the world because of frequency regulations and other issues, so I can’t point you directly to a specific model, but I’ve had good luck with the 900MHz USA version of the Pro radios and a small external antenna.

      For cellular options, we’ve had really good success with using SODAQ’s GPRSbee (https://shop.sodaq.com/en/gprsbee.html). All you have to do is add a SIM card and plug the GPRSBee into the Mayfly. We’ve also successfully used WifiBee modules with the Mayfly.

      SODAQ also sells a LoRaBee (https://shop.sodaq.com/en/lorabee-rn2483.html) module, but I have not used it yet and can’t offer any advice on that, but I think it should work fine with the Mayfly as well.

      in reply to: LCD Display Mayfly #1973
      Shannon Hicks
      Moderator

        Most 16×2 LCD displays require 5v, but there are some that’ll work at 3.3v if you shop around. You could also use a 5v display with the Mayfly because you can use the 5v boost circuit to power it, but remember that you’ll have to do some logic-level shifting on the data pins. You could accomplish that by putting one of these inline between the Mayfly and the 5v display: https://www.sparkfun.com/products/12009

        But I really prefer to use one of these OLED displays: https://www.amazon.com/Grove-128×64-Board-Arduino-Raspberry/dp/B01D5GLDJ2

        It uses the same SSD1306 library as the Adafruit display you posted, but it’s got twice as many pixels since it’s 128×64 instead of 128×32, and it’s cheaper. And the big advantage is that it doesn’t require the separate RST pin like what’s on the Adafruit version, so instead of 5 pins (PWR, GND, SDA, SCL, and RST), it only requires 4 pins, so it has a standard Grove connector on the display board. All you have to do is connect the display directly to the I2C port on the Mayfly using a Grove cable (not included with the display when you buy it from SwitchDoc Labs on Amazon), load a sketch, and the Mayfly prints right on the display. I can post a sample sketch if you’d like.

        in reply to: Arduino datalogger #1955
        Shannon Hicks
        Moderator

          If you’re trying to use a Zigbee module and a microSD card with an Arduino board, you could buy a bee adapter shield and a memory card shield and stack them all together. If you’re logging data over time, you’ll also want a real-time-clock module to be able to timestamp the data on the memory card. But instead of trying to get 4 separate boards to work together, that’s why we created the Mayfly board. It has the Bee socket, memory card socket, real time clock, and several other handy features that make it super simple to do everything you’re looking for all with one board.

          in reply to: Arduino datalogger #1953
          Shannon Hicks
          Moderator

            No, you’ll never need an external supply even if you’re using dozens of 5TM soil moisture sensors. The reason is that the code I posted above will only power one sensor at a time. All of the other sensors are basically sleeping and using virtually no power until they are “woken up” one at a time by the call to their SDI12 address. One 5TM sensor only draws 10mA during measurement, which is only for a fraction of a second. So with all of the sensors connected to the 5V pin of the Arduino and essentially sleeping until they’re called individually for that fraction of a second, you’ll never run the risk of drawing too much current.

            Now, if you switch to a different type of sensor, that is something to be cautious about, but it’s not a problem for the 5TM. And yes, connecting the external supply’s ground to the Arduino ground could allow you to power the sensors with the external supply, but it’s totally unnecessary in this case.

            The hardest thing about hooking up multiple sensors to one Arduino is connecting all of the wires to one pin. In you case, 6 red sensor wires need to get connected to the digital signal pin, 6 white wires get connected to 5V, and 6 bare wires go to ground. You’ll either have to get creative with a protoboard or breadboard or wirenuts or something similar.

            in reply to: Arduino datalogger #1951
            Shannon Hicks
            Moderator

              What voltage were you putting on that white wire with the external supply?

              If you use the “address_change” example, the sensor red wire needs to go on D9 if you want to run the code as-is. If you hook the sensor up as I described and run the address_change example and still don’t get anything, post a new photo of that setup. If you have a different Arduino or sensor, you might also try using one of those in case you damaged either the sensor or the Arduino with too high of an external voltage on the sensor excitation wire.

              in reply to: Arduino datalogger #1949
              Shannon Hicks
              Moderator

                I don’t know what the white box is in the top right of that one photo, but I’m assuming it’s an external power supply. I’m not sure why you are using that; the sensor definitely doesn’t need it and all 3 sensor wires are supposed to be connected directly to the Arduino board. As stated in several of my replies above, connect the sensor red wire to D7. Connect the sensor white wire to the ARDUINO’s 5V pin (also sometimes called Vcc). And connect the sensor bare wire to the ARDUINO’s ground pin. You don’t need an external power supply for any of this. You’re not getting any data because the Arduino board and external supply don’t share a common ground, so there’s no common reference between them so the Arduino is unable to measure anything on that red data wire because it’s all by itself as far as the Arduino can tell. What voltage were you putting on the white wire connected to the + terminal of that external supply?

                Remove the supply completely and connect the sensor directly to Arduino board. Run the “simple_logger” example that’s included with the SDI12 library (changing the DATAPIN in line #37 from pin 9 to pin 7 if you want it to match the code above…). It’ll scan all of the channels and tell you if it sees a sensor and prints what channel it’s on and some basic info about it. If it’s not set to channel 1 or isn’t reading it at all, then you’ll need to keep troubleshooting before trying the code above. You can also use the “wildcard” example for just testing the sensor. Use the “address_change” example if you want to change the sensor address. You should be able to see if it’s all working correctly there too. If all of that looks good, then you can try the above code again, and making sure that you’re using the proper data pin in the DATAPIN declaration line each time. My example above is pin 7, but the library’s have a default of 9. Either one is fine, just be consistent and make sure you’ve got it hooked up right.

                in reply to: Arduino datalogger #1941
                Shannon Hicks
                Moderator

                  The code I posted above has been running for years on several different loggers, so it is correct. Have you verified that you correctly wired the signal, power, and ground lines of the sensors to your Arduino board. If you’re using a Mayfly and one of the Grove ports, you’ll need to turn on the switched external power for the grove port (D22), or you can just connect them to your board’s Vcc pin. Keep in mind that with the Decagon sensors, the red wire is the data wire and white is the positive power wire. Once you’ve assured the sensor is connected properly you need to make sure you successfully programmed each of your 6 sensors with a unique SDI12 addresss using the “Address Change” example included with the SDI12 library. Do them one at a time and verify that you’re getting output from each one (one at a time) on the serial monitor. Once you’ve done all that, then you can put all 6 sensors on the board and run the sketch I posted above. If you want to use less than 6 sensors, just change the ‘6’ in line 31 to whatever the max number of sensors are. You can even put ‘1’ if you want to run the sketch with just 1 sensor.

                  If that still doesn’t work, maybe you could post some photos if your setup and the wiring so we can see if everything is connected properly.

                  Shannon Hicks
                  Moderator

                    The auxiliary A/D converter on the Mayfly is a ADS1115, so I prefer to use the Adafruit library for interacting with it (https://github.com/adafruit/Adafruit_ADS1X15). It uses the I2C port with the default address of 0x48. If you want to add other external ADS1x15 chips, just set the address on any additional chips to 0x49, 0x4A, or 0x4B.

                    See the library examples for how to do single-ended or differential measurements. You can also adjust the gain or sampling frequency, but I usually use the default gain of 2/3, like in the example that Sara quoted above, which is why there’s a formula for converting bits into millivolts. At the default gain, the Mayfly’s aux ADC is 1 bit = 0.1875mV.

                    Keep in mind that because the Mayfly operates at a Vcc of 3.3v, you can’t safely measure any voltage higher than 3.3v or you will damage the ADC. The Mayfly has a set of small jumper pins next to the Grove connectors for choosing either 3.3v or 5v is on the “V” pin of the Grove connector (see the second half of this page: http://envirodiy.org/mayfly/hardware/jumper-settings/). We did this because we typically use the Mayfly with sensors that require 5v for excitation, but only output a signal from 0-2.5v, so we’re not at risk of over-voltage on the measured signal pin. So if you’re connecting a sensor with 0-5v output, you’re going to need to scale the output by 2/3 to protect the Mayfly’s ADC.

                    As I mentioned in this thread (http://envirodiy.org/topic/datalogging-cyclops-rhodamine-wt-sensor/), there are at least 2 ways to measure 0-5v analog signals with your Mayfly:

                    As for measuring the output of the sensor, there are a couple different options. One would be to put the sensor output across a resistor divider that drops the 5v to 3.3v (i.e. a 10k and 20k resistor in series across the sensor output, so when the sensor outputs a max of 5v, the voltage between the two resistors is 2/3 of that, which is 3.3v). Or you could add a separate ADC board (like the Adafruit ADS1115 breakout board). Power the breakout board from the 5v switched output of the Mayfly and then it will be able to handle a max input of 5v. But you’d need to connect the breakout to the I2C port of the Mayfly, so you’d need to add some digital level-shifting on those 2 I2C lines to protect the Mayfly from higher voltage of the breakout. I’m sure there are a few other methods, but those are the two quickest and easiest.

                    in reply to: Mayfly availability #1933
                    Shannon Hicks
                    Moderator

                      In case anyone checks this thread after looking for Mayfly boards on Amazon, we are currently sold out of boards and starter kits. More boards are currently being made, and we hope to have a large number of them back in stock on Amazon in February.

                      in reply to: Mayfly availability #1931
                      Shannon Hicks
                      Moderator

                        I’m hoping to have the protoshields listed on Amazon by the end of January.

                      Viewing 10 posts - 481 through 490 (of 552 total)