Author Topic: Function Gen Pulse vs pwm  (Read 4755 times)

0 Members and 2 Guests are viewing this topic.

Offline nowlanTopic starter

  • Frequent Contributor
  • **
  • Posts: 649
  • Country: au
Function Gen Pulse vs pwm
« on: December 30, 2014, 04:15:01 am »
Hello I am a little confused by pulse / pwm.

I noticed  a lot of new function generators are arb gens these days.
They have a pulse button, which I understand is a short blip.

I believe these are used in RF to test harmonics or something. Not quite sure.

I suspect pwm would be more useful to me. eg, sensor inputs. / uC input.

The old school FG do sine/tri/square.
Not sure if square will do pwm.
Is it fixed 50/50 duty?

Finally, my understanding is the cheap dds ones on ebay, need to be paused to change parameters, eg no easy sweeps.
 

Offline oldway

  • Super Contributor
  • ***
  • !
  • Posts: 2172
Re: Function Gen Pulse vs pwm
« Reply #1 on: December 30, 2014, 11:51:41 am »
PWM is obtained by comparating a triangle wave with a DC or a low frequency AC voltage.
You can always produce such a PWM from the triangle wave of your old school function generator and an external circuit with a voltage comparator as LM311.
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3442
  • Country: us
Re: Function Gen Pulse vs pwm
« Reply #2 on: December 31, 2014, 03:37:51 am »
Hello I am a little confused by pulse / pwm.

I noticed  a lot of new function generators are arb gens these days.
They have a pulse button, which I understand is a short blip.

I believe these are used in RF to test harmonics or something. Not quite sure.

I suspect pwm would be more useful to me. eg, sensor inputs. / uC input.

The old school FG do sine/tri/square.
Not sure if square will do pwm.
Is it fixed 50/50 duty?

Finally, my understanding is the cheap dds ones on ebay, need to be paused to change parameters, eg no easy sweeps.

A pulse is just a one-time event, a sudden rise in voltage (or drop if a negative pulse) and it resumes back to "normal".

PWM (Pulse Width Modulation) on the other hand describes a characteristic of the wave.  Say you have a 1KHz square wave.  Each cycle of a 1KHz wave is (and by arithmetic must be) 1ms.  If this square wave is 50% duty cycle, each cycle of the wave would be 0.5ms at HI and 0.5ms at LOW.  Now if you change that to 60% duty cycle, each cycle you have 0.6ms at HI and 0.4ms at LOW.  In other words, you modulated each cycle of the wave at 60% HIGH for each wave-cycle-width.  PWM describes the modulation - how much of the cycle is HI and how much LOW.  You can look at the example I just described as a chain of repeating pulses each 60% of the cycle-time.  You should look at duty cycle as another characteristic of a continuous wave like Amplitude or Frequencies each being a characteristic of the wave.

You can also have a 100ms pulse of this 1KHz square wave modulated at 60% in which case you have 100 cycles, each cycle has a short pulse of 0.6ms HI and 0.4ms LOW before the next 0.6ms pluse.

A function generator generates waves with different characteristics that you can adjust.  It can generate the wave continuously, or (if pulse is available) a mere short pulse like the 100 ms pulse I described earlier.

I have a cheap Chinese DDS.  It doesn't do pulse but can generate continuous Triangle, Sine, or Square saves.  PWM is adjustable for Triangle and Square.  Sine is by definition 50% duty or it is NOT a Sine wave.

(If I can read your mind successfully, I think you are trying to use it for power control - I know you said sensor input/uC input, but that doesn't seem right as inputs are as the source of the input described and you don't modulate it.  So perhaps you are thinking uC/sensor input to control power output.)

A function generator is not an appropriate tool to drive anything directly.  It doesn't supply enough power to drive anything.  However, while inappropriate, you can use it to modulate another real power source.  Any square/triangle wave can be modulated.  Square is probably better since it is either full-ON or OFF.  60% duty wave "turn on" 60% of the time delivering more power than a 50% "turn on".  A simple square wave with adequate power and PWM will do nicely for this kind of application.

Hope this helps.

Rick
« Last Edit: December 31, 2014, 03:58:06 am by Rick Law »
 

Offline nowlanTopic starter

  • Frequent Contributor
  • **
  • Posts: 649
  • Country: au
Re: Function Gen Pulse vs pwm
« Reply #3 on: December 31, 2014, 03:53:57 am »
Thanks for taking the time to write that up.
I understand pwm etc.

I was just confused about the pulse button on modern arbs etc.
I have only ever used the old analog FG with sin/tri/squ.

I asked a friend who said that I can attempt pwm using square, and adjusting symmetry knob.
Although I dont think they have full range, or come with all FG.



 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3442
  • Country: us
Re: Function Gen Pulse vs pwm
« Reply #4 on: December 31, 2014, 04:16:06 am »
Thanks for taking the time to write that up.
I understand pwm etc.

I was just confused about the pulse button on modern arbs etc.
I have only ever used the old analog FG with sin/tri/squ.

I asked a friend who said that I can attempt pwm using square, and adjusting symmetry knob.
Although I dont think they have full range, or come with all FG.
I just made a wording change and saw your reply.  You are welcome.  Always pleased to share knowledge as others have been generous with me with sharing their experience.

PWM applies only to square and triangle.  PWM on a triangle would affect the rise vs fall - where the apex of the triangle is.    PWM of a square wave affects what percent is HI and the rest is LOW.  For 50%, you have 50% HI and 50% LOW for each cycle, now the wave is symmetric.  You can visualize a wave that is a quarter-HI and three-quarter-LOW in which case it is no longer symmetric.   Pure Sine is mathematically always 50% HI and 50% Low so no PWM there.  Any PWM adjustment is ineffective.

A cheap DDS would generate those nicely allowing you to experiment.  The cheap ones is not very accurate, and is not very stable, and is very noisy.  Mine is a dual channel and I can see the A channel "zero" is modulated by the B channel however minimally (outputA=inputA+f(outputB)).  The frequency is very stable, but the amplitude is not as stable. The peak peaks at 1-2% different max.  (Yeah, it could be my scope...)  All things considered, I got a good deal because it has what I needed and is good enough for me at least for now.
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: Function Gen Pulse vs pwm
« Reply #5 on: December 31, 2014, 04:33:48 am »

Thanks for taking the time to write that up.
I understand pwm etc.

I was just confused about the pulse button on modern arbs etc.
I have only ever used the old analog FG with sin/tri/squ.

I asked a friend who said that I can attempt pwm using square, and adjusting symmetry knob.
Although I dont think they have full range, or come with all FG.

Hey man, I saw your PM last night and made a short video for you illustrating the differences. I fell asleep while it was uploading. Gimme a bit and I'll pm you the link!


Sent from my Tablet
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28377
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Function Gen Pulse vs pwm
« Reply #6 on: December 31, 2014, 04:41:31 am »
Thanks for taking the time to write that up.
I understand pwm etc.

I was just confused about the pulse button on modern arbs etc.
I have only ever used the old analog FG with sin/tri/squ.

I asked a friend who said that I can attempt pwm using square, and adjusting symmetry knob.
Although I dont think they have full range, or come with all FG.
Pulse mode in a modern AWG is simply a square wave with adjustable "on" (high) time.
Eg. The Siglent SDG1000 series has an adjustable duty cycle from 10-90% with a resolution of 0.1% and rated risetime of 7ns @ 1V p-p.

Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7588
  • Country: au
Re: Function Gen Pulse vs pwm
« Reply #7 on: December 31, 2014, 11:39:39 am »
Actually,square waves have equal on & off times.
Change it to different on & off times,& you have a rectangular wave.
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 4105
  • Country: fi
  • Born in Finland with DLL21 in hand
Re: Function Gen Pulse vs pwm
« Reply #8 on: December 31, 2014, 01:54:45 pm »
Thanks for taking the time to write that up.
I understand pwm etc.

I was just confused about the pulse button on modern arbs etc.
I have only ever used the old analog FG with sin/tri/squ.

I asked a friend who said that I can attempt pwm using square, and adjusting symmetry knob.
Although I dont think they have full range, or come with all FG.
Pulse mode in a modern AWG is simply a square wave with adjustable "on" (high) time.
Eg. The Siglent SDG1000 series has an adjustable duty cycle from 10-90% with a resolution of 0.1% and rated risetime of 7ns @ 1V p-p.

In Square mode default is 50% duty (it is square wave).  Duty % can (in SDG1000) adjust 20%-80% up to 10MHz and 40-60% up to 20MHz and not adjustable over 20MHz (just 50%)

In Pulse mode it can also of course run with 50% duty as Square wave. (but pulse mode is limited to max 10MHz or 5MHz depending model.  Pulse mode accept 0.1 - 99.9% duty. (min pulse width 16ns and max 1998s)

Pulse mode signal is made as pulse directly using DAC.  This give some advantage but also disadvantage.
Square mode signal is produced by DAC as sinewave. Square (or rectangular) is produced from this internal siwave using fast PECL comparator with settable treshold (Duty adjustement).   This have also advantages and disadvantages but different as Pulse mode. (mostly differencies can see as different cycle to cycle and inside cycle jitter situation.)

Square mode can not use Pulse Width Modualtion (PWM)  function (if not count "DC modulation(duty)" and if not made special (diy) modification for some special purposes)

Pulse mode can use PWM from internal modulation generator (2mHz - 20kHz modulation signal). Or it can use External modulation signal so it can even do Arb waveform PWM modulation if use example  other Channel as external modualtion signal source.
« Last Edit: December 31, 2014, 02:07:37 pm by rf-loop »
I drive a LEC (low el. consumption) BEV car. Smoke exhaust pipes - go to museum. In Finland quite all electric power is made using nuclear, wind, solar and water.

Wises must compel the mad barbarians to stop their crimes against humanity. Where have the wises gone?
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Function Gen Pulse vs pwm
« Reply #9 on: December 31, 2014, 04:08:11 pm »
You can also have a 100ms pulse of this 1KHz square wave modulated at 60% in which case you have 100 cycles, each cycle has a short pulse of 0.6ms HI and 0.4ms LOW before the next 0.6ms pluse.

Good description, Rick.  I'll just add that the 100ms of this 0.6ms on and 0.4ms off pwm signal that you described is traditionally called a burst, not a pulse.  Some call it a counted burst.

Modern FGs or AWGs can set the number of cycles in a burst, whether you trigger the burst manually via the front panel, via an internal trigger generator, via an external trigger, or remotely via the control interface.

You can also gate the burst via an external gating signal.  The output will be continuously on while the gate is true and will end (synchronous with the end of a single cycle) when the gate is false.

 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3442
  • Country: us
Re: Function Gen Pulse vs pwm
« Reply #10 on: December 31, 2014, 11:07:30 pm »
You can also have a 100ms pulse of this 1KHz square wave modulated at 60% in which case you have 100 cycles, each cycle has a short pulse of 0.6ms HI and 0.4ms LOW before the next 0.6ms pluse.

Good description, Rick.  I'll just add that the 100ms of this 0.6ms on and 0.4ms off pwm signal that you described is traditionally called a burst, not a pulse.  Some call it a counted burst.

Modern FGs or AWGs can set the number of cycles in a burst, whether you trigger the burst manually via the front panel, via an internal trigger generator, via an external trigger, or remotely via the control interface.

You can also gate the burst via an external gating signal.  The output will be continuously on while the gate is true and will end (synchronous with the end of a single cycle) when the gate is false.

Good point!   Burst makes more sense too.  Thanks.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf