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

Cal

Forum Replies Created

Viewing 10 posts - 21 through 30 (of 32 total)
  • Author
    Posts
  • in reply to: Battery Power Options #12843
    Cal
    Participant

      I’m planning to replace some existing datalogging equipment with the Mayfly and keep some of the existing power equipment.

      Today I have several stations each with Campbell Scientific dataloggers & sensors, standalone modems, solar panels, lead-acid batteries and charging circuits. The equipment is all 12v based. My desire is to pull out the dataloggers and modems and replace them with Mayflies + Digi modem modules. I have all the software working which includes interfacing the CS pressure transducers and cellular communications.

      The question is: can I use/keep the existing power (12v 8aH battery, 24v solar panel and charging circuit) and how should I connect to the Mayfly? Also – do I need a LiPo battery to supply the modem?

      Thanks for any ideas/help. – Cal

      in reply to: GPRSBee #12750
      Cal
      Participant

        Mdean,

        When I went to Carrier Profile 2 (at&t) instead of CP 0, my connect time decreased by about 1 minute. Not a huge improvement. I’m hoping my long connect time is due to poor cell signal or bad configuration – and not a modem problem. I’m going to try to travel to a better area this weekend and see if I get connected faster. I’m also interested in trying an AT&T SIM card to see if that improves things. I think I can get one to test for a short time.

        Cal

        in reply to: GPRSBee #12749
        Cal
        Participant

          Brian,

          I feel your pain. I tried to get started months ago with logging_to_envirodiy and gave up. I believe the code is at too high a level to understand what is going on, what’s working and what’s not. You really need to get some “bring-up” software in place to be able to write AT commands and see the XBee respond. That’s why I went with the software noted above and then wrote my own. Here are a few specific suggestions:

          1. Get an antenna for your XBee. I don’t think it will ever connect without one.

          2. Get the Digi manual for your chip: Digi XBee3® Cellular LTE-M/NB-IoT, https://www.digi.com/resources/documentation/digidocs/PDFs/90002258.pdf. Read as much as you can stand. You are going to reference it over and over.

          3. Make sure you have TinyGSM library installed in your libraries folder

          4. Start with the “Diagnostics.ino” sketch under libraries/TinyGSM/Diagnostics. Set the right parameters.

          5. No doubt it will fail quickly – so you can write your own AT commands to start getting some response from your modem. ex.
          modem.sendAT(GF(“AP”)); // test airplane mode
          modem.waitResponse(200,at_out) ; // response will be 0=off or 1=on

          modem.sendAT(GF(“AM0”)); // set airplane mode off
          modem.waitResponse(200) ;

          6. Have “TinyGsmClientXBee.h” and “TinyGsmClient.h” open in an editor to see what routines “Diagnostics.ino” is using and what AT commands are set.

          7. Little-by-little you will start to understand all the things that have to be done in what order to get the modem to work AND what things are failing and why.

          I can send you my code that works for me if you want. Write me at ckillen@tia-software.com

          Cal

          in reply to: Trouble initializing XBee3 LTE-M #12731
          Cal
          Participant

            Sometimes I get the XBee into a mode that won’t respond to AT commands. It has something to do with the sequence of bringing up power to the Mayfly and power to the modem. To get out of this mode, I’d like to try to programmatically “reset” the XBee modem via it’s reset pin #5. In the wiring diagram of the Mayfly, it shows a small circle around that pin as if there is some way to make a connection to it with a wire/digital output…but I can’t find anything on the board. Do you know if/how I can do this?

            in reply to: GPRSBee #12727
            Cal
            Participant

              After a sabbatical of several months, I’m now back working on the LTE-M XBee and I HAVE IT WORKING!

              For software, I’m using:
              – StreamDebugger
              – Parts of Diagnostics.ino
              – TINY_GSM_MODEM_XBEE
              – My own .ino

              My hardware is:
              – My XBee (Digi XBee3 Cellular Smart Modem XB3-C-A2-UT-001)
              – Mayfly 0.5b
              – Soldered SJ13
              – 3.7v Lipo battery
              – USB to Windows PC – no XCTU
              – Hologram SIM

              My network is AT&T, very weak signal in south Florida.

              Here are some items that helped me get over the hump:
              1. My XBee won’t communicate at any speeds higher than 9600 baud!

              2. I have to connect my battery AFTER I attach the USB to my PC. Otherwise the XBee won’t communicate at all.

              3. It takes anywhere from 6 to 20 minutes to connect to the network where I am. None of the software routines in the library that I’ve found will wait that long before starting over – creating an endless loop. The Hologram Dashboard showed that there was “some activity” every few hours, so I knew the XBee was trying. So I wrote my own code to give it more time and BINGO. I will see the dreaded “22” response to AT-AI (registering to network) for several minutes, then “25” (registration denied) for a while, then eventually “00” (connected).

              4. The next problem I found is either a timing bug in TinyGsmClientXBee.h or in some configuration that I don’t understand. In “modemConnect”, the code tries to determine the IP@ from a URL using the “LA” (Lookup Address). Unfortunately, the “OK” from the AT command precedes the IP@ in the serial response. The code ignores the IP@ and replies with IP@= 0.0.0.0. I modified the stream.readStringUntil statement to keep looking for the address which solved the problem.

              5. Now that I have most things working I’m going to try to get the XBee to sleep, so far unsuccessfully. I can see that most of the time the XBee is using about 2ma when just connected to the network. But every minute it briefly does some activity that burns a lot more power. Any help on this would be greatly appreciated.

              I’d be happy to talk with anybody more about my experience.

              in reply to: GPRSBee #12414
              Cal
              Participant

                I’ve cut the trace at SJ13 and made the solder bridge to directly connect the LIPO battery to the modem. Now the LTE-M XBee doesn’t reply to anything – I’m sure it’s not powering on. Am I missing some switch or setting? I’m using some version of logging_to_EnviroDIY.ino.

                in reply to: GPRSBee #12387
                Cal
                Participant

                  I ordered some parts and I’m back working on this. I have 4 each of Mayfly’s (v0.5b), Hologram SIMs, and XBee3’s (XB3-C-A2-UT-001). I’ve had a little trouble getting the library straight and I intend to learn and install PlatformIO, but for now I’m working on regular Arduino platform. I’m running Sara’s “logging_to_EnviroDIY” … I don’t know if it’s the latest version.

                  Oh, the “bug” I reported last post wasn’t really a bug, but a choice between Cell and Wi-Fi in that code. I switched the commented line with the uncommented line:
                  #elif defined(TINY_GSM_MODEM_XBEE)
                  //modem.setupModem(&ModemSerial, modemVCCPin, modemStatusPin, modemSleepRqPin, ModemSleepMode, wifiId, wifiPwd);
                  modem.setupModem(&ModemSerial, modemVCCPin, modemStatusPin, modemSleepRqPin, ModemSleepMode, apn);

                  I’ve had some luck getting a BEE to attempt to connect to the network, because the Hologram website reports:

                  {“linkid”:439623,”record_id”:385223430,”session_begin”:”2018-09-16 14:14:40″,”timestamp”:”2018-09-16 14:15:39″,”bytes”:0,”imei”:”35275xxxxxxxxxx”,”cellid”:4864,”lac”:20502,”network_name”:”AT&T Mobility”}

                  However, the modem never connects. I added some more time and some AT commands to TinyGsmClientXBee getRegistrationStatus() to make sure the modem is ON and responding. I get some response to these commands, but I only get “22” response for status. The output:

                  sending S# to get SIM num
                  [16873422] <<< 894450030xxxxxxxxxx

                  sending IM to get IMEI
                  [16873504] <<< 35275xxxxxxxxxx

                  sending OA to get APN
                  [16873570] <<< ERROR

                  sending MN to get operator
                  [16873625] <<< OK

                  sending DB to get signal strength
                  [16873678] <<< OK

                  sending AI to get status
                  [16873732] <<< 22

                  My cell strength (4G) is good here so I don’t think that’s the problem. I’ve tried different antennae too. I’m ready, willing and able to insert some debug code to find out what’s wrong if anybody has some ideas. Thanks for your help in advance.

                  in reply to: GPRSBee #12380
                  Cal
                  Participant

                    OK – I’ve cleaned up my library problems as suggested. I’ve paired down the logging_to_EnviroDIY.ino to the bare minimum to check out the modem. I also turned on some debugging and I think I fixed a bug in the code that made it think it was connecting to a WiFi network. I know I got on the cellular network because it showed as active on Hologram.io but would not connect. I suspect I have a SIM card problem now. I’ll be contacting Hologram for help and a new SIM card (this one was borrowed from another modem I have). Thanks for all your help.

                    in reply to: GPRSBee #12376
                    Cal
                    Participant

                      I just received the Digi Xbee3 that I ordered a week ago. Now I need a little help with a sketch to get me started. I tried using the code that Beth suggested (Logging_to_EnviroDIY.ino) but never got it to compile. Does anyone have a simple bring-up sketch for this module? You can contact me externally at ckillen@charter.net.

                      in reply to: GPRSBee #12370
                      Cal
                      Participant

                        Thanks Beth and Shannon, I’m finally getting a chance to get back to this.

                        I’m NOT using any sensor with the ADS115 chip so I’ll go back to my 2G setup and comment out those lines of code. I’ll get back to you on my success/failure eventually.

                        The Digi XBee3™ Cellular Smart Modem, LTE-M seems to be what I want in the long run. I just ordered one today. I’d gladly accept any information anyone has on setup, configuration, example sketches, etc.

                        I have to hurry with this project now since it’s quickly getting cold in the far north. I want to get this deployed before the ice/snow comes.

                      Viewing 10 posts - 21 through 30 (of 32 total)