Features

How to build Square Wave to Sine Wave

We will show how to build a square wave to sine wave converter. To do so, we simply need resistors and capacitors- nothing else. Using RC networks, we can reshape a square wave into a sine wave. A circuit like this can be important. We often use sine waves in many different areas of electronics such as acoustics and mathematical operations. Source of power use Sine wave. Even though they use square waves. Many times these waves are important to need.

In fact, to build this circuit, we need 3 RC networks. Only 1 resistor and 1 capacitor comprise  Each RC network is. So this circuit need total of 3 resistors and 3 capacitors.

Even though this circuit is very basic in that it only requires 4 resistors and 4 capacitors, it does contain some complexity in regard to the values of the resistors and more importantly the capacitors in regard to the frequency of the input signal.

The capacitor values that we choose for the circuit is based off the frequency of the input square wave signal. If the capacitor value isn’t appropriate for the frequency of the square wave signal, the circuit will not work. So capacitor values must be chosen. If not, the same square wave signal that we feed into the circuit will be output, meaning the capacitors had no effect on the signal because the value of them are out of the frequency range. We will go over the frequency of the signal and the capacitor values needed in more detail below.

For this circuit, we will input a 10KHz signal. So this circuit, with the given value capacitors given below, will work square wave signals at or near 10KHz.

Components Needed:

  • 3 1.5KΩ resistors
  • 3 10nF capacitors

Square-to-Sine Wave Converter Circuit:

The square-to-sine wave generator circuit that we will build with only resistors and capacitors is shown below.

Square-to-sine wave converter circuit

Figure1: Square Wave to Sine Wave

We then have our first RC network, composed of a resistor and capacitor. The first resistor and capacitor creates the classic capacitor charging and discharging waveform. Being that the voltage across the capacitor, Vc= VIN(1 – e-t/RC), the voltage across the capacitor charges up exponentially and discharges exponentially.

Therefore, the waveform, upon charging is a parabolic-shaped exponential waveform upside down. The same way the capacitor charges up exponentially, it discharges exponentially. Therefore, when the capacitor is discharging, you see a parabolic-shaped exponential waveform right side up. So this is the waveform that you will see after the first RC network.

Figure 2: Added two Capacitors

RC network:

After the first RC network, we then have our second RC network. This RC network takes the exponential waveform and converts it into a triangle waveform. It straightens out the parabolic exponential waveform so that they appear as a straight ascending slope on the charging side and straight descending slope on the discharging side. The result is a triangle.

Figure 3: Triangle Wave Generated

Just like with the first capacitor, the second capacitor charges and discharges, charges and discharges, over and over again. The result is continuous never-ending oscillations of triangle waveform. The third RC network then shapes the triangle waves, smoothing out the straightness of them and making them more curved.

So instead of just the straight upward and straight downward slopes, the slopes are more curved as a sine wave would be. This shapes the wave into a more sine-wave-like waveform. wave. So after the 3rd RC network, the output waveform pretty much identifies as a sine wave. And this is all that is needed to convert square waves into sine waves.

Full Circuit Design in DCACLab

For this circuit, the 10KHz frequency and frequency values close to this work very well with the values given above, which are 1.5KΩ resistors and 10nF capacitors.

 

Figure 4: Full Circuit of Sine Wave converter.

If the correct values are not chosen and are way out of the frequency range, the output waveform will be the same exact square wave, as is input into the circuit, except attenuated a bit due to the resistors. The waveform will be unchanged because the capacitors have no reactance to the voltage due to the frequency level.

If the capacitor still has some reactance due to the signal but is still out of the frequency range, you may get a very poorly formed sine waveform. Therefore, it’s very important to choose correct levels. If you’re willing to play around with values, you will know that the capacitors work for the given frequency if you see a sine waveform from the fourth capacitor. If you do not, then you can be sure that the capacitor values need to be changed.

If the output waveform is a perfect square wave, then you can be sure that the capacitor values are completely out of range for the frequency of the signal. If you see a poorly formed sine wave, the capacitor value is slightly out of range. Either adjust its value or adjust the frequency.

When swapping out the capacitor values, change all 4 capacitors values at once. You want to use the same value capacitors for all the capacitors. This is because if one capacitor works at that frequency, the other will also work at that frequency. If you choose different value capacitors, then one capacitor may work with that frequency, while the other may not. So, in the end, you may get mixed-reactive capacitors and a poorly defined waveform. To fix this problem, use the same value for both capacitors.

The rule of thumb for choosing capacitors is that for low frequencies, higher value capacitors are needed. For high frequencies, lower value capacitors are needed. So for really high frequencies, you may use capacitors in the order of picadors.

For really low frequencies, you may use hundreds of nano farads, or even units of micro farads. This may require some trial and error and testing with building the circuit and checking the waveform on an oscilloscope.

Waveform on an oscilloscope:

However, if you vary greatly from this frequency, like by a few KHz and especially as you vary farther than this, the capacitor values will most likely need to be changed in order to produce sine waveform as output.

Figure 5: Sine Wave Converter Final Output

As far as adjusting the amplitude, this just requires feeding a larger square wave into the circuit to increase the amplitude. Or feeding a smaller square wave into the circuit to decrease the amplitude.

And this is about all that can be done for building and adjusting this square-to-sine wave converter circuit.

And this is how a sine wave generator circuit can be built with a few simple components if we already have a square wave.

Live Simulation: How to Build a Square Wave To Sine Wave


 See My All Simulation 

 

  •  
  •  
  •  
  •  
  •  
  •  

Article written by:

I am Md. Anisur Rahman Likhon. I have completed Cyber Security for Masters of Science in Computer Science & Engineering (MSCSE) at United International University in 2022. After passing the S.S.C examination from Melandah Umir Uddin Pilot High School in 2010 I got admitted to Habibur Rahman College Mahmudpur and I have completed HSC in 2012. I have completed a Bachelor of Social Science (BSS) Hon's in Bangladesh Open University (BOU) in 2018. I have completed Post Graduate Diploma in Information Technology (PGDIT) from IIT, Jahangirnagar University in 2020. Now I am being a job as IT Support Staff at United International University. I am both Technical Content Writer & Instructor at Electronics Circuit Design in DCAClab.com.

%d bloggers like this: