ESP32 Web Oscilloscope

ESP32 Web Oscilloscope — User guide

A browser-based oscilloscope for an ESP32 DevKit: up to four channels, triggering, measurements with statistics, cursors, math channels with derivatives and integrals, FFT, XY mode, a test-signal generator and separate body and screen colours. The version is shown at the end of this page.

1. Overview

The scope has two halves. The ESP32 reads voltages with its built-in analogue-to-digital converter (ADC). The browser page (scope.html) talks to the ESP32 over the USB cable using Web Serial, and does everything a scope's screen and front panel do. Nothing is installed on the computer and no internet connection is needed.

The ESP32 can feed the scope in three ways; the page detects which one automatically:

ESP32-DSO firmware

The ESP32 does nothing but measure. Fastest (up to 250 000 samples per second on the test board, with the DMA engine), triggers on the chip, peak detect, hi-res and a signal generator. Set up →

ScopeProbe library

Two lines added to your own sketch. The ESP32 keeps doing its job and streams readings in the background (up to 2000 per second). Set up →

Plain text

Any sketch that prints lines like 12345,1650 (time in ms, value in mV). Details →

A fourth source, Demo, runs a virtual ESP32 with a simulated RC circuit inside the page, so every control can be learned without hardware.

The documents

DocumentRead it when
User guide (this page)You want to wire something up and use the scope. Start here.
Oscilloscope fundamentalsYou are new to oscilloscopes, or want to know why: signals and the screen, sampling, the ADC, the input, aliasing, memory, the trigger, decimation and acquire modes, ETS, measurements, maths, the spectrum, with diagrams and real measurements.
Technical referenceYou need to know exactly how a number is produced: sample-rate rules, measurement formulas, the complete math-channel language, firmware commands and the binary protocol byte by byte.
Verification guideBefore trusting the scope with a real measurement: step-by-step tests of every claim against your multimeter, with pass criteria and a record sheet.
Self-testTo check the calculations in your browser (one click, no hardware).

Treat readings as unverified until you have done the verification guide on your board. The software is tested and the firmware runs on hardware, but its accuracy has not been confirmed on enough boards yet, and every ESP32's ADC is slightly different.

What is in the folder

The zip download has these files side by side. In the source repository the pages are in its docs/ folder (the published website), with firmware/ and tools/ beside it.

PathWhat it is
index.htmlThe home page: links to the scope, the firmware installer and the documents.
scope.htmlThe scope. Open it in Chrome or Edge. Keep it next to the js, css and img folders.
manual.html, fundamentals.html, reference.html, verify.html, tests.htmlThe five documents above.
firmware/esp32-dso/PlatformIO project: the dedicated oscilloscope firmware.
firmware/probe-example/PlatformIO project: an example sketch (RC charge/discharge) with the probe library. The library itself is lib/ScopeProbe/ScopeProbe.h.
tools/dso_read.pyA small Python client for the firmware, for logging or writing your own software.
flash/The ready-made firmware file (esp32-dso-1.5.1.bin, written at address 0) and the installer's description of it.
js/, css/, img/, icons/, vendor/Parts of the pages. js/dsp.js holds all measurement and maths code; vendor/esp-web-tools is the firmware installer (Apache-2.0 licence).
manifest.webmanifest, sw.jsLet the published site be installed as an app that works offline.

Key numbers (input range, sample rate, memory, timebase) are in the specifications.

2. Safety rules: read before connecting anything

An oscilloscope is the one tool you deliberately connect to live circuits. A commercial scope has protected inputs rated for hundreds of volts; the ESP32's pins have almost no protection. These rules protect the ESP32, your computer and you.

Never connect the ESP32 to mains (230 V / 120 V AC) or to anything directly powered from mains. That includes the inside of chargers, power strips, appliances and the primary side of any power supply. There is no safe "small" version of this. The scope is for low-voltage circuits only: batteries, USB power, bench supplies and isolated adapters such as phone chargers (output side only).

The ten rules

  1. 0 to 3.3 V at the pin, always. The absolute limits are −0.3 V and 3.6 V. Anything outside can permanently damage the pin or the whole chip. The pins are not 5 V tolerant.
  2. Higher voltages need a divider designed for the worst case, not the normal value (5.3). A "12 V" car or adapter circuit can show 14–15 V; a USB-PD charger can switch to 20 V.
  3. No negative voltages. Audio and other AC signals swing below 0 V: use the bias network in 5.4.
  4. Put a resistor in series with every input (1 kΩ for fast signals, 10 kΩ or more for slow ones). If you make a wiring mistake, it limits the current into the chip's protection diodes, which often saves the pin.
  5. One common ground, and only ground. The ESP32's GND is connected through the USB cable to your computer's ground. The scope's GND wire must go to the ground of the circuit you measure and nowhere else. Clipping it onto any other point creates a short circuit through the USB port (figure 1).
  6. Prefer running a laptop on battery when you measure circuits that have their own power supply. A charging laptop may have its ground tied to the building's earth; with another earthed supply this can cause ground loops and surprise currents.
  7. Coils and motors make spikes. Relays, solenoids and motors produce voltage spikes far above their supply when switched off (v = L · di/dt). Keep the flyback diode in place, and probe them only through a divider with a large margin.
  8. Don't feed a signal into an unpowered ESP32. A voltage on a pin while the board is unplugged can back-power the chip through its protection diodes. Plug the ESP32 in first and unplug it last, or keep the series resistor.
  9. Generator output: 3.3 V logic. Always use a series resistor (330 Ω minimum, 1 kΩ recommended). Never drive a large capacitor directly from a pin: at the switching edge, i = C · dV/dt is huge. The generator is off by default, every time you connect, and after Reset all settings.
  10. Capacitors bite back. Observe electrolytic polarity and voltage rating, and discharge big capacitors (through a resistor) before rewiring.
✓ Correct: one common ground Laptop USB ESP32 GPIO34GND probe point(0–3.3 V) circuit's ground (−) ✗ Wrong: GND clipped to a live node ESP32 GND +12 V node short circuit through the USB ground
Figure 1 — The scope's ground is your laptop's USB ground. Connect it to the circuit's ground, never to another point.

3. Quick start

3.1 Demo: one minute, no hardware

  1. Double-click scope.html (or open scope.html, the home page, and choose Open the scope) (Chrome or Edge recommended).
  2. Source = Demo (virtual ESP32). It starts by itself: CH1 (yellow) is the voltage across a 100 nF capacitor charged through 10 kΩ; CH2 (green) is the 200 Hz square wave driving it (the demo switches its virtual generator on for this).
  3. Continue with section 4, a short guided tour of the controls.

3.2 ESP32-DSO firmware: the full oscilloscope

Easiest: the firmware installer on the home page writes the firmware from the browser (Chrome or Edge, on the published website; browsers block it when the page is opened from a file). Then continue at step 5 below. Without the website (for example from the zip download): the ready-made firmware file is in the flash folder; write it with Espressif's esptool (pip install esptool): esptool --chip esp32 write_flash 0x0 flash/esp32-dso-1.5.1.bin. Or build it yourself with PlatformIO:

  1. In VS Code with PlatformIO: File → Open Folder… and choose firmware/esp32-dso.
  2. Plug in the ESP32 and press Upload (→ in the bottom status bar). The first build downloads the ESP32 platform and takes a few minutes. platformio.ini offers three environments: esp32dev (the default, Arduino core 3.3.x), esp32dev-core2 and esp32dev-latest. Upload uses the default; to try another core, choose it under PlatformIO → Project Tasks. The maximum sample rate depends on the core (reference §1).
  3. If the upload stops at Connecting...., hold the board's BOOT button until writing starts.
  4. Close the PlatformIO serial monitor if it opened: only one program can use the port.
  5. Open scope.html. Source = USB serial, Baud = 921600, press Connect and pick the port (named CP210x, CH340 or CH9102 on most boards).
  6. The top bar shows ESP32-DSO 1.5.1 · core … · … max (1 ch, DMA). Connect a signal to GPIO 34 (CH1) through 1 kΩ and press AUTO.

Arduino IDE instead of PlatformIO: make a folder named esp32-dso, copy src/main.cpp into it as esp32-dso.ino, choose the board ESP32 Dev Module and upload.

3.3 Add the probe to your own sketch

Use this when the ESP32 must keep doing a job (driving a circuit, running a motor, reading a sensor) while you watch voltages.

  1. Copy firmware/probe-example/lib/ScopeProbe into your project's lib/ folder (Arduino IDE: into Documents/Arduino/libraries/).
  2. Add two lines:
    #include <ScopeProbe.h>
    
    void setup() {
      Serial.begin(921600);
      ScopeProbe::begin({34}, 100);   // pins, samples per second
      // ... the rest of your setup ...
    }
  3. Upload, close the serial monitor, open scope.html, Source = USB serial, Baud = 921600, Connect.

The example project firmware/probe-example charges a 100 µF capacitor through 100 kΩ for 60 s, discharges it for 60 s, forever, and marks each change on the scope. View it at 10 s/div. Full API: reference §8.

3.4 Any sketch that prints numbers

void setup() { Serial.begin(115200); }
void loop() {
  Serial.printf("%lu,%u\n", millis(), analogReadMilliVolts(34));   // time in ms, value in mV
  delay(10);
}

Set the scope's Baud to match Serial.begin(). Lines that are not numbers are shown in the log and otherwise ignored. Format details: reference §9.

4. First steps with a scope

Why: reading the screen, the trigger and acquire modes (fundamentals).

If this is your first oscilloscope, do these six short exercises with the Demo. Each takes a few minutes and shows one idea that every scope, from this one to a lab instrument, is built around. Start with Data → Reset all settings.

Exercise 1 · Reading the screen

The screen is a graph: time runs left to right, voltage bottom to top. The grid has 10 divisions across and 8 up. Time/div (status bar: H 1 ms/div) says how much time one square represents, so the whole screen shows 10 ms. Each channel has its own volts/div (on its chip below the screen: CH1 500 mV/div).

Try: roll the mouse wheel over the screen to change time/div, and watch how many cycles fit. Count the squares between two rising edges of CH2 and multiply by time/div: that is the period (5 ms → 200 Hz). The small coloured tag at the left edge (1, 2) marks each channel's 0 V line.

Exercise 2 · Making it stand still: the trigger

The scope draws a new picture many times a second. To make a repeating signal stand still, each picture must start at the same point of the wave. The trigger does that: it waits until the signal crosses a level in a chosen direction, and puts that moment at the centre (the ▼ at the top).

Try: drag the yellow ◀T marker on the right edge up and down. Inside the signal's range the picture is still and the status shows Trig'd. Drag it above the signal: in Auto mode the picture starts drifting (status Auto); switch Trigger → Mode to Normal and it freezes instead (Wait). Switch Edge between Rise and Fall and see which slope sits at the centre.

Exercise 3 · Measuring: numbers instead of counting squares

The Measure panel calculates values from the samples on screen. The defaults are CH1 Pk-Pk, CH2 Frequency and CH1 Rise.

Try: tick Statistics. Each reading now also shows μ (average over many captures), σ (how much it scatters), min, max and n. Add CH1 Max and CH1 Top, then set Readout to live: Max jumps with every capture because it is one single, noisy sample, while Top (the most common high level) hardly moves. Read μ when you want a steady number, and Top/Base/Amplitude for the levels of a pulse. Why, exactly: reference §4.3.

Exercise 4 · Cursors: measuring by hand

An RC circuit charges to 63 % of the full step in one time constant τ = R × C = 10 kΩ × 100 nF = 1 ms. To see the full step the capacitor must have time to charge completely, so first slow the square wave: Signal generator → Frequency 50 Hz (each half lasts 10 ms = 10 τ). Set Horizontal → Position to 4 ms (moves the trigger point, the rising edge, near the left edge) and press STOP.

Try: Cursors → Time. Drag line A to the moment CH1 starts rising, and line B to where CH1 reads 2.08 V (63 % of the 3.3 V step; the readout shows CH1's value at B). ΔT in the readout is τ, about 1 ms. Cursors let you measure anything the automatic measurements don't cover. Set the generator back to 200 Hz afterwards.

Exercise 5 · Noise and acquisition modes

Real signals carry noise. Select CH1, set its volts/div to 100 mV and drag its marker down until the top of the curve is on screen: now the fuzz is visible.

Try: Acquire → Normal (raw samples), then Hi-Res (each point averages several readings), then Average (averages successive pictures). Watch the fuzz and CH1's σ in the statistics. Averaging works only because the trigger lines the pictures up.

Exercise 6 · Math channels: calculus you can see

Channels & math → M1 and M2: tick on for both; Display → Layout → Split. M1 = (v2 - v1) / R is the current through the resistor (Ohm's law, from two measured voltages). M2 = C * dv1 is the capacitor's current calculated from how fast its voltage changes: i = C · dV/dt. The two traces lie on top of each other (figure 6). Change the d/dt window and watch M2's roughness change: derivatives magnify noise (reference §5.4).

5. Wiring the inputs

5.1 Which pins

GPIOScope useNotes
34CH1 (default)Input-only, ADC1 channel 6
35CH2 (default)Input-only, ADC1 channel 7
32CH3 (default)ADC1 channel 4
33CH4 (default)ADC1 channel 5
36 (VP), 39 (VN)optional inputsInput-only, ADC1 channels 0 and 3
25generator (default)Also allowed: 26, 27, 4, 13, 14, 16–19, 21–23

Only ADC1 pins are used, because the second ADC stops working whenever Wi-Fi is on. Avoid GPIO 0, 2, 5, 12 and 15 (they decide how the chip boots), 6–11 (wired to the flash memory) and 1/3 (the USB serial link). An input with nothing connected reads random values: that is normal, not a fault.

5.2 Signals between 0 and 3.3 V

Why: the input: what your circuit sees (fundamentals).

Signal 0–3.3 V 1–10 kΩ GPIO34 (CH1) 10–100 nF (optional, slow signals) Signal GNDESP32 GND
Figure 2 — Direct input. The series resistor protects the pin; the optional capacitor steadies readings of slowly changing voltages (it also slows fast edges).

A capacitor at the pin steadies readings. With the series resistor it forms a low-pass filter (10 kΩ × 100 nF → about 160 Hz), so use it only for slow signals. For fast signals keep the resistor at about 1 kΩ and leave the capacitor out.

The ADC is accurate between about 0.15 and 2.45 V. Near 0 V it stops at about 0.1 V (the channel chip shows floor), and above about 3.1 V it stops rising (red CLIP). Both markers mean "the reading is not the real voltage here".

5.3 Higher voltages: divider probes

Why: probes and dividers (fundamentals).

Signal (up to Vmax) R1 GPIO34 R2 10 nF optional Signal GNDESP32 GND Probe factor = (R1 + R2) / R2
Figure 3 — Divider probe. Set the channel's Probe menu to the factor and the scope shows the real voltage.
R1R2FactorAccurate up toAbsolute maxGood for
10 kΩ10 kΩ×24.9 V7.2 V5 V logic, USB 5 V
47 kΩ10 kΩ×5.713.9 V20 V9 V and 12 V circuits
100 kΩ10 kΩ×1126.9 V39 VUSB-PD up to 20 V

"Accurate up to" keeps the pin at 2.45 V; "absolute max" puts 3.6 V on the pin. Resistors have 1–5 % tolerance, so for best accuracy measure one known voltage with your multimeter and enter the exact factor as a custom… probe value: factor = multimeter reading ÷ scope reading with probe ×1.

USB-PD and Quick Charge adapters deliver 5 V until something asks for more, then 9, 12, 15 or 20 V. Check the output with the multimeter before connecting, and size the divider for the highest voltage the adapter can make.

5.4 AC and audio signals (biased input)

Why: AC coupling and anti-alias filters (fundamentals).

The ADC cannot read below 0 V, so an AC signal is lifted onto a steady 1.65 V "bias", and the scope removes the bias again with AC coupling.

Signal (AC) 1 µF 47 kΩ GPIO34 100 kΩ 3.3 V 100 kΩ 1–2.2 nF optional Signal GNDESP32 GND
Figure 4 — Biased input. The two 100 kΩ resistors hold the pin at 1.65 V; the 47 kΩ resistor protects the pin and halves the signal.

For audio, expect a useful view up to a few kHz and roughly 9 effective bits. This shows waveforms and pitch well, but it is not a distortion analyser.

5.5 Measuring current

The ADC measures voltage, so current is measured as the voltage across a known resistor (i = v ÷ R):

5.6 Generator output

With the ESP32-DSO firmware, the Signal generator panel drives one pin: steady High (3.3 V) or Low (0 V), a Square wave from 0.01 Hz to 1 MHz with adjustable duty cycle, or (firmware 1.5.0) a Sine wave from GPIO25 or GPIO26 (the DAC pins; 130.6 Hz – 200 kHz; amplitude ±0.2, ±0.4, ±0.8 V, or ±1.6 V which clips; centred near 1.62 V). The sine comes from an internal RC oscillator: only whole multiples of about 130.6 Hz exist, so the Frequency field jumps to the nearest one (type 1 000 and it becomes 1 044.8 Hz; ↑ ↓ move one step), and even that is accurate to only about ±5 % and drifts, so read the real frequency from the scope; it has a small DAC glitch at mid-scale on the falling half (visible in ETS). Below 100 Hz the firmware makes the wave with a timer (any frequency, edges accurate to about 0.1 ms); from 100 Hz the LEDC hardware makes it (whole hertz). Duty 0 % or 100 % gives a constant level. Connect it through a series resistor (330 Ω minimum, 1 kΩ is a good default). The output starts Off (high impedance) every time the scope connects. A ready-made circuit for experiments, which keeps all voltages in the ADC's accurate range, is the test RC circuit in the verification guide.

6. The screen and controls

Annotated screenshot of the scope
Figure 5 — The scope window (Demo source, stopped, statistics on).
  1. Source: USB serial, Demo or Log file.
  2. Connect / Disconnect, and what is connected.
  3. Status bar: run state, trigger state, acquire mode (NORM, PEAK, HRES = Hi-Res, AVG, ETS; dimmed when the setting is not in effect, for example Peak or Average in roll mode, or ETS while it cannot fold: hover over it to see why), time/div, delay, sample rate (Sa), points on screen, trigger setting, frames per second (and damaged frames, if any).
  4. Screen: 10 × 8 divisions.
  5. Channel marker: that channel's 0 V line. Drag it to move the trace.
  6. Trigger level marker: drag it to set the level.
  7. Trigger point (t = 0). Drag the screen to see before/after.
  8. Channel chips: scale and settings; red CLIP or floor when the input has been outside the ADC range within the last second. Click to select, double-click to switch on/off.
  9. Measurements, with statistics when ticked.
  10. RUN/STOP, SINGLE, AUTO, FORCE.
  11. Settings tabs: Scope (horizontal, channels & math), Trig/Acq (trigger, acquire), Measure (+ cursors), Display (+ FFT, colours), Gen (signal generator), Data (export, calibration, log).
  12. The open tab's settings.
  13. Splitter: drag to make the panel wider; groups then sit side by side. Double-click resets the width.
  14. Manual: opens this guide (links to the other documents at the top).

Every − value + control also follows the mouse wheel while the pointer is over the value, and the +/− buttons repeat when held. Clicking a channel chip selects it and opens its settings in the Scope tab.

6.1 Run controls

Why: Auto, Normal and Single (fundamentals).

ControlWhat it does
RUN / STOP SpaceSTOP freezes the picture. Zoom, pan, cursors, measurements and math still work on the frozen data. In text and roll modes recording continues in the background, so you can drag back through the history (up to about a million samples).
SINGLE SWaits for one trigger, captures it, stops (in both Auto and Normal trigger mode). For one-off events: a button press, power-up. In Roll mode it records one full screen and stops.
AUTO AAutoset: looks for a repeating signal of at least 100 mV peak-to-peak and sets volts/div, time/div (Y-T mode) and the trigger level. If it finds none, it only sets the vertical scale and leaves the time base alone, and says so. Noise smaller than that is not treated as a signal.
FORCE FCaptures now, without waiting for a trigger.

The two badges at the top left of the screen show the state. The first is the run control, what the keys have set:

Badge 1Meaning
RUNAcquiring continuously.
SINGLEArmed for one capture; becomes STOP when it has it.
STOPNot acquiring. The last picture stays on screen.

The second is the trigger status, what is actually happening (the same idea as RUN/STOP/T'D/WAIT/AUTO on bench scopes; hover over it for a one-line explanation):

Badge 2MeaningWhat to do
Trig'dEvery picture starts at a trigger: the signal crossed the level in the chosen direction. The picture is synchronised.Nothing: this is the normal working state.
AutoTrigger mode is Auto, but the signal never crossed the level, so the scope captures without a trigger to keep showing something. The picture is not synchronised and drifts on a repeating signal. On a steady (DC) voltage this is expected, since there is nothing to trigger on.Move the level into the signal (or press 50%).
WaitNormal mode or SINGLE: waiting for the signal to cross the level. Nothing new appears until it does.Check the level and source, or press FORCE.
ArmedSettings just changed: recording the first capture with them.Wait a moment (up to one screen time).
RollRoll mode: continuous scrolling, the trigger is not used.—
StopNot acquiring.RUN/STOP or SINGLE.

The status can carry a note after a dot: · max rate (the board could not sample as fast as asked and used its maximum), · CH1 hidden (with the firmware: the trigger source is switched off; it is still recorded for the trigger, not drawn), or in ETS a note such as ETS: locked, little gain (6.5). The third badge is the acquire mode (NORM, PEAK, HRES, AVG, ETS); it is dimmed when that mode is not in effect, and its tooltip says what is used instead.

6.2 Horizontal (time)

Why: memory, record length and the time base; roll mode (fundamentals).

ControlWhat it does
ModeHow the horizontal axis works, as on bench scopes:
  • Y-T (default): voltage against time, each picture triggered.
  • Roll: the trace scrolls continuously from right to left like a chart recorder, the screen updates smoothly, and the trigger is not used. Only at 50 ms/div and slower: choosing Roll at a faster time base sets 50 ms/div (bench scopes have a similar lower limit, typically 50–500 ms/div).
  • X-Y: one channel against another (Lissajous figures, phase, component curves). Pick the two traces in Display → XY; each axis uses its trace's volts/div and position. The channels are lined up in time first, so the same signal on two channels draws a straight line (before 1.11.2 it showed false phase: 9° at 6 kHz, 14° at 1 kHz with analogRead). Pick only channels that are switched on: otherwise the grid says which one is off.
Time/div5 µs to 50 s per division (the fastest step depends on the ADC engine: about 5 µs with DMA, 50 µs with analogRead) (wheel over the screen, or [ ]). The sample rate follows automatically: in Normal mode as fast as memory and the USB link allow, in Hi-Res about 1000 averaged points per screen (rules and a table: reference §3.1). At very short time/div there may be only a handful of points: switch Display → Draw to Dots to see the real samples.
PositionMoves the trigger point left or right; 0 puts it in the centre. With the firmware it stays on screen (±5 divisions), because the capture holds exactly one screen. Not used while rolling (there is no trigger point); when stopped, drag the screen to look back.
Auto rollIn Y-T and X-Y mode: switch to rolling by itself from the chosen time/div (default 100 ms/div; 50, 100, 200 or off), like the "Roll: Auto" setting on some bench scopes. With it off, slow time bases stay triggered but each picture waits for a whole screen to be recorded, so they update only a few times per second (reference §3.4).

6.3 Channels (vertical)

Why: vertical position, coupling and what volts/div does (fundamentals).

ControlWhat it does
on, labelShow/hide; a short name for the chip.
InputWhich GPIO this channel reads (firmware). In text mode CH1 is the first value column, CH2 the second, and so on.
Volts/div, PositionScale and vertical offset (Shift + wheel; − =; ↑ ↓). Changing volts/div zooms about the centre line: whatever voltage is on the centre line stays there, as on a bench scope. Position can move the trace as far as needed to bring any voltage to the centre (a channel's centre may be up to 2 × its full scale away from 0 V, and never less than ±12 divisions).
CouplingDC shows the real voltage. AC subtracts the average of what is on screen, so a small wiggle on a large DC level can be magnified. The pin still sees the full voltage.
InvertFlips the trace (−v).
ProbeMultiplies by the divider factor (×1, ×2, ×5.7, ×10, ×11, custom).
BW limitMoving average over 3–99 samples: removes fuzz, rounds sharp edges.
UnitV by default; A with a shunt (5.5).

The order in which these are applied matters in some cases: reference §2.

6.4 Trigger

Why: the trigger (fundamentals).

ControlWhat it does
ModeAuto shows the signal even when no trigger comes: it free-runs after waiting 0.6 screen widths (at least 50 ms, at most 2 s). A signal that repeats more slowly than that is forced most of the time, as on a bench scope. Normal only updates on a trigger and otherwise keeps the last picture (Wait): use it for slow signals, one-off events and anything Auto does not hold still.
SourceThe channel that is watched. It may be switched off: with the firmware it is then still recorded for the trigger but not drawn (the status shows · CH1 hidden), and it shares the sample rate with the visible channels.
EdgeRising ↑, falling ↓ or both ↕.
Level, 50%The voltage to cross; 50% sets it to the middle of the signal.
Noise rejectLarger hysteresis: the signal must move further from the level before the next crossing counts. Use it when a noisy edge triggers at random points.
HoldoffIgnore new triggers for this long after one (text streams). For bursts of pulses.

The trigger works in Y-T and X-Y mode at any time base below the roll threshold. Its status is the second badge (6.1). In Roll mode the Trigger settings are dimmed and marked roll: not used. Details, including trigger interpolation: reference §3.3.

6.5 Acquire

Why: decimation, acquire modes and ETS (fundamentals).

ModeWhat the ESP32 doesUse it for
NormalOne reading per point, as many points as memory and the link allow.The raw truth, including noise. Keeps the highest sample rate at slow time bases.
PeakReads continuously and keeps the lowest and highest value between points; drawn as a band.Catching short spikes at slow time bases. With DMA every conversion at the full ADC rate is inspected. No effect when the ESP32 is already at its maximum rate, and not used in roll mode (Normal is used; set Auto roll to off to use Peak at 100 ms/div and slower).
Hi-Res (default)About 1000 points per screen; each one is the average of every reading taken during its interval.Smooth traces, more effective bits, and no false slow waves from signals faster than the sample rate. Best for slow time bases and before taking derivatives.
AverageAverages successive triggered captures (2–64).Repetitive signals with a stable trigger.
ETSEquivalent-time sampling: takes the longest record at full speed (24 000 readings, 96 ms with one channel), measures the signal's period from it and places every reading at its position inside one period.The fine detail of repeating signals: edges of tens of ns, far beyond 250 kSa/s. Time bases down to 50 ns/div (only in ETS). Needs ADC = DMA, at least 20 periods per record and a signal below half the sample rate.

ETS in practice. The status bar's Sa then shows the equivalent rate (for example 94.9 MSa/s ETS = one point every 10.5 ns) and the Acquire settings show the period found, the points per period and the step between them. The trigger status (second badge, 6.1) adds a note when ETS cannot help, and the ETS badge is dimmed while it cannot fold: locked, little gain (the period is a whole number or simple fraction of the 4 µs reading interval, often with the board's own generator at round frequencies: shift the frequency slightly), not repeating, too few periods, level outside (the period is measured from the trigger-level crossings), signal too fast. Smooth signals from an oscillator that drifts (the ESP32's sine, a 555) are followed automatically; the Acquire line then says follows the source's drift. Updates are slow (1–2 per second). How and why it works: fundamentals, ETS; exact algorithm: reference §3.7.

ADC chooses how the ESP32 reads its inputs. DMA (fast): the ADC converts continuously in hardware, up to the maximum the board measured for itself at start-up (250 kSa/s on the test board, about 11 × analogRead; shared by the channels; shown in the top bar and as dma probe: in the log). analogRead: the CPU takes each reading, about 22 kSa/s; the engine of earlier versions, kept for comparison and as a fallback. DMA needs firmware 1.4.0 built with Arduino core 3.x; otherwise the choice is greyed out (hover over it for the reason). With DMA, Hi-Res averages many more readings per point, so traces are cleaner too. Details: reference §3.6.

Memory sets the points per capture. auto lets the scope choose: up to 24 000 points (shared by the channels) in Normal and Average, 12 000 in Peak (each point is a min/max pair), about 1000 in Hi-Res. A fixed number trades detail against updates per second, because larger captures take longer to send.

6.6 Measure

Why: automatic measurements (fundamentals).

Choose a source and a measurement, press Add (up to 12); × removes one. Measurements use the samples on screen, so show at least two full periods for frequency-type readings.

MeasurementMeaning
Pk-Pk, Max, MinHighest − lowest; highest; lowest sample. Include every spike, so they jump around with noise.
MeanAverage: the DC value.
RMS / AC RMSRoot-mean-square with / without the DC part. For a sine: amplitude ÷ √2.
Top / Base / AmplitudeMost common high and low level; Amplitude = Top − Base. Ignore spikes and overshoot: use these for pulses and square waves.
Frequency / PeriodFrom crossings of the middle level, averaged over the screen.
Duty, +Width, −WidthHigh time ÷ period; high time; low time.
Rise / Fall10 % → 90 % time of an edge (and back). For an RC charge that settles fully: 2.2 τ.
Area∫ v dt across the screen (V·s).

Any reading can also be used by name in a formula, for example freq1 or pp1 (6.8 Math channels).

Statistics adds μ (mean), σ (spread), min, max and n over many captures, and restarts by itself whenever you change a setting. Readout sets how often the numbers refresh (4 per second by default, like a bench scope). Mark max/min labels the extremes of the selected trace. Exact formulas: reference §4.

6.7 Cursors

Why: cursors (fundamentals).

ModeWhat it does
TimeTwo vertical lines A and B: their times, ΔT, 1/ΔT, and every trace's value at A and B.
LevelTwo horizontal lines on the chosen trace, with their difference.
BothAll four. Drag the lines; C cycles the modes; Reset puts them back.

6.8 Math channels

Why: maths channels, derivative and integral (fundamentals).

M1–M4 calculate a new trace from the channels, sample by sample, using a formula. The most used names:

WriteMeans
v1 … v4CH1–CH4 as displayed
dv1 … dv4dv/dt (units per second)
iv1 … iv4∫ v dt, from zero at the left edge of the screen
ttime in seconds (0 at the trigger)
m1 … m3earlier math channels
freq1 pp1 mean1 acrms2 …live readings: the numbers of the Measure list, one value for the whole screen (table below)
+ − * / ^, ( )arithmetic; ^ is power
sin exp log sqrt abs sq db clip min max …functions (log is the natural log). All of them: reference §5.3

Put your own constants in the box, one per line (R = 10e3). Useful formulas:

FormulaUnitWhat it shows
(v2 - v1) / RACurrent through a resistor between CH2 and CH1
C * dv1ACapacitor current, i = C · dV/dt
sq(v2 - v1) / RWPower in the resistor
0.5 * C * sq(v1)JEnergy stored in the capacitor
3.3 * (1 - exp(-t / tau))VTheoretical RC charge curve, drawn over the measured one
iv1V·sIntegral: a square wave becomes a triangle
db(v2 / v1)dBGain between two signals
mean1 + pp1 / 2 * sin(2 * pi * freq1 * t + 1.047)VA sine like the one on CH1, shifted 60° ahead: level, size and frequency come from the readings, the phase is yours
v1 / pp1CH1 scaled to a peak-to-peak of 1, whatever its size

Live readings. Anything the Measure list can show can be used in a formula, named by the reading and the channel: freq1, period2, pp1, mean1, rms1, acrms1, max1, min1, top1, base1, amp1, pwidth1, nwidth1, duty1 (a fraction, 0–1), rise1, fall1, area1. Use 1–4 for CH1–CH4, or _m1–_m4 for the math channels (freq_m1, only in a later channel). A reading is one number for the whole screen, refreshed with every acquisition. If it cannot be measured (a frequency needs two edges of the same kind on the screen) the trace simply disappears. Readings cannot be used in the Constants box. For a sine's amplitude use pp1 / 2. The trace is phased from the trigger point (t = 0). Details: reference §5.8; why it works: fundamentals.

Give results in base units (A, W, V…) and the scope adds the prefix (µA, mW). If you type a prefixed unit such as mA, put the factor in the formula (… * 1000). Fit scale sets a sensible scale and position. Derivatives look rougher than the voltages they come from, because they magnify noise; Hi-Res, a larger d/dt window or BW limit help (reference §5.4).

Math channels showing resistor current and C dV/dt
Figure 6 — Demo, split layout: M1 (resistor current, purple) and M2 (C · dV/dt, orange) agree. M2 is slightly rougher and its peaks read a few per cent higher, because it is a derivative (±3-sample window), which magnifies noise. M1's mean is almost exactly 0: the capacitor's charge balance.

6.9 Display and FFT

Why: drawing the picture and the spectrum (fundamentals).

ControlWhat it does
LayoutSingle (one grid for all traces), Split (two grids: channels above, math traces below; looks like Single while no math trace is on), Stack (one grid per trace). With Labels on, every grid shows its own volt scale: the selected trace's if it is in that grid, otherwise the grid's first trace. X-Y is under Horizontal → Mode.
Draw, widthLines joins the samples; Dots shows only real samples.
PersistenceOlder traces fade slowly (Short, Long) or stay (∞): reveals jitter and rare glitches.
Grid, LabelsFull grid, axes or none; axis labels.
Body / ScreenColours of the instrument and of the display, chosen separately (6.13).
FFT spectrumWhich frequencies the on-screen signal contains, in dBV (0 dBV = 1 V RMS). Top (−200 … +100 dBV) and dB/div set the scale; Span zooms in on low frequencies. More points on screen give a finer spectrum. The caption shows the source, how many samples were used (pts; they are zero-padded to a power of two for the calculation, reference §6) and the bin spacing; the peak line shows the strongest frequency in view.
For trustworthy numbers use Acquire Normal with at least 2 periods on screen. Hi-Res lowers the high frequencies (its averaging is a filter); Average can lower them too; Peak has no FFT (its points are min/max pairs, not samples), and the pane says so. ETS shows frequencies above 125 kHz (fundamentals §13). Short warnings (⚠) in the pane: <2 cycles: frequency unreliable (use a slower time base; with one period or less the peak frequency is wrong); last 16384 of N pts only (a longer record: only its newest part, the right of the screen, is analysed); thinned to 16384 pts, no filter (a long text stream, which can alias: narrow the time window); Avg: highs may read low (captures are averaged point by point while the trigger moves by up to one sample, which lowers high harmonics). No FFT in Peak mode; FFT: no data from … means the source is off, its formula has an error, or there are fewer than 16 samples. peak —: the signal is flat. There is no anti-alias filter: a line that moves when you change the time base is an alias, not a real frequency (fundamentals §18.4). The peak label gives the frequency and level of the tone itself, even when it falls between two bins (1.11.2: worked out from the three top bins); the drawn curve can sit up to 1.4 dB lower there, so the ▼ marker may float just above it. With two tones closer than about two bins, or fewer than 2 cycles, the label shows the strongest bin instead (up to half a bin off and 1.4 dB low).

6.10 Signal generator

Why: the built-in generator (fundamentals).

Pin, Off / High / Low / Square / Sine, frequency (0.01 Hz – 1 MHz; whole hertz from 1 Hz; Sine: 130.6 Hz – 200 kHz on GPIO25/26 only, in whole steps of ≈ 130.6 Hz: the field jumps to the nearest step and ↑ ↓ move one step; Square and Sine remember their own frequency) and duty (%), or for Sine the amplitude. The panel shows what the pin is doing and the frequency the ESP32 reports it has set. It starts Off on every connection. Always use a series resistor.

6.11 Data and files

ControlWhat it does
CSV (screen)The displayed time window, all visible channels and math, in volts and seconds.
CSV (history)Everything recorded in text or roll mode (up to about a million samples).
ScreenshotA PNG of the screen with the settings written on it.
Load log…Opens a text/CSV file (serial logs, or this scope's CSV exports).
Text time / valuesUnits for text streams when the sketch doesn't say (default ms and mV).
Clear historyDeletes what has been recorded (the text and roll history, the last capture, the statistics and any persistence). Settings stay as they are.
Reset all settingsEvery control back to default. It keeps the connection (Source, Baud), the colours, panel width and open tab, and the ADC calibration, and the board's signal generator is off afterwards (in Demo the virtual generator keeps driving its circuit). Otherwise settings are remembered by the browser.
ADC calibrationCorrects the gain and offset error of this board's ADC from two points measured with a multimeter (verification guide C3): enter the scope reading and the meter reading at a low (≈ 0.3 V) and a high (≈ 2.4 V) voltage, then Apply. Stored in the browser apart from the settings, so Reset all settings keeps it. Applies to the ESP32-DSO firmware's readings and trigger level. Clear returns to raw readings. Redo it if you change the board. The heading shows whether a calibration is active, with its gain and offset; the four fields keep the points it was made from (also after a reload), the date is shown next to the buttons, and a small CAL tag appears in the status bar while one is active.
Log, CopyThe log (Data tab) shows what the scope sent (▶) and what came back (◀). The log grows to fill the free space below it in the side panel and scrolls inside that space; it resizes with the window. Copy puts the last 300 lines on the clipboard, one per line: paste it into a bug report.

6.12 Mouse and keyboard

ActionMouseKeyboard
Run / StopRUN buttonSpace
Single · Autoset · ForcebuttonsS · A · F
Move in timedrag the screen← → (Shift = 1 div)
Time/divwheel over the screen[ ]
Volts/div of selectedShift + wheel− =
Move selected tracedrag its marker↑ ↓
Select channelclick a chip or marker1–4
Cursorsdrag the linesC cycles modes
Trigger to centredouble-click the screen—

6.13 Colours

Display has two colour choices, like picking an instrument and its display separately. They change only the look: every control stays where it is and works the same.

The default is Neutral · red on both. The buttons are raised: each has a darker strip along its bottom edge and no outline, and the selected option in a group is white. A grey button lights up white while you hold it down; SINGLE lights up in its armed colour (orange).

Either body goes with any screen; choosing the same name on both gives a matching set. The channel colours belong to the screen, and the CH1–CH4 labels in the panel use the same colours, so a channel looks the same everywhere. RUN (green) and STOP (red) keep their colours in every combination. Screenshots use the screen colours.

7. Experiments to try

The test RC circuit from the verification guide (generator → 10k/10k divider → 10 kΩ → 100 nF) keeps every voltage in the accurate range and works for most of these.

i = C · dV/dt

Compare M1 = (v2 − v1)/R with M2 = C·dv1. Change the d/dt window and the Acquire mode and watch M2's noise change.

Time constant

Measure τ three ways: cursors at 63 %, Rise ÷ 2.2, and by overlaying V*(1-exp(-t/tau)) as a math channel and adjusting tau until it fits.

Integration

Square wave on CH1, M1 = iv1 with AC coupling. The integral of a square wave is a triangle; the slope of each side equals the voltage.

PWM average

Generator at 1 kHz into 10 kΩ + 10 µF. Change the duty cycle: Mean follows duty × 3.3 V.

555 timer

Build an NE555 astable and compare the measured frequency and duty with f = 1.44 / ((R1 + 2R2) · C).

Aliasing

Acquire Normal, Memory 1000, Auto roll off (Hi-Res and roll mode hide aliasing), generator at 1 kHz. Slow the time base step by step: once Sa drops below 2 kSa/s (100 ms/div) the picture and the readings go wrong. Verification test D5.

8. Troubleshooting

SymptomCause and fix
"This browser has no Web Serial"Use Chrome or Edge on a desktop computer (Firefox for desktop has it from version 151, but this app has not been tested there). Phone browsers and Safari can only use Demo and Log file.
Port list is empty (Windows)Install the USB-serial driver: Silicon Labs CP210x VCP or WCH CH340/CH9102, depending on the chip next to the USB socket. Try another cable: many are charge-only.
Port list is empty (Linux)Run lsusb. A CH340 (1a86:7523) that never appears as /dev/ttyUSB0 is usually taken by brltty: sudo apt remove brltty, then replug. With the Chromium snap, run sudo snap connect chromium:raw-usb or use Google Chrome.
"Could not open the port"Another program has it: close the PlatformIO/Arduino serial monitor. On Linux also run sudo usermod -aG dialout $USER and log out and in once.
Connected, but no dataBaud mismatch: the scope's Baud must equal Serial.begin() (firmware: 921600). Press Reset board to restart the sketch.
Garbage lines in the log at connectThe ESP32's boot messages, sent at 115 200 baud. Harmless and ignored.
serial: Break received in the log at connectOpening the port resets the ESP32, and the browser most likely reports the line glitch of that reset as a "break". Harmless: the start-up report follows a moment later. serial: The device has been lost. is what the browser reports when the cable is unplugged.
ADC choice greyed out, or the top bar says analogReadThe firmware is older than 1.4.0, was built with Arduino core 2.x (use the default esp32dev environment), or the DMA start-up test failed on this board: the log line dma probe: says which rates failed and why. Please report that line.
"The board restarted" (often when switching the generator on)The ESP32 rebooted. The message and the log give the reason. brownout: the supply dipped: the generator pin may be driving a short or a large capacitance (check the series resistor), or the USB cable/port is weak. panic or a watchdog (int_wdt, task_wdt, watchdog): a firmware fault: copy the log into a bug report.
Red CLIP on a channel; trace flat at about 3.1 VThe pin is above the ADC's range: the real voltage is higher than shown. Use a divider (5.3). Check the real voltage with a multimeter.
floor on a channel; reading about 0.1 V instead of 0Normal: the ESP32 cannot measure below about 0.1 V. For small signals near 0 V, use the biased input (5.4).
Max and Min jump aroundExpected: they are single noisy samples. Use Top/Base, or Statistics μ, or Hi-Res (reference §4.3).
Picture won't stand stillTrigger level outside the signal (◀T marker above or below the trace), wrong source channel, or a noisy edge: use 50%, Noise reject, or Normal mode.
Updates are slow at 10–50 ms/divNormal: each picture needs a whole screen of recording first (200 ms at 20 ms/div), plus the Auto wait when there is no trigger. Use roll mode for slow signals (Horizontal → Mode → Roll, or Auto roll), and set the trigger level inside the signal so Auto doesn't have to time out.
Few points on screen (e.g. about 110 at 1 ms/div)The ADC's speed limit, shared between channels. With ADC = analogRead the board manages only about 22 kSa/s in total (two channels at 1 ms/div: about 110 points): choose ADC = DMA (Trig/Acq tab, about 11 times faster), and switch off channels you don't need (two channels halve the rate). The esp32dev-core2 environment has no DMA engine and an even slower analogRead().
Toast: "Baud is set to …, but the firmware uses …"Set the browser's Baud to the firmware's (DSO_BAUD in platformio.ini) and reconnect.
"damaged frames dropped" in the status barCorrupted bytes on the USB link. They are discarded, never shown. If it keeps counting, try another cable or USB port, and avoid hubs.
Firmware does not compileNote the Arduino core version printed at the start of the build and the first error line. Core 2.x and 3.x are both supported; PlatformIO → Clean helps after switching platforms.
Upload fails: "Wrong boot mode" / "Failed to connect"Hold BOOT during "Connecting…". Close anything using the port.

ESP32 Web Oscilloscope v1.11.2 · firmware ESP32-DSO 1.5.1 · ScopeProbe 1.0