Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

MicroPython for Microcontrollers Module 11

Power, application updates and firmware OTA interview questions

Interview questions on power, application updates and firmware OTA: warm-ups, then what each harder question tests and how a good answer starts.

3 questions: 1 warm-up and 2 with model answers · Levels: Fresher to senior

Warm-up questions

Short questions with short answers, each answered in full.

  1. Fresher

    What does a board keep through lightsleep() that it loses in deepsleep(), and where does the program carry on after each?

    Answered in the lesson Sleep modes and battery life

Questions with model answers

What each question tests, the first step of a good answer and the follow-ups to expect.

  1. Mid to senior

    An ESP32 soil sensor on a development board should run about 8 months on a 2,000 mAh cell: it wakes every 10 minutes for 2 s and calls machine.deepsleep(600_000) in between. In the field it is flat after 9 days. How do you find where the charge goes, and what do you change?

    What it tests
    Turning a battery's life into an average current, splitting it between the wakes and the sleep, telling a board's sleep current from the chip's, and checking that the sleep happens at all.
    First step
    Turn the failure into a number. 2,000 mAh in 9 days is 2,000 ÷ 216 h = 9.26 mA on average, against the 0.343 mA of the plan. Then ask which half can carry it: the 2 s wakes at 100 mA give 0.33 mA, so either the wakes last far longer than planned or about 9 mA flows while the board should be asleep. Measure the current between wakes.
    Follow-ups

    From the lesson Sleep modes and battery life

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page.

    Opening the model answers with your pass…

    Model answers open with any MySmartCoPilot pass.

    • Pro pass · 1 week₹79$2.99
    • 30 days₹179$5.99
    • 1 year₹1,699$45

    One payment; nothing renews unless you choose to. The price shown is the total you pay: no fees or charges are added at checkout.

    It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  2. Mid to senior

    Design the firmware of a door sensor on an ESP32 that runs for a year on a 2,000 mAh battery, reports every opening and closing, and sends a heartbeat every hour. Which sleep does it use, what wakes it, what does each boot do, and how do you check the battery budget?

    What it tests
    Choosing deep sleep with a pin wake and a timer wake, reading wake_reason() and wake_pins() at boot, arming the right level, and turning a lifetime into a budget of wakes.
    First step
    Start from the budget. A year on 2,000 mAh allows 2,000 ÷ 8,760 h = 0.228 mA on average. Deep sleep at 10 µA leaves 0.218 mA for the wakes, about 786 mA·s an hour. A 2 s wake at 100 mA costs 200 mA·s, so the board can afford about 3.9 such wakes an hour, the heartbeat included.
    Follow-ups

    From the lesson Sleep modes and battery life

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes

All MicroPython for Microcontrollers interview questions · The MicroPython for Microcontrollers track

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.