Using a 555 timer to generate a triangle wave

Status
Not open for further replies.

count_volta

Joined Feb 4, 2009
435
I think you could just set the 555 to create a square wave and then feed the output of the 555 into an integrator op amp. That will give you a triangle wave. That is one way we learned in EE school recently.
 

Audioguru

Joined Dec 20, 2007
11,248
I think you could just set the 555 to create a square wave and then feed the output of the 555 into an integrator op amp. That will give you a triangle wave.
The dual opamp circuit has one opamp generating a square-wave and the other opamp is the integrator.
The square-wave generator opamp compares the peak voltage of the triangle-wave with a reference voltage so that the peak triangle-wave voltage is always the same when the frequency is changed.

Your 555 oscillator feeding an integrator has its triangle-wave peak voltage becoming less as the frequency is increased. At low frequencies its output level is so high that the integrator opamp clips and produces a square-wave instead of a triangle-wave.
 

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
Well, I added the 100 uF capacitor to the output of the integrator and it dropped the output voltage considerably. It's nowhere near enough to light an led. As a matter of fact, if I remember correctly, on the oscilloscope showed that the voltage was really low and there was no longer a distinguishable triangle visible with the capacitor installed.
 

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
try 10µF or 4.7µF.
I will try these but if I can remember correctly, I already tried those exact values with similar results. I'll try again though.

Also, I want to be able to vary the frequency of the output. Where should the adjustable pot go? As you could see in my schematic, I have a 100k pot serving as Rt. Is this the best place for it?
 

Audioguru

Joined Dec 20, 2007
11,248
The LM324 opamp is low power so its minimum output sink current is only 10mA and if you connect an LED without a current-limiting resistor then the output of the integrator is shorted at a couple of volts (the forward voltage rating of the LED).

Why are you driving the LED through a coupling capacitor that blocks DC?? Don't you want it to slowly dim and brighten when it is driven from the variable-DC triangle waveform?

The output of the LM324 integrator can drive a transistor emitter-follower that feeds an LED that has a series current-limiting resistor.
 

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
The LM324 opamp is low power so its minimum output sink current is only 10mA and if you connect an LED without a current-limiting resistor then the output of the integrator is shorted at a couple of volts (the forward voltage rating of the LED).

Why are you driving the LED through a coupling capacitor that blocks DC?? Don't you want it to slowly dim and brighten when it is driven from the variable-DC triangle waveform?

The output of the LM324 integrator can drive a transistor emitter-follower that feeds an LED that has a series current-limiting resistor.
Yes I want it to slowly dim and brighten. The led is only a visual test to make sure the varying waveform is working. However, the problem is, the led fades, but never completely extinguishes. I thought this was due to the vertical offset and I was attempting to use a capacitor to bring the offset down so that the waveform could go to zero.

However, when I use a cap, the led pulses, but the pulses get dimmer and dimmer until you can't see them anymore.
 

Wendy

Joined Mar 24, 2008
23,429
The Schmitt Trigger set points can not go rail to rail, it wouldn't be a Schmitt Trigger if it did. The Schmitt Triggers set points define what the peak to peak amplitude is, which is what you are fighting.

The LED forward dropping voltage also defines a minimum voltage for the low set point.

One other thing, you are likely trying to drive the LEDs directly from the op amp. While you can do this the op amps are linear devices, they aren't meant to have much drive, only to linearly respond to voltages. You probably need a driver similar to this to get the results you are looking for.



The LED will follow the wave form in, while loading it only 1/100 as much. Plus, the BE drop of the transistor will lower the LED brightness at the bottom of the triangle wave.

A 555 is very predictable (one reason it is so popular). Its set points are always 1/3 and 2/3 the power supply voltage. This predictability for the Schmitt Trigger is a major asset, which you have lost by making an op amp Schmitt Trigger. Everything affects the op amp version, including (but not limited to) how close to rail to rail the op amp output gets. Since an op amp is a linear device, this is very unpredictable. It works, it demonstrates theory, but more than that is not really practical.

If you just want to have a LED throb you could use the circuit shown below. It works well and has been verified, it is driven by a RC sawtooth (almost a triangle wave). I am under the impression this is not your goal, which makes makes completely extinguishing an LED pretty off your goals. You could always build a variable gain amplifier if all else fails. In general it is a bad idea to add requirements that don't have anything to do with your goals.



If you look close you will see a similarity between the CMOS driver (first picture) and this schematic.

The RC component affects frequency (ie, speed), but not the amplitude. Again, this is a function of the Schmitt Trigger set points.
 
Last edited:

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
I think I mentioned it before, but I'm trying to build a low frequency oscillator for a simple guitar phaser circuit. I was only using the led for a visual aid. I was under the impression that the LFO output needed to sweep between 0V and +V in order to be effective in the phaser circuit. I can post my entire phaser schematic in order to show the context of the oscillator if it would be helpful. As of right now, I have my LFO hooked to the rest of my phaser circuit and I can get the guitar signal all the way through the circuit. The only problem is, there is no audible difference in the sound when it comes out of the amp. It doesn't sound as if the circuit has affected it at all. I have a feeling the problem lies with the LFO and that it is not providing an effective voltage sweep in order to produce the changes in phase.
 

Wendy

Joined Mar 24, 2008
23,429
If you read my posts you will see I have answered your questions. Since you have been ignoring everything I have to say since the second page I am done. A little acknowledgment is always nice.
 

Audioguru

Joined Dec 20, 2007
11,248
when I use a cap, the led pulses, but the pulses get dimmer and dimmer until you can't see them anymore.
Of course, because the LED is a diode rectifier which charges the coupling capacitor until it does not have enough voltage anymore to make the LED bright. Get rid of the output coupling capacitor because you want the LED to be driven with the varying DC triangle waveform.

the problem is, the led fades, but never completely extinguishes.
I used simple Ohm's Law to calculate the peak voltages of the triangle waveform. Its minimum voltage is 3.25V which is too high to turn off most LEDs (maybe a blue or white LED will turn off).

The average voltage of the triangle waveform can be reduced if you add an output emitter-follower transistor to drive the LED that has a series current-limiting resistor. Or, vary the ratio of the 10k voltage divider resistors that make VD. If VD is 2.8V then a red LED will dim to zero and brighten.
 

Attachments

Last edited:

Audioguru

Joined Dec 20, 2007
11,248
I think I mentioned it before, but I'm trying to build a low frequency oscillator for a simple guitar phaser circuit. I was only using the led for a visual aid. I was under the impression that the LFO output needed to sweep between 0V and +V in order to be effective in the phaser circuit.
If you decrease the VD voltage and increase the value of the 3.9k resistor then the 3.25V to 6.24V triangle waveform can go from 0.05V to 7.7V.

Post your phaser circuit for us to see how many volts the triangle waveform must be. Does the phaser work if you feed it a variable DC from a potentiometer?
 
Status
Not open for further replies.
Top