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

neilh20

Forum Replies Created

Viewing 10 posts - 331 through 340 (of 377 total)
  • Author
    Posts
  • in reply to: Newbie Mayfly Setup for RS485 sensor to internet #12528
    neilh20
    Participant

      Hi @srgdamiano – wonderful to work through the code. Very readable and nicely laid out. Very nice to step through the classes. I’m mostly used C, TinyOS/nesC, Python and now JS. But great to see realtime cpp -all on mega1284 device!!!

      DEBUGGING: that was what I was looking for. after seeing a line in the macro file I was guessing some trick out there… now I see in KellerParent.h
      // #define DEBUGGING_SERIAL_OUTPUT Serial
      // #define DEEP_DEBUGGING_SERIAL_OUTPUT Serial
      #include “ModSensorDebugger.h”

      So a general question – it looks like when it comes time to start sensor reading,
      there is no opportunity to say connect to the cloud after every Xth sample or after 4hrs ?
      Typically I’ve seen with 3G modems that it spends 1minute at high current (0.7A) finding the tower and setting up the tcp link. Then the data is pushed fast and closes down.
      So just wondering about that.

      Also wondering if a wireless connection fails, is there a fall back method for pushing the readings later.
      I have had some sites in the past that did not connect for two weeks as they are on the edge of the zone, and it gets a cloudy for two weeks and no RF.

      in reply to: Newbie Mayfly Setup for RS485 sensor to internet #12521
      neilh20
      Participant

        Gosh thanks for the info. Definitely very useful.

        Sara some amazing classes you’ve put together. Thankyou Thankyou.

        They really hummed for me. Still amazed the way they hang together – that’s the fun of optimizing it makes it look simple.
        I usually add a serial debug with a time stamp to watch how long it takes.
        Just wondering – I can see some debug capability built in MS_DBG macro – is it possible to enable it, or the serial debug in some way.
        I tried adding to platformio.ini
        build_flags = -DDEBUGGING_SERIAL_OUTPUT
        and it compiled some modules, and then came up with an error somewhere – making it look like it should only be done on specific files.?

        For the keller nanolevel it wouldn’t respond to the same modbus requests as Keller acculevel 🙁 – so I ended up having to change the message structure to what I had used on another project.

        I expanded “enum kellerModel” and introduced _model to the kellerMobdus – following yosemitech. Its some very ace class structures…

        So effectively I’ve created a KellerNanolevel.h and modified KellerParent.h/cpp and KellerModbus.cpp/h. Would you like me to submit a pull request for it.?
        PlatformIO is very flexible, and to get started (hadn’t read your emails) I ended up with
        Documents\Arduino\env01\nanolevel\logging_to_EnviroDIY.ino and platformio.ini
        In platformio.ini
        [platformio]
        ;src_dir = logging_to_EnviroDIY
        src_dir = .

        Then created
        Documents\Arduino\env01\nanolevel\lib\KellerNanolevel\src – where it automatically looked for source files
        and then copied in files and gave them unique names to make changes
        KellerNanolevel.h KellerNanoParent.h KellerNanoParent.cpp

        Cheers

        So an output with my new sensor enabled and the internal sensors.

        Data Logger: nh05a ExternalVoltage MaximDS3231 KellerNanolevel KellerNanolevel EnviroDIY Mayfly
        Data Logger: nh05a voltage temperatureDatalogger gaugeHeight temperature Free SRAM batteryVoltage
        Data Logger: nh05a volt degreeCelsius meter degreeCelsius Bit volt

        Date and Time in UTC-8 extVoltage BoardTemp kellerHeight kellerTemp FreeRam Battery
        1/3/2000 15:22 5.89625 23.5 -0.0053 22.35 12758 13.387
        1/3/2000 15:30 5.89125 23.5 -0.0053 22.37 12758 13.387
        1/3/2000 15:32 5.89625 23.5 -0.0052 22.39 12758 13.387

        in reply to: Newbie Mayfly Setup for RS485 sensor to internet #12463
        neilh20
        Participant

          Thanks @fisherba..
          Great to see your code..

          I’m trying though to see how I get up and going with PlatformIO

          https://github.com/EnviroDIY/ModularSensors/tree/master/examples/logging_to_EnviroDIY
          There is a platformio.ini

          I’ve forked and then cloned into my local machine such that I have
          C:\Users\neilh77\git\envirodiynh\ModularSensors\examples\logging_to_EnviroDIY

          I’ve downloaded the Visual Studio, and enabled the Platformio plugin
          It has arduino
          C:\Users\neilh77\.platformio\packages\framework-arduinoavr\cores\arduino
          I cloned;
          C:\Users\neilh77\git\platform-atmelavr\examples\arduino-blink>
          modified the .ini board=mayfly and ran and downloaded OK

          Then …. prompted by a lot of trial and error …4hrs of random typing and with sporadic glazed reading of .htmls …. finally this seemed to be the effect

          envirodiynh\ModularSensors\examples\logging_to_EnviroDIY
          I created a directory logging_to_EnviroDIY
          I took the logging_to_EnviroDIY.ino and renamed it into logging_to_EnviroDIY\logging_to_EnviroDIY.cpp

          then at the TERMINAL
          C:\Users\neilh77\git\envirodiynh\ModularSensors\examples\logging_to_EnviroDIY>
          entered
          >platformio run

          and something automagical seem to happen, getting libraries
          and it built.

          Compiling .pioenvs\mayfly\lib31b\EnviroDIY_ModularSensors_ID1648\YosemitechParent.cpp.o
          Compiling .pioenvs\mayfly\lib3ac\AltSoftSerial\AltSoftSerial.cpp.o
          Compiling .pioenvs\mayfly\libff4\SoftwareSerial_ExtInts\SoftwareSerial_ExtInts.cpp.o
          Archiving .pioenvs\mayfly\libFrameworkArduinoVariant.a
          Compiling .pioenvs\mayfly\FrameworkArduino\CDC.cpp.o
          Archiving .pioenvs\mayfly\lib3ac\libAltSoftSerial.a
          Archiving .pioenvs\mayfly\lib31b\libEnviroDIY_ModularSensors_ID1648.a
          Archiving .pioenvs\mayfly\libff4\libSoftwareSerial_ExtInts.a
          Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial0.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial1.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial2.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial3.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\IPAddress.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\PluggableUSB.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\Print.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\Stream.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\Tone.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\USBCore.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\WInterrupts.c.o
          Compiling .pioenvs\mayfly\FrameworkArduino\WMath.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\WString.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\abi.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\hooks.c.o
          Compiling .pioenvs\mayfly\FrameworkArduino\main.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\new.cpp.o
          Compiling .pioenvs\mayfly\FrameworkArduino\wiring.c.o
          Compiling .pioenvs\mayfly\FrameworkArduino\wiring_analog.c.o
          Compiling .pioenvs\mayfly\FrameworkArduino\wiring_digital.c.o
          Compiling .pioenvs\mayfly\FrameworkArduino\wiring_pulse.S.o
          Compiling .pioenvs\mayfly\FrameworkArduino\wiring_pulse.c.o
          Compiling .pioenvs\mayfly\FrameworkArduino\wiring_shift.c.o
          Archiving .pioenvs\mayfly\libFrameworkArduino.a
          Linking .pioenvs\mayfly\firmware.elf
          Checking size .pioenvs\mayfly\firmware.elf
          Building .pioenvs\mayfly\firmware.hex
          Memory Usage -> http://bit.ly/pio-memory-usage
          DATA: [====== ] 64.3% (used 10537 bytes from 16384 bytes)
          PROGRAM: [======== ] 80.4% (used 104532 bytes from 130048 bytes)

          WOW WOW

            WOW

          YaaaaaaYippppeeee

          guess I try looking at the code now and see what its supposed to do …. but that might be Saturday

          in reply to: BOM #12392
          neilh20
          Participant

            HI Beth,
            many thanks for the pointers and for @aufdenkampe system level parts.
            I haven’t used the Mayfly before though I got Mayfly 0.4 and chatted with Shannon when she was in San Francisco.
            I’m building a test capability for interfacing to Keller Nanolevel depth sensor – RS485/Wingboard/Mayfly 0.5b.
            If I can juggle it, and pull together a remote monitoring of low water levels in streams using the Nanolevel I hope to share it at the 2019 Apr23rd https://www.calsalmon.org/conferences/37th-annual-salmonid-restoration-conference. It turns out low stream flow monitoring in the last 25mm of water, with diurnal temperature fluctuations and remote stream valleys, is challenging.

            again thanks for the pointers, just put out a Digikey order.
            regards

            in reply to: Mayfly availability – July 2018 #12385
            neilh20
            Participant

              Fantastic. Amazon pic silk screens says 0.5. Thats a great change to be able to power directly from the LiPo

              in reply to: Mayfly availability – July 2018 #12383
              neilh20
              Participant

                Hello, great to see inventory on Amazon.
                Is the board rev0.5 or rev0.5b.?
                The current board on amazon shows a rev 0.5 – so I’m checking. Seems to me the rev0.5b would support a Cell phone in the Xbee skt with the new rev 0.5b power routing option. I’m auditing to see if I could use the new XB3-C-A2-UT-001 Digi CATM/NBIOT modem (Digikey $69). The CAT-M1 is new – but should provide quicker connection which is lower power and greater distance https://www.u-blox.com/en/lte-cat-m1

                in reply to: Modify SW5V boost to 12V #12212
                neilh20
                Participant

                  Hello @aufdenkampe,
                  Great to hear you are doing a power shield with capability to deliver to the EnviroDIY water quality data portal.
                  There hasn’t been a hw solution yet that I liked, that so I haven’t done anything with the Arduino libs. Maybe that will change.:)
                  I’m planning on doing a poster at http://calsalmon.org/conferences/36th-annual-salmonid-restoration-conference on different types of pressure sensors for “measuring low water levels accurately across a 10C diurnal change in temperature.”
                  If you have a solution (or a plan) to have a switchable +12V from a low cost solar powered storage source I’d be happy to reference it.
                  My objective is switchable +12V powered sensors, with low cost power storage, charging from ~15W solar panel, with a comms solution that can deliver the reading to an internet location and be accessed over the internet.
                  The assumption is that sensor depth readings are taken every 15minutes, and cellular data is pushed ~ 1-4Hrs.
                  The system shuts down inbetween activity and takes less than 0.5mA.
                  The power storage design assumes little sunlight for storms that are two weeks at a time in parts of the year.
                  Dynamic power issues are of course Cellphones(2G/3G) can take ~0.7A for about a 1Minute to connect and deliver to an internet location.

                  I did a software prototype on Nuttx(PX4)/Olimex H407, but gave up when I scoped the amount of work still needed to support some of the basic Nuttx subsystems.
                  It has been running for over a year on the H407 board with external +12V, reading a Keller Nanolevel over RS485 and pushing to Thingspeak/ParticileWiFi
                  I haven’t attempted to standardize on the modbus lib – so its probably not very useful.
                  See modbusm_poll_device()
                  https://bitbucket.org/neilh20/nuttapps/src/e4d5088e591b0f126fc0e8b6b3662f6ffd3cbfcf/examples/modbus/master1/modbusm_user.c?at=dvlp_ensy1&fileviewer=file-view-default
                  The results are visible through http://azonde.info/pm2/WaterDepthTempNanoLevel.htm that pulls from thingspeak.

                  in reply to: Deployment options #4135
                  neilh20
                  Participant

                    Hi @bumpersp
                    Great question.
                    Installation is what the systems needed to be built for, as it brings it all together.

                    I’ve been building and testing equipment for deployment in small to mediums sized streams in N California, and occasionally been out with the Hydrologists that will later on be doing the stream rating curves.
                    My part has been to build the equipment and test in a safe location – in the industry we call it “staging the equipment”.
                    It’s so much easier to verify the equipment works and is reliable by first building it in a safe location, letting it soak for a couple of days, with all the tools and cellular connectivity.

                    For the location in the stream bed, its best to do a survey – geographical and RF – go there with a cellphone on the network you are going to use, and then see if there is a signal.

                    There are cell phone Apps that will help track the strength of a signal on a network as you move around. I have eneded up with two phones for ATT 2G and ATT 3G network to map where the 2G network had been removed.


                    If you are looking to deploy a 2G network, know when it is likely to be sunsetted – I even here ATT 3G sunset dates are being mentioned.
                    For the cellular providers, rural areas have a different cellular network installation criteria than urban networks
                    For the geographical instream locaiton – I imagine you are looking for a reliable place to be able to measure amongst other items stream flow. For that the hydrologists I’ve been out with look for a pool with a stable down stream riffle. The down stream riffle defines the ability to do the rating curve.
                    One aspect of the measurement location is that the measured depth is often impacted by the diurnal temperature cycle of the water, so its valuable also to have a temperature sensor on the depth measurement.
                    If you aren’t likely to be doing stream flow rating curves, it does make the installation location easier.
                    Perhaps people who have experience of the Decagon CTD can comment on what they have found is optimial for it – as the EC may require water flowing round it to be useful.
                    So on the one hand for the sensor its valuable to have a pool with a stable stream, and the RF needs to be able to find the cellular network signal – the cellular radio horizon. Cellular radio signals don’t go through the earth very well. In N california we tend to have deep ravines for the streams, and its very tricky. For other locations maybe the geography is kinder.

                    Then we measure the difference between the inpool measurement position and where the logger is going to – this is the length of waterproof line that sensor needs to have.

                    Typically we are then going to mount the logger/battery housing on a pole/tree/fence above the flood line – with a reasonable solar aspect, and run a flexible conduit down to the stream side. Sometimes this has been 100′.
                    The sensors cable needs to pull through the protective conduit. So the protectective conduit inner diameter must be able to take the maximium dia of the sensor cable bundle.
                    Typically we use a plumbers pull line, and have to figure out how to carefully attach the cable bundle (including sensors) to the plull line.

                    Its conceivable, depending on the sensor cable lengths that you could put one environmental housing for the sensor termination and venting, and then run a 2nd extension cable to different location where the logger/RF signal/solar panel are optimal. Then there needs to be infield cable connections.

                    For fixing in the stream, I recommend the active part of the measurement sensor should be kept 6″ below the surface level for where flow measurements are being made. Typically sensors don’t know where the 0 water level is (they are typically a pressure sensor of some sort), and the least accurate part of measuring is close to 0.
                    The hydrologists I’ve worked with have fixed the sensors firmly in the stream on roots of trees, or with a rebar post. Equally important is then the flexible conduit is well tied down, and prevented from oscillating, when water flows across it.

                    Finally when its all installed, its valuable to have a way of verifying that the data is flowing through to the final destination – which typically is by bringing up the website on a cellphone and checking that its reported in at least once.

                    All cable entries to the enclosures benefit from good down ward drip line practises.

                    Well hope this is useful, and good luck – send some pictures of your locations. 🙂

                    in reply to: Modify SW5V boost to 12V #2487
                    neilh20
                    Participant

                      Hello @aufdenkampe
                      I was just wondering, for the Modbus/Keller Acculevel, for field deployment what you are doing for powering/mechanical and pushing to your intranet. Perhaps this is a topic by itself, be interested to discuss as I’m developing some circuits for same 🙂

                      in reply to: Modify SW5V boost to 12V #2485
                      neilh20
                      Participant

                        Hi Anthony, great to see the SensorModbusMaster detail.

                        FYI for the Keller Acculevel I found they had the CRC16 bytes switched around. Its well documented in the manual “Keller CRC16.

                        Also, if you are looking for accurate measurement at low levels of stream depth with low temperature dependency I’ve found the Keller Nanolevel to be about +/-0.05% across TEB. It uses a capactive sensor rather than the piezo resistive sensor of the acculelvel series. However it only has a range of 0-11′, and wider sensor body.
                        When considering the accuracy of the Acculevel, in discussion with Keller, I found their base level accuracy TEB (Total Error Band) is for +/-30′ Full Scale – so specifying a sensor with a range of less than that, the TEB is still for +/-30′. Not so much of a problem if the water temperature is constant in deeper water, but becomes relevant for measuring low water levels were there can be significant temperature shifts over a day.

                        The Keller devices allow for a number of types of jackets – “Polyethelene for general purpose” ie water is now recommended. The early Acculevel datasheets and Instrumart techsupport recommended Hytrel jacket and these developed fissures after only 6months in the water, and had to be replaced – a lot of field work.

                      Viewing 10 posts - 331 through 340 (of 377 total)