Author Topic: Oscilloscope: Square wave view while in FFT mode?  (Read 2022 times)

0 Members and 1 Guest are viewing this topic.

Offline tinkerbotstlTopic starter

  • Newbie
  • Posts: 6
  • Country: us
Oscilloscope: Square wave view while in FFT mode?
« on: January 28, 2020, 11:07:35 pm »
Howdy,

I have searched the Hantek 5072P scopes menu's and settings, the manual with search tools, google, youtube - asking the same question, and asked the same question on hantek forum, all with zero results. 

Full question:

How do you switch to a square wave view while looking at a sine wave with FFT?


Please see the following pic for exactly the display view I am looking for:




You can even see a guy on youtube do it with the same scope at 0:44 seconds into the video:





Thank you ahead of time :)
« Last Edit: January 29, 2020, 01:14:27 am by tinkerbotstl »
 
The following users thanked this post: Range

Offline Range

  • Newbie
  • Posts: 1
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #1 on: January 29, 2020, 01:20:12 pm »
Great question, I do not know how to do that either, so I'll be watching this post.
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5259
  • Country: nl
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #2 on: January 29, 2020, 01:30:21 pm »
If you want to look at the FFT of a square wave you obviously have to feed a square wave into the scope.
Keyboard error: Press F1 to continue.
 
The following users thanked this post: tooki

Offline tinkerbotstlTopic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #3 on: January 29, 2020, 05:30:57 pm »
But if that is the case, can you please explain to me what's happening in the video I posted, he's looking at a sine wave in fft mode, then he switches the view of the same wave? It's the same wave he's looking at, I think?  The click you hear in the video is the oscilloscope switching functions but the shape of the wave is the same only after he switches functions you can then see the harmonics and he States something to the effect of here's the square wave view.
« Last Edit: January 29, 2020, 05:40:57 pm by tinkerbotstl »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #4 on: January 29, 2020, 05:39:03 pm »
The guy in the video is (most likely) driving the scope with a signal generator that outputs a sine or square determined by a switch on the SIGNAL GENERATOR.  He simply turns a knob or flips a switch, or punches a button on the signal generator to change from sine to square.  Nothing changes on the scope
 
The following users thanked this post: tooki, tinkerbotstl

Offline tinkerbotstlTopic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #5 on: January 29, 2020, 05:44:24 pm »
FYI, I do not want to get into the issues with using an oscilloscope on AC mains.

I have seen examples of AC sine waves that show the exact same view on an oscilloscope, and the AC waveform is not a square wave. So how do they get similar views on an oscilloscope of the harmonics on an AC line, on a sine wave?
« Last Edit: February 18, 2020, 01:01:50 pm by tinkerbotstl »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #6 on: January 29, 2020, 05:44:58 pm »
He says, and he did, change the input waveform from a simple sine wave to a square wave at 0:46.  The signal generator is not shown.

http://www.slack.net/~ant/bl-synth/4.harmonics.html
 
The following users thanked this post: tinkerbotstl

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #7 on: January 29, 2020, 05:49:59 pm »
Not getting into the issues with using an oscilloscope on AC mains, I have seen examples of AC sine waves that show the exact same view on an oscilloscope, but the AC waveform is not a square wave. So how do they get this square wave view above with the fft mode, on a AC sine wave - which is what I'm really interested in?

If the FFT has more than the one spike at the fundamental frequency, that is, it shows harmonics above the fundamental frequency, it is NOT a pure sine wave.  This all goes to Fourier Transforms and Fourier Series.  I posted above a link to a page showing how the square wave is formed from harmonics of sine waves.  The more harmonics that are included, the more square the output becomes.

That's kind of the point of FFT, to show harmonic content.  There may be some reason to filter out high order harmonics.  In fact, there may be reasons to filter out all harmonics.  The FFT will display how effective the filtering actually is.

« Last Edit: January 29, 2020, 05:57:50 pm by rstofer »
 
The following users thanked this post: tinkerbotstl

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #8 on: January 29, 2020, 05:56:29 pm »
FWIW, in the video, the author's description of the harmonics is a little unconventional.  Delta freq is meaningless.

The fundamental (1 kHz) is first harmonic.  The next spike is the 3rd harmonic at 3 times the fundamental or 3 kHz.  The next spike is the 5th harmonic and it is 5 kHz.  That the 5th harmonic is 4 kHz away from the fundamental is useless information.  Delta freq doesn't matter!  What we want is the actual frequency and in the case of a square wave the spikes will all be odd harmonics (1st, 3rd, 5th, 7th etc).
« Last Edit: January 29, 2020, 05:59:03 pm by rstofer »
 
The following users thanked this post: tinkerbotstl

Offline tinkerbotstlTopic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #9 on: January 29, 2020, 05:59:53 pm »
Maybe my AC wave does not have the harmonics I thought.  I will have to look at one I know does.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #10 on: January 29, 2020, 06:03:19 pm »
Not getting into the issues with using an oscilloscope on AC mains, I have seen examples of AC sine waves that show the exact same view on an oscilloscope, but the AC waveform is not a square wave. So how do they get this square wave view above with the fft mode, on a AC sine wave - which is what I'm really interested in?
No, a sine wave (a pure one, or even mostly pure one) will not have the same FFT results as a square wave.  That is a fundamental fact.

What is the big picture of what you are trying to solve/understand.  We are here to help, but need more information.

 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #11 on: January 29, 2020, 06:05:26 pm »
Maybe my AC wave does not have the harmonics I thought.  I will have to look at one I know does.

Do not confuse the terms "AC" with "sine wave."  Do not use them synonymously.
 
The following users thanked this post: tooki

Offline tinkerbotstlTopic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #12 on: January 29, 2020, 06:11:52 pm »
Thanks, I am trying see the harmonics on an AC line. 
« Last Edit: February 18, 2020, 12:58:33 pm by tinkerbotstl »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #13 on: January 29, 2020, 06:28:08 pm »
Thanks, I'm primarly trying see the harmonics on a AC line.  Then I want to see if that passes on to a computer power supply, and ultimately to the USB ouput.

I don't probe mains...  Even if it is full of trash, there's probably nothing you can do about it. 

You can safely look at the power supply output if it is a normal PC because the low voltages are referenced to the chassis ground which is earth ground which matches the earth ground on the scope.  Same with the USB power, one side will be earth ground.  There is an exception if the PC only has a 2 conductor power cord or it uses a power brick with a 2 conductor plug. 

You need to think very carefully about how you probe stuff.  If is often better to check things with a DMM.  For example, check the voltage between what you think is ground on the PC and an actual earth ground like the BNC connector on your grounded scope.  It should be 0V or very very close.  If it isn't, you can't hook the probe ground lead to that point in the circuit.

Dave did a video on "How Not To Blow Up Your Oscilloscope".  Watch it a few times:
https://youtu.be/xaELqAo4kkQ

Before you start probing power systems, you need to ask yourself "why".  What do you hope to learn?  What can you do if the display has trash?  Is making this measurement worth a) my life (in the case of mains) b) my scope and c) my power source.  If you mess up on the USB connector, you can take out the entire motherboard (in the worst case).

Why do you think the USB power is noisy?  It probably isn't, you know.

I look at signals on PCBs and breadboards and they are usually powered by a wall wart or floating power supply.  The voltages are low and I like it that way.  My idea of high voltage these days is 12V.  No more of the high voltage, high current, industrial systems.  I'm retired!

« Last Edit: January 29, 2020, 06:29:44 pm by rstofer »
 
The following users thanked this post: tooki

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #14 on: January 29, 2020, 06:31:53 pm »

I look at signals on PCBs and breadboards and they are usually powered by a wall wart or floating power supply.  The voltages are low and I like it that way.  My idea of high voltage these days is 12V.  No more of the high voltage, high current, industrial systems.  I'm retired!

AMEN and ditto (but I splurge from time to time and go to 24 volts--automatic gates are sometimes 24 volt systems).
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #15 on: January 29, 2020, 06:35:54 pm »
I would expect the mains to have both odd and even harmonics.  I would expect spikes all over the place.

If I absolutely HAD to measure the mains, I would probably use a step-down transformer to reduce the voltage and remove the earth ground reference.  A little 120-6.3V filament transformer would be ideal.  There would be no ground reference in the output so I could connect my scope without worry.

The transformer itself will introduce and eliminate harmonics.  Anything that distorts a pure sine wave will do something to the harmonics.  But it might not be significant and certainly there is value in the added safety.

Did I mention that I don't probe mains?  Of course I did!  There's a reason I don't like jamming my scope probe in wall outlets.
 
The following users thanked this post: SilverSolder, tooki

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #16 on: January 29, 2020, 06:44:29 pm »

I look at signals on PCBs and breadboards and they are usually powered by a wall wart or floating power supply.  The voltages are low and I like it that way.  My idea of high voltage these days is 12V.  No more of the high voltage, high current, industrial systems.  I'm retired!

AMEN and ditto (but I splurge from time to time and go to 24 volts--automatic gates are sometimes 24 volt systems).

OK, just this once! 

The problem with a forum reply is that it won't discuss ALL of the ways this kind of thing can go sideways.  I'm perfectly will to say "I don't probe mains" if it discourages the practice.  I can't be there to watch the process so I just try to discourage it.  Have I done it?  Sure!  But I'm not going to talk about it.

 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #17 on: January 29, 2020, 07:07:43 pm »
There's an easy and safe way to probe mains if you really want to do that, use a HV differential probe. I have a Tektronix P5205 that I use when I need to measure something like the primary side of a switchmode power supply. I've never bothered to look for harmonics on the AC line though, as others have said it doesn't really matter what's there because you can't do anything about it anyway. Just measure the output of the power supply, if you see noise you can work on figuring out the source but in most cases I would expect that it's internally generated by the power supply. It's pretty hard for noise on the line to get through a switchmode power supply, those tend to generate quite a lot of their own noise.
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5259
  • Country: nl
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #18 on: January 29, 2020, 07:08:12 pm »
Thanks, I'm primarly trying see the harmonics on a AC line.  Then I want to see if that passes on to a computer power supply, and ultimately to the USB ouput.

First thing a computer power supply does is rectifying (turning into DC) the incoming AC, then it gets smoothed by one or more capacitors, then it creates a new AC voltage of much higher frequency, this goes into a transformer which outputs different voltages, they get rectified again, smoothed and finally you have your output voltages of +12, -12, +5, -5 and 3.3V

Will you be able to see the incoming AC voltage harmonics on the 5V line? Nope!  :)
Keyboard error: Press F1 to continue.
 
The following users thanked this post: tooki

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #19 on: January 29, 2020, 07:22:07 pm »
These replies get back to my point:

1) Where do you expect to probe?
2) What do you expect to see?
3) What can you do about it if you do see it?
4) Is seeing something you can't change worth the risk of probing the circuit?
 
The following users thanked this post: tooki

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #20 on: January 29, 2020, 07:34:50 pm »
Thanks, I'm primarly trying see the harmonics on a AC line.  Then I want to see if that passes on to a computer power supply, and ultimately to the USB ouput.

Are you getting audio interference in a USB sound card or something like that?
 

Offline tinkerbotstlTopic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #21 on: January 29, 2020, 08:11:19 pm »
I was specifically hoping to avoid all of the comments about the dangers of probing mains.  Just need to see the harmonics on the AC line.
« Last Edit: February 18, 2020, 12:58:10 pm by tinkerbotstl »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Oscilloscope: Square wave view while in FFT mode?
« Reply #22 on: January 29, 2020, 10:26:18 pm »
Well your original question made no sense at all, because there's no such thing as a "square wave view", if you want to look at the frequency spectrum of a square wave, you feed a square wave to the scope, the FFT on the scope displays the spectra of whatever signal you put into it, nothing more.
 
The following users thanked this post: SilverSolder


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf