The main things you need to do is make sure the GPS is off, and also put the LoRa module in sleep mode.
To ensure the GPS is off set GPS_ENABLE to OUTPUT and LOW.
To put the LoRa module to sleep for 60 seconds you will need to open Serial1 at 57600 and send (with line endings, e.g. using println()) the following command: “sys sleep 60000”. The duration is specified in milliseconds.
Another thing that I see is that the power usage changes a lot. By flashing exactly the same code into the same device and using the same battery and measuring equipment, I see a different power usage every time the device boots. And the difference is rather big. One time it can be a steady 3 mA the next time a steady 300 uA and often I see it fluctuating between 200 uA and 500 uA.
I tested two version of the SodaqONE, tonight a Rev.2 board (BETA) and a Rev.3 board.
Using the above sketch the Rev.3 board read at ~45uAs, and the Rev.2 board at about ~53uAs.
One thing I would suggest is power cycling the board after uploading the test sketch. There are instances when the LoRa chip becomes unresponsive after programming the board. The power cycling the board resets the LoRa chip.
Hello Gabriel, do you also see these values after initializing the LoRa module, waking it up, sending a message and then putting the board into deep sleep? What we see is the following sequence after programming + a power cycle;
board does power up (~ 40 - 50mA)
setup runs, GPS powers down, LoRa powers down, LSM303 powers down, USB disconnects, we sometimes go to ~ 70 uA. But often it stays at 3 mA
In case we’ve seen the 70 uA we send a LoRa msg, then put the device back into deep sleep. In that case we never see anything in the micro amps, always milli amps.
It appears that when the LoRa chip has been used for transmitting anything, it refuses to go back to sleep.
We use code derived from Sodaq One Tracker (main code) and we use Sodaq libraries for the other parts (so we replaced the ublox code with the sodaq gps lib because we only power down the GPS, nothing else.)
The device wakes up every hour to send a status message and then goes back to deep sleep. At least that is what we try to do, the board always stays at 3 mA or higher.