TL494 Working With a Crystal || Generate Perfect 50Hz Modified Square Waves

Hello everyone! Thank you for stopping by this instructable.

This is a very exciting project where I have made this TL494 based modified square wave module that is controlled by a crystal oscillator for having super accurate output frequency of 50Hz and it also comes in with an adjustable deadtime control so that you can manually select the wave form that you want and all this without using any microcontroller!

I found this concept quite fascinating and thought of making a module which can generate the control signals for using it in a modified square wave inverter. This project used some very commonly used ICs which are easily available over your local hardware store as well as online.

So without any furthur delay lets get started!

Step 1: Gather Your Components

I will be designing this module almost completely based on SMD components to make the module small and compact but that should not stop anyone to try out this exact project using through hole components. The values of all the components remain exactly the same in both the versions.

So here is a list of all the components that you will be requiring for this build

  1. IC TL494
  2. IC 4060
  3. IC 4017
  4. IC LM358
  5. 4.096Mhz crystal
  6. 7805 voltage regulator
  7. BC547 / 2N2904 or any other general purpose NPN transistor
  8. 1 Mega ohm resistor
  9. 100K resistors
  10. 10K resistors
  11. 1K resistor
  12. 2.2Kresistors
  13. 10K and 100K presets
  14. 10K potentiometer-10 turn precision
  15. 0.1uF and 0.01uF capacitors
  16. 22pF capacitors
  17. LED for power indication( optional)
  18. Copper clad / veroboard
  19. Male header pins
  20. Soldering kit and accessories

All these components can either be used in the through hole or SMD form depending on how you want to make your circuit.

Step 2: The Idea

The idea of using the TL494 with a crystal oscillator came to my mind when I was going through the datasheet of the IC, which mentioned that the IC can be used in a master slave configuration such that the ICs can be cascaded together in such a way that one IC can control the operating frequency of the other ICs connected to it. I found tis very fascinating and began investigating more.

Basically the TL494 is a very popular PWM control chip used in a variety of switching applications and power supply circuits due to some of its useful features like :

  • Having two error amplifiers which can be used as a feedback mechanism in controlling the output voltage or limiting the current
  • Flip flop based output so that we have two alternatively switching outputs
  • external R and C component connections to determine the output frequency based on the RC time constant
  • Internal 5 V reference that can be useful for the error amplifiers
  • Adjustable dead time control between the output pulses
  • A good range of operating voltage

Phew, that was a lot and to get more information about this IC, I have attached the datasheet in this step for your reference.

Now coming to the signal generation, i have successfully generated a stable 50Hz and a 1Khz signal using the 4.096Mhz crystal using the IC 4060 which is a binary counter/ divider and a decade counter IC. If you are interested in how that circuit works, then more details are there in one of my previous projects the link to which is - Stable 50Hz generator

The idea here is to use the binary divider ( IC4060) to generate 1Khz signal rom the crystal and then divide it by 10 using the decade counter IC 4017, in our case to get stable 100Hz which can then be fed to TL494 to generate two alternatively switching 50Hz signal at the output as from the datasheet it is clear that TL494 can accept sawtooth waves as input on pin CT when used as a slave. The deadtime can be controlled by applying a voltage between 0.7 to 3.3 volts which can change the deadtime from 3% all the way upto 100%. This can easily be controlled via a potentiometer. I have attached the snippets of those exact concepts in this step.

Step 3: The Contradiction... and the Solution

Well with the concepts discussed in the previous section I was all set to make this circuit but while testing the circuit on breadboard I faced a peculiar problem.

Even after generating a reasonably stable sawtooth wave from the 100Hz square wave(produced by IC 4017), this sawtooth wave was never able to properly trigger the TL494 to operate a expected. This was a very unusual behavior despite the fact that the application was also mentioned in the datasheet. You can see the sawtooth waveform picture attached in this step. So this idea failed, nor could i properly control the deadtime using the potentiometer.

Well, the solution was to use a square wave of uneven duty cycle and directly feed it to the CT pin of the TL494 while the RT pin gets connected to the reference voltage as mentioned in the datasheet.

In essence, now I had to vary the duty cycle of this square wave( going to CT pin) to change the deadtime of the output and strangely this is what worked out in my system both for generating the output as well as the dead time adjustment.

if anyone knows the reason then please comment down below, that would be helpful to identify this behavior.

Step 4: Generating the Control Signal

To generate the square wave of varying duty cycle, i have used the dual Op-Amp chip LM358. The square waves from the 4017 IC is used by the first Op-Amp to generate a sawtooth wave by configuring it as an integrator, this saw tooth wave is now fed to the second Op-amp of the LM358 which is a comparator and compares this sawtooth to a voltage reference. This voltage reference is controlled by the 10 turn precision potentiometer. You guessed it right, this changes the duty cycle of the square wave and eventually the dead time of our output pulses.

I have attached the snippets of the Proteus simulation to make the idea a bit more clear

Okay! enough of the theory. Now let us dive into actual circuit making steps.

Step 5: Schematic

This is the final schematic that I have used. You can replicate this exact schematic with almost the same component values to get the requited output

Step 6: Testing the Circuit on Breadbord

With the concepts in mind I made the entire circuit on the breadboard to test it out. Make sure you use a good quality breadboard because sometimes a loose connection can be a real pain while debugging your circuit. Make sure to use compact wires to avoid confusion and wrong connections

I have used a 5V regulator and a9V battery to power the system. And s you can see we have our 1Khz signal from IC 4060 and 100hz signal from IC 4017.

Here i have attached photos of all the necessary waveforms like the 1Khz, 100Hz sawtooth and even the control signal to CT pin of TL494

Step 7: PCB Layout

With successful breadboard testes, I got the green signal to move ahead with the PCB fabrication. I have used Easy EDA to generate the schematic and the layout. You can use your favorite designing tool for this.

Step 8: Fabricating the PCB

I used the widely popular toner transfer method to make my PCB. I have first transferred the layout onto the copper clad board which I cut to dimensions and then used ferric chloride solution to etch away the excess copper. After about 10 mins of etching my board was ready for the next steps.

CAUTION: Please follow safety procedure while handling corrosive chemicals, wear gloves to void irritation to the skin

Step 9: Finishing Up the PCB

After the etching process, I drilled the holes for header pins and vias. Since I made a single sided PCB, some connections had to be made from the other side.

I placed some components in their positions to make sure everything fits well.

Step 10: Final Look!

Soldering all the components took me about 3-4 hours. it will depend upon your skill level and the tools you have. I did this with a mere soldering iron.

And finally the board came to life! It looked amazing once complete.

Step 11: Testing the Modules

As you can see this module worked just as expected. And I was getting the correct signals to visualize the output signals for the modified square waves. Since my scope features only one channel I was not able to properly see the individual signals but attaching both probes to both output pins produces the required waveform.

Step 12: Conlusion

Thank you for sticking by till this last step of this rather long article!

I hope you like this project and if so please feel free to share your feedbacks and suggestions.

I have a video covering the details for this module attached in the very beginning, please watch it till the end and while you are there please consider subscribing to my channel! it motivates me to put out more such content like this.

Please share any improvements that I can make in this circuit that can make it more feature rich.

Thanks again and see you in the next one!