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 - 501 through 510 (of 568 total)
  • Author
    Posts
  • 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.

                in reply to: Dying battery in winter solved by 3.5 W solar panel #1923
                Shannon Hicks
                Moderator

                  It’s not mentioned above, but equally important to surviving the cold weather and reduction in sunlight is to increase the capacity of the LiPo battery being charged by the panel. Depending on the type of sensors used and their current draw, a smaller battery might have trouble making it through a long stormy winter week, no matter what size panel is connected to it. So I recommend increasing the battery capacity to as large as you can comfortably get in your enclosure.

                  In our loggers, I use 2000mAh batteries in sunny spots, a 4400mAh battery in shady spots, and a 6600mAh battery in really problematic areas. This, combined with the larger panel, and reducing the transmit rate of the radio/cell module (this is the biggest power hog) should get you though anything.

                  And to answer the question above, the Voltaic Systems panels come with a small barrel-type connector. If you want to use those panels with a Mayfly, you’ll need to connect it to the JST header on the Mayfly, by either cutting and splicing your own homemade cable to the panel, or by ordering one of their barrel-socket-to-bare-lead cables, available on their website.

                  in reply to: Mislabeled grove pins #1896
                  Shannon Hicks
                  Moderator

                    Good find! It’s only the printing on the PC board that is backwards — the actual pin traces follow the standard Grove I2C Pinout: SCL-SDA-Vcc-Gnd (as shown on the schematic). So this shouldn’t be a problem for anyone using a standard Grove cable with connectors on both ends, but if you use one with flying leads or are hacking together your own cable, then the misprint could cause some confusion. I’ll be sure to update the v0.3 and v0.4 board documentation to include a note about the misprint. Thanks!

                    in reply to: Mayfly availability #1885
                    Shannon Hicks
                    Moderator

                      The kits are still in stock, and the single boards should be in stock later this week. More were sent to Amazon last week but their inventory processing has been slowed because of the holidays.

                      in reply to: 5-volt boost circuit current capacity #1883
                      Shannon Hicks
                      Moderator

                        You are correct, the 5v boost circuit on the Mayfly v0.4 has a max current supply of 200ma.

                      Viewing 10 posts - 501 through 510 (of 568 total)