Newbie Scope: Things that aren't square... - Page 1
Forum section: electronics / beginners

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 10, 2024, 07:50:00 pm
content: I have a Rigol DS1052E Oscilloscope labelled 2CH 50MHz/1Gs/sI 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

author: Ice-Tea
author_rank: Super Contributor
timestamp: January 10, 2024, 07:54:34 pm
content: Source of the square?

author: wasedadoc
author_rank: Super Contributor
timestamp: January 10, 2024, 07:59:09 pm
content: 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.

author: janoc
author_rank: Super Contributor
timestamp: January 10, 2024, 08:24:16 pm
content: Quote from: NivagSwerdna on January 10, 2024, 07:50:00 pm50MHz 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 10, 2024, 09:14:04 pm
content: Check that the probes are on the x10 setting.Tim

author: Benta
author_rank: Super Contributor
timestamp: January 10, 2024, 09:42:08 pm
content: 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.

author: srb1954
author_rank: Super Contributor
timestamp: January 10, 2024, 09:43:20 pm
content: Quote from: T3sl4co1l on January 10, 2024, 09:14:04 pmAnd properly compensated using the calibrator O/P from the scope.

author: golden_labels
author_rank: Super Contributor
timestamp: January 10, 2024, 09:44:25 pm
content: To provide pictures to what janoc explained above:square wave compositionfrom 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 aFourier 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.

author: tggzzz
author_rank: Super Contributor
timestamp: January 11, 2024, 12:04:27 am
content: Ignore the number of harmonics points; the risetime is all that matterswhatever 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.https://entertaininghacks.wordpress.com/2018/05/08/digital-signal-integrity-and-bandwidth-signals-risetime-is-important-period-is-irrelevant/

author: pickle9000
author_rank: Super Contributor
timestamp: January 11, 2024, 12:08:35 am
content: 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 thefrequency 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 generatortry different settings on scope and don't forget x10 x1 on the probe. Characterizing your test gear is a part ofbench work.

author: Vovk_Z
author_rank: Super Contributor
timestamp: January 11, 2024, 08:30:16 am
content: Quote from: janoc on January 10, 2024, 08:24:16 pmNo, 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).

author: pcprogrammer
author_rank: Super Contributor
timestamp: January 11, 2024, 08:52:08 am
content: 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.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 11, 2024, 02:08:39 pm
content: 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 signalFor 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

author: CaptDon
author_rank: Super Contributor
timestamp: January 11, 2024, 02:24:03 pm
content: 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!

author: Ice-Tea
author_rank: Super Contributor
timestamp: January 11, 2024, 02:24:39 pm
content: 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 :-)

author: pdenisowski
author_rank: Super Contributor
timestamp: January 11, 2024, 02:54:34 pm
content: Quote from: tggzzz on January 11, 2024, 12:04:27 amYes, that's very good adviceNote 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

author: pcprogrammer
author_rank: Super Contributor
timestamp: January 11, 2024, 03:24:38 pm
content: 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.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 11, 2024, 06:05:05 pm
content: 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

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 11, 2024, 06:08:12 pm
content: Quote from: Ice-Tea on January 11, 2024, 02:24:39 pmAs 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.

author: MarkT
author_rank: Frequent Contributor
timestamp: January 11, 2024, 06:31:37 pm
content: 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).

author: tggzzz
author_rank: Super Contributor
timestamp: January 11, 2024, 08:16:16 pm
content: Quote from: NivagSwerdna on January 11, 2024, 06:05:05 pmTop 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.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: January 12, 2024, 03:51:21 am
content: On some of your screenshots you have channel 1 in AC mode.

author: wasedadoc
author_rank: Super Contributor
timestamp: January 12, 2024, 09:30:25 am
content: Quote from: JustMeHere on January 12, 2024, 03:51:21 amSo what?

author: Vovk_Z
author_rank: Super Contributor
timestamp: January 12, 2024, 04:56:42 pm
content: Quote from: NivagSwerdna on January 11, 2024, 06:05:05 pmThe 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.

author: shapirus
author_rank: Super Contributor
timestamp: January 12, 2024, 05:02:14 pm
content: 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.

author: tooki
author_rank: Super Contributor
timestamp: January 13, 2024, 11:50:40 am
content: Quote from: shapirus on January 12, 2024, 05:02:14 pmYep. 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.)

author: PA0PBZ
author_rank: Super Contributor
timestamp: January 13, 2024, 02:09:54 pm
content: 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:

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 14, 2024, 09:12:21 pm
content: 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 allegedly50MHzand it was 'tweaked' with some firmware hack to be '100MHz'...I would have thought my pictures would look better?

author: tggzzz
author_rank: Super Contributor
timestamp: January 14, 2024, 09:18:19 pm
content: 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.

author: ebastler
author_rank: Super Contributor
timestamp: January 14, 2024, 10:05:05 pm
content: Quote from: shapirus on January 12, 2024, 05:02:14 pmYet 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.

author: IDEngineer
author_rank: Super Contributor
timestamp: January 15, 2024, 04:08:52 pm
content: 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!