10bit PWM vs 16bit PWM

Hi,

Basic Question: What's the difference between having a 10 bit pulse width modulated signal vs. a 16 bit pulse width modulated signal?

--------------------------------------- Posted through

formatting link

Reply to
embcontrol
Loading thread data ...

I would assume that 10-bit allows you 1024 distinct widths, 16-bit allows

2**6 times that number.

Mel.

Reply to
Mel

Generally, a pulse width that can be modulated in 64 times finer increments or not.

This _can't_ be the whole story -- tell us what you're working on, and we'll tell you things like whether we think it matters or not.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

width

I see...so for the 10-bit PWM signal, I can have 1024 distinct widths. However, what determines the limit of how small the width can be? or how big the width can be?

Thanks for your comment! :)

--------------------------------------- Posted through

formatting link

Reply to
embcontrol

s

CASH (for the programmer to set frequency and duty cycle).

Reply to
linnix

Presumably your PWM generator is clocked. The resulting PWM cycle time is usually equal to the clock frequency, or some divided-down version of it, times the number of distinct widths.

So if you had a 10.24MHz clock and a 1024 step PWM counter, you'd have a

10kHz cycle.
--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

If you have to ask this question, you won't be able to comprehend the answer.

VLV

Reply to
Vladimir Vassilevsky

6 bits

More seriously what's the purpose of the question?

Are you trying to figure out how it works? What its effect on a circuit is? What resources a PWM needs?

I've never had an application where a 16bit (or higher) PWM was useful but I have had an application where the machinery that could produce a such a high resolution PWM could produce a useful result.

For what I do the limitations are usually no longer in the PWM but in what the PWM is interfaced to.

Robert

Reply to
Robert Adsett

Well, there are applications where 10bit PWM can be at the lower end of the acceptable range.

Indicator LED dimming in cars, e.g., where you want to match the dynamic range of ambient light outside (brutally bright sunlight to pitch dark night), while still having to control relative brightness of the LED to a certain precision.

Reply to
Hans-Bernhard Bröker

I've got an application where I'd like to play to the logarithmic (decibel- oriented) response of the human eye. Even at 16-bit I run out of large numbers way too fast.

Mel.

Reply to
Mel

If efficiency is not an issue, some 16-24 bit delta/sigma audio DAC followed by a LPF driving the constant current generator set point adjustment should do the job :-).

A more realistic approach would be to let the PWM handle the most significant bits and when the shortest pulse width has been reached, start to control the constant current generator with a few bits (other PWM+LPF).

However controlling the current will alter the efficiency (usually highest efficiency at mid currents) as well as colour temperature of LEDs.

If multiple LEDs are used anyway, control 4 LEDs with one switch, two with an other and only one with a third switch (with possible constant current adjustment). This will enlarge the basic PWM dynamic range at both ends.

For logarithmic light output from a string of 16 series connected LEDs driven by a constant current generator use high voltage open collector drivers to short out none (16 active LEDS) the lowest 8 (8 active), the lowest 12 (4 active), the lowest 14 (2 active), the lowest 15 (one active) and all LEDs ( no LEDs on). The switches could be driven with

3 bits by a 3/8 decoder. Of course, losses in the constant current generator will dominate at low lighting levels.
Reply to
Paul Keinanen

Here's where I usually run into a problem. Either I end up with a duty cycle that's too long leading to pulsing or the minimum pulse width required is too short for the power electronics.

I usually end up switching to some form of PFM for lower end.

Robert

Reply to
Robert Adsett

Robert Adsett skrev:

Some of the AT90PWMxxx parts supports PWM + additional modulation which increase the resolution without increasing the PWM frequency.

A normal PWM will allow a PWM frequency of

fout = fin/n.

And a duty cycle of

duty = (fin * m) / n

--
The AT90PWMxx parts will allow duty cycle of

     duty = (16*fin * m) / n
 Click to see the full signature
Reply to
Ulf Samuelsson

You can do that in software, too.

For that matter, the latest TI "DSC" (28xxx) parts run their PWM through a tapped delay line, giving you an extra four bits of precision beyond what you can get from the maximum clock rate of the device.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

ful

of

rk

to

There is a typical problem when operating PWM at the duty cycle=20 comparable with the turn-on time of the electronics. The behavior gets=20 very nonlinear and dependent on everything. Higher resolution PWM helps=20 to some extent. PFM and/or noise shaping could be the option, too.

This is a kind of noise shaping.

Noise shaping with PWM is a complicated matter, as the PWM is inherently =

nonlinear process. The shaped noise gets smeared everywhere.

h=20

It requires careful approach also as their jitter is comparable with the =

tap resolution of the delay line.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky
[...]

The resolution is 150ps IIRC, so this shouldn't result in any limitation. But resolution is not the only limit, it's also precision IOW analog delay matching the CPU clock.

Oliver

--
Oliver Betz, Munich
despammed.com is broken, use Reply-To:
Reply to
Oliver Betz

l
f

ic

o

Well two things, first is that's of course no longer PWM, but rather a different modulation method that makes use of the machinery that generates the PWM.

Just as, and probably more, important that still leaves you with the low frequency pulsing. I have done similar dithering myself on occasion.

Unfortunately the low frequency nature of this approach is most apparent near zero. Which is often where the extra resolution would be most useful. And also where the minimum pulse width comes into play making the approach even more constrained.

Robert

Reply to
Robert Adsett

It can be very non-linear. Sometimes the drive electronics simply ignores pulse widths below a certain value.

You don't get much more non-linear than a step function :)

Robert

Reply to
Robert Adsett

Sure you can :)

Before the pulse width gets so narrow so it is completely ignored, there is the area of operation where the drive electronics does not have enough of time to get turned on fully. So it operates in the quasi linear rather then in the switched mode. This can result in the nastiness like oscillations, etc.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

I think it would be a little harder to generate in a microcontroller, however...

Reply to
David Brown

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.