RAK4631 - deep sleep until reset

Dear @beegee,

I am using RAK4631 Arduino version and in LoRaWan setup. I need to put the radio and controller in standby and sleep mode respectively. I want RAK4631 to be in deep-sleep until it receives a packet from TTNv3, after that it needs to do some operation. After the operation is complete i need to put it back to deep sleep.

Regards
Bodhibrata Mukhopadhyay

What LoRaWAN class are you using?
In Class A the transceiver is set to sleep after TC/RX cycle is finished. But in Class C the transceiver stays in RX mode.
This is handled inside the LoRaWAN library.

I am using LoraWan class C …. However the radio is not going to standby mode as RAK4631 is consuming almost 5 mA current constantly.

Even I checked for LoraWAN Class A … it is not going to sleep mode as shown in fig above.

However in my case I need LoraWAN classC.

What code are you using?
In Class C the transceiver stays in RX mode all the time, the LoRa transceiver never goes into sleep or standby mode. This is because the transceiver has to listen all the time if a packet from the LoRaWAN server arrives.

In Class A I get a sleep current of below 300uA (depending on the base board I use)

In Class C I get a current of 5mA between the transmissions with the nRF52 “sleeping”

Dear @beegee

I am using the code “LoRaWAN_OTAA_TTN_push” given by the RAK WISBLOCK example.

In Class C: Can I put the radio on standby mode to reduce power? I checked the file “sx126x.cpp”, there is an option SX126xSetStandby(STDBY_RC);. When I execute it after reception of a pkt the node current is ~660 uA. However, it fails to receive any further packets.

In Class A: I too get a sleep current of below 300uA after it joins the Gateway. However, the node never goes back to sleep after the first transmission. The correct is ~5mA.

Can you give me a link to that specific example? I do not know an example named LoRaWAN_OTAA_TTN_push.
Most of our examples are kept simple and do not fully support low power

If you put the radio into standby mode, you are breaking the Class C requirements. You would miss downlink messages from the LoRaWAN server. That makes Class C useless.

It would be the same as a Class A device, only the LoRaWAN server doesn’t know that it can send downlinks only after an uplink from the device.

1 Like

Dear @beegee

Sorry, the name of the file is *** RAK4631-DeepSleep-LoRaWan***. Link.

Did you change anything in that code?

Running that example (I wrote it) in Class A, I get a 30uA sleep current after every packet sending.

Changing the example to Class C, I get a 4.88mA current after every packet sent.

That is consistent with the datasheet of the SX1262, which states 4.2mA RX current

1 Like

Dear @beegee

Thanks a lot. I re-ran your code and it is working as you suggested. I commented out this line previously lmh_class_request(CLASS_C);. My mistake and sorry for wasting your precious time.

Regards,
Bodhibrata Mukhopadhyay

Dear @beegee

Can you please suggest one thing? In my application, I need to send data to rak4631 and initiate a process. After the process is over the node will tx results to the gateway. 30-40 sec latency between sending the instruction and initiating the process is fine. If I set my node to

Class C: It is always consuming 5 mA as it is always in Rx mode.

Class A: Set the SLEEP_TIME to 30 sec and after every 30 sec it transmits a blank packet and waits for an Rx packet. The node consumes 1.12 mA (averga).

Is it better to opt for Class A even though it sends a dummy packet to the gateway every SLEEP_TIME?

If you are targeting a battery powered solution, Class A is definitely the solution to choose.

But you have to check for regional limitations, some regions like EU868 have Duty Cycle limitations that might collide with a packet interval of 30 seconds. You might be ok with a 1 byte dummy packet, but I am not sure.

1 Like

Thanks a lot, @beegee for you help.

Dear @beegee
I hope you are doing well.

The low-power code was working fine, thanks to your help. However, when I initialize Serial1 (“Serial1.begin(115200);” ), RAK4631 does not go to sleep mode and consumes 1.1 mA current in the sleep period.

How do you measure the current?

@beegee

Sorry for the late response. I am measuring current using Power profiler Kit II.

@beegee

I am able to solve the issue by using Serial1.end() before RAK goes to sleep.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.