Function Gen Pulse vs pwm - Page 1
Forum section: electronics / beginners

author: nowlan
author_rank: Frequent Contributor
timestamp: December 30, 2014, 04:15:01 am
content: 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.

author: oldway
author_rank: Super Contributor
timestamp: December 30, 2014, 11:51:41 am
content: 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.

author: Rick Law
author_rank: Super Contributor
timestamp: December 31, 2014, 03:37:51 am
content: Quote from: nowlan on December 30, 2014, 04:15:01 amA 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 (PulseWidthModulation) on the other hand describes acharacteristicof 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 cycleof 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, youmodulatedeach cycleof the wave at 60% HIGH foreach 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 ofrepeating pulseseach 60% of the cycle-time. You should look at duty cycle as another characteristic of a continuous wave likeAmplitudeorFrequencieseach being acharacteristicof the wave.You can also have a 100mspulseof 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 differentcharacteristicsthat 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 adjustablefor 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

author: nowlan
author_rank: Frequent Contributor
timestamp: December 31, 2014, 03:53:57 am
content: 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.

author: Rick Law
author_rank: Super Contributor
timestamp: December 31, 2014, 04:16:06 am
content: Quote from: nowlan on December 31, 2014, 03:53:57 amI 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.

author: timb
author_rank: Super Contributor
timestamp: December 31, 2014, 04:33:48 am
content: Quote from: nowlan on December 31, 2014, 03:53:57 amHey 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

author: tautech
author_rank: Super Contributor
timestamp: December 31, 2014, 04:41:31 am
content: Quote from: nowlan on December 31, 2014, 03:53:57 amPulse 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.

author: vk6zgo
author_rank: Super Contributor
timestamp: December 31, 2014, 11:39:39 am
content: Actually,square waves have equal on & off times.Change it to different on & off times,& you have a rectangular wave.

author: rf-loop
author_rank: Super Contributor
timestamp: December 31, 2014, 01:54:45 pm
content: Quote from: tautech on December 31, 2014, 04:41:31 amIn 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.

author: codeboy2k
author_rank: Super Contributor
timestamp: December 31, 2014, 04:08:11 pm
content: Quote from: Rick Law on December 31, 2014, 03:37:51 amGood 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 aburst, not a pulse. Some call it acounted 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.

author: Rick Law
author_rank: Super Contributor
timestamp: December 31, 2014, 11:07:30 pm
content: Quote from: codeboy2k on December 31, 2014, 04:08:11 pmGood point! Burst makes more sense too. Thanks.