What an Embedded System Is: A Loop in a Box With Constraints
A desktop program runs on someone else's electricity. An embedded system carries its own — and every line of code is a decision about heat, time, and money.
🎯 By the end you'll understand
Why an embedded system is defined by the box around the loop, not the loop itself. The five constraints — energy, cost, timing, thermal, size — and how each one turns into a number you can be held to. The four-way failure taxonomy (electrical, thermal, timing, integration) that organises every later stage of this course. What Beacon is, which of its numbers are already fixed, and why the constraint you never wrote down is the one that kills the first board.
KEY INSIGHTThe loop is easy. The box is the point.
Every embedded system is a sense–compute–act loop. So is every Python script that reads a sensor over USB and plots it. The difference is not the loop. It is that the embedded loop runs inside a box with walls — and the walls push back.
If you have written firmware on a dev kit, you already know the loop: read a sensor, decide something, drive an output, repeat. That part transfers directly from software. What does not transfer is the set of things the desktop quietly gave you for free: unlimited power from the wall, a fan, a gigahertz of slack, a case big enough for anything, and a bill of materials nobody ever asked you to justify. An embedded system is a loop that has been asked to pay for all of that itself — from a battery, on a budget, inside a specific volume, on a deadline measured in milliseconds. Every one of those debts is a constraint, and every constraint is a physical quantity with a number attached.
An embedded system is a sense–compute–act loop bound by constraints that desktop software never meets: energy it must carry, cost it must justify, timing it must hit, heat it must move, and size it must fit. The loop is where the code lives. The constraints are where the failures live. This course is organised around the second sentence, not the first — and the single most reliable predictor of whether a first board survives is whether its designer wrote the constraints down before choosing parts.
CORE CONCEPTSense, compute, act — then the walls close in
Start with a scene from a real bench. A small board is meant to read a temperature sensor once a minute and send the reading by radio. On the desk, powered from USB, it works for a week. The engineer swaps USB for the intended coin cell, ships ten units to a customer, and every one of them is dead within eleven days. Nothing in the code changed. Nothing in the circuit changed. The only thing that changed is that the loop was finally asked to run inside its box — and the box had a wall labelled "energy" that the design had never touched.
That story is the whole lesson in miniature. Let's draw it properly.
Notice what the diagram does not say. It does not say "microcontroller" or "no operating system" or "written in C." Those are common features of embedded systems, but they are consequences, not definitions. A Raspberry Pi running Linux inside a vending machine is embedded. An ESP32 dev kit on your desk running the same firmware from USB is, in the sense that matters, not yet — it has a loop but no walls. The walls appear the moment the thing has to survive on its own resources in a place you cannot reach.
An embedded system is a computing loop (sense → compute → act) dedicated to a specific function and bound by physical constraints — energy, cost, timing, thermal, and size — that it must satisfy without outside help. The "without outside help" clause is doing the work: it is why the constraints are hard limits rather than performance goals. A phone app that drains the battery gets uninstalled. A sensor tag that drains the battery gets thrown away, along with the company's deposit on the next order.
One more thing about the loop. On a desktop, the loop runs whenever the OS lets it, and the OS is generous. On Beacon, the loop runs for roughly 45 milliseconds once a minute and sleeps the other 59.955 seconds — which means the system spends 99.9 % of its life doing nothing, and the "nothing" is where almost all of the energy goes. That inversion — the idle state dominating the budget — is the first thing that surprises people arriving from software, and it is why Lesson 1.9 and all of Stage 4 obsess over microamps rather than megahertz.
HOW IT WORKSFive constraints, and how each one becomes a number
A constraint that is not a number is a wish. "Long battery life" cannot be violated, because it cannot be measured; "≥ 6 months at one report per minute at 22 °C" can be, and therefore can be designed to. This section takes each of the five walls and shows the arithmetic that turns it into a Beacon number. The numbers come from the project canon and will be formalised as requirements R1–R9 in Lesson 1.9; here the goal is to feel the shape of each calculation.
Energy: the budget you cannot see
Beacon carries a 1000 mAh lithium-polymer cell and must last six months. Six months is 4,380 hours, so the average current the whole board may draw is:
1000 mAh ÷ 4,380 h ≈ 0.228 mA ≈ 228 µA
That is the naïve budget, and it is the number a first-time designer writes down and feels good about. It is wrong in the useful direction: it assumes the cell delivers every milliamp-hour on its label, at every temperature, with no self-discharge, no retransmissions, and no firmware bug that keeps the radio awake. Experienced engineers design to a heavily derated version. Beacon's canon uses a 6× real-world margin, which takes the design target down to:
228 µA ÷ 6 ≈ 38 µA average
Thirty-eight microamps for a Wi-Fi-capable microcontroller, two sensors, a regulator, and a radio. Here is where it goes, using the measured figures the course uses throughout:
| State | Current | Duration per minute | Share of the 60 s average |
|---|---|---|---|
| Deep sleep (module 5 µA + regulator + sensors idle + divider leakage) | ≈ 8 µA | 59.955 s | ≈ 8 µA |
| Active window (sensor sample + 3 BLE advertisements at 0 dBm) | ≈ 40 mA avg | 45 ms | 40 mA × 0.045 s ÷ 60 s ≈ 30 µA |
| Average | ≈ 38 µA |
Read the last column carefully: the 45 ms burst at 40 mA costs almost four times as much as the entire 59.955 s of sleep. Yet if the sleep current were 50 µA instead of 8 µA — which is what happens when you leave an LED on, or forget to power down a sensor, or use a regulator whose own quiescent current is 40 µA — the average would be 80 µA and the derated life would fall from six months to under three. Energy on a battery product is a story about the idle state first and the active burst second. You will measure exactly this in Lesson 1.8 and Lesson 4.1.
Cost: the budget everyone pretends is someone else's job
Beacon's bill of materials must come in at or under IDR 150,000 per unit at 25 units — about USD 9.5 at the exchange rate the canon assumes (≈ IDR 15,800 per USD), excluding the enclosure. That number is not generous. The table below is an illustrative small-quantity distributor breakdown (prices move; treat the rows as plausible 2026 figures to be checked against live quotes, not as canon):
| Item | Illustrative unit cost (USD) | Note |
|---|---|---|
| ESP32-C3-MINI-1 module | 1.70 | Pre-certified; includes antenna and 4 MB flash |
| SHT40 temperature/humidity sensor | 1.50 | The most expensive sensor on the board |
| LIS2DH12 accelerometer | 0.90 | Motion wake via INT1 |
| MCP73831 charger + DW01A/FS8205 protection + TVS | 0.72 | 500 mA charge, cell protection, USB surge |
| XC6220 LDO (Stage 1–3 breadboard regulator) | 0.25 | Replaced by a TPS62840 buck in Lesson 4.2 (≈ +0.80) |
| USB-C receptacle, JST-PH, button, WS2812B-2020, passives | 0.75 | The "small stuff" that adds up |
| 4-layer PCB, 35 × 25 mm, at 25–30 pcs | 0.60 | Board cost is quantity-sensitive |
| Assembly (SMT, small batch) | 0.60 | Per-unit share of setup + placement |
| 1000 mAh LiPo cell with protection tab | 1.60 | Second-largest line item |
| Total (LDO version) | ≈ 8.62 | Headroom to 9.50: ≈ USD 0.88 |
Two lessons hide in that table. First, the microcontroller is not the dominant cost — the sensors and the cell are, together, more than the module. Second, once the buck regulator arrives in Stage 4 the headroom shrinks to roughly ten cents, which means every "small" addition a stakeholder requests (a buzzer, a second LED, a bigger cell) must displace something else. A cost constraint is a coupling: it forces the energy decision and the feature list to negotiate.
Timing: deadlines the physics sets
When someone picks up the instrument Beacon is attached to, the accelerometer's interrupt fires and the report must reach the gateway within two seconds. Two seconds sounds lazy to a software engineer used to microsecond timers. It is not, because the chip is in deep sleep with its clocks stopped and its RAM mostly unpowered. Waking, re-running the bootloader, initialising the radio, sampling the sensors, and transmitting takes a few hundred milliseconds end to end on an ESP32-C3 (an illustrative figure; you will measure the real one in Stage 3), and the motion-detection latency of the LIS2DH12 depends on its output data rate — at 10 Hz the sensor itself cannot notice anything faster than about 100 ms. The two-second budget is therefore roughly: sensor detection (≤ 100 ms) + wake and boot (hundreds of ms) + radio burst (tens of ms) + gateway scan window (the gateway is not listening continuously either). Every one of those is a design decision with a timing consequence, and Stage 3 is where they are made.
Thermal: the constraint that shows up as smoke
Beacon is a low-power device, so thermal seems irrelevant — until you consider the charger. The MCP73831 is a linear charger: it drops the difference between the 5 V USB input and the cell voltage across itself, at the full charge current. At 500 mA into a cell sitting at 3.7 V, that is (5.0 − 3.7) V × 0.5 A ≈ 0.65 W dissipated in a package the size of a grain of rice. The MCP73831 has internal thermal regulation that folds the current back when the die gets hot, which is why it survives — but it also means "500 mA charging" is a claim about a cool board, and a Beacon sealed in an IP54 enclosure in a 45 °C room will charge slower than the spec sheet promises. Thermal constraints rarely announce themselves on the bench at 22 °C. They announce themselves in the field. Lesson 1.2 does the dissipation arithmetic properly; Lesson 4.4 designs the charger.
Size: the constraint that makes the others fight
Beacon's PCB is limited to 35 × 25 mm, four layers. That is 875 mm² of board, and the ESP32-C3-MINI-1 alone is 13.2 × 16.6 mm — 219 mm², a quarter of the total, before you account for the fact that its antenna end must sit at the board edge with no copper underneath. A USB-C receptacle, a battery connector, a charger, protection, two sensors, an LED, a button, test points, and routing all have to fit in what is left. Size is not an independent constraint; it is the one that turns the others into a zero-sum game. A bigger cell would fix energy but not fit. A buck regulator would fix energy but needs an inductor, which needs area. You are about to feel this coupling directly.
SEE ITConstraint budget explorer — three budgets, one board
Below are Beacon's three hardest budgets — energy (a 1000 mAh cell against a six-month requirement), cost (IDR 150,000 ≈ USD 9.5), and area (875 mm² of PCB, of which the antenna needs a copper-free zone). Every control is a real design decision from the canon. The defaults are Beacon's final design. Your job is to break it, then understand exactly which wall you hit and why the fix for one wall pushes you into another.
Three things to try, in this order. First, switch the regulator to the LDO: the sleep current roughly doubles and the derated life drops below the requirement — this single toggle is why Stage 4 replaces the breadboard regulator with a buck. Second, restore the buck and turn on the "power" LED: one milliamp of LED, an amount nobody would notice on a dev kit, cuts the life from years to weeks. Third, add the GPS the stakeholder wanted, and note that it fails all three budgets at once — then try to rescue it with the 2000 mAh cell and watch the cost wall catch you. The pricing and area figures are illustrative; the current model is calibrated to Beacon's measured numbers.
DEFINITIONHow boards die: the four-way failure taxonomy
This course sorts every failure you will ever debug into four classes. The classes are not academic; they map to different instruments, different lessons, and different first questions to ask at the bench. Each stage of the course exists because one of these classes bites in a specific way.
Electrical — wrong voltage or wrong current, somewhere
The regulator browned out when the radio burst pulled 300 mA through a trace that could not supply it. A 5 V signal reached a 3.3 V input. A pull-up was missing and an I2C line floated. A GPIO was asked to source 40 mA when the datasheet said 20. The MOSFET was driven from 3.3 V but its on-resistance was specified at 4.5 V, so it sat half-on. First question: what is the voltage at this node, and what current is flowing through it, right now? Instruments: multimeter, then oscilloscope. Stages: 1 (physics), 2 (circuits), 5 (layout, because a trace is a resistor and an inductor).
Thermal — power that had nowhere to go
The 0603 resistor was correct by Ohm's law and rated for 0.1 W, and it was asked to dissipate 0.25 W. The linear charger folded back its current in a sealed enclosure. The LDO dropped 1.4 V at 200 mA and got hot enough to shift its output. Thermal failures are electrical failures integrated over time: P = V·I is the bridge, and the package's ability to move that power to the air is the limit. First question: how many watts, into what package, at what ambient? Instruments: a finger (carefully), a thermal camera, a thermocouple. Stages: 1.2, 1.5, 4.2, 4.4.
Timing — the right thing, too late or too early
The interrupt arrived while the I2C transaction was mid-byte and the bus hung. The watchdog reset the chip during an OTA write. The sensor was read 2 ms after power-up, before it had finished its own boot. The BLE burst went out before the crystal had settled. The debounce was too short and one press became three. Timing failures are the ones that appear intermittently, pass in the lab, and fail in the field. First question: what is the order and spacing of events, in microseconds? Instruments: logic analyser, oscilloscope with a trigger, logs with timestamps. Stages: 3 (firmware), 1.7 (measurement).
Integration — every part correct, the whole wrong
Each subsystem passed its own test. Together, the radio's burst dipped the rail enough to corrupt the ADC reading of the battery, so the firmware reported "low battery" every time it transmitted. The antenna was perfect until the enclosure's screw sat 3 mm from it. The breadboard prototype worked; the PCB did not, because the breadboard had 5 pF of stray capacitance in exactly the place the design needed it. Integration failures are the reason bring-up (Stage 6) is its own discipline, and why a schematic review is not a substitute for a measured board. First question: what changed between the configuration that worked and the one that does not? Stages: 5, 6.
A checklist tells you what to look at. A taxonomy tells you what kind of thing you are looking for, which determines the instrument you pick up first. Reaching for the logic analyser to debug a brown-out wastes an afternoon, because a logic analyser sees only ones and zeros and a brown-out lives in the analogue space between them. Ask "which of the four is this?" before touching a probe, and you will be right about the instrument far more often than not. Lesson 1.7 is about the instruments; this section is about choosing.
You will notice that the four classes are not independent. A thermal failure begins as an electrical one (too much current), a timing failure often has an electrical cause (a slow rise time from a weak pull-up), and integration failures are frequently all three interacting. The taxonomy is a way to start, not a way to finish — and the failure-mode angle in every lesson of this course names which class the lesson is defending against.
BEACONMeet Beacon: the loop, the box, and the numbers already fixed
Every lesson in this course advances one concrete product. Beacon is a battery-powered BLE tag that attaches to a piece of equipment — a lab instrument, a tool cart, a rental asset — and once a minute reports temperature, humidity, battery level, and whether the thing has moved since the last report. A motion event wakes it early. Gateways relay the reports to a small dashboard over MQTT. It charges over USB-C and can be updated in the field. Twenty-five units will be built and deployed for thirty days as the course's final milestone.
Why this product and not a robot arm or a smart plug? Because Beacon is small enough to actually build and finish, and constrained enough that nothing about it is easy. A mains-powered device would let you skip the energy wall. A one-off prototype would let you skip cost. A device with no deadline would let you skip timing. Beacon has all five walls at full height, which means every stage of the course has something real to push against.
Three of Beacon's constraints are named in this lesson's brief and are already fixed in the canon: ≥ 6 months on the 1000 mAh cell at one report per minute at 22 °C (that is the ≈ 38 µA design target you just derived); ≤ IDR 150,000 per unit at 25 units excluding the enclosure; and ≤ 2 s from a motion event to a report on the air. The remaining requirements — 10 m BLE range through one plaster wall, sensor accuracy, USB-C charging at 500 mA, OTA with rollback, a 35 × 25 mm four-layer board, and an indoor 0–45 °C environment — are written out formally in Lesson 1.9. Stage 1 milestone: the requirements table R1–R9 exists with real numbers; an LED, a button, and the XC6220 LDO are running on a breadboard; and the first current measurement has been taken and compared to the budget above.
Here is what the loop looks like in ESP-IDF terms — not the whole firmware (that is Stage 3), but the skeleton that makes the "45 ms awake per minute" figure concrete. On an ESP32-C3, deep sleep is not a function that returns; the chip reboots on wake, so the "loop" is really the boot sequence running once per wake:
#include "esp_sleep.h" void app_main(void) { /* 1. why are we awake? (timer, motion INT on a GPIO, or first boot) */ esp_sleep_wakeup_cause_t why = esp_sleep_get_wakeup_cause(); /* 2. SENSE — ~15 ms: SHT40 + LIS2DH12 over I2C, battery via ADC */ beacon_sample(why == ESP_SLEEP_WAKEUP_GPIO); // flags "moved" /* 3. ACT — ~30 ms: 3 non-connectable BLE advertisements at 0 dBm */ beacon_advertise(); /* 4. SLEEP — the other 59.955 s at ≈ 8 µA */ esp_sleep_enable_timer_wakeup(60ULL * 1000000ULL); // microseconds esp_deep_sleep_start(); // never returns }
Two things to notice. First, the highlighted line is the entire energy strategy: the chip spends its life asleep, and the timer argument is the "1 report/min" requirement expressed in microseconds. Second, there is no while(1). The loop is closed by the hardware reset on wake, which has consequences for every variable you thought would persist — a timing-and-integration trap that Lesson 3.7 handles with RTC memory.
COMPARISONDesktop vs embedded: the same program, a different contract
Because the loop transfers from software and the box does not, it helps to see the contract side by side. The left column is what your laptop promises a Python script. The right column is what Beacon's board promises its firmware.
| Resource | Desktop assumption | Beacon's reality | What breaks if you forget |
|---|---|---|---|
| Energy | Infinite, from the wall | 1000 mAh, ≈ 38 µA average allowed | Dead in weeks (energy) |
| Compute | GHz, multi-core, cached | One RISC-V core at 160 MHz, awake 0.075 % of the time | Radio burst grows, budget blown (energy) |
| Memory | Gigabytes, virtual, swapped | 400 KB SRAM, 4 MB flash, RAM lost on every sleep | State vanishes at wake (timing/integration) |
| Heat | A fan somebody else designed | Whatever the FR-4 and the air will take | Charger folds back, LDO drifts (thermal) |
| Time | Best effort; the OS reschedules | ≤ 2 s motion-to-report; I2C timing in µs | Missed deadline, hung bus (timing) |
| Cost | Already paid for | ≤ USD 9.5 per unit, ≈ USD 0.1 headroom after the buck | Product unsellable (cost) |
| Space | A rack, a desk | 35 × 25 mm, four layers, antenna at the edge | Antenna over ground, 10 m becomes 3 m (integration) |
| Access | SSH in and fix it | Sealed in an enclosure on a cart in someone else's building | OTA is the only hand you have (R7) |
The last row matters more than it looks. On a desktop, a bug is an inconvenience that a patch fixes tonight. On a deployed Beacon, a bug that keeps the radio awake is a physical event: twenty-five batteries drain, twenty-five units go dark, and someone drives to the site. This is why the OTA-with-rollback requirement exists, why the firmware runs a self-test on boot, and why Stage 6 treats a post-mortem as a deliverable rather than a formality. Embedded engineering is, among other things, the practice of being paranoid about things you will not be able to reach.
People sometimes define embedded systems as "real-time systems." That is a subset, not a definition, and it misleads. Beacon has exactly one hard timing requirement (≤ 2 s after motion), and it is soft in practice — a report at 2.3 s is a degraded product, not a dangerous one. Meanwhile, a desktop audio workstation has far harder timing requirements than Beacon and is not embedded at all. Timing is one of the five walls, not the definition of the box. Insisting on a real-time operating system for a device that sleeps 99.9 % of the time is a classic way to spend the energy and cost budgets on a constraint you did not have.
WEAKNESSWhere this bites
The most common death of a first board is not a wrong calculation; it is a calculation that was never done, because the constraint it would have tested was never written. The engineer in the opening story did not miscompute the energy budget — they never had one. Their "requirement" was "it should last a long time," which cannot fail on paper and therefore fails in the field. The discipline is boring and non-negotiable: numbers, units, conditions, and a verification method, before parts are chosen. A requirement written after the design is a description of what you built, not a constraint on what you build. Lesson 1.9 makes this the stage's deliverable.
The ESP32-C3 datasheet's 5 µA deep-sleep figure is a typical value at room temperature with a specific set of RTC peripherals enabled. Design your six months around it and you will ship a product that lasts three: leakage roughly doubles for every 10 °C rise, cells self-discharge, retransmissions happen, and one unit in twenty-five will sit at the unlucky end of the distribution. Beacon's canon applies a 6× derating between the naïve 228 µA and the 38 µA design target precisely because typical is not a promise. Lesson 1.6 teaches you to read the conditions column as law; here, just absorb the habit of asking "under what conditions?" every time a number looks good.
Software engineers arriving in embedded work optimise what they know how to optimise: code speed, memory, elegance. On a device that is awake for 45 ms a minute, shaving 5 ms from the active window saves about 3 µA — while a 10 kΩ pull-up on a line that a sleeping peripheral holds low costs 3.3 V ÷ 10 kΩ = 330 µA, a hundred times more. The energy budget is dominated by the idle state, and the idle state is dominated by hardware decisions: which rails stay on, which parts have a sleep mode, which resistors leak. Before optimising code, measure the sleep current (Lesson 1.8) and find out which wall you are actually standing against.
KEY INSIGHTHow this connects
- Voltage, Current, Resistance, and Power (1.2) — the electrical and thermal failure classes get their arithmetic: why P = V·I is the quantity that destroys parts, and why a resistor that is correct by Ohm's law can still be the wrong part.
- Reading a Datasheet Without Getting Fooled (1.6) — the "typical is not a promise" warning becomes a method: min/max/typ, conditions, and a guided tour of the ESP32-C3-MINI-1 and SHT40 datasheets that this lesson's numbers came from.
- Breadboards, Prototyping, and the Bench (1.8) — Beacon's first physical milestone: the LDO, LED, and button on a breadboard, and the first sleep-current measurement compared against the 38 µA target.
- Beacon's Requirements: From Wish to Specification (1.9) — the stage deliverable: every constraint in this lesson becomes a numbered requirement with units, conditions, and a verification method, and the top-down power budget is derived formally.
The five walls and the four failure classes are the two coordinate systems this course uses everywhere. When a new topic appears — a pull-up value in Stage 2, a FreeRTOS priority in Stage 3, a trace width in Stage 5 — ask which wall it is defending and which failure class it prevents. Both questions always have answers, and the answers are what separate a designer from someone assembling reference circuits.
GLOSSARYKey terms introduced
- Embedded system
- A dedicated sense–compute–act loop bound by physical constraints — energy, cost, timing, thermal, size — that it must satisfy without outside help. Defined by the box, not the loop.
- Constraint
- A limit on the design expressed as a number with units and conditions. "Long battery life" is a wish; "≥ 6 months at 1 report/min at 22 °C" is a constraint. Only constraints can be verified or violated.
- Average current
- The time-weighted mean of a device's current draw across all its states. For a duty-cycled device it is dominated by the sleep state; Beacon's design target is ≈ 38 µA.
- Derating
- Deliberately designing to a fraction of a rated or typical value to absorb temperature, ageing, tolerance, and unmodelled behaviour. Beacon derates its naïve 228 µA energy budget by 6×.
- Duty cycle
- The fraction of time a system spends in its active state. Beacon's is 45 ms per 60 s ≈ 0.075 %, which is why idle current matters more than active current.
- Failure taxonomy
- The course's four-way sorting of failures — electrical, thermal, timing, integration — each mapped to a first question, an instrument, and a stage.
- Bill of materials (BOM)
- The complete list of parts on a product with quantities and unit costs. Beacon's must total ≤ IDR 150,000 (≈ USD 9.5) at 25 units, excluding the enclosure.
- Deep sleep
- An MCU power state in which the CPU, most RAM, and most clocks are off and only a small always-on domain (RTC timer, wake-up pins) remains. On the ESP32-C3 the module draws about 5 µA and wake is a reboot.
ACTIVE RECALLCheck your understanding
Answer in your own words first, then reveal.
1A friend says "an embedded system is a computer without an operating system." Why is that the wrong definition, and what is the right one?›
It confuses a common feature with the defining one. Plenty of embedded systems run full operating systems (a Linux board inside a vending machine), and plenty of OS-free programs are not embedded (a bare-metal benchmark on a desk). The defining feature is the box: an embedded system is a sense–compute–act loop that must satisfy physical constraints — energy, cost, timing, thermal, size — without outside help. The "without outside help" clause is what turns those from performance goals into hard limits. Whether there is an OS underneath is an implementation choice made in response to those constraints, not the definition.
2Beacon is awake for 45 ms at 40 mA once a minute and sleeps at 8 µA the rest of the time. Which state costs more energy per minute, and by how much? What does that tell you about where to optimise?›
The active burst: 40 mA × 0.045 s = 1.8 mA·s per minute, which averages to 30 µA over 60 s. Sleep contributes 8 µA. So the burst is nearly four times the sleep cost at these numbers. But the lesson is the sensitivity, not the ratio: the burst is already near its floor (a sensor read and three packets), whereas sleep current is one careless decision away from being 50 µA or 1 mA — an LED left on, a divider left connected, a regulator with high quiescent current. A 1 mA "power" LED alone would be 33× the burst. Optimise by measuring the sleep state first and eliminating hardware leaks, then trimming the burst. Code speed is the last lever, not the first.
3Sort these into the four failure classes: (a) the ADC reads low every time the radio transmits; (b) a 0603 resistor discolours after an hour; (c) the I2C bus hangs once a day; (d) a GPIO input reads random values. Name the instrument you would reach for first in each case.›
(a) Integration — each part works alone; the radio burst dips the rail and corrupts the ADC. First instrument: oscilloscope on the 3.3 V rail, triggered on the transmit. (b) Thermal — the part is dissipating more than its package can shed; it may be correct by Ohm's law and still wrong by P = I²R. First instrument: a calculator, then a thermocouple or thermal camera. (c) Timing — an intermittent bus hang is almost always an ordering or interruption problem (an interrupt mid-transaction, a clock-stretch that times out). First instrument: logic analyser on SDA/SCL with a long capture. (d) Electrical — a floating input with no defined level. First instrument: multimeter on the pin, then check for the missing pull-up or pull-down. Note that (a) and (d) both involve voltage, but (a) is about the whole system interacting and (d) about a single node — which is why they call for different first questions.
4The budget explorer shows that adding a GPS module fails energy, cost, and area simultaneously, and that a 2000 mAh cell rescues energy but breaks cost. What general principle about constraints does that demonstrate, and what should a designer do when a stakeholder asks for the GPS anyway?›
Constraints are a coupled system, not a checklist. Fixing one wall by spending against another is the normal shape of an embedded trade-off, and the widget makes the coupling visible: energy ↔ cost (bigger cell), energy ↔ area (buck needs an inductor), features ↔ everything. The right response to the GPS request is not "no" and not "yes" — it is to show the stakeholder the numbers: which requirement they are proposing to relax (six months becomes six weeks, or IDR 150k becomes IDR 220k, or the board grows past 35 × 25 mm), and let them make the trade knowingly. That is what requirements are for: they turn an argument about taste into a decision about numbers. Lesson 1.9 formalises the table that makes that conversation possible.