RAK4631 - deep sleep until reset

I use “RAK4631-DeepSleep-LoRaWan.ino” example, would like to put RAK4631 to deep sleep and just wait for pressing reset button.
I tried


but the result is:

Hello Zenek,


is only putting the nRF52 into sleep mode, but not the SX1262 LoRa Transceiver.
Can you try to use Radio.sleep() before you call sd_power_mode_set.

Hi Bernd,
thanks but adding this didn’t help, still 6 mA.

Without the sd_power_mode_set(NRF_POWER_MODE_LOWPWR); and with just the deep sleep code I get this:
During LoRaWAN join:

After join in sleep mode:

Are you initializing LoRaWAN?
Are you able to connect to a LoRaWAN server?
If you initialize LoRaWAN, but cannot connect to a LoRaWAN server, the MCU will never sleep, because it is retrying to join the LoRaWAN network.

Bernd I use ABP mode, everything else works, I can send and recive packets.

What do you get when you try without sd_power_mode_set(NRF_POWER_MODE_LOWPWR);?

If you only want to send on a button push, you could remove the SoftwareTimer, attach an interrupt to your button GPIO and wake up with the semaphore.

void buttonHandler(void)
	// Switch on blue LED to show we are awake
	digitalWrite(LED_BUILTIN, HIGH);
	eventType = 1;
	// Give the semaphore, so the loop task will wake up
	xSemaphoreGiveFromISR(taskEvent, pdFALSE);

why do I need this: we have, for example, 1000 devices, they are programmed and tested and in housings.
The installation is 2000 km away in 3 months, the point is that the devices should wait in sleep until someone resets them with a magnet, and then they worked normally (i.e. send the packet every 10 min). So that there is no need to open the housing to connect the battery.

Without sd_power_mode_set(NRF_POWER_MODE_LOWPWR); same 6mA.

Hi. Can you tell me what kit you are using to measure the current levels of these devices. I tried using my multimeter, but the pulses are too short to read.

Hi @Alangward https://www.mouser.pl/new/nordic-semiconductor/nordic-power-profiler-kit-2/

Same as Zenek, I am using the Noridc PPK2 power profiler and the DUT are RAK5005-O + RAK4631 and no other modules connected.

Thanks both. I’ve ordered one. I wish I’d thought about this earlier

Well my PPK2 arrived yesterday and I’m now trying to figure how to connect it to me 19007 base board. I’m worried I might damage something.
I assume that I need to connect Vin and GND to a battery and then connect Vout and Gnd to the battery connector on the base board?
I had thought that the PPK2 would provide the power, but that doesn’t appear to be the case.

Hi Alan,
please check this Get your Power Profiler Kit II up and running - YouTube
It can work also as power source (in this case use VOUT and GND).

I have the Vout and GND connected to the battery connector of the Base Board and leave the Vin open:

In the app, I select “Source meter” set the voltage, then “Enable recording” and final “Enable Power Output”

And then I get the consumed current

For what it is worth, that is exactly how I use my PPK2 as well - connect power through the battery connector, and use source meter as type in the app.

Thanks for the helpful replies. I think I must have missed one of the steps. Also I need to solder a battery connector onto the PPK2 output wire - a job for tomorrow
Thanks again

I’ve found that I can just shove the tinned leads from the battery connector wiring into the dupont connector of the PPK2 and it works fine. Saves me from wasting/dedicating a battery connector cable that way.

To avoid problems with loose connections and soldering directly to the PPK2 wires, I made a simple adapter:

1 Like

Dear Beegee,

I am testing the deep sleep feature of RAK4631 and observed that after joining it goes to deep sleep as shown by you. However, after RAK4631 is waken up by the timer to transmit a packet it never goes back to deep sleep. How do I put it to deep sleep again?

I am using the code provided by RAK and have set #define SLEEP_TIME 15000.

Bodhibrata Mukhopadhyay

Hi @bodhibrata

Which code are you using?
If you are using RUI3, can you give me the RUI3 version with “AT+VER=?”