ADC input scaler
0–30 V into an ESP32-S3 ADC pin


Summary
Scales a battery or bus voltage into one ESP32-S3 ADC channel, filters it for the sampler and clamps the pin against wiring faults. An optional high-side switch disconnects the divider between readings so a battery isn't drained.
Specs
| Input | 0–30 V |
|---|---|
| Ratio | 1/21, 0.1 % thin film |
| Accuracy | ±0.21 V at the input |
| Bandwidth | 167 Hz |
Key parts
- RT0805 0.1 %
- BAT54S
- BSS84
- BSS138
Checks
- ERC 0/0
- Netlist PASS
- ngspice
Known limits
- No TVS or reverse-polarity protection on the input
- Clamp current can lift the 3.3 V rail while the ESP32 sleeps
Warning. Reference design. Test first with a current-limited supply and protection. Not for unattended use.
- View files on GitHub (opens in a new tab)
- Schematic PDF (opens in a new tab)
- Read the full write-up (opens in a new tab)
Schematic generated with AI assistance at my direction; I reviewed pin assignments against the datasheets.