You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ahh - Yes, with setDeepSleep the Pico won't be able to receive data from the Serial port - which could make life a bit more tricky.

    I think in normal mode the GPS sends data once a second, so the easiest option might be something like:

    var gps = require("GPS").connect(Serial4, function(data) {
      // make sure we exit deep sleep a little bit before the next set of data comes in
      setTimeout(function() { setDeepSleep(0); }, 1800 /* may need tweaking */);
      // Ensure that when we exit this, we re-enter deep sleep
      setDeepSleep(1);
      // Do stuff with data
      // ...
    });
    

    If you could speed up the baud rate output by the GPS then you'd also be able to limit the amount of time the Pico has to stay awake for.

    40mA is good to hear I know peripherals will add to that.

    If you mean peripherals inside the chip, I think you're fine - 40mA should include basically all of those. Looks like the GPS itself could draw ~70mA at startup though - but that's still low enough it can be run off the Pico's 3.3v regulator, so choosing a battery should be pretty easy.

    As far as logging every so often, I wonder whether you can put the GPS into a low power mode via the USART, or whether you'd have to physically switch off the power to it if you wanted to save power when idle.

    Looks like finding a battery will be easy though. It looks like without any power saving you'd be looking at under 50mA power draw total, so a single 3000mAh 18650 lithium battery would do 60 hours - which is quite close to what you need anyway. Use two of them in parallel and you should have plenty in hand.

About

Avatar for Gordon @Gordon started