# Circuit to convert a pulse signal to square wave

How can I convert a pulse signal into a square wave.

I have a pulse signal created using a Function Signal Generator, ZK-PP2K Pulse Frequency Generator 8A Driver Module LCD Pulse Frequency Cycle Module 1Hz-150KHz Motor Controller LCD Display https://www.amazon.com/Function-Generator-Frequency-1Hz-150KHz-Controller/dp/B08HV2FPJR

Specifications:

1>.Product name: ZK-PP2K PWM Signal Generator

3>.Work voltage:DC 3.3V-30V

4>.Frequency range:1Hz~150KHz

5>.Frequency accuracy:2%

6>.Duty cycle range:0.00%-100%

7>.Output Current:8A(Max)

8>.Number of pulses:1~9999 or Infinite

9>.Delay time:0.000s~9999s

10>.Pulse width:0.000s~9999s


I watched a video that uses simulink to create a model that does this. https://youtu.be/m6aw6HcIbPc

How can I convert this simulink example into a "workable" circuit. My thoughts were to use a combination of an op-amp and bridge wave rectifiers but I think I'm over thinking it since I already have the pulse generated. Any thoughts?

Detail of the waveforms you require: -

So, what you want is an output that flips each time the input pulse rises.

This can be achieved with a D type flip flop like this: -

Image from here.

How can I convert this simulink example into a "workable" circuit.

Of course you need to do other things to make a working circuit: -

• Power supply for the D type flip flop
• Power rail decoupling capacitor to ensure no glitches
• Careful layout to prevent EMI
• Unused pins on the D type flip flop tied to the appropriate power rail
• Connectors for input signal and output signal
• Maybe a 1 kΩ resistor in series with the output from the circuit to prevent careless shorts when connecting it to an oscilloscope.
• An input resistor to prevent significant stress on the circuit in case your powerful PWM driver is set up incorrectly. Maybe even an attenuator formed from two resistors.

You can also use JK flip-flops. Here's two cascaded showing how you can take an input signal of frequency $$\f\$$ and reduce $$\f\$$ by 4: -

Image from here.