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

Sara Damiano

Forum Replies Created

Viewing 10 posts - 291 through 300 (of 465 total)
  • Author
    Posts
  • in reply to: Depth measurement using MaxSonar #13489
    Sara Damiano
    Moderator

      I don’t remember exactly which models we’ve tested or which seems to be the best; maybe Shannon can pipe in.

      No matter which you’re using, definitely do get the MaxTemp.

      in reply to: Sleep code not working with Maxbotix 7389 #13488
      Sara Damiano
      Moderator

        Did the modification I suggested get your board to go back to sleep and stay asleep?

        in reply to: RS485 without auto direction control #13487
        Sara Damiano
        Moderator

          I’m sorry I haven’t responded. My family is finally finished with a fun round of stomach bugs.

          Were you by chance talking with @neilh or did you just happen to get to the same place at almost the same time coincidentally? Neil wrote up a fix for this in the SensorModbusMaster library, which I just accepted. If you update that library, you should be getting the fix. It might take 24 hours or so for the PlatformIO registry to catch the update on the library; if you’re ready to get the fix NOW you can uninstall and reinstall SensorModbusMaster using the github link instead of the library name.

          With the fix in SensorModbusMaster, is it finally working for you?

          I”m sorry for not being more helpful sooner!

          in reply to: RS485 without auto direction control #13475
          Sara Damiano
          Moderator

            Oops. I’d meant to cut the code using NeoSWSerial and SoftwareSerial from that particular example but apparently cut it only from the example platformio.ini file.

            Can you post your platformio.ini file? Are you using Atom or VSCode? It shouldn’t make a difference for the code; I’m just asking so I can help you better. What versions of all libraries do you have installed? Did you install any manually or let PlatformIO do the install? Are you sure you haven’t installed any twice? In your project’s folder, navigate to the .pio/libdeps/mayfly subfolder and look at all the folders within it. Do you see any library names in there twice (with a different suffix tagged onto the end of the folder name). If you see any repeats, the easiest solution is to delete everything and let PlatformIO reinstall just one version of each. Then update all your libraries and your platforms if you haven’t already. To do this, open a new terminal in PlatformIO with either the button or the menu. On Atom you can use the + icon on the bottom; on VSCode there should be a button on the very bottom left that looks like this: [> ]. In the terminal first update the platforms with the command “pio update”. Then update your project specific libraries with the command “pio lib update.” PlatformIO itself hasn’t been updated in a while, but you can verify that you’re running the lastest version with the command “pio upgrade.” After updating everything, make sure you clean out any older pre-compiled files by hitting the trashcan icon.

            When you say the board restarts, does it restart instantly or does it hang for 15 minutes and then restart? Please add these defines to your platformio.ini file and then post the output when the board is running. It might be very long; you can post it or attach it as a text file.

            in reply to: Multiple pins at one site in MMW #13472
            Sara Damiano
            Moderator

              Yeah, it’s a known issue.

              in reply to: RS485 without auto direction control #13463
              Sara Damiano
              Moderator

                I was feeling cocky after the LTC1480 worked and pulled out the Max485 and level shifters. Zero success with communication, but I didn’t have any problems with the program crashing.

                in reply to: RS485 without auto direction control #13462
                Sara Damiano
                Moderator

                  Ok, I broke out the 3.3V RS485 chip I have (an LTC1480) from the “someday I’ll test this” box. I’d bought the chip ages ago to try out in place of the (5V) MAX485 that I couldn’t ever get to work. But since the automatic flow control always worked nicely, I threw the LT1480 onto a shelf unopened.

                  Anyway, it worked for me. I made some very small tweaks to the SensorModbusMaster library to see if I could get the timing better, which helped a little, but it worked even without. I didn’t have any issues with the board restarting or anything.

                  Hm.. In my test I used AltSoftSerial (pins 5&6) as my serial and tried the RE_/DE on both pins 4 and A2. What exactly are your connections and what code exactly are you running?

                  in reply to: RS485 without auto direction control #13461
                  Sara Damiano
                  Moderator

                    Also, I’m really surprised you couldn’t find an adapter with automatic flow control. Where were you looking? There are a bunch on Amazon. This is one brand I’ve bought: https://www.amazon.com/SMAKN%C2%AE-Adapter-Serial-Converter-Module/dp/B010723BCE

                    in reply to: RS485 without auto direction control #13460
                    Sara Damiano
                    Moderator

                      I have never gotten the communication to work correctly using manual flow control, but it should not be causing your board to restart. I’ll look into it.

                      When using manual flow control, you have to set the direction pin high or low to change directions. The library does this, but I think there is a timing issue or something because my attempts at using it with a max485 and level shifters compeletely failed.

                      in reply to: Sleep code not working with Maxbotix 7389 #13455
                      Sara Damiano
                      Moderator

                        Well, actually, I forgot about the internal data filter. Leaving the sensor always powered will give time for that to come into play. I don’t know if it will help any, though.

                        Some thing else I thought about in your code: Even though you’re delaying for a second between calls to the SonarRead() function, you were actually parsing and keeping the first 10 readings the sensor took after power on (about 166ms apart) and just processing them 1 second apart. That’s because as long as the sonar is sending data (which is continuously while it is powered) and you’re listening to it with SoftwareSerial, the characters are being stored in the buffer. Once the buffer is full, they just get thrown away. Nothing comes out of the buffer until you read() it. When you do read it, you’re reading out in the order they were placed into the buffer, even if they were placed there a while ago. The fix I suggested for the sleep will also fix this because the end() will dump the buffer and it will be re-created empty at the begin().

                        I doubt going up to 25 attempts will make much of a difference.

                      Viewing 10 posts - 291 through 300 (of 465 total)