How to measure the duty cycle rise time with an oscilloscope?

Status
Not open for further replies.

Varughese

New Member
I have a pwm output whose duty cycle rises from 20% to 70% in 350ms in certain condition. How can I measure this using Oscilloscope? Is it possible? I need to measure the time taken for the pwm to rise from 20% duty cycle to 70%.

Any help would be greatly appreciated.
 
Do you have an understanding of time measurement using an oscilloscope? Yes, you can measure rise time of a pulse on an oscilloscope, however, you need an understanding of how to use and read the oscilloscope. You make no mention of what oscilloscope(s) are available to you or what the scope capabilities are.
 
I am using a Tektronix TDS 2002c oscilloscope. I have used Oscilloscope a bit. I do know how to use the measure function in the scope to measure rise time of pulse.

But my problem is that I have to measure the time taken for a pwm output to reach from 20% duty cycle to 70% duty cycle. The riste time of a pulse is not going to help me there. Earlier we used to have pwm outputs which used to rise from 0% to 100% duty cycle. In that case measuring the time taken to reach 100% duty cycle was easy. But now the problem is that I have to measure between 20% to 70%.

Is there any way we could achieve this?
 
OK. You know how to set the scope up for a stable display of rise time. So how about we try this, let's use the variable vertical gain. Your scope should have 8 vertical divisions and 10 horizontal divisions. Let's use the 8 vertical divisions to our advantage. Run your signal into a vertical channel as usual. Each vertical division is a major division broken down into 5 minor divisions (the minor division tic marks on the center graticule line). Using the variable vertical gain adjust the display for a nice 6 divisions. So now 6 divisions equal 100% of your signal. 6 * .2 = 1.2 divisions and 6 * .7 = 4.7 divisions. Shifting the trace using the horizontal control measure the time between the 1.2 and 4.7 division points of your pulse leading transitional edge. That will give you the time between the 20% and 70% points of your pulse.

There are other ways to go about this using delaying time base functions of the scope but let's keep it simple. Again 20% of 6 is 1.2 and 70% of 6 is 4.7 so if 6 = 100% you know the 20% point is 1.2 divisions up from bottom and 70% is up 4.7 divisions from bottom of trace.

Ron
 
I think there's some confusion over the term 'rise time'. If I understand correctly the OP is not interested in the shape of the PWM pulse itself (i.e the rise time of the pulse edge) but is trying to determine how long it takes for the PWM duty cycle to increase from 20% (i.e. 1:4 mark/space ratio) to 70%?

Edit:
What is the PWM frequency?
An RC filter to smooth the PWM could be used to give a voltage representing the duty cycle, then that voltage could be measured on the scope.
 
Last edited:

You are correct. I think I confused some by mentioning the time rise time. I shouldn't have used that. As you mentioned I am only interested in the time taken for PWM duty cycle to increase from 20 to 70%.

The PWM frequency is 100Hz.
 
OK, my bad as I interpreted it as rise time of a single PWM pulse. In that case as Alec suggest:

An RC filter to smooth the PWM could be used to give a voltage representing the duty cycle, then that voltage could be measured on the scope.

Ron
 
I don't know what PWM you are using. That term covers many things.

In a switching power supply (PWM) there of the output of the error amplifier. (usually a place to hang a scope probe) In most supplies the duty cycle is related the voltage on the output of the error amp.
 
OK, there are a lot of ifs and buts here, and I am not familiar with the capabilities of your oscilloscope and if it is capable of doing this, but this is the approach which I would take:

Set the scope to capture and record the PWM signal as it sweeps from 20 to 70% duty cycle.
Save the trace in permanent memory if possible, then you can recall it if you mess up the original you are working on.

Scroll through the trace using a magnified timebase and find where the duty cycle is 20% and mark that position by whatever means is available.
Then scroll along until the duty cycle is 70% and mark that position.

Measure the time between the two markers and you have your inappropriately described "rise time", I guess that a better description would be sweep time, I dont know.

JimB
 
I think something is missing! What changes the duty cycle? For example say you adjust the duty cycle by turning a POT, then the time could be seconds/minuets/hours depending on how fast you turn it. Is it adjusted by some kind of interrupt? What I am trying to say is we need to know what controls the duty cycle so we know the time frame. Personally unless this was a quick 20%-70% I would be using a deep memory Logic analyzer. That way you just run it and then scroll back to 20% place a cursor there, then scroll forward and place other cursor at 70%.
Can you give details of the system? Otherwise say for example you have a interrupt that makes the duty cycle increase every 10 seconds by 5%, your never going to capture that on a scope.
Does your scope have a post trigger setting? and a delay setting? Do you have access to a Logic analyzer? do you have say a PK2 or PK3?
 
You are correct. I think I confused some by mentioning the time rise time. I shouldn't have used that. As you mentioned I am only interested in the time taken for PWM duty cycle to increase from 20 to 70%.

The PWM frequency is 100Hz.
OK....this is confusing. Please draw a schematic or something. schematic=1000 words.
 
Actually I am trying to validate something. I am not sure how the development team have implemented this. The requirement we had requires the "PWM output to increase from 20% duty cycle to 70% duty cycle at the press of a particular switch in 350 ms". My understanding is that the development guys increases the pwm duty cycle in a cyclic task. And to make matters worse this more or less Black Box testing. We have not much idea of how the implementation is done in the box(system).
 
You may not have enough scope to do what you want. It sounds like you don't have any signal to indicate the beginning of the sweep so that means if you want to see it you need to capture the entire 350 ms. If your scope has a delay time base you can just scroll thru the trace to see the duty cycle. If it doesn't have delay you could try the X10 magnifier.... It may be enough. If not go back to Alec's idea.
 
The Oscilloscope does not have magnified time base option.
I will try Alec's idea. Only issue is that I only have access to system next week.
 
Using an RC filter should give me a saw tooth wave? Am I correct?
How will that help me in measuring the time taken for Duty cyle increase from 20% to 70%.
 
Why not use a logic analyzer? it will capture that no problem. I would set it to 1 second capture.
 
I was wrong! Look at page 99 of your manual, and then page 20. Apparently you can trigger on pulse width (page 90) and it will record data while waiting for a trigger (page 20), so I am guessing it will do what you want
 
The requirement we had requires the "PWM output to increase from 20% duty cycle to 70% duty cycle at the press of a particular switch in 350 ms".
1) Is the duty cycle intended to be a constant 20% before you press the switch?
2) Can you monitor duty cycle on the scope before you press the switch?
3) Can you capture the scope waveform exactly 350ms after pressing the switch?
4) With a 100Hz PWM frequency there will be only 35 pulses in that 350ms period, so the RC filter method probably won't work ;(
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…