Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. gbsmith
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by gbsmith

    • gbsmith

      Recovery of Battery Powered Sensor after Gateway Outage
      Troubleshooting • • gbsmith  

      3
      0
      Votes
      3
      Posts
      886
      Views

      gbsmith

      Here is a link to my sketches and log file. If I don't sleep the SAMD21G18 but instead wait, I can cycle the power on the gateway and the sensor recovers even with my SPI write to a register to implement the radio sleep. The log file is called "node_debug_wait.txt" However, If the wait is replaced with a sleep, LowPower.deepSleep(10000); the sensor does not recover until it too is power cycled. I also tried the RTCZero.h library to implement the sleep. See MySensors_BME280_RTC sketch. Both sleep methods work as long as the gateway never goes down. I tried #define MY_TRANSPORT_WAIT_READY_MS 2000 and the sensor does not connect with gateway at all. When the sensor is down after the gateway power cycle there is no receive data at the gateway so I did not collect the gateway log. On the sensor side, once the CPU powers down the serial USB connection lost. I tried both Arduino Serial Monitor and PuTTY to get the sensor log file. To overcome the serial problem I created a blink function and then inserted that into the code to determine if my interrupt service function was working see MySensors_BME280_Debug. Now the solution: I added an awake up interrupt service routine which calls transportCheckUplink(). That's it. It seems to be enough to get the transport layer running again after a CPU sleep. My Motenio M0 board only draws 10 - 20 uA total when CPU, RFM69 and BME280 are shutdown with no modifications of the factory board. It is be a very capable yet low power MySensor. I look forward to official support of sleep for a SAMD21G18 based board. Meanwhile, this is a workaround.
    • gbsmith

      How to sleep the Moteino M0?
      Hardware • • gbsmith  

      5
      0
      Votes
      5
      Posts
      1421
      Views

      gbsmith

      @alexsh1 current draw details in sketch header. 10-20 uA I had some problems with recovery after gateway power cycling. See discussion here. This issue has been fixed with a workaround.