Author Topic: Newbie Scope: Things that aren't square...  (Read 2090 times)

0 Members and 1 Guest are viewing this topic.

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Newbie Scope: Things that aren't square...
« on: January 10, 2024, 07:50:00 pm »
I have a Rigol DS1052E Oscilloscope labelled 2CH 50MHz/1Gs/s



I attached one channel to a signal which should be a 18MHz square wave and another which is the above divided by 3 so around 6MHz.

Why aren't they squarer?  Is it my measuring or a limitation of the scope?

I can guess a 18MHz and a 6MHz wave (with a 2:3 duty cycle)... but I would have to guess
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3074
  • Country: be
    • Freelance Hardware Engineer
Re: Newbie Scope: Things that aren't square...
« Reply #1 on: January 10, 2024, 07:54:34 pm »
Source of the square?

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1420
  • Country: gb
Re: Newbie Scope: Things that aren't square...
« Reply #2 on: January 10, 2024, 07:59:09 pm »
The 18MHz trace might be the result of you having unknowingly enabled the 20MHz low pass filter.

As for the other trace I would suspect something amiss with the 6MHz source.

It may be relevant that the fall time of both appears to be the same.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3788
  • Country: de
Re: Newbie Scope: Things that aren't square...
« Reply #3 on: January 10, 2024, 08:24:16 pm »
I have a Rigol DS1052E Oscilloscope labelled 2CH 50MHz/1Gs/s
...
I attached one channel to a signal which should be a 18MHz square wave and another which is the above divided by 3 so around 6MHz.

50MHz scope will not show 18MHz square wave as a square wave but as a more-or-less distorted sine because it doesn't have enough bandwidth. Remember, square wave = fundamental 18MHz + infinite amount of harmonics. You need to get at least ~5 of those harmonics for the signal to still look somewhat square. With 50MHz bandwidth you would have at best 2, third harmonic is already outside.

So that explains your 18MHz signal.

Why the 6MHz signal is so messed up is difficult to say without knowing more about your signal source and how are you measuring things.

 
The following users thanked this post: NivagSwerdna, pdenisowski

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21741
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Newbie Scope: Things that aren't square...
« Reply #4 on: January 10, 2024, 09:14:04 pm »
Check that the probes are on the x10 setting.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: wraper

Online Benta

  • Super Contributor
  • ***
  • Posts: 5901
  • Country: de
Re: Newbie Scope: Things that aren't square...
« Reply #5 on: January 10, 2024, 09:42:08 pm »
I'd say your divider is too slow (74HC?).
But, you know, posting only half the information (the 'scope part) and leaving out the circuit gives you half answers.

« Last Edit: January 10, 2024, 09:43:51 pm by Benta »
 

Offline srb1954

  • Super Contributor
  • ***
  • Posts: 1101
  • Country: nz
  • Retired Electronics Design Engineer
Re: Newbie Scope: Things that aren't square...
« Reply #6 on: January 10, 2024, 09:43:20 pm »
Check that the probes are on the x10 setting.
And properly compensated using the calibrator O/P from the scope.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1227
  • Country: pl
Re: Newbie Scope: Things that aren't square...
« Reply #7 on: January 10, 2024, 09:44:25 pm »
To provide pictures to what janoc explained above: square wave composition from harmonics. For your 18 MHz square wave, the first four are 18 MHz, 36 MHz, 54 MHz, 72 MHz. As you can see the third one is already beyond scope’s bandwidth.

Paul Falstad created a Fourier transform demo, which you may use to play with the concept. Buttons on the right set predefined waveforms.

Also note that “square wave” is an idealized concept. Very often they are actually sinusoidal: in particular for clock signals and when data signal is pushed to the limits of the medium. So be sure the signal is expected to be squareish in the first place.



« Last Edit: January 10, 2024, 09:48:23 pm by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19639
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Newbie Scope: Things that aren't square...
« Reply #8 on: January 11, 2024, 12:04:27 am »
Ignore the number of harmonics points; the risetime is all that matters[1] whatever the fundamental frequency. Concentrate on the understanding that a scope is a time domain instrument.

If you have a square wave input, then the rule of thumb is that the scopes risetime is 0.35/BW: a 50MHz scope will have a 7ns risetime. That's true for an 18MHz or 18Hz square wave.

[1] https://entertaininghacks.wordpress.com/2018/05/08/digital-signal-integrity-and-bandwidth-signals-risetime-is-important-period-is-irrelevant/
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: pdenisowski

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2439
  • Country: ca
Re: Newbie Scope: Things that aren't square...
« Reply #9 on: January 11, 2024, 12:08:35 am »
When you look at a trace that appears not as expected.

- Check your setup, the act of measuring can alter the waveform (x10 x1 on a probe makes a diffrence)
- Check or perhaps understand your device under test. The quality / uniformity / level vary can greatly over the
frequency range of the device.

This can be a very fun/educational thing. I'd suggest a notebook and pencil. If you are looking at signal generator
try different settings on scope and don't forget x10 x1 on the probe. Characterizing your test gear  is a part of
bench work. 
 

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1431
  • Country: ua
Re: Newbie Scope: Things that aren't square...
« Reply #10 on: January 11, 2024, 08:30:16 am »
So that explains your 18MHz signal.
No, it doesn't. 18 MHz and any signal with two-three harmonics doesn't look like sine or sawtooth. There is something other going wrong (or not).
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: nl
Re: Newbie Scope: Things that aren't square...
« Reply #11 on: January 11, 2024, 08:52:08 am »
Yes many factors to consider.

Measuring on for instance a breadboard with crappy connections can distort the signal due to added resistance and capacitance. Without the schematics and the measurement setup there is no way of telling why you see on the scope what you see.

In the 6MHz signal it looks like the 18MHz is somewhat bleeding through, forming the ripple on the high part of the signal.

Conclusion: Provide us with more information if you want to get better answers.


Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Newbie Scope: Things that aren't square...
« Reply #12 on: January 11, 2024, 02:08:39 pm »
The signals come from an Arcade PCB... it's not exactly this since my actual board has some different components but essentially it is the same...

The 18MHz is the 401 signal..




The other signal isn't described completely on the schematic but is the equivalent of this diagram...



The green signal

For all intents and purposes the bottom schematic shows both signals but on my board some of the parts are in a custom chip which implements the equivalent.

The pair of JKs form a divide by 3

« Last Edit: January 11, 2024, 02:11:44 pm by NivagSwerdna »
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1772
  • Country: is
Re: Newbie Scope: Things that aren't square...
« Reply #13 on: January 11, 2024, 02:24:03 pm »
Be aware, as Tim mentioned, the X1 setting on the probe may have a very low bandwidth. I learned this the hard way with my Tektronix P2220 probes (and all the chinese imitations). These are '200 MHz' probes with a 6 MHz bandwidth in the X1 position!! I surely didn't expect that lower limit on a 200 MHz rated probe!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3074
  • Country: be
    • Freelance Hardware Engineer
Re: Newbie Scope: Things that aren't square...
« Reply #14 on: January 11, 2024, 02:24:39 pm »
You're leaving a lot of blanks, "some different components" makes all the difference. But TP401 won't have much of a square on it at 18MHz and with a Tr of 10ns or so from that buffer :-)

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 691
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Newbie Scope: Things that aren't square...
« Reply #15 on: January 11, 2024, 02:54:34 pm »
If you have a square wave input, then the rule of thumb is that the scopes risetime is 0.35/BW: a 50MHz scope will have a 7ns risetime. That's true for an 18MHz or 18Hz square wave.

Yes, that's very good advice :)

Note however that the factor may need to be increased from 0.35 to around 0.40 depending on the scope's frequency response -- 0.35 is usually for scopes with a Gaussian response, whereas a slightly higher factor might be better for scopes with a "steeper" frequency response (i.e. more "wall-like")

I talk about this in my video on oscilloscope bandwidth:

https://youtu.be/FhT8TpuI7ek?t=621
Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8

Free online test and measurement fundamentals courses from Rohde & Schwarz:  https://tinyurl.com/mv7a4vb6
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: nl
Re: Newbie Scope: Things that aren't square...
« Reply #16 on: January 11, 2024, 03:24:38 pm »
The schematic helps indeed. Both 74LS parts used in the schematic are "slow" when it comes to rise time. The JK filpflop, according to the datasheet I checked, has a typical max clock frequency input of 20MHz, so close to what is used in this design.

The 6MHz signal, like you stated in your original post, comes out as 33% or 66% pulse width depending on which output is measured. On the green marked one it would be high for two clock periods and low for one. This can be seen on your scope image. But there it has a rise time of ~50ns which is indeed quite long even for the 74LS107.

So maybe what others have pointed out is that you are using 1x setting on your probes.

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Newbie Scope: Things that aren't square...
« Reply #17 on: January 11, 2024, 06:05:05 pm »
TBH I've never had my probes on anything other than x1.... so the idea to use x10 is quite novel to me!

Anyway...



So that's with the probes at x10 and otherwise default.

It's clearly represents what I would expect from a logical point of view.  i.e. the blue trace is 1/3 of the yellow trace with a 2/3rds duty cycle.

And I take the Fourier comments from a point of view of someone who's done FFTs in the past so that is understood; just thought I was getting short changed from my 50MHz scope which is allegedly tweaked to 100MHz.

FWIW The scope has a Sinx/x setting... didn't seem to make much difference
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Newbie Scope: Things that aren't square...
« Reply #18 on: January 11, 2024, 06:08:12 pm »
You're leaving a lot of blanks, "some different components" makes all the difference.
As stated some of the logic on this board is provided by a (Konami) Custom Chip which is not documented.  But logically that device just implements the logic that is found on similar boards... just in one custom package.
 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 375
  • Country: gb
Re: Newbie Scope: Things that aren't square...
« Reply #19 on: January 11, 2024, 06:31:37 pm »
The whole point of x10 probes is high bandwidth with low loading of the circuit, using the x1 setting is seldom if ever useful due to it heavily loading the circuit (lots of capacitance) and having low bandwidth (typically 1/10th of the probe's x10 bandwidth).
 
The following users thanked this post: NivagSwerdna

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19639
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Newbie Scope: Things that aren't square...
« Reply #20 on: January 11, 2024, 08:16:16 pm »
TBH I've never had my probes on anything other than x1.... so the idea to use x10 is quite novel to me!

Anyway...

(Attachment Link)

So that's with the probes at x10 and otherwise default.

It's clearly represents what I would expect from a logical point of view.  i.e. the blue trace is 1/3 of the yellow trace with a 2/3rds duty cycle.

And I take the Fourier comments from a point of view of someone who's done FFTs in the past so that is understood; just thought I was getting short changed from my 50MHz scope which is allegedly tweaked to 100MHz.

FWIW The scope has a Sinx/x setting... didn't seem to make much difference

Top trace shows a clean risetime of approx 7ns, which corresponds to a 50MHz response - as expected. That signal has sufficient signal integrity to be usable as a clock.

Bottom trace also has a clean 7ns falltime, but there is a lot of crap. It could not be used as a clock.

What could cause the crap? One obvious possibility is a poor probe ground connection. Make sure you have a short connection between the probe's shield and the ground on the IC driving the bottom trace.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: NivagSwerdna

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 759
  • Country: us
Re: Newbie Scope: Things that aren't square...
« Reply #21 on: January 12, 2024, 03:51:21 am »
On some of your screenshots you have channel 1 in AC mode.
 

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1420
  • Country: gb
Re: Newbie Scope: Things that aren't square...
« Reply #22 on: January 12, 2024, 09:30:25 am »
On some of your screenshots you have channel 1 in AC mode.
So what?
 

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1431
  • Country: ua
Re: Newbie Scope: Things that aren't square...
« Reply #23 on: January 12, 2024, 04:56:42 pm »
TBH I've never had my probes on anything other than x1.... so the idea to use x10 is quite novel to me!
The rule is always use x10 divider except some rare cases when you really need x1. Only x10 divider has the smallest possible influence on the circuit and the signal you want to look at.
Using x1 instead of x10 is an old known catch for a young players.
« Last Edit: January 12, 2024, 04:59:47 pm by Vovk_Z »
 
The following users thanked this post: tooki, NivagSwerdna

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1449
  • Country: ua
Re: Newbie Scope: Things that aren't square...
« Reply #24 on: January 12, 2024, 05:02:14 pm »
Someone in a related topic gave an advice of switching your probes to x10 and wrapping the switches over with insulation tape to make them stay in that position, and that's a good advice.
I would only add that it's better to use a heat shrink tube for this: it looks better and does not leave a sticky residue.
 
The following users thanked this post: tooki

Online tooki

  • Super Contributor
  • ***
  • Posts: 11644
  • Country: ch
Re: Newbie Scope: Things that aren't square...
« Reply #25 on: January 13, 2024, 11:50:40 am »
Someone in a related topic gave an advice of switching your probes to x10 and wrapping the switches over with insulation tape to make them stay in that position, and that's a good advice.
I would only add that it's better to use a heat shrink tube for this: it looks better and does not leave a sticky residue.
Yep. Or just replace them with fixed x10 probes! (For example, the basic x10 probes from Testec only cost about €15 and are way nicer than Rigol’s probes.)
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5140
  • Country: nl
Re: Newbie Scope: Things that aren't square...
« Reply #26 on: January 13, 2024, 02:09:54 pm »
It's a rainy Saturday here so I created your circuit and measured twice: 500MHz bandwidth and 20MHz bandwidth, see pictures and note the difference.
I didn't have (didn't want to search too long) a 18MHz crystal so I used a 16MHz one, shouldn't matter.

500MHz:



20MHz:


Keyboard error: Press F1 to continue.
 
The following users thanked this post: tooki, NivagSwerdna, pdenisowski

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Newbie Scope: Things that aren't square...
« Reply #27 on: January 14, 2024, 09:12:21 pm »
Very nice.

Comparing those with my pictures from post#17...


https://www.rigol-uk.co.uk/product/rigol-ds1052e-50mhz-digital-oscilloscope/

So my scope is allegedly

50MHz

and it was 'tweaked' with some firmware hack to be '100MHz'...

I would have thought my pictures would look better?

 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19639
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Newbie Scope: Things that aren't square...
« Reply #28 on: January 14, 2024, 09:18:19 pm »
If you can see  a 3.5ns risetime, then it is 100MHz.

If you can see a 7ns risetime, then either it is 50MHz or you are seeing the signal's risetime.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6569
  • Country: de
Re: Newbie Scope: Things that aren't square...
« Reply #29 on: January 14, 2024, 10:05:05 pm »
Someone in a related topic gave an advice of switching your probes to x10 and wrapping the switches over with insulation tape to make them stay in that position, and that's a good advice.
I would only add that it's better to use a heat shrink tube for this: it looks better and does not leave a sticky residue.

Yet another way to implement this: On many low-cost probes (including the ones from Rigol which I have), you can simply pop out the little "grip" piece of the slide switch. That leaves you with a nicely recessed switch which can still be moved to 1x with a small screwdriver in the rare situations where you need that -- but otherwise can't be moved inadvertently.
 
The following users thanked this post: shapirus

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: Newbie Scope: Things that aren't square...
« Reply #30 on: January 15, 2024, 04:08:52 pm »
I suspect you have a (probe) connection issue at work too. I believe I can see your top, yellow trace riding on what looks to be a sine-ish lower frequency. I'd double check your physical connections. Can't accurately diagnose a signal until you're sure it's ONLY that signal you're looking at!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf