Beacon's Schematic v0: The Front-End Comes Together
A schematic is an argument, not a drawing. Every part should be able to explain why it is there.
🎯 By the end you'll understand
How the eight lessons of this stage assemble into one sheet: battery sensing with a switched divider, an I2C bus with sized pull-ups, a debounced button on a strapping pin, an LED behind a high-side switch, USB-C with its protection and its CC resistors, and reverse-battery protection. How to run a structured design review in which every component states the reason it exists, the failure it prevents, and the number that sized it. What that review actually finds on this schematic — including a gate-drive error that would have passed every electrical rule check. And the discipline of writing down what is deliberately still open, so that Stages 3 and 4 inherit decisions rather than mysteries.
KEY INSIGHTEvery part is a claim, and claims can be wrong
The most expensive components on any board are the ones that are there because a reference design had them. They cost money, area and BOM lines, they are never questioned because nobody knows what they do, and when one of them is the wrong value the symptom appears three stages later wearing a firmware costume.
A design review that consists of three engineers looking at a schematic and saying "looks fine" is worse than no review, because it produces confidence without information. The version that works is mechanical and slightly tedious: go part by part, and for each one say out loud what it is for, what goes wrong without it, and where its value came from. Most parts pass in ten seconds. A few produce an uncomfortable pause. Those pauses are the entire value of the exercise — and on Beacon's v0 there are three of them, one of which is a genuine error that no rule check could have caught.
Three sentences per component. "This is here because…" — the function, in one clause. "Without it, …" — the specific failure, with a symptom you could observe on a bench. "Its value is X because…" — an arithmetic result or a datasheet requirement, not a habit. A component that cannot produce all three sentences is either unnecessary or not yet understood, and both of those are findings.
CORE CONCEPTThe sheet, block by block
Beacon's schematic v0 fits on one page in six blocks. It is not the finished design — the regulator and the charger are Stage 4's work, and every pin assignment is provisional until Stage 3 — but every part on it is here because a lesson in this stage put it here.
Reading it in the order the current flows: USB-C brings in VBUS and the data pair, with two 5.1 kΩ pull-downs so a source will actually turn VBUS on, a low-capacitance TVS array on all three exposed lines, and series resistor footprints on D±. VBUS feeds the charger block, reserved for Lesson 4.4. The cell is a protected 1000 mAh LiPo on a JST-PH connector. Its positive terminal passes through Q2, the reverse-polarity P-MOSFET, into the regulator block — an LDO on the breadboard now, a TPS62840 buck once Lesson 4.2 has done the arithmetic — which produces the 3V3 rail.
That rail supplies four things. The ESP32-C3-MINI-1, with 100 nF and 10 µF at its supply pin and the recommended 10 kΩ / 1 µF delay network on EN so the module does not start before the rail is up. The I2C bus on GPIO6 and GPIO7, with 4.7 kΩ pull-ups and the two sensors, plus the accelerometer's INT1 line on GPIO3 — which has to be one of GPIO0–GPIO5, because only those are in the RTC domain and can wake the chip from deep sleep for R4. The LED, behind Q3 on GPIO10 with its mandatory 100 kΩ gate pull-up and its data line on GPIO5. And the battery-sense divider, behind switch Q1 on GPIO1, feeding GPIO4. The button sits on GPIO9 with an RC network, and carries a red note about strapping that Stage 3 will have to honour.
HOW IT WORKSHow to run a design review that finds things
The method below is deliberately boring. Its value is that it is exhaustive and that it produces a written artefact, which means the next revision inherits reasoning rather than archaeology.
Walk the power path first, in the order energy flows
Source, protection, conversion, distribution, loads. Power problems create symptoms everywhere else, so finding them first saves you from chasing their consequences. At each node, ask what the voltage is at the extremes — a full cell at 4.2 V and a flat one at 3.0 V — and check every connected pin's absolute-maximum rating against the worst of them.
Then every component, three sentences each
Function, failure prevented, source of the value. Write them down. This is where the pauses happen. A component that produces "it was in the reference design" is not condemned — reference designs encode real experience — but it is flagged for someone to actually look up.
Then every net that leaves the board or touches a human
Connectors, test pads, buttons, anything a finger or a jig can reach. Each one needs an answer to "what happens when this is shorted to ground, shorted to the rail, or hit with 8 kV?" Lesson 2.6's rule applies: only exposed conductors need protecting, and every exposed conductor needs a decision.
Then every pin with a special function
Strapping pins, boot pins, pins that are also ADC channels, pins that are also crystal inputs. On the ESP32-C3 this list is short and lethal: GPIO9 selects boot mode and GPIO8 also participates; GPIO2 is a strapping pin that must read high at reset; GPIO18 and GPIO19 are the native USB pair; GPIO0 and GPIO1 are the 32 kHz crystal inputs; ADC1 is GPIO0–GPIO4 and GPIO5 is ADC2, which Wi-Fi can take away; and only GPIO0–GPIO5 are in the RTC domain and can wake the chip from deep sleep. Every one of those is a schematic decision with a firmware consequence, and two of them collide on this board.
Then the sleep state of every node
This is the review step that battery products need and mains products do not. Go through the schematic and ask, for every net: what is its voltage when the device is asleep, and does any current flow? Lesson 2.1's stuck bus, Lesson 2.7's floating gate, and Lesson 2.4's always-on divider are all found here and nowhere else.
Finally, write down what is still open
Not everything can be decided at this stage, and pretending otherwise produces schematics full of confident guesses. An open item with an owner and a lesson number is a plan; the same item undocumented is a defect waiting for a bring-up session.
"What is the worst thing a reasonable person could believe about this component?" Applied to a P-channel MOSFET it produces "that it is oriented like a load switch". Applied to a pull-up resistor it produces "that a bigger value is always safer". Applied to a decoupling capacitor it produces "that its position on the schematic reflects its position on the board". Each of those beliefs is common, defensible and wrong, and asking the question is faster than waiting for the belief to show up as a symptom.
SEE ITJustify every part
Nine components from Beacon's v0. For each one, choose the reason it exists and the value or topology that sizes it. Wrong answers are not marked wrong — they are run, and the widget tells you the symptom the board would show. Getting all nine right means the schematic has become a set of testable claims rather than a picture.
Two of the nine are worth dwelling on. Q1, the divider switch, has an option that reads as obviously correct — a P-channel MOSFET with its gate driven straight from a GPIO — and is the error this review actually found on v0. And the CC resistors have an option, one shared 5.1 kΩ instead of two, that appears on a remarkable number of first-revision USB-C boards and produces a device that charges when the cable is one way round and not the other.
WEAKNESSWhat the review found
Three findings, in descending order of severity. This is what a review is for; a review that finds nothing has usually not been run properly.
The canon calls for the battery divider to be switched by a small P-MOSFET so it does not drain the cell. Drawn the obvious way, that FET's source sits at VBAT — anywhere from 3.0 V to 4.2 V — and its gate is driven by a GPIO that swings between 0 V and 3.3 V. Work out VGS in both states with a full cell: gate low gives VGS = 0 − 4.2 = −4.2 V, which turns it on properly; gate high gives VGS = 3.3 − 4.2 = −0.9 V, which does not turn it off. The divider leaks continuously, the sleep current is 2 µA over budget, and the pin sits in the worst place a pin can sit: neither driving the switch off nor honestly on. Reach for the obvious patch — a pull-up from the gate to VBAT — and it gets worse, because releasing the GPIO then lets an external 4.2 V node drive a 3.3 V pin, which its protection diode has to absorb.
The fix is a level shift: a small N-channel MOSFET (or a digital transistor) whose gate takes the 3.3 V GPIO and whose drain pulls Q1's gate to ground, with a 4.7 MΩ resistor from Q1's gate to VBAT to hold it off by default. Two extra parts, and the default state is now "off" through power-on and reset as well as sleep. Note what caught this: not a rule check, which sees a perfectly legal net, but the review question "what is VGS in each state, at both ends of the battery's range?" And note what happens to the finding next, because it is the part that matters. It is written up, costed at two parts, and carried forward as an open change — and Rev A is fabricated without it, because 1.85 µA measured against an 8 µA sleep budget reads like margin somebody can spend later. Lesson 5.9 accepts it a second time, for the same reason, and Lesson 6.9 measures what it actually cost. A review improves the argument on paper; only a change order improves the board.
Canon specifies 22 Ω in series with D+ and D−, and the reasoning from Lesson 2.6 is sound: series resistance limits what the TVS lets through and limits fault current if a pin meets VBUS. But USB 2.0 requires the driver's total output impedance, including any series resistor, to fall between 28 and 44 Ω. If the ESP32-C3's integrated USB PHY already presents something near 40 Ω, adding 22 Ω puts the pair at roughly 62 Ω, outside the specification, with reflections and a degraded eye.
This is not resolvable from first principles — it depends on a number in Espressif's documentation for the specific PHY. The review's output is therefore not a value but an action: the footprints stay on the schematic, the BOM line reads "22 Ω / 0 Ω — value confirmed in 4.4 against the PHY's specified output impedance", and the bring-up procedure includes an enumeration test. Leaving a populatable footprint costs nothing; guessing costs a board spin.
GPIO9 on the ESP32-C3 is sampled at reset to choose the boot mode: held low while the chip comes out of reset, it selects serial-download mode instead of running your firmware. Beacon's user button is on GPIO9, so a user holding the button while the tag powers up will put it into download mode and it will appear dead. Canon lists this as a known Rev A defect that Rev B fixes, which makes it teaching material rather than an embarrassment — but a review that did not surface it would have let it reach the pilot as a surprise.
The v0 action is threefold: a red note on the schematic reading "GPIO9 is a strapping pin — button held at power-up enters download mode; see 3.3"; a line in the Stage 3 firmware backlog to detect and report the condition where possible; and an entry on the Rev B change list to move the button to a non-strapping pin. Three cheap actions in place of one expensive surprise. Note also that the RC on this pin does double duty: R8 and C2 debounce the switch with τ = 10 kΩ × 100 nF = 1 ms, and the same capacitor slows the edge at reset, which is a small mitigation and not a fix.
BEACONThe Stage 2 milestone, and what is deliberately open
The milestone for this stage is met: Beacon's schematic v0 exists on paper and is reviewed — battery-voltage sensing with a switched divider, an I2C bus with correctly sized pull-ups, a debounced button, an LED driver behind a high-side switch, USB and battery protection, and a crystal-referenced clock plan. Here is the sheet's own summary of itself, which is the artefact the next three stages will actually use.
| Block | Decided | The number that decided it | Lesson |
|---|---|---|---|
| Battery sense | 1 MΩ / 1 MΩ divider, 100 nF, switched by a P-MOSFET (gate GPIO1, via an N-MOSFET level shift) into GPIO4 = ADC1_CH4 | 2.1 µA while enabled; 500 kΩ Thevenin against a ~10 pF sample capacitor; τ = 50 ms, so read ≥ 250 ms after enable | 2.3, 2.4 |
| I2C bus | 4.7 kΩ pull-ups to 3V3; SHT40 at 0x44 and LIS2DH12 at 0x19 on GPIO6/GPIO7 at 400 kHz; INT1 on GPIO3, inside the RTC domain so it can wake the chip | Rise time under the 300 ns Fast-mode limit at the expected bus capacitance, against 0.7 mA per line when a device holds the bus low | 2.1 |
| Button | SW1 to GPIO9, 10 kΩ + 100 nF | τ = 1 ms against typical contact bounce; GPIO9's strapping behaviour flagged in red | 2.1, 3.3 |
| LED | WS2812B-2020 on 3V3 behind a P-MOSFET, gate on GPIO10 (active low, driven directly — the source is on the 3.3 V rail, so no level shift is needed), 100 kΩ gate pull-up, data on GPIO5 | 1 mA idle against an 8 µA sleep floor; 0.7 × 3.3 V = 2.31 V logic threshold met from a 3.3 V output | 2.7 |
| Power integrity | 100 nF + 10 µF at the module; 100 nF at each sensor and on the switched LED rail; unbroken ground plane on layer 2 | Loop inductance ≈3 nH at 2 mm over a plane, versus ≈68 nH at 15 mm without one — the difference between a 75 mV notch and a 1.7 V one | 2.5 |
| Protection | PRTR5V0U2X on VBUS and D±; 22 Ω / 0 Ω footprints on D±; reverse-battery P-MOSFET drain-to-cell; two 5.1 kΩ CC pull-downs | IEC 61000-4-2 at 8 kV contact is a 30 A first peak; ≈1 pF keeps USB full speed alive; 50 mΩ costs 2 mV where a Schottky would cost 0.30 V | 2.6 |
| Clock | No 32.768 kHz crystal. Sleep timing from the internal RC, calibrated against the module's 40 MHz crystal | The payload carries no timestamp and there is no scheduled window, so only interval accuracy is required — and it saves 1 µA plus GPIO0 and GPIO1 — one an ADC channel, the other already the divider's enable output | 2.8 |
These are on the sheet in a text box, not in someone's memory:
1. Regulator not chosen. An XC6220 LDO carries the breadboard through Stages 1–3; the TPS62840 buck is selected in 4.2 once the power budget is measured. The schematic reserves the block and the footprint decision rides with it.
2. Charger block reserved. MCP73831 at 500 mA, designed properly in 4.4 together with the USB-C current negotiation and the thermal question.
3. Pin assignment fixed, but unverified against the module. The map is decided — GPIO4 battery sense, GPIO1 divider gate, GPIO6/GPIO7 I2C, GPIO3 accelerometer interrupt, GPIO10 LED gate, GPIO5 LED data, GPIO9 button, GPIO18/GPIO19 USB — and Lesson 3.3 must confirm every one against the ESP32-C3-MINI-1's own pinout, which does not bring out every pin the bare chip has. Anything that moves gets re-checked against three lists at once: ADC1 channels, RTC-domain wake pins, and strapping pins.
4. D± series value unconfirmed. 22 Ω or 0 Ω, decided in 4.4 against the PHY's output impedance.
5. Test points not yet placed. The Tag-Connect TC2030 footprint and four pogo pads are a Stage 5 layout concern (5.5) and a Stage 6 jig concern (6.3), but the nets they need — UART, EN, GPIO9, 3V3, GND — are named now so they exist to connect to.
6. No protection on the test pads. A considered risk, mitigated procedurally, first on the Rev B list if the pilot produces an unexplained dead unit.
One last habit worth installing, because it costs nothing now and saves a stage later: write the tests the schematic implies while you still remember why. Beacon's sheet carries four, each one a sentence that Lesson 6.1's bring-up procedure will execute literally. "Sleep current with the LED rail gated off must measure under 10 µA in series with the battery." "Battery divider must read within 50 mV of a multimeter at the cell, 250 ms after enable." "Reversing the cell through a 50 mA current-limited supply must draw no current." "The board must enumerate over USB-C in both cable orientations." Those four sentences are the schematic's argument restated as claims that can fail — which is the only form in which an argument is worth anything.
WEAKNESSWhere this bites
Reference designs are enormously valuable and they encode assumptions you cannot see. A development kit's schematic includes parts for USB-powered operation, for a debug header you will not fit, for a 5 V rail you do not have, and for an EMC environment quite different from yours — and it omits everything specific to a battery product, because it is not one. Copying it wholesale gives you a board that works and a bill of materials nobody can defend, which is exactly the state this lesson exists to prevent. Use reference designs as evidence, part by part, with the three sentences applied to each. Where the reference disagrees with your arithmetic, find out why before you follow it; sometimes it knows something you do not, and finding out which is the point.
An electrical rule check finds unconnected pins, outputs driven against each other, and power pins with no source. It is worth running and it is not a review. Every one of this lesson's three findings passes an ERC cleanly: Q1's gate is connected to a valid driver, the 22 Ω resistors are legal passives, and GPIO9 is an ordinary input. Rule checks verify the grammar of a schematic; a review verifies its claims. The two are complementary and neither substitutes for the other, and the difference matters most exactly where automated checking looks most reassuring.
A schematic drawn for a mains-powered product is reviewed in one state: powered and running. A battery product has at least three — running, sleeping, and the awkward seconds between power-on and the moment firmware configures the pins — and most of its expensive defects live in the second and third. The always-on divider, the floating gate, the bus held low by a confused slave, the pull-up feeding an unpowered device through its protection diode: none of these are visible when you look at a schematic and imagine it working. The habit is to walk the sheet a second time asking "and what is this net doing while the device sleeps?", and a third time asking "and what is it doing in the two hundred milliseconds after power-on, before any code has run?" Both passes take twenty minutes and both routinely find something.
KEY INSIGHTHow this connects
- Logic Levels, Pull-ups, and Open-Drain (2.1) — the 4.7 kΩ pull-ups and the rule that no line may sit low while the tag sleeps.
- ADCs and DACs: Sampling the Real World (2.4) — the divider's ratio, its 100 nF reservoir, and the 250 ms settling rule that became a firmware requirement.
- Decoupling, Grounding, and Return Paths (2.5) — the decoupling drawn beside the pins it serves, and the two layout constraints written as schematic notes.
- Protection: ESD, Reverse Polarity, Overcurrent, and Inrush (2.6) — the TVS, the reverse-battery FET and its orientation, the CC resistors, and the parts deliberately left out.
- Switching Things: Driving LEDs, Motors, and Relays (2.7) — the high-side switch and the 100 kΩ pull-up that keeps three years of battery life.
- Inside a Microcontroller: Core, Memory, Peripherals, and Buses (3.1) — next: the chip this sheet has been arranging itself around gets opened up, and every pin assignment left provisional here becomes a decision about peripherals, buses and memory.
Stage 3 turns this sheet into firmware on a dev kit: drivers for both sensors, the state machine, the wake sources, and the strapping-pin trap made real. Stage 4 fills the two dashed blocks and measures whether the power budget this schematic assumed is the one the hardware delivers. Stage 5 turns it into copper, where the decoupling notes become placement rules and the ground plane becomes a layer. And Stage 6 runs the four tests written at the end of the previous section on a real board — the moment when this argument either holds or produces a Rev B change list, which are the only two acceptable outcomes.
GLOSSARYKey terms introduced
- Design review
- A structured pass over a schematic in which every component states its function, the failure it prevents, and the origin of its value. Distinct from an automated rule check, which verifies connectivity rather than intent.
- Electrical rule check (ERC)
- Automated verification of a schematic's connectivity: unconnected pins, conflicting drivers, unpowered supplies. It passes on every finding in this lesson.
- Strapping pin
- A pin sampled during reset to configure the chip's boot behaviour. On the ESP32-C3, GPIO9 selects serial-download mode when held low at reset, which makes it a hazardous place for a user button.
- Level shift
- A small transistor stage that lets a logic-level signal control a gate referenced to a different supply — required here because a P-MOSFET whose source sits at 4.2 V cannot be turned off by a 3.3 V output.
- Populatable footprint
- A component position on the board that can be fitted with a real value or a zero-ohm link, used to defer a decision that depends on measurement without risking a board spin.
- Open item
- A decision consciously deferred, recorded on the sheet with the lesson or stage that will make it. The difference between a plan and a defect is whether it is written down.
- Schematic note
- Text on a sheet that carries a constraint no component can express — a settling time, a layout rule, a firmware requirement created by a hardware choice. The main channel by which a schematic communicates with layout and firmware.
- Sleep-state review
- A second pass over a schematic asking, for every net, what its voltage is and what current flows while the device sleeps. The pass that finds most battery-product defects, and the one mains-powered design habits omit.
ACTIVE RECALLCheck your understanding
Answer in your own words first, then reveal.
1A P-MOSFET switches Beacon's battery divider, source at VBAT, gate driven by a 3.3 V GPIO. Compute VGS in both logic states with a full cell and say what is wrong.›
With a full cell at 4.2 V: gate low gives VGS = 0 − 4.2 = −4.2 V, which turns the FET fully on. Gate high gives VGS = 3.3 − 4.2 = −0.9 V, which for a logic-level P-channel part is somewhere between partially on and fully on — it certainly does not turn it off. The switch that exists to save 2.1 µA in sleep therefore does not switch, and the divider leaks continuously. There is a second problem: the GPIO is exposed to a gate node that sits above 3.3 V, which violates the pin's absolute-maximum rating of roughly VDD + 0.3 V.
The fix is a level shift: a small N-channel MOSFET whose gate takes the 3.3 V logic and whose drain pulls the P-MOSFET's gate to ground, with a high-value resistor (1 MΩ) from that gate up to VBAT to hold it off by default. The default state is now off through power-on, reset and sleep. A low-side N-channel switch at the bottom of the divider looks simpler and is not a substitute: with the bottom leg disconnected the sense node floats up to VBAT through the upper 1 MΩ, putting up to 4.2 V on an ADC pin rated to about 3.6 V.
2Give the three sentences for Beacon's 100 nF divider capacitor, and then for its 100 kΩ LED gate pull-up.›
C1, 100 nF at the divider tap. It is here because the ADC's sampling capacitor takes its charge from a local reservoir instead of from a 500 kΩ source. Without it, charge sharing between roughly 20 pF of stray capacitance and a ~10 pF sample capacitor makes every reading about a third low, consistently and stably, so the battery gauge reports a healthy cell as nearly flat. Its value is 100 nF because that is about ten thousand times the sample capacitor, holding the per-sample droop near 2 µV — and the consequence, τ = 500 kΩ × 100 nF = 50 ms, is the reason the sheet says "read ≥ 250 ms after enable".
R5, 100 kΩ from Q3's gate to 3V3. It is here because the high-side switch must default to off whenever the GPIO is not actively driving it. Without it, the gate floats in deep sleep and when the pin is high-impedance at power-on, partially enhancing the channel; a couple of hundred microamps of leakage takes the average from 38 µA to 238 µA and battery life from three years to 175 days, missing R1's 182 by about a week in a way no short bench test detects. Its value is 100 kΩ because it must be low enough to hold the gate against leakage and high enough that the 33 µA it draws while the LED is on is negligible over a 45 ms wake once a minute.
3Why does the schematic carry 22 Ω / 0 Ω footprints on D± rather than a decided value, and when is that an acceptable engineering answer versus an evasion?›
Because the correct value depends on a number the review did not have: the ESP32-C3 USB PHY's own output impedance. USB 2.0 requires the driver's total output impedance, series resistor included, to sit between 28 and 44 Ω. If the PHY is already near 40 Ω then 22 Ω puts the pair at about 62 Ω, out of specification, and 0 Ω is correct; if the PHY is nearer 20 Ω then the 22 Ω is exactly right. Both parts fit the same footprint, so leaving the position populatable costs nothing and defers the decision to Lesson 4.4, where the specification will be read.
It is a legitimate answer when three conditions hold: the alternatives share a footprint so no layout risk is deferred, the decision has a named owner and a named point at which it will be made, and there is a test that will confirm it. All three hold here — the bring-up procedure enumerates the device over USB. It becomes an evasion when the deferral is undocumented, when the options need different footprints, or when "we'll decide later" is applied to something that constrains the layout. The test is simple: can you state what would change on the board depending on the answer? If nothing, defer freely. If something, decide now.
4A reviewer says Beacon's schematic is incomplete because it has no crystal, no fuse, and two blocks drawn as dashed placeholders. Respond.›
Take the three separately, because they are three different kinds of thing.
No crystal is a decision, and it is recorded with its reasoning. The payload carries a sequence number and no timestamp, and nothing on the tag has to be awake at an agreed absolute moment, so only interval accuracy is required — which the internal RC oscillator satisfies with a hundredfold margin. Fitting one would cost about 1 µA against an 8 µA sleep floor and both GPIO0 and GPIO1, which are the C3's 32 kHz crystal inputs — one of them an ADC1 channel, the other already Beacon's divider-enable output. The sheet carries the trigger that would reverse the decision, so a future revision inherits the argument rather than repeating it.
No fuse is also a decision. The cell already carries a DW01A and FS8205 protection pair that interrupts a short in milliseconds, far faster and more appropriately than a thermal device. A PTC would add tens of milliohms, a hold current that falls in a warm warehouse, and a resistance that rises permanently after each trip, in exchange for protection that already exists.
The dashed blocks are the one point that is half right. They are incomplete, deliberately: the regulator choice depends on a measured power budget that does not exist until Stage 4, and designing the charger before the USB-C current negotiation is settled would mean designing it twice. Each block names its intended part, and each carries an open item with a lesson number. That is the difference between a plan and a gap — but the reviewer is right that they must be tracked, which is exactly why they are the first two entries on the open-items list rather than an absence someone might miss.