Arduino Sketch Transforms ESP32 Board into Web-Based Oscilloscope

Published  March 8, 2024   0
S Staff
Author
Web-Based Oscilloscope

Bojan Jurca’s open-source Arduino sketch "Esp32_oscilloscope," transforms any ESP32 board to function as a web-based oscilloscope accessible over WiFi. While the Scoppy project demonstrated the conversion of a Raspberry Pi Pico W into a 2-channel oscilloscope, Bojan's project showcases the potential of using the more robust ESP32-series microcontroller for similar applications. Compatible with ESP32, ESP32-S2, ESP32-S3, and ESP32-C3 boards, the sketch utilizes the I2S interface for rapid data sampling.

ESP32 Board into Oscilloscope

Originally conceived to showcase the multitasking capabilities of the ESP32 microcontroller with Arduino, the project evolved into firmware for an ESP32 oscilloscope. It accommodates both output/PWM and input signals, handling digital (0 or 1) and analog (0 to 4095) signals. The web interface displays up to 736 samples per screen, although the sampling rate may vary due to concurrent processes, especially when integrated into other projects. The ESP32 may encounter challenges in maintaining the desired sampling frequency consistently.

The oscilloscope's display reflects the sampled values in real-time, which may not precisely mirror the input GPIO signal. Samples are depicted as digital values (0 and 1) or analog values ranging from 0 to 4095, corresponding to 0 V to 3.3 V.

For those without access to an ESP32 board or limited time, Bojan offers a demo accessible at http://jurca.dyn.ts.si/oscilloscope.html. Comprehensive details about the Esp32_Oscilloscope project is available on GitHub.