Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

32 bit resolution PWM

Status
Not open for further replies.

xmen_xwk

Full Member level 3
Full Member level 3
Joined
Sep 12, 2014
Messages
172
Helped
2
Reputation
4
Reaction score
2
Trophy points
18
Activity points
1,373
Is there any board like arduino which can generate 32bit resolution PWM ?
My range is following

4Hz-1000Hz frequency
200us-10000us period

Usually all arduinos has max 16 bit resolution. I need to specify frequency and period by code.
 

Is there any board like arduino which can generate 32bit resolution PWM ?
My range is following

4Hz-1000Hz frequency
200us-10000us period

Usually all arduinos has max 16 bit resolution. I need to specify frequency and period by code.
I find it difficult to believe that you really need 32 bit resolution.
You will never be able to resolve such a small increment in the PWM output signal.
 

I already did, but I'm looking for similar operation in arduino or any other low cost board.
 

Is there any board like arduino which can generate 32bit resolution PWM ?
... ...
Usually all arduinos has max 16 bit resolution. I need to specify frequency and period by code.

16 bit precision means 1 part in 64K
32 bit precision means 1 part 4G

I would suggest that even 10 bit precision would be good enough (1 in 1000).

None of the components in the PWM circuits will be able to preserve even 16 bit accuracy.
(can you measure/ estimate from the oscilloscope trace the original pwm values used?)
 

Hi,

I already did, but I'm looking for similar operation in arduino or any other low cost board.
I can't believe this..

With a 400MHz counter clock this means you have a 10s cycle time. PWM frequency is 0.1Hz.

For 1000Hz with 32bits resolution you need a 400GHz clock. The resolution is 2.5ps.

I wonder how you did this...

Klaus
 

Not necessarily 32 bit, but higher resolution PWM is required for some applications. The usual way is referring to fractional or sigma delta modulator techniques. If I remember right, some newer ARM processors have PWM units with high resolution features.
 

I only need 32 bit resolution to have PWM duration in micro seconds(200us) if frequency is low, like 4Hz. I do not understand why would that be impossible ? I tried and it worked on a microcontroller which has 32bit resolution for single pin, it didn't worked on any other PWM pins, turned out only one pin had 32 bit resolution support. I dont know too much about microcontrollers. I just need simple board, where I can feed the values(frequency and duration and pin) and get the output PWM.

- - - Updated - - -

I'm very sorry for the confusion, when I said PWM period, I meant PWM duration. Its been long time I did some electronics stuff, forgot the words.
 

If we read "32 bit" as pwm using 32-bit timer opposed to 16-bit timer, the question makes sense. The actual resolution with 4 Hz pwm frequency won't be 32 bit, rather 20 to 24 bit.
 

Hi,

I do not understand why would that be impossible ?
It is mathematics.

I still don´t understand.

A 200us pulse width with 4Hz is just: 200us/250ms = 1/1250. Means a 11 bit PWM should be enough. It generates pulse width with a resolution of 122us.

***
PWM resolution in bits also defines the PWM resolution in time.
200us sounds like an absolute value.
I wonder if you meant to generate a 200.000 us pulse with very exact pulse width?
Or do you need a reoslution of 200us?

***
Mathematics:
* the PWM resolution in time is 1/counter_clock_frequency.
* the PWM frequency is counter_clock_frequency / (2^n). Where n is the resolution in bits.

In other words: if you need a pulse_width of 200us you just need a counter_clock_frequency of 1/200us = 5000Hz.
ANY resolution in bits will do.
If you now additionally need a PWM (period) frequency of 4Hz, then the counter_top_value should be 250ms/200us = 1250. (count from 0 to 1249).
So you need a 11 bit counter, with a 11 bit compare.

****
The other way round, with your values:
4Hz PWM frequency and 32bits of resolution needs a counter_clock_frequency of 4Hz * 2^32 = 17.18GHz. (hard to achieve for a 32 bit counter with compare)
The PWM resolution in time is 1/counter_clock_frequency = 58.2ps.


Klaus
 

Agreed, you don't need 32 bit resolution to set 200 µs/250 ms pwm pulse width/period. Problem is that many µCs don't provide 250 ms period in lack of predividers.
 

yes I need absolute values, like if I need 4Hz and 200uS duration, like 5Hz, 1000uS duration. But how do I do that ? I have range from 4Hz to 1000Hz and while duration can be 200uS to 10000uS.

Isnt more resolution means more accuracy ? in lower bits, the value will be round off and will not be exact required PWM.

I dont seem to find any way to set exact frequency and then the duration of PWM.
 

I believe it's necessary to refer to specific processors and PWM timers. They are all different.
 

I believe it's necessary to refer to specific processors and PWM timers. They are all different.

But that's the question. Which board should I use?
 


It would be better if I can just buy a board like arduino?
 

yes I need absolute values, like if I need 4Hz and 200uS duration, like 5Hz, 1000uS duration. But how do I do that ? I have range from 4Hz to 1000Hz and while duration can be 200uS to 10000uS.

Still not clear enough. Let us assume that you need 200+/-1 uS. To get a resolution of 1uS you will need 1MHz clock. 200uS will then mean 200 clock cycles and 4Hz will mean 250000 clock cycles. The latter exceeds 16 bit clock resolution. Remember that clock cycle is related to the osc period used.

Assume you can do with 200 +/- 10 uS resolution. In that case 4Hz will mean 25000 clock cycles. But we do have microcontrollers that can easily do 200 +/- 1 uS easily. We only need a 32 bit timer so that we can do low frequencies accurately.

However, if you are doing 1000 uS duration, you can very easily using +/- 10 uS (i.e., 1% which is good for most purposes). 32 bit counters for timer is not uncommon. Please check- most have multiple timers and some of them may be 32 bit.
 

Although you can find SOC uC's with digital blocs with which you can make up to 32-bits PWM modules ( AN2246 ) - as said before - it doesn't mean that you can achieve such a resolution in the analog world; it´s due to the fact that perhaps these modules are built with 8-bits cells. Even a 16-bit PWM module, at D/A stage would require lot of cares when dealing with EMI and other stuffs.

If you are still not convinced about the feasibility of that resolution ( < 1/1,000,000,000 ), you can calculate the thermal noise for the PWM period that you intend to manage and the load resistence for the applied Vcc, and will realize that the generated white noise is muach larger than the smallest voltage obtained with a 32-bit resolution: Thermal Noise Calculator
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top