Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Resource icon

Introduction to pulse width modulation 2012-01-26

Status
Not open for further replies.

ElectroMaster

Administrator
ElectroMaster submitted a new article:

Introduction to Pulse Width Modulation - A look at a powerful technique for controlling analog circuits with a microprocessor's digital outp

A look at a powerful technique for controlling analog circuits with a microprocessor's digital outputs.

Pulse width modulation (PWM) is a powerful technique for controlling analog circuits with a microprocessor's digital outputs. PWM is employed in a wide variety of applications, ranging from measurement and communications to power control and conversion.

Analog circuits

An analog signal has a continuously varying value, with infinite resolution in both time and magnitude. A...

Read more about this article...
 
Useful intro. Eagerly awaiting Chapter 2: 'Practical Circuits for PWM Control of Motors and Other Loads' ;)
 
Nice ..

Some additions:

Sometimes, we can't see the "benefit" of PWM at first glance over say a rheostat, until we see the beauty of the maths, of "how" PWM is a nice solution.

With a rheostat, it's basically control how much a load gets by wasting the extra;

Think about it like this: You have a tank full of water. You’re thirsty and you’d like a glass of water. In a ‘control by wasting the extra’ solution, you’ll have to empty the tank leaving only the equivalent of a glass of water, and then drink that.

It’s the same thing here : We have a voltage source of say E volts. We have a load, of say R ohms.

If we want the load to receive I ampères of current, we'd have to apply to it a voltage of R*I volts.

But we have an E volts source .. So ?

So we need to empty the water in the tank leaving only what we need. We need to waste E-RI volts in a resistance (rheostat) … That’s a lot of waste.



This is a solution, but as the author said, it's a lot of waste(I think he re-wrote this article for that magazine, I've seen one that’s very similar to this one elsewhere, almost ad litteram.. That 9 volts battery example gets around so much, you'd think there is a lack of analog signals in the world we live in, which basically is an analog world :) )

Anyhow, so in which way PWM is cool ?

Well for that, we get a bit 'technical' and talk about the average voltage applied to the load (That's what authors mean when they say « the load 'sees' X volts », but don't show the eyelashes of it)

The average voltage applied to the load is the integral of the voltage applied to the load, "divided" by the period T.

[LATEX]V_a=\frac{1}{T}.\int_{0}^{T}V(t).dt[/LATEX]

So, for a source of E volts which is ON for [LATEX]\alpha.T[/LATEX] ([LATEX]0\leq \alpha \leq1[/LATEX]) and OFF the rest of the time [LATEX](1-\alpha).T[/LATEX]

[LATEX]V_a=\frac{1}{T}.\int_0^TV(t).dt=1/T.(\int_{0}^{\alpha.T}E.dt+\int_{\alpha.T}^T0.dt)=\frac{\alpha.T}{T}.E=\alpha.E[/LATEX]

We see that the average (mean) voltage the load ‘sees’ is proportionnal to the duty cycle [LATEX]\alpha[/LATEX]

What does this mean ?

It means that if you only want a glass of water, you simply drink a glass of water and don’t waste the water in the tank.

If our load wants [LATEX]\frac{E}{4}[/LATEX] , there is no need to waste [LATEX]\frac{3E}{4}[/LATEX] in a resistor.. We simply tinker with the duty cycle [LATEX]\alpha[/LATEX] (the ratio mark/period, or how long it is ON/Period), which is easily done, to get what we WANT.

Think about it like opening a faucet and closing it, then opening it again and closing it until our glass is filled, so we don't have to empty the tank.


Of course, as the author said, a light bulb that’s ON for one day, and then OFF for another day still has a duty cycle of 50% .. However, we can « see » it.

What we'll have to do is keeping the duty cycle, but increase the frequency of the switching depending on the characteristics of our system.

If it’s a light bulb, it has to do with image retention of the eye, we figure the frequency we need in order for the eye not to see any « switching », but only notice an increase or a decrease in "lighting" .. dimming
 
I think Jugurtha had a very good mathematical point but lack CLARITY......he confused himself and went out of cliff but good job.The author has very simple deep down analysis self explanatory,you can drink cup of coffee and understand it all without asking a single question...i love the explanation regarding PWM.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top