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.

Triangle wave generator for pwm

Status
Not open for further replies.
a question aside
1)in sinusoidal PWM does it matter which pin the sine wave is fed into?
some ppl feed the sine wave to the inverting input and the triangle wave to the noninverting input,while some do the opposite.
Does it matter?
2)Can the TL082 opamp generate triangle waves up to 30Khz comfortably.
it seems to be the only opamp available and common here where i stay


Hi again,

Well you would feed the sine (or signal) into the non inverting terminal to get a genuine PWM output at the output of the comparator itself, but if you need to use a driver after that then you have to consider if the driver inverts or not. If the driver inverts, then you'd want to feed it into the inverting terminal most likely. If not using a driver then depending on what you will use it for will require feeding it into the appropriate pin. But for a regular PWM out of the comparator itself the sine (or the signal) goes into the non inverting terminal.

I think we found the minimum slew rate for the TL082 to be 5v/us, so if we assume a plus and minus 10v output that means for a triangle centered at 0v we have 2us up, 2us down, 2us down again, 2us up, for a total time period of 8us. The inverse of 8e-6 is 125000, so that means the theoretical max frequency of a triangle (not a sine) would be 125kHz, assuming the forced gain of the circuit isnt too exceptionally high.
I would keep it less than that however, and i would think that 30kHz would be ok. If we go too high on the frequency with a triangle then we have to start thinking about some harmonics and the gain bandwidth product. For example, the 9th harmonic of 30kHz is 270kHz, so with a gain of 10 we start to get close to the limit for that sinusoidal frequency, so maybe a gain of 10 would be a limit point we might want to use for a 30kHz triangle in order to maintain a good triangular waveshape.
 
Hi again,

Well you would feed the sine (or signal) into the non inverting terminal to get a genuine PWM output at the output of the comparator itself, but if you need to use a driver after that then you have to consider if the driver inverts or not. If the driver inverts, then you'd want to feed it into the inverting terminal most likely. If not using a driver then depending on what you will use it for will require feeding it into the appropriate pin. But for a regular PWM out of the comparator itself the sine (or the signal) goes into the non inverting terminal.

I think we found the minimum slew rate for the TL082 to be 5v/us, so if we assume a plus and minus 10v output that means for a triangle centered at 0v we have 2us up, 2us down, 2us down again, 2us up, for a total time period of 8us. The inverse of 8e-6 is 125000, so that means the theoretical max frequency of a triangle (not a sine) would be 125kHz, assuming the forced gain of the circuit isnt too exceptionally high.
I would keep it less than that however, and i would think that 30kHz would be ok. If we go too high on the frequency with a triangle then we have to start thinking about some harmonics and the gain bandwidth product. For example, the 9th harmonic of 30kHz is 270kHz, so with a gain of 10 we start to get close to the limit for that sinusoidal frequency, so maybe a gain of 10 would be a limit point we might want to use for a 30kHz triangle in order to maintain a good triangular waveshape.
Hello,
1)This gain limit,does it have to do with the circuit itself?
2From your explanation it means that i could get a a triangle at about say 40kHz max using the Tl082 and still get a good triangle.?
3)Remember the Triangle circuit you used to explain output voltage to me.
Now if i used that circuit to generate 30Khz,will the amplitude and output voltage be thesame as when i reduced the frequency to say about 500Hz?
4)If the output voltage decreases as its what i expect due to increasing frequency and at this 30KHz one uses it in Sinusoidal PWM to generate a PWM wave,
Will the PWM be affected due to the reduced output voltage and amplitude as compared to using a much lower frequency like 500Hz beimg compared to a 50Hz sine wave?
5)if the PWM will be affected,will the 30khz wave form need to be amplified?
 
Last edited:
The datasheet for the TL082 shows a graph of its voltage gain vs frequency. Its high frequencies have less gain so that it does not oscillate when it has 100% negative feedback (a gain of 1).

The datasheet also has a graph that shows its maximum output swing vs frequency (its slew rate).
With an output of 10V peak its output shows distortion and some attenuation at 150kHz.

A triangle waveform has straight sides when its harmonics are not attenuated below 10 times its frequency.
So a TL08x opamp produces a fair (but not good) 20kHz triangle waveform but a funny-looking one at 30kHz.
 
what type of capacitor does one recommend when filtering the output of an inverter.
i noticed that non polarized is often used when placing at the output of the inverter transformer to do the filtering but can one use a polarised capacitor at the AC output and if not so why?
 
A polarized capacitor can be used on DC but not on AC.
You do not connect a capacitor directly to the output of the transformer because at high frequencies it is a short circuit. Usually an LC filter is used.
 
A polarized capacitor can be used on DC but not on AC.
You do not connect a capacitor directly to the output of the transformer because at high frequencies it is a short circuit. Usually an LC filter is used.
since an LC filter is used what type of capacitor is used then in the LC filter.
 
The LC filter at the output of a sinewave inverter or class-D power amplifier uses a non-polarized capacitor probably a film type.
But I am just guessing because my electricity is very reliable and I have never seen an inverter and I have never used an inverter.
 
what type of capacitor does one recommend when filtering the output of an inverter.
i noticed that non polarized is often used when placing at the output of the inverter transformer to do the filtering but can one use a polarised capacitor at the AC output and if not so why?

Hello there,

You need to use a non polarized cap on the output of the inverter transformer because a polarized one is made for DC only. It's that simple. But there is a little more to it then that really. It's a good idea to use caps that are made for AC line voltages because they can take the abuse.

The output at the output of the inverter transformer is AC, therefore you need an AC capacitor not a DC capacitor. The trick of back to back DC polarized capacitors is not that great of an idea either.

So if you connect a cap directly to the output transformer secondary make sure it is an AC type made for line voltages and make sure the inverter can take the extra load to begin with.
 
The datasheet for the TL082 shows a graph of its voltage gain vs frequency. Its high frequencies have less gain so that it does not oscillate when it has 100% negative feedback (a gain of 1).

The datasheet also has a graph that shows its maximum output swing vs frequency (its slew rate).
With an output of 10V peak its output shows distortion and some attenuation at 150kHz.

A triangle waveform has straight sides when its harmonics are not attenuated below 10 times its frequency.
So a TL08x opamp produces a fair (but not good) 20kHz triangle waveform but a funny-looking one at 30kHz.
Hello,compliments of the season to you.
From what you said does that mean that if I decided to use a TL084 instead of TL082 it could not give a good triangle even at 40Khz-50Khz.
I read a note online where TL084 was used to generate triangle waves at 50Khz.
 
A TL081 is a single opamp. A TL082 is a dual opamp (it has 2 opamps). A TL084 is a quad opamp (It has 4 opamps). All these opamps are exactly the same.
A TL08x has an output slew rate that is good up to about 150kHz so it can produce a not good 30kHz triangle wave, a 20kHz fair one or a 10kHz good one.
It can easily oscillate at 50kHz and higher but a triangle waveform will be awful.
 
Hello,compliments of the season to you.
From what you said does that mean that if I decided to use a TL084 instead of TL082 it could not give a good triangle even at 40Khz-50Khz.
I read a note online where TL084 was used to generate triangle waves at 50Khz.

Hello again,

As i said many times before, it also depends on the VOLTAGE of the output. The peak voltage says a lot about the way it will behave. If you have a 10v peak wave it will be different from a 1v peak wave by 10 times, and that's a lot!
For a sine wave we use the slope at the zero crossing as the guide rate of change (or slew rate), and for a triangle we assume that if we can pass the 11th harmonic without too much attenuation then the triangle should pass good enough.
So again, with a 5v/us slew rate that means the output can go from zero to 5 volts in 1 microsecond, so for a symmetrical triangle we need that to happen four times per cycle, so that means the fastest we can go is 4 microseconds, which is 250kHz. The 11th harmonic is 2.75MHz so the device has to be able to handle that as well without too much attenuation. Unfortunately, that's where the gain drops to about 1, so it may not function up to that high of a frequency.
We could do a simulation if you want to see that next.
 
Hello,
This is just a curious question
In inverters, will using a transformer that is rated higher than the power supply voltage affect the quality of automatic stable voltage regulation under various loads.
if i use a 12V power supply and i use a 15-0-15/22ov transformer will the auto regulation be as effective as using a transformer that matches the power supply voltage like 12-0-12/220v or lesser than supply voltage 10-0-10/220v?
 
Hello,

In inverters, will using a transformer that is rated higher than the power supply voltage affect the quality of automatic stable voltage regulation under various loads.
if i use a 12V power supply and i use a 15-0-15/22ov transformer will the auto regulation be as effective as using a transformer that matches the power supply voltage like 12-0-12/220v or lesser than supply voltage 10-0-10/220v?
If you use a 13.5V battery then the output Mosfets will swing to about 13.2V. Then if you use a 15V transformer the 13.2V swing is too low by 15V/13.2V= almost 14%. Then the 220V output will be 194VAC.
If you use a 10V transformer the output voltage will be too high by 13.2V/10V= 32% and voltage regulation is needed to reduce it. When there is not much load current it will be even higher.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top