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 - 311 through 320 (of 371 total)
  • Author
    Posts
  • in reply to: AREF #12647
    neilh20
    Participant

      Hello Shannon/@shicks – thanks for the detail.I missed that it was an internal connection on the mega1284 to the 3.3V
      The issue with the 3.3V, is that it is connected to the LiIon through the regulator SPX3819.
      The regulator has a dropout that is variable depending on the load, temperature etc – so from the datasheet at load of 500mA it could be a potentially max of 700mv under some extreme conditions, but more likely to be the typical 340mV.
      So assuming that the LiIon V is measured before any load is applied ie less than 50mA, the max regulator dropout is 250mV, but more likely to be 125mV…
      So I am reading the datasheet, (and sometimes let out the smoke for getting it wrong 🙂 )…

      Taking worst case analysis – measurement of the LiIon V with std settings, below 3.5V could be distorted.

      Practically speaking I’m seeing a distortion of LiIon V when it drops below 4.1V, measured by BattV compared to an ExtVolt with 100K/100K. Still investigating – I’m probably got something wrong, but trying different options.

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

        Thankyou @fisherba thankyou!!!. I got the Xbee SB6 wifi communicating to data.envirodiy.org

        I’ve cloned locally github.com/EnviroDIY/ModularSensors
        then set to develop
        and copied
        enviroDIY\ModularSensors\examples\logging_to_EnviroDIY
        Arduino\env02\nanolevel

        Starting up platformIO I opened the folder Arduino\env02\nanolevel
        in platformio.ini I set
        [platformio]
        ;src_dir = logging_to_EnviroDIY
        src_dir = .

        [env:mayfly]

        lib_deps =
        https://github.com/EnviroDIY/ModularSensors#8f1d8b58c2b9813484feed77a6074f215ecbc3e3
        https://github.com/vshymanskyy/StreamDebugger

        https://github.com/PaulStoffregen/AltSoftSerial.git
        https://github.com/EnviroDIY/SoftwaterSerial_ExternalInts.git

        For my logging_to_EnviroDIY.ino
        I merged in specific updates for only Keller Nano
        I have the XBEE cmd stream showing with new StreamDebugger

        The commit – https://github.com/EnviroDIY/ModularSensors/commit/8f1d8b58c2b9813484feed77a6074f215ecbc3e3 seems to be there already, but I’ll do a manual compare.
        I use meldmerge.org – fantastic compare and merge tool.
        Thankyou @fisherba & @srgdamiano for the pointers – there are a lot of changes in ‘develop’ – I can’t imagine how to track them.
        Amazing work @srgdamiano for bringing it all together
        I’ll let my mayfly+xbee run on my desk and see what happens.

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

          Just wondering if I should be able to build from the develop or whether there are dependencies that make it too complex.
          If I need to just wait until it gets to master – then thats OK as well, but if its useful;

          I’m using GitHub Desktop (latest 1.4.2)
          I switch to ModuleSensors which map to https://github.com/EnviroDIY/ModularSensors.git and maps to my c: git\envirodiy\ModularSensors
          Fetch origin shows just updated
          I set current branch to develop
          In Git Power shell I have
          C:\Users\neilh77\git\envirodiy\ModularSensors\examples\logging_to_EnviroDIY [develop]> ls
          Directory: C:\Users\neilh77\git\envirodiy\ModularSensors\examples\logging_to_EnviroDIY

          Mode LastWriteTime Length Name
          —- ————- —— —-
          -a—- 10/11/2018 12:10 PM 44318 logging_to_EnviroDIY.ino
          -a—- 10/11/2018 4:33 PM 760 platformio.ini
          -a—- 10/4/2018 10:25 AM 917 ReadMe.md

          I start up VS with PlatformIO
          File->Open Folder->C:\Users\neilh77\git\envirodiy\ModularSensors\examples\logging_to_EnviroDIY
          I then press the icon “trash can” PlatformIO Clean
          > Executing task: C:\Users\neilh77\.platformio\penv\Scripts\platformio.exe run –target clean <

          Processing mayfly (framework: arduino; platform: atmelavr; board: mayfly)
          —————————————————————————————————————————————————————–
          LibraryManager: Installing id=1648 @ =0.15.3
          Error: Could not find a version that satisfies the requirement ‘=0.15.3’ for your system ‘windows_amd64’
          The terminal process terminated with exit code: 1

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

            Thanks for the status 🙂 very much appreciate its a a work in progress – sometimes it just figuring it out. Its great to have it visible on github and to get pointers.
            For software stability, testing is everything, and the options for boards and modems are a matrix.
            For the record using the Xbee WiFi S6 hybrid, the current master branch as of this date needs updates to ModemOnOff.cpp to manage the PowerOnOff
            With those updates I ran the Xbee Wifi last night posting to data.envirodiy.org
            However alot the changes/work that has been performed since May and ModemOnOff.cpp functions are merged into another class – and I’m still exploring what has changed – so will continue that when the changes are released.

            I do appreciate everyone’s pointers – and also when there is a lot of work being released – sometimes the best for any outsider (me) is just to support with testing when it becomes appropriate, and of course lots of learning about the changes.

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

              Ok thanks – great eye – I caught a couple of spaces when I pasted it in, but the last GUID was later
              Now I am posting and getting 201 back.

              So a question -if I’m going to submit updates – should I be working of the master branch or the develop branch?
              currently I have library from May 24th update of
              https://github.com/EnviroDIY/ModularSensors/blob/master/examples/logging_to_EnviroDIY/platformio.ini
              lib_deps =
              EnviroDIY_ModularSensors@>=0.12.2

              ………………
              Clock interrupt!
              Current Unix Timestamp: 1539171120
              Logging interval in seconds: 300
              Mod of Logging Interval: 120
              Number of Readings so far: 0
              Mod of 120: 0
              Time marked at (unix): 1539171120
              year: 2018
              month: 10
              date: 10
              hour: 11
              minute: 32
              second: 0
              Time marked at [char]: 2018-10-10T11:32:00-08:00
              Time to log!
              Local:RS485on–
              Turning modem on.
              nhTurning modem on by setting pin 23 to 0.
              Modem now on.
              Powering sensors…
              Skipping modem in sensor power up!
              Waking sensors…
              Updating sensor values…

              Waiting up to 5 seconds for modem to respond to AT commands…
              [12578] < 1 >
              [12582] ### AT:
              [12584] < 1 >
              [12593] ### AT: CN
              [12595] < 1 >
              [12814] < 1 >
              [12822] ### AT: AI
              [12830] ### AT: CN
              [12832] < 1 >
              No prior internet connection, attempting to make a connection.
              Waiting up to 5 seconds for modem to respond to AT commands…
              [13060] < 1 >
              [13064] ### AT:
              [13066] < 1 >
              [13074] ### AT: CN
              [13076] < 1 >

              Waiting up to 5 seconds for WiFi network…
              [13297] < 1 >
              [13303] ### AT: AI
              [13314] ### AT: CN
              [13316] < 1 >
              Sending credentials…
              [13535] < 1 >
              [13543] ### AT: EE 2
              [13547] < 1 >
              ……
              [13604] ### AT: WR
              [13635] < 1 >
              [13643] ### AT: AC
              [13647] < 1 >
              [13654] ### AT: CN
              [13658] < 1 >
              [13877] < 1 >
              [13883] ### AT: AI
              [13891] ### AT: CN
              ……
              [18872] < 1 >
              [18878] ### AT: AI
              [18888] ### AT: CN
              [18890] < 1 >
              … Connection failed
              Connecting to NIST daytime server to check connection strength…
              Connecting to 129.6.15.30…[19116] < 1 >
              [19124] ### AT: IP 1
              [19128] < 1 >
              [19146] ### AT: DL 129.6.15.30
              [19150] < 1 >
              [19159] ### AT: DE 25
              [19163] < 1 >
              [19169] ### AT: WR
              [19202] < 1 >
              [19208] ### AT: AC
              [19212] < 1 >
              [19218] ### AT: CN
              [19222] < 1 >
              …Success!
              Getting signal quality:
              [19550] < 1 >
              [19556] ### AT: LM
              [19566] ### AT: CN
              [19568] < 1 >
              RSSI: 162
              Percent signal strength: 0
              Get Values:
              Pressure_mbar:3.18
              Temp_C: 17.18
              Height_m:0.03
              Get Values:
              Pressure_mbar:3.17
              Temp_C: 17.16
              Height_m:0.03
              Get Values:
              Pressure_mbar:3.17
              Temp_C: 17.16
              Height_m:0.03
              Putting sensors back to sleep…
              Cutting sensor power…
              Skipping modem in sensor power down!
              Local:RS485off–
              Connecting to the Internet…

              Waiting up to 5 seconds for modem to respond to AT commands…
              [24643] < 1 >
              [24647] ### AT:
              [24649] < 1 >
              [24657] ### AT: CN
              [24659] < 1 >

              Waiting up to 50 seconds for WiFi network…
              [24879] < 1 >
              [24887] ### AT: AI
              [24895] ### AT: CN
              [24897] < 1 >
              … Connected with saved WiFi settings!
              Connecting to data.envirodiy.org…[25120] < 1 >
              [25145] ### AT: LA data.envirodiy.org
              [25288] ### AT: IP 1
              [25290] < 1 >
              [25313] ### AT: DL 129.123.41.212
              [25317] < 1 >
              [25325] ### AT: DE 50
              [25329] < 1 >
              [25335] ### AT: WR
              [25368] < 1 >
              [25374] ### AT: AC
              [25378] < 1 >
              [25387] ### AT: CN
              [25389] < 1 >
              …Success!

              \/—- Post Request to EnviroDIY —-\/
              POST /api/data-stream/ HTTP/1.1
              Host: data.envirodiy.org
              TOKEN: 7b19191b-b3d6-416d-9e07-4fbe549f2493
              Content-Length: 334
              Content-Type: application/json

              {“sampling_feature”: “b918f150-4fff-424d-813a-a69a808a93b6”, “timestamp”: “2018-10-10T11:32:00-08:00”, “3907922a-56fe-46f3-a56e-9de6b77d3679”: 21.25, “f40a9dff-2c54-43ae-a016-1c5095c188eb”: 0.0324, “7bc30855-ae08-4865-ab89-a8e17df93bfc”: 17.16, “2c58e64d-6b66-4d9e-b893-bfdb10b65426”: 3.972, “0cf94fc8-a5d2-4fbe-82f2-2a81650575a8”: 0}

              [26597] < 1 >
              [26605] ### AT: TM0
              [26609] < 1 >
              [26615] ### AT: WR
              [26648] < 1 >
              [26654] ### AT: AC
              [26658] < 1 >
              [26664] ### AT: CN
              [26669] < 1 >
              [26888] < 1 >
              [26896] ### AT: TM64
              [26900] < 1 >
              [26906] ### AT: WR
              [26939] < 1 >
              [26945] ### AT: AC
              [26949] < 1 >
              [26955] ### AT: CN
              [26959] < 1 >
              Closed TCP/IP.
              — Response Code —
              201
              Running a daily clock sync…
              Disconnecting from the Internet…
              Turning modem off.
              Turning modem off by setting pin 23 to 1.
              Modem now off.
              Successfully connected to SD Card with card/slave select on pin 12
              Opened existing file: nh06d_2018-10-10.csv

              \/—- Line Saved to SD Card —-\/
              2018-10-10 11:32:00,21.25,0.0324,17.16,3.972,0

              ——————————————

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

                Got Xbee Sleep access fixed.
                I’m now communicating to the Xbee Wifi and getting NIST time.
                Looks like an error on post.

                Fixed the Xbee Sleep access;
                envirodiy\ModularSensors\src\ModemOnOff.cpp
                bool heldOnOff::on(void)
                //digitalWrite(_modemSleepRqPin, HIGH);
                digitalWrite(_modemSleepRqPin,_isHighWhenOn) ;

                bool heldOnOff::off(void)
                //digitalWrite(_modemSleepRqPin, LOW);
                digitalWrite(_modemSleepRqPin,!_isHighWhenOn);

                <start log of post>
                \/—- Post Request to EnviroDIY —-\/
                POST /api/data-stream/ HTTP/1.1
                Host: data.envirodiy.org
                TOKEN: 7b19191b-b3d6-416d-9e07-4fbe549f2493
                Content-Length: 334
                Content-Type: application/json

                {“sampling_feature”: “b918f150-4fff-424d-813a-a69a808a93b6”, “timestamp”: “2018-10-09T16:58:00-08:00”, “3907922a-56fe-46f3-a56e-9de6b77d3679”: 23.50, “f40a9dff-2c54-43ae-a016-1c5095c188eb”: 0.0323, “7bc30855-ae08-4865-ab89-a8e17df93bfc”: 19.24, “2c58e64d-6b66-4d9e-b893-bfdb10b65426”: 4.457, “0cf94fc8-a5d2-4fbe-82f2-2a81650575a8 “: 0}

                [26306] ### Unhandled: r: nginx/1.10.3 (Ubuntu)

                Date: Wed, 10 Oct 2018 00:58:14 GMT

                th: 78

                Connection: keep-alive

                Vary: Accept

                X-Frame-Options: SAMEORIGIN

                Allow: POST, OPTIONS

                {“detail”:”JSON parse error – Expecting object: line 1 column 334 (char 333)”}HTTP/1.1 400 Bad Request

                Server: n

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

                  Hi @srgdamiano, Thanks for the headsup on new enviroDIY/TinyGSM release. I can see init changes on https://github.com/EnviroDIY/TinyGSM/branches

                  I did start with Mayfly setup:
                  const char *wifiId = “MyGuest”; // The WiFi access point, unnecessary for gprs
                  const char *wifiPwd = “”; // The password for connecting to WiFi, unnecessary for gprs
                  const long ModemBaud = 9600; // Default for XBee is 9600, I’ve sped mine up to 57600
                  const int8_t modemSleepRqPin = 23;//23; // Modem SleepRq Pin (for sleep requests) (-1 if unconnected)
                  const int8_t modemStatusPin = 19;//BEECTS;//19; // Modem Status Pin (indicates power status) (-1 if unconnected)
                  const int8_t modemVCCPin = -1; // Modem power pin, if it can be turned on or off (-1 if unconnected)
                  ModemSleepType ModemSleepMode = modem_sleep_reverse; // How the modem is put to sleep

                  and thats when it initialized and then hung. XCTU showed MyGuest, Encryption Enable, PK Passphrase empty (which it always shows as empty, it seems its a write only field for pwds!).
                  So connecting a logic analyzer on XbeeWifi pins the modemSleepRqPin wasn’t requesting wake state and sending data to a sleeping Xbee – so after about 3hrs of tracing input to the XbeeWifi module I figured I was getting it wrong.

                  So checking the updates pending on EnviroDIY/TinyGSM I figure I should use your new release (thanks for all the updates to vshymanskyy/TinyGSM) and then try again.
                  So to try again with the Mayfly, I think should
                  1) Reset the XBEE WiFi module to defaults via XCTU
                  2) Set “logging_to_EnviroDIY.ino” to sleep mode as above and then Monitor the modemSleepRqPin and modemStatusPin and Tx & Rx
                  and see if it works.

                  I can go onto a different project until the new EnviroDIY/TinyGSM lib is released.
                  Alternatively, if it would be useful to you, I could attempt a pre – release build of enviroDIY/TinyGSM (master or original?).

                  Here is my current log
                  <start log with pins enabled, and WiFi configured********************************>
                  Now running logging_to_EnviroDIY.ino on Logger nh06c
                  Logger timezone is UTC-8
                  RTC timezone is UTC
                  Creating a new on/off method for the Digi XBee with power on pin -1 status on pin 19 and on/off by holding pin 23 low.
                  Creating a new TinyGSM modem and client for the Digi XBee…
                  Initializing Digi XBee…
                  [1863] ### Modem: Digi XBee® Wi-Fi
                  … Complete!
                  Modem attached!
                  Pin 8 set as LED alert pin
                  Pin 21 set as testing mode entry pin
                  Registration token set!
                  Sampling feature UUID set!
                  Current RTC time is: 2000-01-06T11:00:22-08:00
                  Setting up logger nh06c to record at 10 minute intervals.
                  This logger has a variable array with 7 variables, of which 7 come from 4 sensors and 0 are calculated.
                  Successfully connected to SD Card with card/slave select on pin 12
                  Opened existing file: nh06c_2000-01-06.csv
                  Data will be saved as nh06c_2000-01-06.csv
                  This logger is also tied to a NO MODEM SELECTED for internet connectivity.
                  Turning modem on.
                  Skipping modem in sensor power up!
                  Skipping modem in sensor power down!
                  Attempting to synchronize RTC with NIST
                  This may take up to two minutes!

                  Waiting up to 5 seconds for modem to respond to AT commands…

                  Modem does not respond to AT commands!
                  Turning modem off.
                  Clock interrupt!
                  Push button on pin 21 at any time to enter sensor testing mode.
                  Logger setup finished!
                  ——————————————

                  Cloÿ,HZ·terrupt!
                  Clock interrupt!
                  Current Unix Timestamp: 947156460
                  Logging interval in seconds: 600
                  Mod of Logging Interval: 60
                  Number of Readings so far: 0
                  Mod of 120: 60
                  Not time yet.

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

                    Just wondering is anybody is using the Digi Xbee S6 module.
                    I’m trying it as my first test module
                    I have an open guest wifi that I’ve used.
                    It initialled configured it -.
                    const char *wifiId = “MyGuest”; // The WiFi access point, unnecessary for gprs
                    const char *wifiPwd = “”; // The password for connecting to WiFi, unnecessary for gprs
                    It powered up, and didn’t appear to work.
                    So enabled logging that I could find.
                    it became all strange..
                    I put it on XCTU/XBIB to read it and could see it did the WiFiID – but then it started behaving strangely
                    So I’ve changed to this
                    #if defined(TINY_GSM_MODEM_XBEE)
                    const long ModemBaud = 9600; // Default for XBee is 9600, I’ve sped mine up to 57600
                    const int8_t modemSleepRqPin = -1;//23; // Modem SleepRq Pin (for sleep requests) (-1 if unconnected)
                    const int8_t modemStatusPin = -1;//BEECTS;//19; // Modem Status Pin (indicates power status) (-1 if unconnected)
                    const int8_t modemVCCPin = -1; // Modem power pin, if it can be turned on or off (-1 if unconnected)
                    ModemSleepType ModemSleepMode = modem_sleep_reverse; // How the modem is put to sleep

                    and from reset I get the following
                    with the last two sets of commands goign to the XBEE WiFi
                    ATAC\r response OK\r
                    ATHS\r 601\r
                    ATCN\r OK\r
                    then
                    +++ response OK\r
                    ATS1\r OK\r
                    ATS0200\r OK\r
                    ATWR\r OK\r
                    ATAC\r OK\r
                    ATCN\r OK\r
                    then nothing ….
                    It looks like it looses or is reinitialized from knowing its an XBEE Wifi
                    Any suggestions on how to configure Xbee WiFi. I haven’t worked through the AT cmd set as I think I’m doing something wrong 🙁

                    —————-The terminal output from reset—
                    Now running logging_to_EnviroDIY.ino on Logger nh06b
                    Logger timezone is UTC-8
                    RTC timezone is UTC
                    Creating a new on/off method for the Digi XBee with power on pin -1 status on pin -1 and on/off by holding pin -1 low.
                    Creating a new TinyGSM modem and client for the Digi XBee…
                    Initializing Digi XBee…
                    [1863] ### Modem: Digi XBee® Wi-Fi
                    … Complete!
                    Modem attached!
                    Pin 8 set as LED alert pin
                    Pin 21 set as testing mode entry pin
                    Registration token set!
                    Sampling feature UUID set!
                    Current RTC time is: 2000-01-02T18:01:54-08:00
                    Setting up logger nh06b to record at 10 minute intervals.
                    This logger has a variable array with 7 variables, of which 7 come from 4 sensors and 0 are calculated.
                    Successfully connected to SD Card with card/slave select on pin 12
                    Opened existing file: nh06b_2000-01-02.csv
                    Data will be saved as nh06b_2000-01-02.csv
                    This logger is also tied to a NO MODEM SELECTED for internet connectivity.
                    Turning modem on.
                    Skipping modem in sensor power up!
                    Skipping modem in sensor power down!
                    Attempting to synchronize RTC with NIST
                    This may take up to two minutes!

                    Waiting up to 5 seconds for modem to respond to AT commands…

                    Modem does not respond to AT commands!
                    Turning modem off.
                    Push button on pin 21 at any time to enter sensor testing mode.
                    Logger setup finished!
                    ——————————————

                    Current Unix Timestamp: 946836120
                    Logging interval in seconds: 600
                    Mod of Logging Interval: 120
                    Number of Readings so far: 0
                    Mod of 120: 0
                    Time marked at (unix): 946836120
                    year: 2000
                    month: 1
                    date: 2
                    hour: 18
                    minute: 2
                    second: 0
                    Time marked at [char]: 2000-01-02T18:02:00-08:00
                    Time to log!

                    in reply to: XBee Networks of Mayfly Loggers – 900Mhz #12583
                    neilh20
                    Participant

                      Had this come through –
                      https://www.crowdsupply.com/silicognition/wesp32 – POE ESP supposedly first delivery mid-Dec
                      https://github.com/espressif/arduino-esp32 No idea how well an Arduino XBP900 interface would work with this.

                      I personally have found PoE 802.15af has worked very well for “borrowing” some space on some other entities building.
                      It has meant a long drill for going through an insulated wall, and physical access to the network somewhere in the building. Building maintenance is used to being helpful. It has been easier than IT WiFi access that is nervous about network breaches, and changing passwords.

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

                        Hi @srgdamiano

                        SensorBase Class – I’m a C guy trying for some class – but I’ll take the power switching where ever those in the higher classes deem it 🙂 Let me know where I could pull from when its available.

                        I hear you about AltSoftSerial – I got a gray hair just thinking about it – but its the way RS485 wingboard plugs into the Mayfly and so far its worked. It seems awfully dependent on playing nice with interrupts.

                        Now there is such good software available – if the AltSoftSerial fails I’ll have to think of a hardware solution – possibly moving the RS485 from connector J4 to J3….. but even then start to get into limitations with serial ports – one is needed for debug and one is needed for XBEE .
                        Oh well the world of Arm with 4+ serial ports is in another universe – I have my favourite MKL27Z256 – builtin USB, RTC, ADC16bit, 32Ksram – and costs same mega1284. Same family as TeensyLC, but has ROM bootloader like mega1284. I have one running on another board – Oh well.!!

                        Thanks for the headsup on LTE-M – good to hear that some people have it working with Hologram network – I understand from another project that I’m on that LTE-M’s coverage is extending. I haven’t found a map yet of coverage – but will keep ears open.
                        I imagine you know about the 2G network changes https://www.envirodiy.org/wild-wireless-world-2g-or-3g/

                      Viewing 10 posts - 311 through 320 (of 371 total)