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

Matt Barney

Forum Replies Created

Viewing 10 posts - 91 through 100 (of 171 total)
  • Author
    Posts
  • in reply to: Connectors for 20-pin headers #14476
    Matt Barney
    Participant

      Oh, now I see the Mayfly protoshield: https://www.envirodiy.org/mayfly/hardware/accessories/. It happens to be out of stock at Amazon at the moment, but that’s OK, I don’t have an immediate need. It would work, but would also require adding/moving the Grove sockets to the protoshield if one still needed those.

      I was implementing a TTL-based sensor using a software serial port, and initially it seemed like it would be easiest to connect to the Mayfly’s digital pins via the 20-pin header, but I realized that I could instead use one of the Grove ports and a Grove to screw terminal adapter, so that’s what I did. In the future, if I need access to additional/different Mayfly pins, I’ll either get a protoshield or make my own.

      Thanks!

      Matt

      in reply to: Connectors for 20-pin headers #14474
      Matt Barney
      Participant

        Thanks Neil.

        Initially I thought I could use screw terminals but soon realized that the male pins that protrude from them are not long enough to provide a secure plug-in to the 20-pin headers. Perhaps my best solution will be to solder screw terminals to a small perfboard or proto board, along with male headers which would plug into the 20-pin females on the Mayfly.

        Matt

        in reply to: Wiring Ultrasonic sensor w/ temp compensator #14471
        Matt Barney
        Participant

          Yep, that was it. When I didn’t find the library in EnviroDIY, I just grabbed it from slashdevin’s original. Now that I have your fork of NeoSWSerial, it works. Thanks!

          in reply to: Wiring Ultrasonic sensor w/ temp compensator #14469
          Matt Barney
          Participant

            Any ideas why AltSoftSerial works here, but NeoSWSerial doesn’t?

            in reply to: Connectors for 20-pin headers #14468
            Matt Barney
            Participant

              Do people just use individual jumper wires to the Mayfly pins on these headers? Or is there a modular cable of some type that works with them?

              in reply to: MMW Data Outage? #14464
              Matt Barney
              Participant

                I repeated my test for another ~48 hour run, sampling every 5 minutes, but this time using WiFi instead of XBee3 cellular. All of my 548 sample points made it to the MMW database, and all POST messages sent by the Mayfly received successful response code 201. So data upload via cellular appears to be significantly less reliable, even when cell signal is good.

                in reply to: MMW Data Outage? #14458
                Matt Barney
                Participant

                  Great news, @aufdenkampe! Thanks to you and your team.

                  I ran a test overnight, with a Mayfly sampling every 5 minutes. Out of 179 samples sent to MMW, only one received Response Code 504, at 04:30 MST, Aug 7th. All other POST messages received successful response codes (201). The 04:30 point did not get saved to the MMW database. What I’ve observed in the past was that the ‘504’ points still got saved in the database. In any case, this appears to be an improvement compared to my previous tracking of 504 errors.

                  There were 4 other sample points during my test which the Mayfly saved to the SD card but apparently never attempted to send to MMW, as there were no “Sending data” nor “POST” messages in the log at those times. I believe this is a Mayfly/Xbee3 issue, not a MMW issue. I’ve only seen it when using an LTE modem, not when using WiFi.

                  Best,

                  Matt

                  Trout Unimited

                  in reply to: Mayfly SCL and SDA voltage level #14454
                  Matt Barney
                  Participant

                    I’m not an expert, but based on the Mayfly schematic (see pins 19 and 20 on the ATMega1284P, upper left), it looks like SDA and SCL are pulled high via external resistors on the board, so there is no way to disable them in code.

                    Reading a tutorial at Adafruit, it looks like that is an inherent part of the design of the I2C protocol:

                    The I2C clock and data lines need pull-up resistors to prevent from floating to random values. Since many different devices can share these lines the I2C protocol requires that each device ‘give up’ or stop driving the lines when not in use. If no device is driving the lines then the pull-up resistors ensure they go up to a high logic level instead of floating at random values.

                    Matt

                    in reply to: Wiring Ultrasonic sensor w/ temp compensator #14423
                    Matt Barney
                    Participant

                      I think my code must not be catching the interrupt properly. It doesn’t get beyond this line in MaxBotixSonar.cpp:

                      I am able to get it working by using AltSoftSerial (Rx on pin 6), but am unable to get NeoSWSerial to read from the MaxBotix sensor.

                      Any help is appreciated.

                      Thanks,
                      Matt

                      in reply to: Wiring Ultrasonic sensor w/ temp compensator #14414
                      Matt Barney
                      Participant

                        I’ve probably done something dumb in my code, but can’t see what it is, so I could use another set of eyes on it…

                        I’ve got a MaxBotix MB7589 SCXL-MaxSonar-WRMT and have it communicating via NeoSWSerial on pin 7. Using the single_sensor.ino example, it works fine. Now I’m trying to integrate it a logging sketch, based on DRWI_NoCellular.ino, and I never get any readings displayed nor written to the SD card. Code is attached. If I comment the sonar_range variable out of the variableList, it works, and the remaining variables get successfully logged.

                        Here is the debug output after turning on the debug flag in MaxBotixSonar.h:

                        Thanks,
                        Matt

                      Viewing 10 posts - 91 through 100 (of 171 total)