Module 5: Optimising Our Application

In Module 5 we’ll optimise our data logger application, and add the finishing touches to our application code so it’s ready for deployment.

We go through calculating battery life, ways to power optimise our device in both the hardware and software, putting our device into low power mode and waking it up again, and implementing a watchdog timer to gracefully recover from tricky embedded software bugs like stack overflows, race conditions and memory leaks. Then, we’ll remove our command line code, and implement all these features into our final deployment code. Woohoo!

Click here for video slides, terminology, downloads and additional references

 

5.0  Power Optimisation – How Low Can You Go? – Lab 1

In this video we cover:

  • calculating power consumption
  • our power optimisation strategy
  • ways to optimisation power in hardware and software
  • measuring current
  • estimating battery life
  • brownout resets

In the Lab, we’ll press a pushbutton to put WildLogger into sleep mode and wake it up again.

5.0 – PowerManagement  (PDF)

 

 

5.1 Watchdog Timer – Who Let The Watchdogs Out? – Lab 2

In this video we cover:

  • watchdog timer
  • types of software failures including logic bugs, stackover flows, memory leaks and race conditions

In the Lab, we’ll initialise the watchdog timer, create a simulation that hangs the system, and observe as the system resets itself via the serial monitor.

5.1 – WatchdogTimer (PDF)

 

 

5.2 The Grand Finale – Our Deployment Application – Lab 3

In this video we cover:

  • Calculating battery life on actual data

In the Lab, we’ll integrate the sleep / wake cycle, remove the command line, and add the watchdog timer to create our final deployment-ready application.

5.2 – TheGrandFinale (PDF)

 

 

Supporting Materials

Terminology Sheet

Module 5 – Terminology Cheatsheet(PDF)

 

Video Slides

5.0 – PowerManagement  (PDF)

5.1 – WatchdogTimer (PDF)

5.2 – TheGrandFinale (PDF)

 

Conversations & Troubleshooting

Module 5 Discussion (forum thread)

 


Copy link