Author Topic: Zeeweii toyscopes - How do they do it?  (Read 2731 times)

0 Members and 1 Guest are viewing this topic.

Online tatelTopic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: es
Zeeweii toyscopes - How do they do it?
« on: April 21, 2023, 07:06:09 pm »
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 8)
 

Online wasedadoc

  • Super Contributor
  • ***
  • Posts: 1469
  • Country: gb
Re: Zeeweii toyscopes - How do they do it?
« Reply #1 on: April 21, 2023, 07:31:10 pm »
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. 
« Last Edit: April 21, 2023, 07:46:12 pm by wasedadoc »
 
The following users thanked this post: jebem, Aldo22, aleph0

Online tatelTopic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: es
Re: Zeeweii toyscopes - How do they do it?
« Reply #2 on: April 21, 2023, 07:43:33 pm »
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?
 

Online tatelTopic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: es
Re: Zeeweii toyscopes - How do they do it?
« Reply #3 on: April 21, 2023, 07:51:40 pm »
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
 

Online wasedadoc

  • Super Contributor
  • ***
  • Posts: 1469
  • Country: gb
Re: Zeeweii toyscopes - How do they do it?
« Reply #4 on: April 21, 2023, 08:04:14 pm »
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
The toyscope has a frequency counter working on the input signal, not the sampled signal.
 

Online tatelTopic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: es
Re: Zeeweii toyscopes - How do they do it?
« Reply #5 on: April 21, 2023, 08:44:29 pm »
The toyscope has a frequency counter working on the input signal, not the sampled signal.

Yeah, I was guessing it
 

Online tatelTopic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: es
Re: Zeeweii toyscopes - How do they do it?
« Reply #6 on: April 23, 2023, 04:21:30 am »
A video is worth a thousand pictures.

Sine wave from 1 to 30 MHz: https://youtu.be/DgjjeEjtxGA

Square wave from 100 KHz to 25 MHz https://youtu.be/oAR0WuilDfc
 

Offline S57UUU

  • Regular Contributor
  • *
  • Posts: 73
  • Country: si
Re: Zeeweii toyscopes - How do they do it?
« Reply #7 on: April 23, 2023, 05:56:05 am »
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.
 
The following users thanked this post: jebem

Online wasedadoc

  • Super Contributor
  • ***
  • Posts: 1469
  • Country: gb
Re: Zeeweii toyscopes - How do they do it?
« Reply #8 on: April 23, 2023, 11:17:35 am »
A video is worth a thousand pictures.

Sine wave from 1 to 30 MHz: https://youtu.be/DgjjeEjtxGA

Square wave from 100 KHz to 25 MHz https://youtu.be/oAR0WuilDfc
It 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.
« Last Edit: April 23, 2023, 11:30:09 am by wasedadoc »
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16867
  • Country: 00
Re: Zeeweii toyscopes - How do they do it?
« Reply #9 on: April 23, 2023, 12:05:17 pm »
It 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.

Yep. If you see an 18MHz sine wave on one of these 'scopes  there's NO WAY to know if it was a 22MHz input signal or not.

(and it's not a 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.
 

Online tatelTopic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: es
Re: Zeeweii toyscopes - How do they do it?
« Reply #10 on: April 23, 2023, 12:11:47 pm »
It 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.

Yep. If you see an 18MHz sine wave on one of these 'scopes  there's NO WAY to know if it was a 22MHz input signal or not.

(and it's not a 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.

Amplitude under -3dB isn't a clue?
« Last Edit: April 23, 2023, 05:34:45 pm by tatel »
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16867
  • Country: 00
Re: Zeeweii toyscopes - How do they do it?
« Reply #11 on: April 23, 2023, 01:14:23 pm »
Amplitude under -3dB isn't a clue?

That assumes you know what the amplitude is supposed to be.  :-//

(and the one I measured wasn't -3dB)
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 8070
  • Country: us
  • Retired, now restoring antique test equipment
Re: Zeeweii toyscopes - How do they do it?
« Reply #12 on: April 23, 2023, 02:02:05 pm »
It 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.

Yep. If you see an 18MHz sine wave on one of these 'scopes  there's NO WAY to know if it was a 22MHz input signal or not.

(and it's not a 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.

There 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.) 
 
The following users thanked this post: shakalnokturn, jebem

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16867
  • Country: 00
Re: Zeeweii toyscopes - How do they do it?
« Reply #13 on: April 23, 2023, 02:08:11 pm »
change the time base by one notch in both directions.
An alias will change its displayed frequency.

Only if the sample rate changes.
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3570
  • Country: ua
Re: Zeeweii toyscopes - How do they do it?
« Reply #14 on: April 23, 2023, 05:12:16 pm »
Also, if we get an aliased waveform that is, say 48 MHz, how could the toyscope show an accurate frequency measurement of 52 MHz?

it 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.
« Last Edit: April 23, 2023, 05:21:59 pm by radiolistener »
 
The following users thanked this post: jebem, aleph0

Online tatelTopic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: es
Re: Zeeweii toyscopes - How do they do it?
« Reply #15 on: April 23, 2023, 05:32:46 pm »
Hmmm... really interesting and instructive replies. Thank you all!
 

Online tatelTopic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: es
Re: Zeeweii toyscopes - How do they do it?
« Reply #16 on: April 23, 2023, 05:37:21 pm »
Amplitude under -3dB isn't a clue?

That assumes you know what the amplitude is supposed to be.  :-//

(and the one I measured wasn't -3dB)

OK, 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.
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16867
  • Country: 00
Re: Zeeweii toyscopes - How do they do it?
« Reply #17 on: April 23, 2023, 08:25:30 pm »
OK, 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.

Right.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf