# Function Generator: Build a Sine, Ramp & Rect Wave

• abdo375
In summary, you can't use an IC to do this conversion because it requires an op-amp. You can Google "triangle to sine conversion" and find many resources that will teach you how to do this using an op-amp.
abdo375
I'm trying to build a function generator that will output a sine, ramp and rect wave and I need to change the amplitude and the frequency of the signal, as far as the first part goes, I've succeeded, but I can't seem to control the frequency and the amplitude of the signal independently.

Last edited:
And you can't. You need to design an addition variable gain amplifier that will automatically compensate for an amplitude drop or gain. It's sometimes referred to as ALC, Automatic Level Control. That will level your amlitude through out your frequency range.

I'm missing something. Where does the sine wave pop out?

Glad to see I'm not the only one who missed it Mike.

I'm sorry should have made it more clear, it pops from the integrator circuit (the output of the third Op-Amp) and the rect wave from the differentiator circuit(last one).

No, the integral of a triangle wave is not a sine wave. There is a different technique that is generally used for cheap tri --> sine conversion.

The output of the Integrator: http://img369.imageshack.us/img369/5135/labprojectschematic112ka0.jpg"
cheap trick ?

Last edited by a moderator:
Hmmm. Well I don't get that. Does it make that sine-wave-looking waveform at only one frequency? Certainly a damped integration of a triangle wave is not a sine wave in general.

The cheap trick that I referred to is to use diodes and resistors to make an amplitude-dependent impedance that shapes the triangle into a sine. There used to be an IC with that inside it, but I forget the number.

I see your point berkemen (I'm surprised I haven't before) , I'm going to look deeper into this.

too bad I can only use op-amps in the circuit, no IC's.

Last edited:
I googled "triangle to sine conversion" and got lots of hits. Here's the first one:

http://www-personal.engin.umd.umich.edu/~fmeral/ELECTRONICS%20II/04%25c3-Opamp/02-%25c3FuncGenProject/Nonlinear%20Function%20Fitting.pdf

## 1. What is a function generator and what does it do?

A function generator is an electronic test instrument that produces various types of electrical waveforms. It is used in the field of electronics and engineering for testing and troubleshooting circuits, as well as in research and development for studying and analyzing different waveforms.

## 2. What are the common types of waveforms that can be generated by a function generator?

The most common types of waveforms that can be generated by a function generator are sine, square, triangle, and sawtooth waves. Some advanced function generators may also have the capability to generate arbitrary waveforms.

## 3. How does a function generator produce different waveforms?

A function generator has an internal oscillator that generates a constant voltage at a specific frequency. This voltage is then passed through a series of circuits that shape the waveform according to the desired type, amplitude, and frequency. For example, a sine wave is produced by passing the voltage through a circuit called a Wien bridge oscillator.

## 4. What are the applications of a function generator?

Function generators have a wide range of applications in various fields such as electronics, telecommunications, and scientific research. They are used for testing and troubleshooting electronic circuits, as well as for signal generation in experiments and research. They can also be used in audio and radio frequency testing and calibration.

## 5. Can I build my own function generator?

Yes, it is possible to build a simple function generator using basic electronic components and a microcontroller. However, it may not be as accurate or versatile as a commercially available function generator. It is recommended to purchase a function generator for more precise and reliable results.

Replies
5
Views
827
Replies
25
Views
5K
Replies
15
Views
3K
Replies
16
Views
2K
Replies
28
Views
4K
Replies
47
Views
4K
Replies
46
Views
4K
Replies
38
Views
4K
Replies
14
Views
4K
Replies
5
Views
2K