Open-source signal generator built for the ESP32 family of microcontrollers. Currently supports sine- and square waves. Configuration of the signal generator is done using a web-based UI, which is served directly from the device via WiFi.
The ESP32 DevKitC V4 was used for development and testing.
The Arduino software version 1.8.15 with the esp32 board extension version 1.0.6 was used for building and uploading. To upload the static web files to the device, ESP32 Filesystem Uploader was used.
Build and upload using Arduino. Since the static files of the website are being served from a simple on-device filesystem, it is necessary to format the flash storage once prior to first use:
#define FORMAT_FILESYSTEM
in SigGen.ino#define FORMAT_FILESYSTEM
in SigGen.inoThe software is configured to connect to a WiFi network after booting, for which the configuration is stored in the µC's EEPROM. At first boot, that configuration is uninitialized and thus, connecting to WiFi will fail.
Whenever a WiFi connection could not be established, the device enters the access-point (AP) mode, acting as a WiFi AP with SigGen
as its SSID. The AP mode can be forced by uncommenting #define FORCE_AP
in SigGen.ino.
In AP mode, the device's IP address is 192.168.4.1
. To configure the device for your WiFi, navigate to http://<DEVICE_IP>
, select Configuration
in the header menu and set the SSID and enter a password. You can optionally assign a static IP address to the device, as well as configure the gateway and subnet mask.
After writing the configuration to EEPROM, you need to restart the device to apply the changes. This can be achieved either via the reset button on the device itself or by navigating to http://<DEVICE_IP>/reboot
.
Visit http://<DEVICE_IP>
to bring up the signal generator's UI, which is separated into two tabs (one for each waveform).
The front-end is built using Materialize. The number of static files has been reduced to its practical minimum due to limitations of the webserver. As a consequence, all image data is defined inline and only the CSS file is served separately from the HTML.
Visual Studio Code version 1.43.1 with the Arduino extension was used for development.
Documentation pending (monitor HTTP requests from the UI for reference).
If you find a bug, have suggestions or are interested in extending this project, drop me a line or issue a pull request.