8 years, 6 months ago.

Sleep mode

Hey everyone, i am using the LPC1768 to record temperature data over a period of time. I am trying to set up a way to put the mbed into a sleep mode to conserve power for a period of time, wake up, record the temperature, and return to sleep mode. Any suggestions for how to write the code for the sleep mode and waking up without any external stimulus would be appreciated.

2 Answers

8 years, 6 months ago.

Unfortunately the MBED LPC1768 is not the best platform for low power due to the extra peripheral chips can't be powered down. The Silicon Labs platforms do work well for low power applications. Take a look at this:

https://developer.mbed.org/platforms/EFM32-Happy-Gecko/

This has a temperature/humidity sensor on board and this program will run for months on a coin cell:

https://developer.mbed.org/users/star297/code/MemLCD-Temperature-Humidity-Demo/file/b0e5b889098e/main.cpp

You could add a SD card break out board and record the data to use in a spread sheet for instance.

Be nice to NXP :(.

The https://developer.mbed.org/platforms/mbed-LPC11U24/ can go reasonably low power (easily enough for months on a coin cell in powerdown, although you need to borrow some code to make it go there, and the mbuino is pretty much bare metal (making debugging a bit more effort, since you need to instantiate a USBSerial object instead of regular Serial), so it can achieve full low-power operation.

It does depend on your requirements though: If it is powered from mains, simply don't worry about power. The consumption of an MCU is so low you really won't notice it on your powerbill.

posted by Erik - 05 Nov 2015

I do like NXP, generally use the LPC1768 to develop my code, probably the most stable platform on Mbed. Now there is more to choose from I suppose I should try them out, but just have toooo many platforms. Yeah, the low power stuff is purely for portable battery function and a challenge to see how far I can go on a few mA's of power.

posted by Paul Staron 05 Nov 2015
8 years, 6 months ago.

You can wake using a Ticker from sleep, but short answer: Don't bother. The LPC1768s power consumption is only for a small part due to the MCU on it, and sleep mode only has limitted impact (deepsleep is much better, but doesn't work for it).

In general for reducing power consumption, have a look at: https://developer.mbed.org/users/no2chem/notebook/mbed-power-controlconsumption/

This is always a problem with the development boards with the extra 'toys' they have. The best I could get with the Mbed LPC1768 was around 20 mA in deepsleep. The SiLabs boards are the exception for the ones I have, perhaps there are others. No need to cut tracks to remove waste power. But you still can't beat a prototype board with MCU only mounted and the KL's have worked the best for me running in deepsleep using your WakeUp code periodically to do some housekeeping.

posted by Paul Staron 05 Nov 2015