I‘m trying sample data with high sampling rate. I need to be faster (ideally close to 2MHz) than the standard analogRead command allows. Has anybody had some success with this? I was able to do that with other boards (Teensy, STM variants) but similar approaches fail on the UNO Q.
you might find my notes here useful in choosing a sampling rate for your signal. The Nyquist criterion isnt always the mostb appropriate, depending on what youy are trying to measure. Which you havent said - more info would be useful.
I‘m familiar with basic data processing. My project is to collect the fringe patterns from a interferometer. We have signals from a reference laser and a signal laser. The fringe frequency is up to 500kHz. I have successfully used a Teensy 4.1 to effectively build a Fourier Transform Spectrometer. The disadvantage of the Teensy is that a seperate computer needs to be connected. I want to replicate the project with UNOQ and have it as a standalone instrument. Most pieces are in place but with the sampling rate I‘m stuck at 160kHz.
In the UNO R3, the ADC conversion clock is, by default, 125 kHz. Since each conversion requires 13 ADC clock cycles, the conversion time per sample is 104 µs. Therefore, the maximum sampling rate is approximately 9,615 samples per second.
Given this limitation, how can one expect a sampling rate higher than 9,615 samples per second from the ADC of the UNO Q, especially when the timing of its header signals is designed to be fully compatible with the UNO R3?
It is true that, in the UNO R3, the ADC clock can be increased up to 8 MHz, which theoretically allows a maximum sampling rate of about 615,384 samples per second. However, this comes at the cost of reduced accuracy and is outside the recommended operating conditions.
The key question is: can such an approach—i.e., significantly increasing the ADC clock beyond standard limits—be practically and reliably implemented in the UNO Q?
Can you clarify this for me - are you interested in the SHAPE of the signal within one or a few cycles, variations of its amplitude vs another parameter, or counting fringes.
Did you finally sucessfully measured your signal at high frequency?
I have a partially similar question about double ADC measurement here : UNO Q: Simultaneous ADC1 + ADC4 timer-triggered DMA capture at up to 2.5 MS/s
It may be possible to do that rebuilding the UNO Q loader, implemeting a function using there low level capabilities and exporting and calling it from an Arduino LLEXT sketch.