Fifteen minutes to a power sweep
Claude went from a written brief to a running MCU power characterisation in 15 minutes, using PowerBench AI's event markers and API. The finished grid took longer, and the reasons are worth more than the speed.
0 views
I gave Claude a brief for a CH32V203 dev board at 01:14. By 01:23 it had written sweep firmware and flashed it to the board. At 01:29 the sweep was being recorded on PowerBench AI, my bench instrument. About seven minutes later the board had stepped through 420 stretches, each one labelled with the clock, peripheral state and CPU state it belonged to.
Characterising a microcontroller’s power is normally a slow job, because of the bookkeeping. You set a configuration, wait, read a meter, write it down, and hope you noted the right row. Fourteen clock settings, sixteen peripheral states and two CPU states make 432 cells once you remove the combinations that cannot exist. I would not do that by hand.
The fifteen minutes end at a running sweep. The grid was finished at 11:44 the same morning, for reasons I will come to. I also wrote the brief, and it was long. It carried the marker line map, the polarity, the warning that an attached programmer distorts readings, and the fact that this board’s regulator misbehaves below 3.6 V. Claude did not work those out. Everything I know about this bench went in, and the firmware, analysis and bench steps came out.
What it found
All figures are at the board input, 4.17 V through the on-board regulator, so they include that regulator.
- On HSI at 144 MHz the board draws 10.95 mA busy and 2.77 mA in WFI, which is 45.5 mW and 11.5 mW. At 8 MHz it is 0.83 mA and 0.39 mA.
- The slope is 73.9 µA/MHz busy and 17.0 µA/MHz in WFI.
- The crystal costs about 305 µA more than HSI at every step, busy or asleep. The PLL costs about 100 µA.
- Peripheral clocks scale with frequency. At 144 MHz in WFI, DMA1 alone adds 808 µA, TIM1 429 µA and TIM2 309 µA. Everything enabled together adds 2.26 mA to a 2.77 mA base.
- STOP is 14.1 µA with the low-power regulator and 63.5 µA without.

The live page has n and spread for every cell. There are 432 run cells at n = 2 to 5, with a median spread of 0.7 µA.
What it could touch
Speed came from what Claude had access to. Four things closed the loop:
- A programmer on the chip under test. It could flash, read back and compare without asking me.
- Event markers. Eight digital inputs on the hub, sampled once per packet at a 62 µs grain and stored in the recording. Seven work on my breadboard today.
- A recording API. It claims the session, starts a recording, stops it and releases it. No clicking.
- Statistics over any time window. The engine returns the current and power sums for a list of windows, so nobody has to download samples or write a decoder.
With those four, the firmware and a 629-line analysis script could be written straight against the instrument. Without the markers it would still need a console or a timed sync, and an attached programmer distorts the reading.
The marker feature is on a branch, not in a release. This run used it as deployed on my bench.
The chip labels its own data
This is the part I would copy.
The programmer has to be off during a reading, so the board runs unattended and has no way to report through a console. It says what it is doing on the marker lines instead. Before each stretch it sends a four-symbol frame holding the cell’s id, some status flags and a check. Then it drives all lines high for the measurement, so every run cell carries the same marker state.
The analysis script reads those frames back out of the recording, turns each one into a time window, and asks for the mean current in that window. It needs no host sync and no schedule to line up against, and a stretch that went wrong cannot end up in the wrong row.
Each pass also starts with a line walk: one line at a time goes low for 100 ms. The script derives the line map from that and refuses to continue if two walks disagree. It came back the same as the map I had measured by hand, with PA4 connected to nothing.
Why I believe the numbers
A label written by the firmware is only a claim, so the sweep tests it twice.
The firmware reads the clock registers live before each frame. Clock switch status, oscillator ready, PLL lock and the peripheral enables all go into the flags, and one bad flag drops the stretch.
The second test does not trust the firmware at all. Every stretch lasts exactly 1.000 s of the chip’s clock at its nominal frequency, and the hub times both edges on its own clock. A wrong PLL multiplier would show immediately. Across all cells the crystal reads +29 ppm against the hub and HSI reads +0.17 %, which is its trim error. The recording can tell the two oscillators apart with no help from the chip.
Where the minutes ran out
The first sweep hung at the end of its first pass. The firmware polled the watchdog’s status before the watchdog’s clock was running, so the status could never clear. Claude spotted a flat 0.63 mA with the lines stuck low, found its own bug and fixed it, and the fix needed a reflash. Its question asking me to replug the programmer sat until 10:08.
The second full run died 315 seconds in, and Claude asked whether anything had touched the USB. My answer was “yes usb cable moved and got disconnected”. The source goes off when the hub link drops, so the board lost power.
Then the pooled grid showed 380 µA of spread on some busy cells, against about 1 µA elsewhere. Claude split the cells by recording before accepting that. Busy cells on the first image read 4.3 % higher than on the fixed one, while WFI matched within 0.1 %. The busy loop sits at a different flash address in that build, which is the likely cause. It is not proven, because nobody tested it and the recordings were also hours apart. The 208 busy cells from that image came out of the grid, and one more pass replaced them.
Two things stay open in the note. All seven marker lines low cost 0.1 µA here, against a far larger difference I measured earlier the same day, and I cannot explain the gap. Rungs 3 and 4 of the current ranges also overlap near 0.65 mA, which appears to move those readings by about 11 µA.
What I would take from this
Fifteen minutes is real, but it is the time to a running sweep. A finished grid took two flashes, four recordings and about an hour and a half after I came back to it. The bench caused some of that delay, and so did I.
The first pooled grid mixed two images whose busy cells sat 4.3 % apart. The spread gave it away, and the per-recording split found it, because every stretch was labelled well enough to compare across runs. If you want an AI to characterise hardware quickly, give it the instrument’s API, and make sure the instrument can contradict what the firmware says.