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.

Generating uni-polar PWM signal using IR2113

Status
Not open for further replies.
But my sine wave coming in from the reference will be clipped at the negative cycle.
Not when the opamps are biased at half the supply voltage so that their outputs can swing equally up and down.

But the triangular waveform is not symmetrical uh?
Alec's simulation does not use TL072 opamps that would clip the top and bottom almost equally. The resistors need to be adjusted to reduce the output level to avoid clipping.
 
So for the triangular circuit, the input will be at 6Vref instead of grounding it?

Actually, will it be possible to connect the carrier and reference to LM339 without causing the sine wave to be clipped?
 
So for the triangular circuit, the input will be at 6Vref instead of grounding it?
Yes. That's what AG has been telling you in several posts. Your sine-wave also needs to be centred around 6V, so the opamps which generate it will need the 6V ref. You might also wish to dedicate one opamp as a unity-gain buffer for that 6V ref.
 
Yes. That's what AG has been telling you in several posts. Your sine-wave also needs to be centred around 6V, so the opamps which generate it will need the 6V ref. You might also wish to dedicate one opamp as a unity-gain buffer for that 6V ref.
I tried biasing the inverting sine wave circuit but the outpt waveform got clipped.
 
In addition, I connected up the triangular circuit with 6Vref biasing. It was okay. However, once I connected it to another TL072 with +Vcc & GND, then the triangular waveform become distorted and the pure sine wave on the other input also got clipped as well.
 
I tried biasing the inverting sine wave circuit but the outpt waveform got clipped.
It will do if the opamp is not a rail-to-rail output type or if the circuit can't control the gain so that the sine peak-to-peak output is less than the output capability of the opamp.

Edit: Can you post the schematic of your sine-wave generator?
 
Last edited:
His schematics show that the "sinewave generator" is a potentiometer connected to ground so its DC reference is 0V. Maybe it is fed from a mains transformer.
Its output is used and another output is from an inverting opamp that also has a DC reference of 0V.
Let us see how he biased the circuit at +6V.
 
His schematics show that the "sinewave generator" is a potentiometer connected to ground so its DC reference is 0V. Maybe it is fed from a mains transformer.
Its output is used and another output is from an inverting opamp that also has a DC reference of 0V.
Let us see how he biased the circuit at +6V.

Yup. The sine wave is taken from the main. Sorry but I am still new here..
 

Attachments

  • SPWM(VCC&GND).pdf
    42.7 KB · Views: 496
I calculated the top and bottom voltages of the triangle wave.
It is simple to properly bias the sinewave opamp.
 

Attachments

  • PWM triangle and sinewave generators.png
    PWM triangle and sinewave generators.png
    39.5 KB · Views: 475
Both inputs of a comparator or an opamp are the same voltage at the switching threshold because the voltage gain is very high at about 200,000 times.
When one input voltage exceeds the other input voltage by only 0.00004V then the output switches to the other saturation voltage.

I used Ohm's Law to calculate the currents and voltages.
 
Both inputs of a comparator or an opamp are the same voltage at the switching threshold because the voltage gain is very high at about 200,000 times.
When one input voltage exceeds the other input voltage by only 0.00004V then the output switches to the other saturation voltage.

I used Ohm's Law to calculate the currents and voltages.

Sorry but I dont understand how to get the output value.
Anyway, this is the triangular output waveform. So I have to adjust the resistors value?

And also, How to include the DC 6V inside a sine wave from the grid
 

Attachments

  • 2013-11-28 13.27.28.jpg
    2013-11-28 13.27.28.jpg
    1.1 MB · Views: 283
Last edited:
How to include the DC 6V inside a sine wave from the grid
Like this:-
BiasedSine.gif
 
Sorry but I dont understand how to get the output value.
I simply used Ohm's Law to calculate currents and voltages.
1) The output swing of a TL072 opamp that has a 12V supply is about +1.5V to +10.5V.
2) The U1a comparator part of the triangle generator switches when the ramping input from the U1b integrator passes +6V.
3) When the output of U1a is at +1.5V and its (+) input reaches +6V then R3 has a voltage of 6V - 1.5V= 4.5V across it then its current is 4.5V/10k= 0.45mA.
4) R2 also has a current of 0.45mA then it has a voltage across it of 0.45mA x 4.7k= 2.115V.
5) Then the voltage at the output of U1b is 6V - 2.115V= +3.885V.
Do the same calculations when the output of the triangle wave goes high.

Anyway, this is the triangular output waveform. So I have to adjust the resistors value?
The value of R2 or R3 can be changed to change the output level.

How to include the DC 6V inside a sine wave from the grid
I showed that adding a simple coupling capacitor to the input of the inverter allows it to be biased correctly since its (+) input is at +6V.
As Alec shows for your non-inverted signal from the grid, connect the common of the transformer to +6V.
 
I simply used Ohm's Law to calculate currents and voltages.
1) The output swing of a TL072 opamp that has a 12V supply is about +1.5V to +10.5V.
2) The U1a comparator part of the triangle generator switches when the ramping input from the U1b integrator passes +6V.
3) When the output of U1a is at +1.5V and its (+) input reaches +6V then R3 has a voltage of 6V - 1.5V= 4.5V across it then its current is 4.5V/10k= 0.45mA.
4) R2 also has a current of 0.45mA then it has a voltage across it of 0.45mA x 4.7k= 2.115V.
5) Then the voltage at the output of U1b is 6V - 2.115V= +3.885V.
Do the same calculations when the output of the triangle wave goes high.


The value of R2 or R3 can be changed to change the output level.


I showed that adding a simple coupling capacitor to the input of the inverter allows it to be biased correctly since its (+) input is at +6V.
As Alec shows for your non-inverted signal from the grid, connect the common of the transformer to +6V.

Thanks, I sort of understood your calculation le
But just for clarification, why doesnt the op-amp swing from 0 ~ 12V? Why only +1.5V and +10V

As for the coupling capacitor, similar to the schematic. The (+) input is +6V but when I connect a simulated sine wave to the coupling capacitor, the sine wave become close to a straight line with slight ripple.
 
But just for clarification, why doesnt the op-amp swing from 0 ~ 12V? Why only +1.5V and +10V
The TL072 opamp is fairly old and its output uses ordinary bipolar transistors as darlingtons (an emitter-follower feeding another emitter-follower). Its datasheet shows that its output voltage does not reach the positive or the negative supply voltage.
Modern "rail-to-rail" opamps use Cmos transistors and when the load current is small their outputs reach the positive and negative supply voltages.

As for the coupling capacitor, similar to the schematic. The (+) input is +6V but when I connect a simulated sine wave to the coupling capacitor, the sine wave become close to a straight line with slight ripple.
The coupling capacitor connects to the 10k ohms input resistor of the inverting opamp, it does not connect to ground. If its source is a fairly low resistance potentiometer then its signal level should not change when it is connected.
 
The TL072 opamp is fairly old and its output uses ordinary bipolar transistors as darlingtons (an emitter-follower feeding another emitter-follower). Its datasheet shows that its output voltage does not reach the positive or the negative supply voltage.
Modern "rail-to-rail" opamps use Cmos transistors and when the load current is small their outputs reach the positive and negative supply voltages.


The coupling capacitor connects to the 10k ohms input resistor of the inverting opamp, it does not connect to ground. If its source is a fairly low resistance potentiometer then its signal level should not change when it is connected.
Just a couple of questions, with regards to what alec_t said. Because I am using function generator to produce a 50Hz sine wave, if I were to connect 6VDC to it, wont it blow the generator because of the DC & AC issue.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top