Continue to Site

Welcome to

Welcome to our site! 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.

DC level control from PWM signal

Not open for further replies.


Advanced Member level 5
Jan 9, 2012
Reaction score
Trophy points
Activity points

It is very basic to know that the DC voltage represent the average value of the PWM signal, hence it can be expressed in term of duty cycle as

Vdc=DutyCycle%*VDD, assuming that the PWM hgih voltage is equal to VDD.

However, we can generate the PWM with different frequencies, while in the formula is not showing any relationship to the frequency with the DC level of the signal,

Hence I would ask for the criteria of choosing the PWM

Thank you


for generating DC you need to use an analog LPF.
So you may want fast response (duty_cycle change to DC_value)... while you want low ripple and low hardware effort.

I miss clear specifications. There´s not a single value in your post.

My way:
* decide the resolution you need.
* this defines the duty cycle counter
* usually you have a maximum counter clock frequency.
* this with the duty cycle counter value defines the PWM frequency
* decide the reponse time (this defines the PLF cutoff frequency)
* decide the ripple (this defines the filter order)

Thank you Klaus,

That was very useful information to me,

I am using the Arduino DUE microcontroller to generate PWM,

and I use the PWM to control the speed of DC motor and also for light intensity control. In either cases I don't need a LPF. Also the Arduino is giving me much of freedom to generate the PWM with the frequency and resolution I need. Hence I need to have at least the practical contstraint of choosing the PWM frequency besides the points you already mentioned



why did you say "DC level from PWM signal" instead of "motor control with PWM".

It´s a different story.



why did you say "DC level from PWM signal" instead of "motor control with PWM".

It´s a different story.

Hello Klaus,

because I presumed that by controlling the duty cycle is it the same as you are controlling the DC level and hence it is how to control the speed the speed of the DC motors or the light intensity.

could you please me the difference in the two stories


the DC level is th average of a signal. And your given formula is true for a 0% / 100% VDD square wave signal.
You need an analog low pass filter to get the DC level.

But for motor control you don´t need the DC level. You run it directly with PWM, maybe you put some EMI filter between power switches and motor.
Now the given forumla uses "VDD" which usually is the logic supply voltage but not necessarily the motor supply voltage.
Also the formula is only true for half bride driving the motor. But often when one uses PWM motor control you just have a low side switch. Then the formula is not true anymore.


My recomendation: always tell us about your true goal.
In this case your goal is motor control with PWM. Not DC level in the meaning of 0Hz (which your formula relates to).

And for best assistance we need some values.
You may do motor RPM control, you may do motor torque control, or combined. You may do motor position control.
You may do motor control with energy harvesting, you may use a motor control with safety braking (disk saw).
You may do high accuracy motor RPM control for vinyl turn table according studio standards.
You may do low cost low performance fan control for your room.... and a lot of different applications with different requirements inbetween and with different solutions. Or RC car, or RC caterpiller control where you control the direction with the (difference) speed of two motors.

With the information we can recommend you how to get the expected performance.

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to