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.

COMPARE THIS TWO SIGNAL TO CREATE SPWM PULSES OUTPUT

Status
Not open for further replies.
HOW TO COMPARE THIS SIGNAL USING RELATION OPERATOR OR USING COMPARATOR COMPARE THIS TWO SIGNALS TO GET OUTPUT OFF SPWM(SINE PULSE WIDTH MODULATION)
enter image description here

PLEASE HELP ME CREATE IT
 
Last edited:
Welcome to ETO!
Please note that using all capitals is regarded as shouting.
Your Sine and Tri labels should be swapped.
Try googling "sine wave pwm" to see the standard ways to do this.
 
....To get sinusoidal PWM....you put the sine into the comparator, along with the repeating ramping wave.
So re-base the sine so its always positive........from 0 to 5V say....that being peak to peak...
Then you shove the ramp into the other comparator input.....ensure that the ramp's peak is slightly higher than the sine's peak.
Obviously the frequency of the ramp should be much much faster than the sines frequency.
 
Welcome to ETO!
Please note that using all capitals is regarded as shouting.
Your Sine and Tri labels should be swapped.
Try googling "sine wave pwm" to see the standard ways to do this.
sorry for using capitals. i know spwm working i want how to know compare it and also invert the pulses
 
....To get sinusoidal PWM....you put the sine into the comparator, along with the repeating ramping wave.
So re-base the sine so its always positive........from 0 to 5V say....that being peak to peak...
Then you shove the ramp into the other comparator input.....ensure that the ramp's peak is slightly higher than the sine's peak.
Obviously the frequency of the ramp should be much much faster than the sines frequency.
what comparator to use it?
 
What are the frequencies of the triangle and sine waves?

ak
 
triangle (ramp) freq must be much greater than sine frequency......say >30kHz.
What comparator?.....Any general purpose comparator will be ok.
(as long as it accepts the voltages you will be using with it)
 
and also how to invert a output square pulse?
You could use the inverting input of an opamp or comparator. If the pulse voltage is a logic level one then instead you could use a digital inverter.
 
An LM339/393 is a common comparator that should work for your purposes.
Note that, since the output is an open collector, it requires an output pull-up resistor of a few kohm to the V+ supply for proper operation.

Reversing the two input signals to the comparator will reverse the output signal polarity.
You can also use another comparator to reverse the signal polarity.
 
You could use the inverting input of an opamp or comparator. If the pulse voltage is a logic level one then instead you could use a digital inverter.
here i Have attached the file with sine and triangle(ramp) signal in it.
could you please compare it and invert the output signal. and upload it here please
 

Attachments

  • Draft3.asc
    845 bytes · Views: 233
could you please compare it and invert the output signal. and upload it here please
Sorry, no.
This sounds too much like homework, and we will help you with the homework (which we' ve done), but we won't do it for you.
 
An LM339/393 is a common comparator that should work for your purposes.
Note that, since the output is an open collector, it requires an output pull-up resistor of a few kohm to the V+ supply for proper operation.

Reversing the two input signals to the comparator will reverse the output signal polarity.
You can also use another comparator to reverse the signal polarity.
Could please show short image or drawing representation of your saying please?

and i am not able to find LM339/393 opamp in ltspice library
 
Last edited:
could you please at least make short image or drawing representation on how to connect it opamp to compare it and invert the output signal?

No matter how wrong it could be, why not trying that yourself.? Even just to lie saying that you did some efforts to learn something.

And, at this stage of things, use any common opamp just acting as comparator.

Do you realize that you, sooner or later will have to read about all this?
 
could you please at least make short image or drawing representation on how to connect it opamp to compare it and invert the output signal?
No.
Do you know how op amps work?
Do you know what an analog comparator is?
If not I suggest you look them up before you come back with any more questions.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top