Esp32_oscilloscope Arduino firmware turns your ESP32 board into a web-based oscilloscope

Bojan Jurca’s “Esp32_oscilloscope” is an open-source Arduino sketch that can transform an ESP32 board into a web-based oscilloscope that works over WiFi.

We had also written about the Scoppy project to turn the Raspberry Pi Pico W into a 2-channel oscilloscope, but there’s no reason the more powerful ESP32-series microcontroller could not be used for the same purpose, and Bojan’s Esp32_oscilloscope project does just that and works with ESP32, ESP32-S2, ESP32-S3 and ESP32-C3 boards using the I2S interface for fast data sampling.

Arduino ESP32 Web-based WiFi oscilloscope

The project was initially designed to demonstrate the multitasking abilities of the ESP32 microcontroller with Arduino, but this evolved into an ESP32 oscilloscope firmware. It works both with output/PWM and input signals, digital (0 or 1) and analog (0 to 4095) signals, and the web interface shows up to 736 samples per screen although the sampling rate may not be completely constant all the time.

To install it on your board, you’ll need to load the project in the Arduino IDE and set your router credentials and the hostname:


The program relies on the FAT file system, so you’ll need to select one of the FATFS partition schemas in Tools->Partition scheme-> ... unless the ESP32 board does not have external flash in which case you’d need to comment out the


…in order for the firmware to use progmem to store the oscilloscope.html file. Now you can build the program and flash it to your board. You’ll also need to upload a few files to the /var/www/html directory (android-192-osc.png, apple-180-osc.png, oscilloscope.html) over FTP, and you should be able to access the oscilloscope with “http://your-esp32-ip/oscilloscope.html” or “http://esp32-hostname/oscilloscope.html” URL from your web browser.

ESP32 OscilloscopeIf you are short on time and/or don’t happen to have an ESP32 board on hand, Bojan is also running a demo at http://jurca.dyn.ts.si/oscilloscope.html as shown in the screenshot above. The full details for the Esp32_Oscilloscope project can be found on GitHub. It’s not the first time we cover a project that shows the status of ESP32 GPIO pins in a web browser, as GPIOViewer does just that but serves a different use case.

Via gojimmypi on Twitter/X

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
6 Comments
oldest
newest
Andreas Elfving
Andreas Elfving
1 month ago

would be really interesting to extend this to also be a logic/protocol-analyzer. To dynamically instance a spi device or a serial port för (specific pins, i guess, since esp32 doesnt have full gpio re-routing capabilities) could be done and really useful.

Conor Stewart
1 month ago

You can already get cheap half decent logic analysers. There are the generic saleae clones (24 MSPS and 8 channels) or the slightly more expensive Sipeed version (8 channels, up to 160 MSPS for 2 channels, only one channel for windows) and Sipeed are releasing a better 1 GSPS USB 3 version soon apparently.

Vivian Mascarinhas
Vivian Mascarinhas
1 month ago

ESP32 has a problem with analogue inputs. It is never accurate. How is that this works as an oscilloscope??
Has the output been checked against a real scope to confirm the calibration?

Mr. Lane
Mr. Lane
1 month ago

Put one of the 5 volt signals. or use a voltage divider, to one of the other Analog ports, and now you know what 5 or 2.5 volts value is.

Van Kahlen
Van Kahlen
1 month ago

Probably not checked

Conor Stewart
1 month ago

Why don’t people use half decent MCUs for things like this? Why not use something better for this? The ESP32 can apparently handle up to 2 MSPS (but lower is recommended) and the rp2040 can only handle 500 KSPS and the ADCs in these MCUs are known to not be the best, especially the ESP32. Why not use one of the STM32G4 series like the STM32G473 with 5 x 4 MSPS ADCs, 7 DACs, 7 comparators and 7 OP amps? I believe the multiple ADCs can be interleaved too, to at least double interleaved if not triple. Or one of… Read more »

Khadas VIM4 SBC