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.

Pulse Width Modulation

Status
Not open for further replies.

andy257

Member
Hi Guys

Where does the modulation aspect of these pulse width modulators come from? I know they require an oscillator but i dont understand how modulation comes into it. Doesnt it require a second frequency to modulate?

cheers

andy
 
andy257 said:
Where does the modulation aspect of these pulse width modulators come from? I know they require an oscillator but i dont understand how modulation comes into it. Doesnt it require a second frequency to modulate?

I don't really understand your question?.

Any 'modulator' require two things, a carrier signal and the modulation signal - although either, or both, could be permanently fixed.

So what are you refering to?.
 
PWM is usually created by taking a slow-changing signal (say a current/voltage demand) and comparing it against a much higher frequecy triangle waveform
 
As I understand it PWM is adjusting, by some means, the width or "on" time of a repetitive pulse. Modulation is adjustment or change. The adjustment or "modulation" is intended to convey intelligence/information or simply drive something to a greater or lesser average "on" time.

If used to convey information a longer pulse might have a different meaning or value than a shorter pulse. I suppose that the dits and dahs of morse code are a simple form of this.

If used to control power a shorter pulse would cause less power to be applied - a longer pulse is more power. Worth noting is that one could invert this relationship.
 
I was looking at audioguru's project here https://www.electronics-lab.com/projects/games/004/index.html

What i didnt understand was where does the modulation come into this.

I studied modulation in my communications class and from what i learnt there must be a carrier and an information source (message signal) for modulation to occur. I know there is an oscillator in the circuit but where is the modulation taking place.

If there were two oscillators that would make sense but there appears only to be one.

andy
 
andy257 said:
I was looking at audioguru's project here https://www.electronics-lab.com/projects/games/004/index.html

What i didnt understand was where does the modulation come into this.

I studied modulation in my communications class and from what i learnt there must be a carrier and an information source (message signal) for modulation to occur. I know there is an oscillator in the circuit but where is the modulation taking place.

If there were two oscillators that would make sense but there appears only to be one.

andy

did you even read my reply?
 
Styx said:
andy257 said:
I was looking at audioguru's project here https://www.electronics-lab.com/projects/games/004/index.html

What i didnt understand was where does the modulation come into this.

I studied modulation in my communications class and from what i learnt there must be a carrier and an information source (message signal) for modulation to occur. I know there is an oscillator in the circuit but where is the modulation taking place.

If there were two oscillators that would make sense but there appears only to be one.

andy

did you even read my reply?

Yes i read your reply, reading over it again its starting to make sense. It was the fact there didnt seem to be two frequencys being used that confused me.
 
Andy

I think your confusion comes from the use of the word "modulation" in two different contexts.

You are thinking of modulation in terms of modulating the carrier of a radio transmitter, where an oscillator provides the carrier, and the voice the modulation.

In this context, Audioguru is changing (modulating) the width of a pulse in order to vary the brightness of his LEDs.
He is modulating at a very low frequency, ie whenever he moves the R7 "brightness" control.
When he has stopped rotating the control, the pulse width (and brightness) is fixed until he turns it again.

I hope this clears your confusion.

JimB
 
JimB said:
Andy

I think your confusion comes from the use of the word "modulation" in two different contexts.

You are thinking of modulation in terms of modulating the carrier of a radio transmitter, where an oscillator provides the carrier, and the voice the modulation.

In this context, Audioguru is changing (modulating) the width of a pulse in order to vary the brightness of his LEDs.
He is modulating at a very low frequency, ie whenever he moves the R7 "brightness" control.
When he has stopped rotating the control, the pulse width (and brightness) is fixed until he turns it again.

I hope this clears your confusion.

JimB

Bugger i thought i understood it for a moment there. So it has nothing to do with modulation after all?

where does the triangular waveform come from? if its the oscillator then where does the sine wave come from? is it from the rising and falling voltage/current?

andy
 
andy257 said:
Bugger i thought i understood it for a moment there. So it has nothing to do with modulation after all?

No!.

where does the triangular waveform come from? if its the oscillator then where does the sine wave come from? is it from the rising and falling voltage/current?

There is no sinewave (why would there be), the 'triangle' wave is generated on the input of the schmitt trigger inverter oscillator.

There's a capacitor to ground from the input, and assuming this is discharged, the output of the inverter will be HIGH. The feed back resistor feeds this high voltage back to the input, and charges the capacitor. Once the charge reaches the trigger point of the schmitt the output goes LOW, the feed back resistor then discharges the capacitor, until it goes below the schmitt release point. In this way the input of the gate has a rough triangle waveform, and the output of the inverter a squarewave.

The two diodes in the feedback path are to select two different resistor values, one for charging, and one for discharging, by altering these you can alter the mark/space ratio of the output - which is what the pot does.
 
Andy, do you understand duty cycle? all PWM does is change the duty cycle of a square wave, and typically the duty cycle will be made to be proportional to an input voltage. the stuff others are talking about with triangle waves and comparators are convenient methods that you can use to GENERATE a PWM signal. there are no sine waves involved...

you need to stop thinking about it in terms of communications, because that's not the only meaning of modulation; in fact you'll probably understand it much better if you totally forget about what you learned in communications for a minute. In communications, yes, you are combining a couple of sine waves in some way or another to produce the modulation on a carrier wave which can be more easily transmitted, which can then be decoded. in PWM, the signal of interest is the PWM signal itself, because the object is generally to use it to drive things like LEDs and motors, and the "input signal" so to speak, is only important as a control signal for producing this output; you generally don't use it as a communication scheme where the input signal is decoded at some output.

with PWM driving an LED, for example, 0% duty cycle leaves the LED all the way off, and 100% leaves it fully on, and duty cycles in between 0% and 100% vary the brightness from full off to full on. the reason it's used instead of simply driving the same device with a varying analog voltage, is that it avoids many of the problems such as non-linearity of the devices, and in the case of motors, gives improved torque, and it lets you use a digital output driver (such as an inverter/buffer, or some transistors) for high-power output, instead of trying to make an analog amplifier that can handle the power.
 
I would like to thank all of you who have taken the time to post. Its beginning to make sense and i am actually thinking about building this circuit just to understand it properly.

It would be alot better to leave the name modulation out of it and call it a pulse width something........., then i wouldnt have been confussed.

leave the word modulation for things regarding communication etc :D

Andy
 
andy257 said:
It would be alot better to leave the name modulation out of it and call it a pulse width something........., then i wouldnt have been confussed.

leave the word modulation for things regarding communication etc :D

The confusion is all your own I'm afraid 8)

Communication is only one small part of things that are modulated, the term modulation is perfectly correct for PWM (and the many other non-communication uses for modulation).

In any case, PWM is a perfectly valid communication technique, and is often used.
 
Nigel Goodwin said:
andy257 said:
It would be alot better to leave the name modulation out of it and call it a pulse width something........., then i wouldnt have been confussed.

leave the word modulation for things regarding communication etc :D

The confusion is all your own I'm afraid 8)

Communication is only one small part of things that are modulated, the term modulation is perfectly correct for PWM (and the many other non-communication uses for modulation).

In any case, PWM is a perfectly valid communication technique, and is often used.

Yes Nigel you are correct its all my own confussion. I never expected modulation to appear outside of the communications area within electronics. How wrong i was. Never mind i am young and still learning, thats my excuse.

Thanks all

andy
 
Yes, my circuit modulates, err changes, the width of the on-time pulses of LED current to control its brighness efficiently. If instead I used a variable current limiting series resistor, an awful lot of power would be wasted as heat in the resistor.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top