If you want to generate square wave using 555 Timer you might not know how to calculate the resistors and capacitor value for your required square wave frequency. Here we will show how you can calculate Resistor and Capacitor values to generate square wave. And after calculating the components value we will show how it works on the breadboard with video. In the next 555 timer tutorial, we will show you how you can measure the frequency and pulse duration using **DIY oscilloscope using Arduino and Matlab Simulink**.

**Working of ****Square Wave Generator Using 555 Timer IC **

A little bit of working mechanisms and circuit schematics need to be told before we move on. To know more in details see how 555 Timer works in Astable Multivibrator Mode with Simulation. A 555 timer square wave generator works in astable mode of operation.

The schematic diagram of 555 timer square wave generator is as shown. The Trigger pin(2) is connected to the Control Voltage pin(6) in astable mode of operation which is what causes self-tiggering.**Equations for Astable Multivibrator of 555 Timer**

Below are some equations which relates the two resistors and capacitor value with the charging time, discharging time, total period, frequency and also duty cycle. In case of square wave generator the duty cycle is ideally 50%.

**Charging Time(Tc)** is given by,

**\(T_c = 0.693(R_A+R_B)C\)** ------------(1)

**Discharge Time(Td)** is given by,

**\(T_d = 0.693R_BC\) ** --------------------(2)

**One Cycle Period(T)** is thus given by adding (1) and (2),

\(T=T_c+T_d\)

That is,

**\(T=0.693(R_A+2R_B)C\) ** ------------------(3)

**Frequency of Oscillation(Fosc)** is thus,

\(F_{osc}=1/T\)

or, \(F_{osc}=1/0.693(R_A+2R_B)C\)

That is,

**\(F_{osc}=1.44/(R_A+2R_B)C\) ** ---------------------(4)

**Duty Cycle**

\(Duty Cycle = \frac{R_A+R_B}{R_A+2R_B}\) ------------------------(5)

**Steps to calculate Resistors & Capacitor values for square wave generation**

**1. Choose resistor R1 value.**

eg. R1 = 100Ohm

**2. Multiply R1 by 100 to get R2, that is, R2 = 100xR1. **

eg. R2 = 100x100Ohm = 10,000Ohm = 10KOhm

**3. Choose frequency(Fosc) or Time period(T)**

Here you can either decide on your required frequency of the square wave or decide upon first the total time period(T). For instance you might need certain time delay for high/low and the total one pulse period is the sum of the high and low pulse width since for square wave they have equal width. Then once you have determined Period(T) you can determine frequency(Fosc) since Fosc = 1/T.

eg. Let's choose Fosc = 1.5Hz

**4. Calculate the Capacitor Value**

Once you have the frequency of the wave, you can then determine the capacitor value(C) using the equation.

**\(F_{osc}=1.44/(R_A+2R_B)C\)**

eg, let's choose Fosc = 1.5Hz, then solving the above equation for C we get,

C = 47uF

**Example Circuit for Square Wave** with frequency of 1.5Hz with calculated resistors and capacitor values above is shown below.

In the above circuit example, we have added two capacitors C2 and C3 of 0.01uF to reduce noise in the circuit. Also we have added a LED with current limiting resistors R3 at the output just to view the output signal.

**Simulation of 555 Timer Square Wave Generator in Proteus**

The following simulation shows the 555 Timer generating a square wave of frequency 1.5Hz. The led at the output will blink at this frequency.

You might also be interested in our earlier 555 Timer tutorial how to simulate 555 Timer as Monostable Multivibrator in Proteus.

**Video Demonstration of 555 Timer as Square Wave Generator**

Leave comments if you have questions.