Pulse-with modulation using op-amp.

  • Thread starter Thread starter Bassalisk
  • Start date Start date
  • Tags Tags
    Modulation Op-amp
Click For Summary
The discussion centers on using an op-amp as a comparator for pulse-width modulation (PWM) with a triangle wave as the carrier and a sine wave as the modulating signal. Participants clarify that the triangle wave's amplitude should be greater than that of the sine wave to avoid distortion in the output signal. It is emphasized that if the sine wave's amplitude exceeds that of the triangle wave, it could lead to clipping and ineffective modulation. The conversation also touches on the importance of the op-amp's gain-bandwidth product and slew rate, which determine the maximum frequency for effective modulation. Overall, the correct configuration and amplitude relationship between the waves are crucial for successful PWM implementation.
Bassalisk
Messages
946
Reaction score
2
http://pokit.org/get/c2d0bb4355d353d0ff5bc47c7158ce45.jpg

Suppose we have an op-amp configured as a comparator.

At -ive lead, we are sending the carrier wave, specifically in my example, triangle wave.

At +ive lead, we are sending the input signal, the one that we want to modulate, specifically in my example a sine wave.

My question is regarding the amplitudes of both waves.

What would be the best choice of amplitudes:

1. They are both the same
2. The carrier wave should have a bit or a lot above the input signal.

Also my thoughts here are that the carrier wave shouldn't ever be beyond input signal(regarding the amplitudes) because we wouldn't get a very good modulation at the output, am I right?
 
Last edited by a moderator:
Engineering news on Phys.org
Don't you have your signals mixed up?
The carrier wave is surely the sine wave? And the modulating signal the triangle wave?
What do you mean by 'shouldn't ever be beyond input signal',,,
 
technician said:
Don't you have your signals mixed up?
The carrier wave is surely the sine wave? And the modulating signal the triangle wave?
What do you mean by 'shouldn't ever be beyond input signal',,,

For this example I am using sine as the input wave.

Just to straighten out some misconceptions.


I am aiming at this:

If the amplitude of my input wave, is greater than the amplitude of the carrier wave, won't that distort the modulated signal?


Or it doesn't matter at all?
 
so you want to produce a series of pulses whose width at any time is in proportion(or perhaps inverse proportion) to the instantaneous value of the much slower sinewave?
is that right? (words are such an awkward way to paint pictures..)

work it in your head -
The triangle wave must be larger than the sinewave
else the sinewave peaks would stop the train of pulses,

and a sinewave spends most of its time near the peaks.

were sinewave larger, your pulse train would appear and disappear twice per sinewave cycle.
Draw it out on paper.

check your 555 applications. 555 makes a good PWM modulator.
 
jim hardy said:
so you want to produce a series of pulses whose width at any time is in proportion(or perhaps inverse proportion) to the instantaneous value of the much slower sinewave?
is that right? (words are such an awkward way to paint pictures..)

work it in your head -
The triangle wave must be larger than the sinewave
else the sinewave peaks would stop the train of pulses,

and a sinewave spends most of its time near the peaks.

were sinewave larger, your pulse train would appear and disappear twice per sinewave cycle.
Draw it out on paper.

check your 555 applications. 555 makes a good PWM modulator.


Yes yes, that's what I wanted to be confirmed! Thank you mr. Jim! I am currently top of my class in electronics, so I got nobody to confirm my thoughts with :D. Not that I am bragging or anything :p
 
oops wrong thread edited..

glad you are enjoying the class,,
and your success makes me happy. i like electronics too but did not really excel.
Hillbilly saying "It ain't braggin' when it's true!"

Thank you for your kindness.
 
I've done exactly what you describe to transmit audio over a light beam. How large you want the carrier, in this case triangle wave, relative to the modulating signal will determine how much modulation you get. Think about it, a triangle wave that goes 20 VPP centered around zero with a modulating signal of only a 1 or less VPP also centered around zero will not make the output move very far away from 50% duty cycle compared to a signal that goes 10 VPP. Too much signal compared to the carrier will cause clipping when the final signal is decoded.
 
jim hardy said:
oops wrong thread edited..

glad you are enjoying the class,,
and your success makes me happy. i like electronics too but did not really excel.
Hillbilly saying "It ain't braggin' when it's true!"

Thank you for your kindness.

My kindness? Please :D Don't make me laugh! You are the one with the wisdom of knowledge, I am only 2 years into knowing how transistor works!
 
Averagesupernova said:
I've done exactly what you describe to transmit audio over a light beam. How large you want the carrier, in this case triangle wave, relative to the modulating signal will determine how much modulation you get. Think about it, a triangle wave that goes 20 VPP centered around zero with a modulating signal of only a 1 or less VPP also centered around zero will not make the output move very far away from 50% duty cycle compared to a signal that goes 10 VPP. Too much signal compared to the carrier will cause clipping when the final signal is decoded.

In the end I will need to make a sine carrier as I see it, other than some oscillators I am clueless.

I forgot that triangle has a lot of other harmonics, I would get aliasing.
 
  • #10
You want to the carrier to be a triangle wave on the input to the comparator. Why do you think sine wave? It certainly won't be linear. With a triangle wave as I described in my last post the duty cycle will be linear with the modulating signal.
-
The triangle wave generator you have in your other thread combined with a comparator is all you need. I don't know what you have for a modulating signal, I'm thinking audio? More info please!
 
  • #11
Averagesupernova said:
You want to the carrier to be a triangle wave on the input to the comparator. Why do you think sine wave? It certainly won't be linear. With a triangle wave as I described in my last post the duty cycle will be linear with the modulating signal.

Hmmm. I think I understand. I will experiment with this further. I am trying to combine my knowledge from Signals and Systems and electronics, a lot of headaches.What does PWM do to a spectrum of the input signal? Amplitude modulation, shifts it.
 
  • #12
I think the input signal is still simply there since recovering it only requires low pass filtering. So it is actually passed along unlike the modulating signal in AM, which as you mentioned is shifted up next to the carrier. Where else it may show up I do not know.
-
Incidentally, what are you trying to do? Final goal?
 
  • #13
I tried feeding a sinewave into the inverting (-) input of a comparator and a sawtooth wave of the same amplitude into the non inverting (+) input.

http://dl.dropbox.com/u/4222062/pwm%20gen.PNG

As you can see, you get a good pulse width modulation on the output (shown in red).
 
Last edited by a moderator:
  • #14
vk6kro said:
I tried feeding a sinewave into the inverting (-) input of a comparator and a sawtooth wave of the same amplitude into the non inverting (+) input.

http://dl.dropbox.com/u/4222062/pwm%20gen.PNG

As you can see, you get a good pulse width modulation on the output (shown in red).

Yes I see.

One more question though. How can I determine, up to which frequencies my modulator can go?

How is that determined, by the op-amp characteristics? What is that called?
 
Last edited by a moderator:
  • #15
nice post there vk6kr0

that picture is worth quite a few thousand words...

and it shows why my thinking was exactly backward.

is my face red... but it happens pretty often.

old jim
 
  • #16
The data sheet for the opamp will have a figure for gain-bandwidth.

Unfortunately, this circuit uses a lot of gain so it won't have much bandwidth.

You might do better with a dedicated comparator like the LM311 although you have to be careful with layout of the circuit or they will oscillate. See the data sheet for the precautions you need to take.

I couldn't find a maximum frequency for those, but the data sheet gives response times of 200 nS which is the period of a 5 MHz signal. So, something like 100 KHz should not be a problem.
In fact, the data sheet shows a 311 being used as a 100 KHz oscillator.
 
  • #17
The slew rate spec should tell you everything you need to know in this case.
 
  • #18
I've been avoiding this slew rate for quite a while. Seems scary. I will investigate this parameter, thank you for your suggestions.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
5K
Replies
5
Views
2K
Replies
9
Views
7K
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 19 ·
Replies
19
Views
8K