Function Generator

Thread Starter

BH. GURU CHARAN

Joined Apr 25, 2025
2
Could anyone help me in designing of function generator like square wave is generated by using 555 timer and cascaded to integrator to get triangle and again cascaded to sin wave with adjustable frequency. Well I've tried to do so but eventually ending up with a different wave as soon as i change the frequency and when i try to connect an op amp to make the gain high at output of square well I am getting a pure DC why is that so. (I use NI Multism) 1745664834196.png
 

BobTPH

Joined Jun 5, 2013
11,463
There are only about a billion schematics for 555 square wave generators out there. Let’s create another one!
 

Thread Starter

BH. GURU CHARAN

Joined Apr 25, 2025
2
Welcome to AAC!
Is this a school/college assignment?
No sir I've completed my under graduation in Electrical and Electronics and in my college we don't apply what we study so i got enlightenment my questioning myself actually. so now I am trying to apply all concepts practically and trying to implement but unable to do this small circuit. When I stay at home I try to do this but failing to do
 

DickCappels

Joined Aug 21, 2008
10,661
I suggest: NE555 at 2X output frequency, a divide by two circuit (D or JK flip-flop), and two staggered integrators.

The reason for the NE555 generating 2X the output frequency and the divide by two is to get a very symmetric square wave without tedious manual adjustment.

The amplitude of the sine wave (or very nearly sine wave) will vary with frequency because of the frequency-sensitive nature of the integrators.
 

AnalogKid

Joined Aug 1, 2013
12,045
IRL a bipolar 555 has an asymmetrical output that causes problems when driving an integrator. A better choice is a CMOS 555 such as an LMC555. This has almost perfectly symmetrical output states at low output currents. There is a circuit in the LMC555 datasheet for a 50/50 oscillator. The output duty cycle remains fixed at 50/50 with a single resistor for adjusting the frequency. This probably is a better starting point for your circuit.

Page 7, figure 12.

Also, no matter how many R-C filters you have in series, the output waveform will not be a triangle wave. The technical reason for this is that a square wave has only odd harmonics, while a triangle wave requires both odd and even harmonics. This is a consequence of the Rourier Transform.


To do what you want, you need either a passive integrator with constant-current sources, or an active integrator circuit, such as one using an opamp. Either way, the integration capacitor will have to be adjusted when changing frequency.

As mentioned above, there are a lot of function generator schematics on the innergoogle. Many are based on an integrator circuit driving a comparator. The advantage here is that with only one timing capacitor and resistor, you get both constant amplitude and variable frequency with only one adjustment.

ak
 

Attachments

Last edited:

Reloadron

Joined Jan 15, 2015
7,857
You make no mention of the frequency range?
You may want to consider Function Generator ICs like the XR2206 for example. A simple Google of Function Generator ICs will bring up plenty of on chip solutions.

Ron
 

MisterBill2

Joined Jan 23, 2018
27,186
The 555 is listed as a "Precision Timer" IC, which is a very handy function. While it can be made to work as an oscillator it is not a very simple function generator.
A device defined as a function generator is the 8038, which is intended to serve as a sine, triangle, and square wave function generator. It works very well in that application.
So why not use the correct component for the application. Consider that a part of ENGINEERING is using the correct component for a chosen function.
 

Pyrex

Joined Feb 16, 2022
501
It is impossible to create a function generator with a single 555' timer.
To obtain a sine voltage, you need to have an accurate triangular voltage generator. As shown here -
Precision 40KHz Triangle Generator - Signal_Processing - Circuit Diagram - SeekIC.com

Then a sinus voltage must be formed from the triangular voltage -
Lab Activity: Generating sine waves from triangle waves [Analog Devices Wiki]

It would be much easier to use a specialized chip, which was advised earlier .

The circuit you tried to use in the first post can only generate poor form signals. And you will still have additional problems if you want to change the frequency
 

AnalogKid

Joined Aug 1, 2013
12,045
Cute trick.

Note that in some company's in-house design standards, the direct paralleling of logic gate outputs is forbidden. Because no two transistors are identical, the five paralleled outputs do not all transition from one output state to the other at *exactly* the same time. This means that there are very brief periods of time when some gates are high and some are low, creating a direct path from Vcc to GND, called cross-conduction. This "shoot-through" current decreases the long-term reliability of the circuit.

This is mitigated somewhat by the fact hat CMOS gates, especially the original CD4xxx series parts, to not have a very low output impedance. The output behaves like a true output stage with a 200 to 400 ohm resistor in series with it. Thus, the chip is partly self-protecting because it cannot move enough current to damage itself immediately.

ak
 
Last edited:

crutschow

Joined Mar 14, 2008
38,322
Because no two transistors are identical, the five paralleled outputs do not all transition from one output state to the other at *exactly* the same time
True.
But that small time difference for all the inverters on the same chip is likely not large enough to give any significant shoot-through current.
 

MisterBill2

Joined Jan 23, 2018
27,186
I have routinely put outputs of the CD4049 in parallel, but never other CMOS logic outputs. I do that because it was presented as an option in the applications data notes.
So the first thing is to see if the producer of the IC describes it as OK.
 

AnalogKid

Joined Aug 1, 2013
12,045
But that small time difference for all the inverters on the same chip is likely not large enough to give any significant shoot-through current.
Completely agree.

And yet, for a MIL project, I threw in what was basically a heartbeat indicator LED as a convenience for possible field depot maintenance, with paralleled unused inverters rather than a transistor and resistor. I got dinged in a design review for the paralleled outputs.

Single-trial learning. Do it in personal projects - sure. Recommend it into a space where it will be copied into applications very different from the original, with no understanding of the original design conditions - probably not.

ak
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,045
I think it was a carryover from the TTL days, when output impedances were much lower and output stages definitely were *not* self-protecting.

ak
 

tonyStewart

Joined May 8, 2012
231
I have routinely put outputs of the CD4049 in parallel, but never other CMOS logic outputs. I do that because it was presented as an option in the applications data notes.
So the first thing is to see if the producer of the IC describes it as OK.
I agree. But in 74ALC family with the inputs forced near Vdd/2 for some analog app, supply current will be much higher.

The CD4000 family was high RdsOn to withstand Vdd=high voltage e.g. 18V
The 74HCxxx family is closer to 50 ohms
the 74ALCxxx is closer to 22 Ohms.
The CMOS logic has no deadband and will always have cross-conduction, especially when operating well above Vdd min.
There isn't much mismatch within the same IC when using parallel logic to run in tandem and cause thermal issues.

Although the nice analog amp applications of the 4000 series no longer work as well with 74HC series from lack of gain margin when using negative feedback now with much higher GBW.
 

MisterBill2

Joined Jan 23, 2018
27,186
My comment ONLY covers the CD4xxx family. I would not put other family outputs in parallel. AND REALLY, I have only done it with the CD 4049 devices, and a very few others.
 
Top