Disclosure: I work at Qoitech, the company that makes the measurement tool used in this article, and I thought it was worth sharing anyway.
Hi all,
We recently released an early preview of Otii MCP, allowing AI assistants like Claude Code, Cursor, and VS Code to interact with Otii power measurement instruments directly from the development environment.
To put it to the test, we used Claude Code and an Otii Ace Pro to optimize the firmware of an Olimex ESP32-DevKit-Lipo with a DS18B20 temperature sensor.
The experiment
The original firmware read the temperature, connected to Wi-Fi, published the data, and waited five seconds before repeating. During that idle period, the ESP32 remained active.
We asked Claude Code to introduce sleep modes and verify the improvement through Otii MCP.
The test setup included:
- Otii Ace Pro supplying 4.2 V, with a 0.5 A current limit.
- UART logging to identify firmware activities and measure energy between messages.
- A controllable USB switch to disconnect USB power during measurements and avoid skewing the results.
Claude replaced the temperature conversion delay with light sleep and the five-second idle period with deep sleep. It then rebuilt and flashed the firmware, captured new measurements, and compared the results.
What did we measure?
| Measurement | Before | After |
|---|
| Energy per cycle | 2.01 J | 1.07 J |
| Five-second idle energy | 0.874 J | 0.021 J |
| Temperature reading energy | 0.162 J | 0.040 J |
The result: approximately 47% less energy per cycle.
Interestingly, after optimizing the sleep periods, Wi-Fi communication became the dominant energy consumer, accounting for roughly 1 J per cycle.
One practical consideration: UART messages help identify measurement intervals, but they don’t always correspond to the exact transition into or out of sleep. For more precise timing, GPIO markers can provide better boundaries.
Where does Otii MCP add value?
Traditional Otii measurements and TCP API scripts remain useful for manual analysis and repeatable automated tests.
With Otii MCP, an AI assistant can help close the loop between firmware changes, real measurements, and the next optimization, without requiring engineers to manually coordinate every step.
This makes it particularly interesting for exploratory power optimization, where each measurement informs what to test next.
Want to see the full workflow?
We documented the experiment, including the firmware changes, measurement analysis, and additional optimization opportunities:
ESP32 power optimization with AI assistant and Otii MCP
You can also find the setup instructions and source code in the Otii MCP GitHub repository.
This is still an early preview, so feedback is very welcome!
What would you want an AI assistant to measure or optimize in your embedded projects?