Another Sleep-Wake thread

A place to talk about all the Operating Systems, Software & Hardware
Forum rules

- Posts are to be made in the relevant forum. Users are asked to read the forum descriptions before posting.

- Members should post in a way which is consistent with "normal writing". That is users should not post excessive numbers of emoticons, large, small or coloured text, etc. Similarly users should not SHOUT or use excessive punctuation (e.g. ! and ?) in topic titles or posts.

- Members should use an appropriate, descriptive subject when posting a new topic. Examples of bad subjects include; "Help me!", "I'm stuck!", "I've got an error!", etc. Examples of good subjects include; "Getting an TABLE FULL error upon login", "Cannot restore a backup".

- Members are asked to post in English only so that posts can be well received and properly monitored.

- Spam is not tolerated here under any circumstance. This includes offering hosting services (charged and free), installation services, solicitation etc. Recruiting members for your own projects (moderators, designers, professional MOD work, etc.) is not permitted and is also considered spam. Users posting spam will be warned and their post removed.

- Members should post in a way that is respectful of other users. Flaming or abusing users in any way will not be tolerated and will lead to a warning. Vulgar language and inappropriate material is not allowed and will be removed. We try to maintain a family friendly atmosphere whenever it is possible within the main subject matter of this community. Please keep this in mind when participating.

- Each user is allowed to create one account. If you would like to change your username, please contact us and, most likely, we can do it for you while you can keep all of your profile data, posts, and other content.

- If a user violates our guidelines and shows a disregard for them, our staff and our community, they run the risk of losing their account. We reserve the right to deactivate any account and to edit or remove any content without warning. These guidelines are subject to change at any time without notice.

Thank you for visiting LattePanda.com!
Post Reply
User avatar
Zauberkugel
Posts: 5
Joined: Tue Jan 22, 2019 8:19 pm

Fri Jan 25, 2019 6:43 pm

I'm evaluating a Lattepanda 4G/64 model for a project involving solar-powered remote devices. They need to sleep through the night to conserve battery. I tested power consumption using Windows' built in "When plugged in, PC goes to sleep" function.

Currents are measured at 13.6V. There is a small step-down transformer down to 5V after the current sensor. Wifi is on.

Current Power
Booting Up 450 mA 6.1 W
Windows idle 220 mA 3.0 W
Sleeping 130 mA 1.7 W
Hibernating 40 mA 0.5 W
Power off 0.0 mA 0.0 W (this shows the idle transformer isn't contributing)

In Winter I have about 15 hours with no meaningful solar power. I'll need 3,300 mAh of battery capacity to make it through the night while running; 2,000 mAh while sleeping; And 600 mAh while hibernating. (plus a bit more for operations, redundancy, etc). I can live with that. But if we can reduce this further, it would be great.

Interestingly, during both sleep and hibernation, LattePanda's Arduino co-processor continues to run. The pins continue to put out voltages. This probably explains the remaining 0.5W draw. So we can't rely even on hibernation to turn external devices off for us. We must turn them off in code. I can't see any way to send Arduino to sleep, short of interrupting the main power supply.

Sleeping and saving power is all good and well. But it's only going to be useful, if we can figure out how to wake up. My devices are going to be deployed in remote areas, where it's completely impractical to walk up to it and push a button. So there needs to be some timer-dependent functionality to do it. Windows is completely passed out during hibernation. I think we will need BIOS functionality to bring LattePanda back from hibernation. I spent a long time looking for that setting and cannot see it. Does that exist in 4G/64? Will the Alpha have it? Can BIOS be upgraded to support it?

Short of an answer, I will probably need to use an external system to interrupt LattePanda's main power. I'm thinking a Fire Beetle with an RTC or light sensor, and MOSFET should do the trick. But this increases the System's complexity. It would be easier and more robust (fewer failure points), if we could have a BIOS function that simply powers up LattePanda at a particular time, like many desktop PCs have. I think it would make LattePanda more useful and easier to use for many embedded / internet of things application if it could do that. What do you all think?

User avatar
Gabriel.cruz
Posts: 1
Joined: Mon Feb 11, 2019 4:46 pm

Mon Feb 11, 2019 4:48 pm

Im interested in this too

User avatar
LattePanda
Site Admin
Posts: 2446
Joined: Wed Jan 20, 2016 9:09 am

Mon Feb 18, 2019 11:02 am

Dear Zauberkugel,

Check out this lowpower library to enable sleep mode for onboard Arduino - https://github.com/rocketscream/Low-Power
Also u can use a button or other trigger to turn on the device via interrupt.
Even you can use onboard Arduino to control different power mode for the LattePanda, by hacking the power button. However this feature is optimized on LattePanda Alpha, which extends more IO of power management for CPU part. Check out this diagram - http://docs.lattepanda.com/content/alph ... ayability/

Hope it's helpful!
Enjoy Tinkering with LattePanda ! :lol:

User avatar
Zauberkugel
Posts: 5
Joined: Tue Jan 22, 2019 8:19 pm

Wed Mar 20, 2019 1:15 am

Thanks for the link to low power library. This actually looks useful for something else I'm doing too! I will patiently wait for my Alpha to ship, and then give this "hacking the power button" a shot!

User avatar
Zauberkugel
Posts: 5
Joined: Tue Jan 22, 2019 8:19 pm

Mon May 13, 2019 3:05 am

Hey, much to my delight, I discovered my new Alpha came with a wake-on-RTC function in its bios. Thanks for implementing this! According to preliminary testing it works fine as long as the Alpha is on a steady power supply. But if there is any kind of power interruption, it does not wake up after that. So it looks like we will still need a "wake after power failure" function to give us a truly autonomous embedded system. I hope you can figure this out. Good luck !! Please let us all know loud and clear when you do !!

User avatar
SixSixSevenSeven
Posts: 22
Joined: Sun Sep 04, 2016 7:27 pm

Mon May 13, 2019 7:51 am

On the alpha, you have access to a selection of power headers, the Arduino can be wired to those, even allowing the Arduino to perform a soft shutdown before the battery runs flat etc. Plus the Arduino is capable of keyboard and mouse emulation as a bonus touch.
Arduino I've measured myself previously, it's nowhere near 0.5W, try about a 10th of that. But you do have chips like eMMC, PMIC, RAM etc all running too

Post Reply