Zeeweii toyscopes - How do they do it? - Page 1
Forum section: electronics / testgear

author: tatel
author_rank: Frequent Contributor
timestamp: April 21, 2023, 07:06:09 pm
content: I recently got into an argument with fellow forum member radiolistener about Zeeweii toyscopes.radiolistener's point is these devices doesn't have any antialiasing filter so they can't be trusted above 5 MHz (DSO2512, thread here:https://www.eevblog.com/forum/testgear/new-2ch-pocket-dsosg-sigpeak-dso2512g/msg3547154/#msg3547154)My point was that even DSO154 seems to show (thread:https://www.eevblog.com/forum/testgear/new-toy()-scope-dso154pro-1ch-claimed-40mss/msg4531274/#msg4531274) accurate frequencies and waveforms.After reading about Nyquist theorem and aliasing (https://www.asdlib.org/onlineArticles/elabware/Scheeline_ADC/ADC_NumRep_Nyquist.html) I reckon radiolistener's point is valid. But how does Zeeweii achieve to show semingly good results?Obviously I know fungus has a DSO154 so he will have probably something to say, then hopefully all the usual suspects will also get into the slaughterhouse with their chainsaws

author: wasedadoc
author_rank: Super Contributor
timestamp: April 21, 2023, 07:31:10 pm
content: It is very simple. Any frequency components in the input signal that are higher than half the sampling frequency get shifted down. Folded around the half sampling frequency. Say sampling at 100MHz. Input 51MHz sine wave. Reconstructed output will be 49MHz sine wave. Input 50MHz sine will produce 50MHz sine. Input 52MHz sine, output 48MHz sine etc. Input 100MHz, get DC out.If there are multiple input components eg 30 MHz and 60 MHz the 30 MHz one will be reconstructed properly. The 60 MHz one will appear as 40 MHz. Aliasing does not change the amplitude. The amplitude of the false 40 MHz out will be the same as the 60 MHz in. Aliasing does not change the amplitude or frequency of the 30 MHz component.Still using 100MHz sampling rate example, if you input a 20MHz square wave then the harmonics , 60MHz, 100MHz and up will be aliased down and distort the viewed waveform. However the 20MHz component in the input has the largest amplitude. It still has the largest amplitude at the output. The output will not be a square wave but will have recognisable period of 50nS.In summary, if there is negligible amplitude of frequency components above the half sampling frequency then the effect on viewed waveforms is negligible.You have probably seen aliasing many times when watching a cowboy movie on TV. The wagon wheels rotating backwards has the same cause. The TV frame rate is too low compared to the forward rotation rate of the wheels.

author: tatel
author_rank: Frequent Contributor
timestamp: April 21, 2023, 07:43:33 pm
content: Thank you, thats a much clear -and fast- answer than anything I could get from the stuff I readed.So, are the fears induced in us poor little newbies exagerated?

author: tatel
author_rank: Frequent Contributor
timestamp: April 21, 2023, 07:51:40 pm
content: Also, if we get an aliased waveform that is, say 48 MHz, how could the toyscope show an accurate frequency measurement of 52 MHz?I'm going to have quite a lot of fun doing some tests.Again, thank you very much for giving a simple answer

author: wasedadoc
author_rank: Super Contributor
timestamp: April 21, 2023, 08:04:14 pm
content: Quote from: tatel on April 21, 2023, 07:51:40 pmThe toyscope has a frequency counter working on the input signal, not the sampled signal.

author: tatel
author_rank: Frequent Contributor
timestamp: April 21, 2023, 08:44:29 pm
content: Quote from: wasedadoc on April 21, 2023, 08:04:14 pmYeah, I was guessing it

author: tatel
author_rank: Frequent Contributor
timestamp: April 23, 2023, 04:21:30 am
content: A video is worth a thousand pictures.Sine wave from 1 to 30 MHz:https://youtu.be/DgjjeEjtxGASquare wave from 100 KHz to 25 MHzhttps://youtu.be/oAR0WuilDfc

author: S57UUU
author_rank: Regular Contributor
timestamp: April 23, 2023, 05:56:05 am
content: This is not just some problem with cheap scopes. "Real" scopes like Tek TDS... will also alias. It's up to the user to check for aliasing, for example by changing the time base.Sometimes aliasing can even be useful, see "equivalent time sampling". This trick dates back to analog sampling scopes, for example Tek 7000 series TDR plugins.

author: wasedadoc
author_rank: Super Contributor
timestamp: April 23, 2023, 11:17:35 am
content: Quote from: tatel on April 23, 2023, 04:21:30 amIt would appear to be sampling at 40MHz as stated in specification. There is no or minimal anti-alias filtering. The displayed frequency is measured from the samples, not the input signal.

author: Fungus
author_rank: Super Contributor
timestamp: April 23, 2023, 12:05:17 pm
content: Quote from: wasedadoc on April 23, 2023, 11:17:35 amYep. If you see an 18MHz sine wave on one of these 'scopes there'sNO WAYto know if it was a 22MHz input signal or not.(and it'snota specific problem with these 'scopes, that's just how sampling works)You need a hardware frequency counter to know the truth, and these don't have one.

author: tatel
author_rank: Frequent Contributor
timestamp: April 23, 2023, 12:11:47 pm
content: Quote from: Fungus on April 23, 2023, 12:05:17 pmAmplitude under -3dB isn't a clue?

author: Fungus
author_rank: Super Contributor
timestamp: April 23, 2023, 01:14:23 pm
content: Quote from: tatel on April 23, 2023, 12:11:47 pmThat assumes you know what the amplitude is supposed to be.(and the one I measured wasn't -3dB)

author: TimFox
author_rank: Super Contributor
timestamp: April 23, 2023, 02:02:05 pm
content: Quote from: Fungus on April 23, 2023, 12:05:17 pmThere is an easy way to see if your display is an alias: change the time base by one notch in both directions.An alias will change its displayed frequency.(I remember chasing an apparent almost 60 Hz waveform, not line-synchronous, with an early DSO, where the signal was actually an external 10 MHz clock that was undersampled when the DSO time base was appropriate for 60 Hz. The apparent frequency resulted from a small frequency mismatch, 6 ppm, between the external clock and the internal clock of the DSO.)

author: Fungus
author_rank: Super Contributor
timestamp: April 23, 2023, 02:08:11 pm
content: Quote from: TimFox on April 23, 2023, 02:02:05 pmOnly if the sample rate changes.

author: radiolistener
author_rank: Super Contributor
timestamp: April 23, 2023, 05:12:16 pm
content: Quote from: tatel on April 21, 2023, 07:51:40 pmit depends on exact device implementation. Usually frequency counter is implemented in hardware on FPGA GPIO pin which is not sampled with ADC, but connected directly to the signal with analog comparator, so it can measure frequency which is higher than half sample rate of ADC. But some toy may use software trigger implemented after ADC, in such case it can't measure frequency above half sample rate.Software trigger is used in a toys which doesn't have FPGA, just CPU. But Zeeweii has Lattice FPGA, so it has hardware trigger and can measure frequency which is higher than half sample rate. Usually hardware frequency counter on FPGA has synchronous design, so it's higher frequency is limited with FPGA clock frequency, which is equals to external oscillator, but also may be multiplied inside on a PLL.

author: tatel
author_rank: Frequent Contributor
timestamp: April 23, 2023, 05:32:46 pm
content: Hmmm... really interesting and instructive replies. Thank you all!

author: tatel
author_rank: Frequent Contributor
timestamp: April 23, 2023, 05:37:21 pm
content: Quote from: Fungus on April 23, 2023, 01:14:23 pmOK, I see. Of course when testing one knows the amplitude at AWG's output, but that's just a very particular case. Not useful if not testing.

author: Fungus
author_rank: Super Contributor
timestamp: April 23, 2023, 08:25:30 pm
content: Quote from: tatel on April 23, 2023, 05:37:21 pmRight.