+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Member level 1
    Points: 455, Level: 4

    Join Date
    Oct 2017
    Posts
    40
    Helped
    0 / 0
    Points
    455
    Level
    4

    Shifting the waveform using op amp

    I am trying to generate the SPWM using analog circuit, by comparing sine with triangular wave the output will be Sinusoidal PWM.

    - Here i am generating Sine wave of 50 HZ using wein bridge oscillator. And it outputs good.
    - Triangular wave is generated by square wave generator and integrator.
    - Two waves are compared using comparator( LM393 )
    Waveform generation circuits https://drive.google.com/open?id=1BF...cRJSJp97E919Gc


    The two waves should be like the below images
    Click image for larger version. 

Name:	sine & triangle 2.jpg 
Views:	4 
Size:	499.5 KB 
ID:	152347
    But i get like this
    Click image for larger version. 

Name:	sine & triangular wave.jpg 
Views:	2 
Size:	500.6 KB 
ID:	152348

    How to shift the wave up or down according to the required amplitude ??
    Click image for larger version. 

Name:	sine wave shifting waveform.jpg 
Views:	3 
Size:	347.6 KB 
ID:	152349

    •   AltAdvertisment

        
       

  2. #2
    Advanced Member level 5
    Points: 12,423, Level: 26
    Achievements:
    7 years registered

    Join Date
    Apr 2010
    Posts
    1,889
    Helped
    405 / 405
    Points
    12,423
    Level
    26

    Re: Shifting the waveform using op amp

    attach your opamp circuit for sinewave , triangle and comparator with supply voltages shown.



    •   AltAdvertisment

        
       

  3. #3
    Super Moderator
    Points: 73,784, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,968
    Helped
    3407 / 3407
    Points
    73,784
    Level
    66

    Re: Shifting the waveform using op amp

    Hi,

    maybe you want something "self-aligning":

    Use a DC-Blocking series capacitor on both signals and do DC biasing both signals to the same (average) level.
    R to the bias voltage.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  4. #4
    Full Member level 1
    Points: 763, Level: 6

    Join Date
    Jan 2019
    Location
    Belgium
    Posts
    101
    Helped
    51 / 51
    Points
    763
    Level
    6

    Re: Shifting the waveform using op amp

    Use something like a summing amplifier. (Ref: https://www.electronics-tutorials.ws/opamp/opamp_4.html)

    Click image for larger version. 

Name:	opamp54.gif 
Views:	2 
Size:	5.1 KB 
ID:	152356



  5. #5
    Member level 1
    Points: 455, Level: 4

    Join Date
    Oct 2017
    Posts
    40
    Helped
    0 / 0
    Points
    455
    Level
    4

    Re: Shifting the waveform using op amp

    The waveform get shifted good by using level shifter circuit. Thank you friends for your response..

    - - - Updated - - -

    Quote Originally Posted by vivekroy View Post
    Use something like a summing amplifier. (Ref: https://www.electronics-tutorials.ws/opamp/opamp_4.html)

    Click image for larger version. 

Name:	opamp54.gif 
Views:	2 
Size:	5.1 KB 
ID:	152356
    Sure i will try it

    - - - Updated - - -

    Quote Originally Posted by KlausST View Post
    Hi,

    maybe you want something "self-aligning":

    Use a DC-Blocking series capacitor on both signals and do DC biasing both signals to the same (average) level.
    R to the bias voltage.

    Klaus
    I tried with decoupling capacitor at the output of the waveform . Which work good for a single circuit , for example Wien bridge oscillator added with decoupling capacitor at the end , gives ac sine wave of middle value zero volt. But when I add this circuit to an comparator the sine wave get shifted.



    •   AltAdvertisment

        
       

  6. #6
    Advanced Member level 5
    Points: 49,755, Level: 54
    Achievements:
    7 years registered
    Audioguru's Avatar
    Join Date
    Jan 2008
    Location
    Toronto area of Canada
    Posts
    8,651
    Helped
    2018 / 2018
    Points
    49,755
    Level
    54

    Re: Shifting the waveform using op amp

    The two 10k resistors in series that divide the 9V into +4.5V and -4.5V are overloaded by the input bias current of the opamps. Use opamps with Jfet inputs that have an extremely low input bias current.
    Why do your opamps have no part numbers?

    - - - Updated - - -

    If you add a coupling capacitor (a decoupling capacitor at the end) to the output of the Wien bridge oscillator then the comparator input has no DC reference voltage that should be at hlf the supply voltage. Then the DC bias current of the LM393 comparator causes its DC input to go positive.



--[[ ]]--