square waves question - Page 1
Forum section: electronics / beginners

author: festus
author_rank: Contributor
timestamp: December 28, 2010, 03:09:42 am
content: Hi, I have a few simple newbie questions about square waves so I ask here in the newbie forum.Watching Ep 70 about the Rigol scope hack, I notice the display of a bad looking square wave, at least the sq wave looks kinda bad to me. I am guessing that was from a cheap/average function generator, or am I wrong?My questions are general in nature, for example, how 'square' should you expect a typical average-quality FG to generate at the frequency involved? I have seen old tube type FG's that are far from square above 20KHz. I assume modern FG's are a lot better, but what are reasonable expectations here? At what frequency should the FG still look nicely square, assuming the scope has the bandwidth to accurately show it?Also, using Dave's 100Mhz scope as an example, what is the maximum frequency square wave that could be shown on that 100Mhz scope that would look nice and square, assuming the generator was putting out a nice square wave? I have read different figures from 10X to 20X, so I am guessing that a 5Mhz to 10Mhz square wave would be the max that scope could show accurately, is that correct?Along those lines, I was wondering why Dave did not show a square wave that the 50Mhz scope could not accurately show, then show how that same sq wave would look nice and square wave after the 100Mhz hack. Is that because it is hard to find a generator that would generate a nice square wave at the frequencies involved? (I understand that he showed the 100Mhz scope showing the wave more accurately, but the wave was ugly to begin with. I thought it would have been cool to show the 100Mhz scope showing a nice high frequency square wave after the upgrade.)Thank you.

author: Mechatrommer
author_rank: Super Contributor
timestamp: December 28, 2010, 03:41:16 am
content: from what i understand, whats important is not the "square'ness" fo the signal, its just ViL and ViH, thats to determine logic 0 or 1. well just a thought, got nothing todo with OP question. for the OP question i think its regarding rise/down time of a particular signal or dso capability.

author: Zyvek
author_rank: Regular Contributor
timestamp: December 28, 2010, 03:43:12 am
content: High frequency function generators are pretty expensive, I thought Dave's only did like 20Mhz (from his lab tour video)

author: Simon
author_rank: Unknown
timestamp: December 28, 2010, 08:28:47 am
content: anything dealing in square waves needs to be capable of 10X the desired frequency, so yes ideally you can only perfectly represent up to 10MHz on a 100MHz scope. For most purposes providing the square wave rise and fall times are within certain limits it will be fine for most uses, the thing to learn about real world electronics (and anything) versus the theory of it is COMPROMISE and how far do you really have to go to make it work.

author: jahonen
author_rank: Super Contributor
timestamp: December 28, 2010, 09:22:05 am
content: There is no such thing as "perfect squarewave". All real signals have finite rise/fall-times. It is just what timescale is used to look at it.Generally, it is better to think in terms of rise/fall-time since that is not coupled to the frequency in any way, and can be applied even in case of single pulse with no repetition frequency (where frequency thinking breaks up). Also, if the duty cycle is something else than 50%, where 1/n rule for each odd harmonic can be applied, then the harmonic content will be much different. With extremely small or extremely high duty cycles, harmonics go unattenuated for very high frequencies.This means that it is really the edge rate what matters. Take a memory bus for example. You might have some signals that toggle only in some kHz, but they still need to do the transition from one logic level to an another within a 100 ps or so. That means you can't use 20 MHz or so scope to look at those signals, even if the toggle rate is low.Regards,Janne

author: Zero999
author_rank: Super Contributor
timestamp: December 28, 2010, 11:23:57 am
content: Yes, there's no such thing as a perfect squarewave.I remember advising someone at work who was thinking about buying a cheap 3kHz USB 'scope for training GCSE students to buy a better 'scope, even though he only wanted it for low frequency 555 timer work. I told him that he needs time times the be bandwidth of the maximum squarewave he's interested in or 20 times the sample rate, so for his application he needed 30kHz although I advised 1MHz. I'm not sure if he listened to me but 3kHz USB 'scopes are cheap so he wouldn't have wasted much money.Another interesting thing is for digital 'scopes the sample rate needs to be much higher than double the frequency, if you're looking at the phase shift between two signals. For example, if two 10MHz sinewaves are 45oout of phase but are sampled at 20MHz they will appear in phase.

author: festus
author_rank: Contributor
timestamp: December 28, 2010, 07:34:39 pm
content: Great replies, thanks, I learned something new today.