There are occasions when a circuit needs to be fed with a square wave signal. To provide for such a scenario, we will build a square wave signal generator that uses a 555. A 555 can be configured to run in 3 different modes, the one that we are concerned with here is called the astable mode. We will use the 555 in astable mode to build an astable multivibrator. Astable means that it runs without settling into a stable state, it constantly oscillates between a LOW and HIGH state. We can adjust the amount of time that it is in a LOW state, as well as how long it is in the HIGH state. This is known as the duty cycle. A duty cycle of 50% means that the circuit is in a low state for the same period as it is in the high state. Or we can express this as a ratio of 1:1. A multivibrator is a device that operates in a two-state mode.

The output signal frequency of our astable multivibrator will be determined by the 2 resistors (R1 and R2) and the 1 capacitor (C1), governed by the formula f = 1 / time period. The time period can be calculated by 1.44 / ((R1 + R2 x 2) x C1).

A fixed frequency signal generator wouldn’t be very useful, so we will substitute R2 with a potentiometer, so we can vary the signal frequency that is generated. Varying the value of our capacitor, C1 would also alter the frequency. However, we will keep C1 at a fixed value as it is easier to alter a resistance. We will also use a potentiometer for R2, which will allow us to vary the duty cycle between 50% and 100%.

R1, R2 and C1 form a resistor-capacitor network. The capacitor charges and discharges at a rate that is proportional to the resistance. When the voltage on C1 reaches 2/3 of the supply voltage, the 555 triggers its flip-flop (pin 2). The capacitor starts to discharge and when it drops to 1/3 of the supply voltage the flip-flop flips again and starts the capacitor charging again. When C1 is charging, the RC is dependent on both R1 and R2. When it’s discharging, only R2 comes into play, because of the connection to pin 7 between the 2 resistors. The time taken to perform these charge-discharge cycles is what determines the frequency of the square wave generated. The frequency is the reciprocal of the time taken for the circuit to go high plus the time taken to go low.

There are 2 parameters that we are interested in altering, the frequency and the duty cycle.

555 square wave signal generator Arduino

1 Comment

Comments are closed.