Arduino_nRF5x_lowPower icon indicating copy to clipboard operation
Arduino_nRF5x_lowPower copied to clipboard

Example sketches

Open probonopd opened this issue 6 years ago • 5 comments

Thanks for creating this library, highly appreciated. Can you please add two example sketches, e.g.,

  • One that measures something based on a timer; e.g., reports the temperature from the sensor embedded inside the nRF 5 via BLE, and then goes to sleep for x minutes, then have it repeat

  • One that sleeps until it is triggered by an interrupt; e.g., a PIR motion sensor attached to the nRF5, and then sends the information "motion detected" via BLE

Also, maybe you can add some documentation on the power modes and what is possible in which power mode. What is the most power efficient way to send the temperature every x minutes?

Keep up the great work!

probonopd avatar Feb 26 '18 17:02 probonopd

the only thing i got to work by now is waking up from power off using an interrupt. The power modes depend on the sensors and other stuff built onto the board, basic current consumption can be found in the nRF5x product specification. The board i'm using has 2 laser sensors and an accelerometer on it, power off uses 0.09mA if i don't use the lasers, but 0.9mA if i use them, but cut their power before sending to power off

nRF52: http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/pmu.html?cp=2_1_0_16_0#unique_1291325043

mristau avatar Feb 27 '18 09:02 mristau

I've added an example for power off mode, and some documentation from the nordic product page. From my experience the constant latency and low power modes draw about the same current. So the only way to make it less consuming is power off. To wake it from power off, using any sort of timer, it has to be an external timer that creates an interrupt every some minutes.

mristau avatar Feb 27 '18 10:02 mristau

@mristau I really appreciate your hard work to create this library and providing with examples of Low Power Modes and Interrupt functionality in Arduino environment.

I've added an example for power off mode, and some documentation from the nordic product page. From my experience the constant latency and low power modes draw about the same current. So the only way to make it less consuming is power off. To wake it from power off, using any sort of timer, it has to be an external timer that creates an interrupt every some minutes.

Can you add an example to implement timer, that wakes up the NRF52832 in every few minutes. In the SDK there is example of RTC but could not understand how to implement in the arduino environment. Some links that I found useful: Link 1 - Nordic Forum Link 2 - Nordic Forum Link 3 - Github

Hope to hear from you soon.

TamojitSaha avatar Jan 27 '20 07:01 TamojitSaha

@TamojitSaha I'm attempting something similar. Did you ever figure it out?

KEranda avatar Aug 29 '20 20:08 KEranda

I tried to create a working sketch on my own, but unfortunately I failed in doing so.

TamojitSaha avatar Oct 06 '20 06:10 TamojitSaha