Bojan Jurca’s “Esp32_oscillscope” is an open source Arduino sketch that allows you to convert an ESP32 board into a web-based oscilloscope that works over WiFi.
I also wrote about the Scoppy project to turn a Raspberry Pi Pico W into a two-channel oscilloscope, and there’s no reason why you can’t use the more powerful ESP32 series microcontrollers for the same purpose. Bojan’s Esp32_oscillscope project does just that. Works with ESP32, ESP32-S2, ESP32-S3, and ESP32-C3 boards with an I2S interface for high-speed data sampling.
This project was originally designed to demonstrate the multitasking capabilities of the ESP32 microcontroller using Arduino, but it evolved into the ESP32 oscilloscope firmware. It works with output/PWM and input signals, both digital (0 or 1) and analog (0 to 4095) signals, the sampling rate may not always be perfectly constant, but the web interface has one screen Up to 736 samples are displayed per sample.
To install it on the board, you need to load the project into the Arduino IDE and set the router credentials and hostname.
// If these #definitions are missing, STAtion will not be setup #define DEFAULT_STA_SSID “YOUR_STA_SSID” // <- Replace with your information #define DEFAULT_STA_PASSWORD "YOUR_STA_PASSWORD" // <- Replace with your information // Define the name that Esp32 will use as hostname #define HOSTNAME "MyEsp32Oscillscope" // <- Replace with your own information (up to 32 bytes)
// If these #definitions are missing, the STation will not be setup #define DEFAULT_STA_SSID “YOUR_STA_SSID” // <- Replace with your information #define DEFAULT_STA_PASSWORD “YOUR_STA_PASSWORD” // <- Replace with your information // Define the name that Esp32 uses as the hostname #define HOSTNAME “MyEsp32Oscillscope” // <- Replace with your own information (maximum 32 bytes) |
Since the program relies on the FAT file system, you must choose one of the FATFS partition schemes. [ツール]->[パーティション スキーム]-> ... Unless your ESP32 board does not have external flash, in which case you should comment it out.
#define FILE_SYSTEM FILE_SYSTEM_FAT
#define FILE_SYSTEM FILE_SYSTEM_FAT |
…because the firmware uses progmem to save the oscillscope.html file. Now you can build the program and flash it to the board. You will also need to upload some files (android-192-osc.png, apple-180-osc.png, oscillscope.html) to the /var/www/html directory via FTP. This will allow you to access it. on the oscilloscopehttp://your-esp32-ip/oscillscope.html” or “http://esp32-hostname/oscillscope.htmlGet the URL from your web browser.
If you’re short on time or don’t have an ESP32 board handy, Bojan has a demo running at http://jurca.dyn.ts.si/oscillscope.html, as shown in the screenshot above. More information about the Esp32_Oscillscope project can be found on GitHub. This isn’t the first time I’ve covered a project that displays the status of ESP32 GPIO pins in a web browser. GPIOViewer does exactly that, but accommodates a different use case.
Jean-Luc started CNX Software as a part-time job in 2010, then quit his job as a software engineering manager and began writing daily news and reviews full-time in late 2011.