---
+ Post New Thread
Results 1 to 20 of 20
  1. #1
    Full Member level 6
    Points: 2,765, Level: 12
    moonnightingale's Avatar
    Join Date
    Sep 2009
    Posts
    362
    Helped
    5 / 5
    Points
    2,765
    Level
    12

    How to convert Square Wave to Sinewave

    I am getting square wave from 555 timer IC
    I want to convert it into sine wave and then feed it into speaker

    Kindly tell me how to convert Square wave to sine wave

  2. #2
    Full Member level 4
    Points: 1,728, Level: 9

    Join Date
    May 2011
    Posts
    191
    Helped
    61 / 61
    Points
    1,728
    Level
    9

    Re: How to convert Square Wave to Sinewave

    If you need a low cost solution, you could use a high order active analog filter (LOW PASS) after the 555. What you will obtain is not a perfect sinewave but it might work depending on your application.
    Another option would be making an analog sinewave generator like this one: A Sine Wave Generator

    Good luck!


    1 members found this post helpful.

  3. #3
    Full Member level 6
    Points: 2,765, Level: 12
    moonnightingale's Avatar
    Join Date
    Sep 2009
    Posts
    362
    Helped
    5 / 5
    Points
    2,765
    Level
    12

    Re: How to convert Square Wave to Sinewave

    Basically i am having square wave of 400 Hz
    I want to convert it into Sinewave and listen on speaker,
    Kindly tell me which approach is good and easy to patch on breadboard


    1 members found this post helpful.

    •   Alt27th September 2011, 19:10

      advertising

        
       

  4. #4
    LvW
    LvW is offline
    Advanced Member level 5
    Points: 36,102, Level: 46
    LvW's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    5,152
    Helped
    1524 / 1524
    Points
    36,102
    Level
    46

    Re: How to convert Square Wave to Sinewave

    The fundamental component of your square wave is the wanted sinusoidal signal.
    Therefore - as proposed above - use a lowpass and supress all higher harmonics as much as needed.
    The low pass order is determined by the accuracy you want to obtain (measured as THD).


    1 members found this post helpful.

  5. #5
    Full Member level 6
    Points: 2,765, Level: 12
    moonnightingale's Avatar
    Join Date
    Sep 2009
    Posts
    362
    Helped
    5 / 5
    Points
    2,765
    Level
    12

    Re: How to convert Square Wave to Sinewave

    Ok thanks
    Can u give me link of some site which can show me circuit for low pass infreq range 300 Hz to 600 Hz


    1 members found this post helpful.

  6. #6
    FvM
    FvM is offline
    Super Moderator
    Points: 171,406, Level: 98
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    27,762
    Helped
    8758 / 8758
    Points
    171,406
    Level
    98

    Re: How to convert Square Wave to Sinewave

    Texas Instruments Filter Pro is one of many available tools supporting the design of active filters. Active Filter Design Application - FILTERPRO - TI Software Folder



  7. #7
    Newbie level 3
    Points: 366, Level: 4

    Join Date
    Jan 2011
    Location
    Shenzhen, China
    Posts
    4
    Helped
    0 / 0
    Points
    366
    Level
    4

    Re: How to convert Square Wave to Sinewave

    For deriving sinusoid wave ,you'd better pick the filter type as Cauer (also be called as Elliptic) to reduce the order of the filter.



  8. #8
    Member level 3
    Points: 976, Level: 7
    mehtadhaval's Avatar
    Join Date
    Sep 2010
    Posts
    56
    Helped
    7 / 7
    Points
    976
    Level
    7

    Re: How to convert Square Wave to Sinewave

    If you just want to listen the 400Hz tone on the speaker then you can directly give 400Hz square wave directly to the speaker.
    Learning is a continuous process.....

    Dhaval Mehta



  9. #9
    Full Member level 6
    Points: 2,765, Level: 12
    moonnightingale's Avatar
    Join Date
    Sep 2009
    Posts
    362
    Helped
    5 / 5
    Points
    2,765
    Level
    12

    Re: How to convert Square Wave to Sinewave

    yes i know i am also listening it on my speakers but i want to convert it into sine wave

    Somebody wrote that a simple RC circuit can convert square to sine wave
    How to calculate values of Resistor and Capacitor for 300 Hz Square Wave

    Kindly explain me their connectivity



    •   Alt28th September 2011, 13:36

      advertising

        
       

  10. #10
    LvW
    LvW is offline
    Advanced Member level 5
    Points: 36,102, Level: 46
    LvW's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    5,152
    Helped
    1524 / 1524
    Points
    36,102
    Level
    46

    Re: How to convert Square Wave to Sinewave

    Quote Originally Posted by moonnightingale View Post
    yes i know i am also listening it on my speakers but i want to convert it into sine wave

    Somebody wrote that a simple RC circuit can convert square to sine wave
    How to calculate values of Resistor and Capacitor for 300 Hz Square Wave

    Kindly explain me their connectivity
    That`s nonsense. A simple RC circuit (first order lowpass) cannot change a squarewave into a sinusoidal signal. In theory, you would need an IDEAL lowpass (brickwall response) to remove all harmonics. As I told you earlier, a lowpass of order n=2...4 will do the job - depending on your THD requirements.
    Regarding Narshben`s suggestion, I doubt if an elliptical filter is the best choice for this purpose due to its complexity.



  11. #11
    Full Member level 6
    Points: 2,765, Level: 12
    moonnightingale's Avatar
    Join Date
    Sep 2009
    Posts
    362
    Helped
    5 / 5
    Points
    2,765
    Level
    12

    Re: How to convert Square Wave to Sinewave

    Quote Originally Posted by LvW View Post
    That`s nonsense. A simple RC circuit (first order lowpass) cannot change a squarewave into a sinusoidal signal. In theory, you would need an IDEAL lowpass (brickwall response) to remove all harmonics. As I told you earlier, a lowpass of order n=2...4 will do the job - depending on your THD requirements.
    Regarding Narshben`s suggestion, I doubt if an elliptical filter is the best choice for this purpose due to its complexity.
    Can u send me circuit diagram for any filter
    Thanks



  12. #12
    LvW
    LvW is offline
    Advanced Member level 5
    Points: 36,102, Level: 46
    LvW's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    5,152
    Helped
    1524 / 1524
    Points
    36,102
    Level
    46

    Re: How to convert Square Wave to Sinewave

    Quote Originally Posted by moonnightingale View Post
    Can u send me circuit diagram for any filter
    Thanks
    For "any filter"? Do you know that there are several books dealing only with filter design?
    And - what about Internet search?



  13. #13
    Full Member level 1
    Points: 1,088, Level: 7

    Join Date
    Jun 2011
    Location
    Bath, Somerset
    Posts
    112
    Helped
    19 / 19
    Points
    1,088
    Level
    7

    Re: How to convert Square Wave to Sinewave

    From what I remember, there is a triangular wave available at the timing inputs of a 555.

    Buffering this with an op-amp or Emitter follower stage and then using a 'triangle to sine' convertor comprising a series of back to back diodes with series resistors in the negative feedback path to shape the gain within an inverting op-amp stage can give a good approximation of a sinewave with distortion below 1%.
    I did use this method some years ago for an 'internal' reference signal, to avoid amplitude bounce as with Wein Bridge oscillators, within an Audio Mixing Desk but unfortunately no longer have the circuit info.

    Think this will be simpler than trying to use filtering of a squarewave to output a sinewave from your circuit....... although a simple lo-pass passive filter following the 'triangle to sine' convertor will further improve the residual sinewave distortion giving you a purer tone for listening tests with the 'speakers which you want to achieve.

    Seem to remember that there is some good info on this approach in the Analog Devices Application Notes, but can't remember which one(s) - hopefully someone else can remember where this info is?

    Hope this assists
    Mik
    Last edited by audiomik; 28th September 2011 at 15:24.



  14. #14
    FvM
    FvM is offline
    Super Moderator
    Points: 171,406, Level: 98
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    27,762
    Helped
    8758 / 8758
    Points
    171,406
    Level
    98

    Re: How to convert Square Wave to Sinewave

    A 400 Hz low-pass. The yellow magnitude response is valid for the given component values.




  15. #15
    Full Member level 6
    Points: 2,765, Level: 12
    moonnightingale's Avatar
    Join Date
    Sep 2009
    Posts
    362
    Helped
    5 / 5
    Points
    2,765
    Level
    12

    Re: How to convert Square Wave to Sinewave

    Quote Originally Posted by FvM View Post
    A 400 Hz low-pass. The yellow magnitude response is valid for the given component values.

    Actaully i am having several frequencies which are controlled through push button
    the range of my frequencies is from 250 Hz to 600 Hz

    will this filter work for whole range of frequencies


    I just tried this circuit which i got from internet. I changed the values of Inductor and capacitor by hit and trial and now i am getting perfect sinewave for almost whole range

    can u kindly explain me this circuitry. how it is producing the sinewave
    Pics are attached



  16. #16
    FvM
    FvM is offline
    Super Moderator
    Points: 171,406, Level: 98
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    27,762
    Helped
    8758 / 8758
    Points
    171,406
    Level
    98

    Re: How to convert Square Wave to Sinewave

    Actaully i am having several frequencies which are controlled through push button
    the range of my frequencies is from 250 Hz to 600 Hz

    will this filter work for whole range of frequencies
    That's difficult, because 3rd harmonic of 250 Hz is very near to 600 Hz. You didn't yet mention this requirement, by the way. But I assume, that you're able to find suitable filters from literature. The TI FilterPro software is one of many available resources.

    To generate a sine signal over a certain frequency range, a RC generator tuned with two resistors, e.g. a stereo potentiometer, seems more reasonable in my view. There are many previous threads about sine generators at Edaboard.



  17. #17
    Full Member level 6
    Points: 2,765, Level: 12
    moonnightingale's Avatar
    Join Date
    Sep 2009
    Posts
    362
    Helped
    5 / 5
    Points
    2,765
    Level
    12

    Re: How to convert Square Wave to Sinewave

    Quote Originally Posted by FvM View Post
    That's difficult, because 3rd harmonic of 250 Hz is very near to 600 Hz. You didn't yet mention this requirement, by the way. But I assume, that you're able to find suitable filters from literature. The TI FilterPro software is one of many available resources.

    To generate a sine signal over a certain frequency range, a RC generator tuned with two resistors, e.g. a stereo potentiometer, seems more reasonable in my view. There are many previous threads about sine generators at Edaboard.
    ok thanks FVM
    Kindly comment about the circuit which i have uploaded
    How it is giving so good response

    Can u explain it

    thanks



  18. #18
    FvM
    FvM is offline
    Super Moderator
    Points: 171,406, Level: 98
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    27,762
    Helped
    8758 / 8758
    Points
    171,406
    Level
    98

    Re: How to convert Square Wave to Sinewave

    WIth unloaded output (is it?), it's far from a regular low pass filter, e.g. having 10 dB peaking at 500 Hz. This suggests, that the filter requirements aren't actually very critical.



  19. #19
    Full Member level 6
    Points: 2,765, Level: 12
    moonnightingale's Avatar
    Join Date
    Sep 2009
    Posts
    362
    Helped
    5 / 5
    Points
    2,765
    Level
    12

    Re: How to convert Square Wave to Sinewave

    ok thanks
    can u kindly explain me function of inductor and capacitor in this circuit



  20. #20
    FvM
    FvM is offline
    Super Moderator
    Points: 171,406, Level: 98
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    27,762
    Helped
    8758 / 8758
    Points
    171,406
    Level
    98

    Re: How to convert Square Wave to Sinewave

    The filter is a passive 3rd order low-pass, the corresponding LC implementation of the OP filter I posted above. My adjusting the L and C values, you can give it different filter characteristics.

    Some basics about passive filters can be found here: Lessons In Electric Circuits -- Volume II (AC) - Table of Contents



+ Post New Thread
Please login