Concepts
Accuracy and limits of each board
What each board can measure, and how finely.
The scope can only be as good as the board’s analogue input.
| Board | Input range | Resolution | Smallest step | Fastest rate |
|---|---|---|---|---|
| Arduino Uno | 0 V to 5 V | 10 bits | about 4.9 mV | 8 000 samples a second |
| ESP32 DevKit | 0 V to 3.3 V | 12 bits | 1 mV | 20 000 samples a second |
| Raspberry Pi Pico | 0 V to 3.3 V | 12 bits | about 0.8 mV | 200 000 samples a second (C++), 50 000 (MicroPython) |
Fastest signals
The fastest signal each board reads well, at its fastest rate, for each kind of reading (from the samples a cycle each needs; see Sampling):
| Board | Frequency only | Sine wave | Square wave | Precise readings | Never above |
|---|---|---|---|---|---|
| Arduino Uno | 2 000 Hz | 800 Hz | 400 Hz | 160 Hz | 4 000 Hz |
| ESP32 DevKit | 5 000 Hz | 2 000 Hz | 1 000 Hz | 400 Hz | 10 000 Hz |
| Raspberry Pi Pico, C++ | 50 000 Hz | 20 000 Hz | 10 000 Hz | 4 000 Hz | 100 000 Hz |
| Raspberry Pi Pico, MicroPython | 12 500 Hz | 5 000 Hz | 2 500 Hz | 1 000 Hz | 25 000 Hz |
- Frequency only: the frequency is right; the shape and peak to peak are not.
- Sine wave: its shape, and peak to peak within 5 %.
- Square wave: it looks square, and its duty cycle is within 5 points. So a 5 000 Hz square on an ESP32 has only 4 samples a cycle: its frequency reads right, but it will not look square.
- Precise readings: a sine within 1 %, a triangle within 5 %, a duty cycle within 2 points.
- Never above half the rate. None of these boards filters out faster signals, so one above this shows as a false, slower signal. The scope cannot tell, so check what you expect to see.
At a slower rate every figure falls in step: half the rate, half the figure.
These are about sampling alone. Each board’s own input adds its errors, below.
Each board’s input
- Arduino Uno. 10 bits over 0 V to 5 V. Its maker says the input works best from a source of 10 kΩ or less; from a weaker source, readings of a changing signal lag behind it.
- ESP32 DevKit. 12 bits, but Espressif gives about 150 mV to 2450 mV as the range where it is accurate, with errors of up to 7 steps between neighbouring readings and 12 across the range. On our board, 0 V read as 0.14 V and 3.3 V as 3.15 V. Keep signals in the middle of the range for the best readings.
- Raspberry Pi Pico (RP2040). 12 bits over 0 V to 3.3 V, but the chip measures as 8.7 effective bits: small, steady jumps at four points of the range (about 0.41 V, 1.24 V, 2.06 V and 2.89 V) are a known fault of the chip. Its input draws little, at least 100 kΩ.
- Raspberry Pi Pico 2 and Pico 2 W (RP2350). As the Pico, without those jumps: at least 9 effective bits.
Good to know
- Only positive voltages. The boards measure from 0 V up to their supply. A signal that swings below 0 V needs a level shift first; never connect one directly.
- The reference is the supply. On the Uno and Pico, readings are scaled to the board’s supply voltage, so a supply that is not exactly 5 V or 3.3 V scales every reading with it.
- The ESP32’s input is less linear near the ends of its range. Readings in the middle are the most trustworthy.
- Checked on the bench. Each board’s own 1 000 Hz test signal (490 Hz on the Uno) reads at the right frequency and duty cycle, with its harmonics where theory puts them, at both the default and an unrelated rate.
Sources
- ATmega328P datasheet: analogue input circuitry, Microchip.
- ESP32 datasheet: ADC characteristics, Espressif.
- RP2040 datasheet: ADC and erratum RP2040-E11, Raspberry Pi.
- RP2350 datasheet: ADC, Raspberry Pi.