PWM question
roverfixer
Posts: 3
I'm using the old Parallax USB Oscilliscope (Item code 28014) and I'm trying to measure a 5V PWM Analog signal (alleged by manufacturer). This signal carries the RPM signal from an engine management control unit to the car's tachometer in the instrument cluster as well as several other control units.
I understand the concept of PWM well enough I thought but when I use the scope, the signal isn't at all what I expect to see. I assumed the duty cycle would be proportional to engine speed but according to the scope, the duty cycle remains constant at 50% regardless of RPM. What happens is that when I rev the engine, the square waves tighten up and squish together. Is this right? Is the system really using the frequency rather than the duty cycle to control RPM?
I've experimented with the rising, falling edge; the 10-50-90% to no avail.
I don't have any data as to what the frequency of the output is.
sorry if I post this to the wrong area and sorry if I'm not asking a very well defined question...
TIA
I understand the concept of PWM well enough I thought but when I use the scope, the signal isn't at all what I expect to see. I assumed the duty cycle would be proportional to engine speed but according to the scope, the duty cycle remains constant at 50% regardless of RPM. What happens is that when I rev the engine, the square waves tighten up and squish together. Is this right? Is the system really using the frequency rather than the duty cycle to control RPM?
I've experimented with the rising, falling edge; the 10-50-90% to no avail.
I don't have any data as to what the frequency of the output is.
sorry if I post this to the wrong area and sorry if I'm not asking a very well defined question...
TIA
Comments
http://en.wikipedia.org/wiki/Pulse-width_modulation
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
When all else fails.....procrastinate!
TIA
It sounds to me like what you're seeing is a change in frequency of the waveform, not a change in the duty cycle (like you've already pointed out).
The reason you see the signal squishing together on the 'scope display is because the horizontal timebase is fixed and when the frequency of the incoming square wave increases, you end up getting more full periods over the given time range. Similarly, if your time base is much shorter than the incoming period of the input, it will appear to be stretched out because you will get fewer and fewer complete periods for the given time range.
With PWM, you should be able to set the horizontal time range to a value that would allow you to see the complete period of the PWM signal (i.e., you should be able to see the initial L-H, then the H-L of the high period, followed by the low period, then see the start of the next cycle--the L-H transition). Assuming positive PWM (high duty cycle/total period, positive), one would see the "high" time proportionally fill the total "frame" that makes the PWM period. At 0% PWM, you would see 0V continuously, and 100% you would see +5V continuously (or whatever the signal level was).
It sounds like you've answered your own question re: PWM, but I wanted to help you understand why the signal would seem squished when the frequency increased.
If you want to measure the frequency, you can either use the cursors or try to have a few periods of the waveform on the 'scope and there is a data field that looks like a square wave with an arrow on the first L-H transition and on the 2nd L-H transition--this contains the frequency of the incoming waveform.
BTW, are you using the 'scope or the digital inputs? My reference above assumes the 'scope inputs (haven't played with the digital inputs so I don't know what the screens have as measurements).
Good luck,
--Scott
It is looking for the frequency. Knucklehead-me, I was assuming because it was PWM it was going to be looking for the duty cycle info.
Thanks for your input.