A utility for visualizing and recording Biopotential Signals using Upside Down Labs BioAmp.
- Arduino IDE
- Arduino-ESP32 Core
- AsyncTCP library
- ESPAsyncWebServer library
- WebsocketsServer Library
- ESP32 Filesystem Uploader in Arduino
- Download and install Arduino IDE. Make sure to install legacy version 1.8.x and not v2.
- Let's first install Arduino-ESP32 core by going to
Tools -> Board -> Board manager
. Find and install ESP32. - Now open arduino IDE, go to
Sketch -> Include Library -> Manage Libraries
. Serach for Websockets and install. - Follow same step for AsyncTCP library.
- Now to install ESPAsyncWebserver, first download the zip file from here. Then go to
Sketch ->Include Library -> Add .ZIP Library
. Then go to downloads and select downloaded zip file. - Now to install ESP32FS plugin, download this .zip file. Extract this file and place it in
<home_dir>/Arduino/tools/ESP32FS/tool/esp32fs.jar
. You will have to create atools
directory inside your<home_dir>/Arduino
directory if not present already. Fot all changes to take place, reload Arduino IDE.
- Open BioSignal-Recorder.ino with Arduino IDE.
- In your Arduino IDE under
Tools -> Board
make sure you choose "ESP32 Dev Module" or a board allowing partition schemes. - Under
Tools -> Upload Speeds
Choose115200
. - Under
Tools -> Partition Scheme
ChooseDefault 4mb with SPIFFS
. - Find and change SSID to your WiFi SSID and PASSWORD to your WiFi password.
- Compile sketch and upload it on your ESP32.
- In your Arduino IDE click on
Tools-> ESP32 Sketch Data Upload
. BioSignal-Recorder uses spiffs file system. - If SPIFFS upload fails, then try installing this alternative for ESP32FS Plugin. Make sure to remove older .jar file and follow same installation instruction.
- Go to the serial monitor, you can find IP for the webpage, you might have to hard reset your esp32 at this stage if the IP is not displayed.
- Use any browser to access given IP address. Make sure the device is connected to the same SSID as added in .ino file.
- Select GPIO number and frequency and start visualising.
Feature | Discription |
---|---|
Multichannel | ESP32 has 4 hardware timers which are currently being used for sampling data according to provided sampling rate. User can choose number of channels to use. |
Variable sampling rate | Multiple options for sampling rate are given from 100Hz to 5000Hz.Every channel can be set with different sampling rate. |
Save as CSV | Data can be saved as a CSV file and downloaded on computer. CSV file contains data with timestamp, channel number and packet number of corresponding channel. |
Note: ESP32 has 2 ADC units. ADC1 and ADC2. ADC2 is shared with WIFI module hence we can only use pins in ADC1 channel. ADC1 has 8 pins, GPIO 32-39.
The frontend of this project inspired from BojunJurca's Esp32_oscilloscope project.