espScope
espScope copied to clipboard
Changing sampling rate
Thanks for sharing this project. Using esp32 as a wireless scope is a great idea though it is unfortunate you are no more working on it. I was playing with it and was wondering how one can implement timebase to change the sampling rate.
Sampling a low frequency signal like 1kHz will require about 40k sample buffer, but the buffer used is 5k, so the scope can only capture 1/8 of a complete wave. What was your plan to implement a timebase? How can one implement this based on your library?
Hi, it was never planned to be used for low-speed signals (actually esp32 embedded adc is fast enough to handle this), so there is no solution "out-of-the-box". But you could simply increase the buffer size, esp32 has a lot of ram. One of the solutions that could be used is simply reducing ADC clock speed, but the chip doesn't guaranty its parameters at clocks lower than 20Mhz, so it can lead to signal quality degradation.
Did you made some experiments with the BT of the ESP? I understand that your scope was the 40MHz measurement. But if you can send the data in realtime to a BT device, you can create a logger or sniffer directly on your android-app using the measured data. I mean, if you can measure a serial-data (it is up to 1MHz) or i2c or SPI and send it to a phone, you can use this module for a lot of measurements.
I didn't try BT because the idea was to have the UI loaded from the device, by using HTML5 and javascript, so no external app is required. I think one can still log the data with JS using local storage or store into SQLite database.