espScope icon indicating copy to clipboard operation
espScope copied to clipboard

Changing sampling rate

Open irazaq opened this issue 7 years ago • 3 comments
trafficstars

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?

irazaq avatar Aug 20 '18 01:08 irazaq

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.

easyvolts avatar Oct 13 '18 09:10 easyvolts

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.

Adrianotiger avatar Apr 23 '19 08:04 Adrianotiger

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.

irazaq avatar Apr 24 '19 02:04 irazaq