Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
TITLE TEXT 
BATTERY LIFE 
STUART HARRELL
WHO IS THIS GUY? 
I’m an engineer on the firmware team. 
! 
I spend a lot of time working on battery life. 
! 
I also make...
WHY YOU MIGHT CARE 
25% of customers say that battery life is important to 
them (will probably rise) 
! 
We may start tel...
OVERVIEW 
First 10 minutes — guessing game 
! 
Second 10 minute — getting more battery life in YOUR 
app 
! 
Last 10 minut...
GUESSING GAME
GUESS THE BATTERY LIFE 
1. Listen to scenario 
! 
2. Ponder carefully 
! 
3. Hold up fingers to show guess 
! 
4. Be yours...
PRACTICE ROUND! (MINUTE WATCH FACE) 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. M...
PRACTICE ROUND! (MINUTE WATCH FACE) 
Answer is 4. More than 12 days. (14 days)
BACKLIGHT ON CONSTANTLY 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 ...
BACKLIGHT ON CONSTANTLY 
Answer is 1. Less than 2 days. (4 hours)
WATCH FACE WITH SECONDS 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 ...
WATCH FACE WITH SECONDS 
Answer is 3. Between 6 and 12 days. (9 days)
WATCH FACE WITH MINUTE ANIMATION 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More...
WATCH FACE WITH MINUTE ANIMATION 
Answer is 3. Between 6 and 12 days. 
(11 days)
WATCH FACE WITH MINUTE, BLUETOOTH OFF 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4....
WATCH FACE WITH MINUTE, BLUETOOTH OFF 
Answer is 4. More than 12 days. (36 days)
CONSTANT ANIMATION 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 days
CONSTANT ANIMATION 
Answer is 1. Less than 2 days. (1 day)
GRABBING WEATHER ONCE PER MINUTE 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More...
GRABBING WEATHER ONCE PER MINUTE 
Answer is 3. Between 6 and 12 days. (6 days)
GRABBING WEATHER ONCE PER SECOND 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More...
GRABBING WEATHER ONCE PER SECOND 
Answer is 1. Less than 2 days. (18 hours)
RECAP 
Backlight 
Constant Animation 
Bluetooth 
Tick Timer 
4 hours 
1 day at 30 fps 
6 days when using on minute 
18 hou...
TIPS AND TRICKS THAT *YOU* CAN USE
BATCHING 
The CPU and bluetooth chip are power hogs 
! 
Every time the CPU wakes up, it has a system upkeep cost 
! 
Every...
BATCH BLUETOOTH USAGE 
Sending app message on the minute = 6 day battery 
! 
! 
Sending app message on the second = 18 hou...
BATCH ACCELEROMETER READINGS 
! 
100 Hz with 25 sample batches = 12 day battery (very small impact) 
! 
100 Hz with 1 samp...
FPS MATTERS 
Rotating house 30fps = 1 day battery 
! 
Rotating house 10fps = 3 day battery 
! 
! 
More battery life or smo...
VERTICAL VS HORIZONTAL ANIMATIONS 
1-pixel row at 30fps = 5 day battery 
! 
1-pixel column at 30fps = 1 day battery 
! 
! ...
SECOND VS MINUTE WATCH FACES 
Simplicity with minutes = 14 days battery 
tick_timer_service_subscribe(MINUTE_UNIT, 
handle...
DON’T LEAVE ON THE BACKLIGHT 
Will drain a fully charged battery in 4 hours 
! 
Be careful with light_enable 
! 
Consider ...
SUMMARIZING 
Backlight 
Constant Animation 
Bluetooth 
Tick Timer 
Avoid light_enable 
Lower FPS and try to minimize the r...
DEMO TIME
SCREENSHOT 1
SCREENSHOT 2
SCREENSHOT 3
NOW IT’S YOUR TURN 
Demo link: http://arcane-escarpment-6914.herokuapp.com 
! 
! 
! 
! 
Email me: stuart@getpebble.com 
! ...
BLUETOOTH LE WORKSHOP 
11:00 
Martijn
Upcoming SlideShare
Loading in …5
×

Battery Life | Pebble Developer Retreat 2014

2,211 views

Published on

You can find the video recording here: http://youtu.be/TS0FPfgxAso

Stuart Harrell, software engineer at Pebble, gives a talk about battery life and how to preserve it. This talk explains the effect of different system functions on battery life and discusses solutions to common battery life problems with apps.

Day 2 - Video 1

Published in: Technology

Battery Life | Pebble Developer Retreat 2014

  1. 1. TITLE TEXT BATTERY LIFE STUART HARRELL
  2. 2. WHO IS THIS GUY? I’m an engineer on the firmware team. ! I spend a lot of time working on battery life. ! I also make Pebble apps (see right).
  3. 3. WHY YOU MIGHT CARE 25% of customers say that battery life is important to them (will probably rise) ! We may start telling customers about battery hogs (they don’t know) ! ???
  4. 4. OVERVIEW First 10 minutes — guessing game ! Second 10 minute — getting more battery life in YOUR app ! Last 10 minutes — interactive demo
  5. 5. GUESSING GAME
  6. 6. GUESS THE BATTERY LIFE 1. Listen to scenario ! 2. Ponder carefully ! 3. Hold up fingers to show guess ! 4. Be yourself
  7. 7. PRACTICE ROUND! (MINUTE WATCH FACE) 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  8. 8. PRACTICE ROUND! (MINUTE WATCH FACE) Answer is 4. More than 12 days. (14 days)
  9. 9. BACKLIGHT ON CONSTANTLY 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  10. 10. BACKLIGHT ON CONSTANTLY Answer is 1. Less than 2 days. (4 hours)
  11. 11. WATCH FACE WITH SECONDS 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  12. 12. WATCH FACE WITH SECONDS Answer is 3. Between 6 and 12 days. (9 days)
  13. 13. WATCH FACE WITH MINUTE ANIMATION 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  14. 14. WATCH FACE WITH MINUTE ANIMATION Answer is 3. Between 6 and 12 days. (11 days)
  15. 15. WATCH FACE WITH MINUTE, BLUETOOTH OFF 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  16. 16. WATCH FACE WITH MINUTE, BLUETOOTH OFF Answer is 4. More than 12 days. (36 days)
  17. 17. CONSTANT ANIMATION 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  18. 18. CONSTANT ANIMATION Answer is 1. Less than 2 days. (1 day)
  19. 19. GRABBING WEATHER ONCE PER MINUTE 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  20. 20. GRABBING WEATHER ONCE PER MINUTE Answer is 3. Between 6 and 12 days. (6 days)
  21. 21. GRABBING WEATHER ONCE PER SECOND 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  22. 22. GRABBING WEATHER ONCE PER SECOND Answer is 1. Less than 2 days. (18 hours)
  23. 23. RECAP Backlight Constant Animation Bluetooth Tick Timer 4 hours 1 day at 30 fps 6 days when using on minute 18 hours when using on second 36 days when turned off 14 days with minute watch face 9 days with second watch face
  24. 24. TIPS AND TRICKS THAT *YOU* CAN USE
  25. 25. BATCHING The CPU and bluetooth chip are power hogs ! Every time the CPU wakes up, it has a system upkeep cost ! Every time the bluetooth chip wakes up, it has to open the channel for communication and it remains in a high-power active mode for a short time
  26. 26. BATCH BLUETOOTH USAGE Sending app message on the minute = 6 day battery ! ! Sending app message on the second = 18 hours ! ! Sending 60 app messages on the minute = 6 day battery
  27. 27. BATCH ACCELEROMETER READINGS ! 100 Hz with 25 sample batches = 12 day battery (very small impact) ! 100 Hz with 1 sample batches = 8 day battery ! ! Above numbers are for when no processing is occurring. ! Accelerometer cost = how much CPU is turned on
  28. 28. FPS MATTERS Rotating house 30fps = 1 day battery ! Rotating house 10fps = 3 day battery ! ! More battery life or smoother animations? Which will your users prefer?
  29. 29. VERTICAL VS HORIZONTAL ANIMATIONS 1-pixel row at 30fps = 5 day battery ! 1-pixel column at 30fps = 1 day battery ! ! ! Why? Our display draws row-wise. ! Consider trying to minimize the number of rows if you have a long-lasting animation
  30. 30. SECOND VS MINUTE WATCH FACES Simplicity with minutes = 14 days battery tick_timer_service_subscribe(MINUTE_UNIT, handle_minute_tick); ! Simplicity with seconds = 9 days battery tick_timer_service_subscribe(SECOND_UNIT, handle_second_tick); ! Power consumption is a mix between waking CPU and drawing to the display
  31. 31. DON’T LEAVE ON THE BACKLIGHT Will drain a fully charged battery in 4 hours ! Be careful with light_enable ! Consider giving users a choice if you do want to keep the backlight on ! Don’t repeat my mistake!
  32. 32. SUMMARIZING Backlight Constant Animation Bluetooth Tick Timer Avoid light_enable Lower FPS and try to minimize the rows associated with the animation Batch calls that use bluetooth whenever possible Process data in larger batches (25) if your application permits Waking the CPU every second is more expensive then waking every minute Accelerometer
  33. 33. DEMO TIME
  34. 34. SCREENSHOT 1
  35. 35. SCREENSHOT 2
  36. 36. SCREENSHOT 3
  37. 37. NOW IT’S YOUR TURN Demo link: http://arcane-escarpment-6914.herokuapp.com ! ! ! ! Email me: stuart@getpebble.com ! Tweet me: @StuartHarrell1
  38. 38. BLUETOOTH LE WORKSHOP 11:00 Martijn

×