Using a 555 timer to generate a triangle wave

Status
Not open for further replies.

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
It is very confusing for you to use a lousy old 741 opamp that needs a lot of changes to a simple circuit to make it work. The output of the 741 opamp does not go to a low enough voltage to turn off a red LED.
If you use an inexpensive and readily available LM358 or MC33172 dual opamp then they make an oscillator and an integrator that need only a single supply voltage. A transistor will not be needed.
Could I use a LM324 quad op amp instead? The only dual op amp that my local radio shack seemed to have was a TL082 Dual Bifet Op Amp.

Also, the more I read, the more it seems that the 555 is a big part of the problem since its output never really goes to zero.

Thanks again for all the help and patience. It's been frustrating trying to get this whole thing to work when it seems like it should be working.
 

tom66

Joined May 9, 2009
2,595
The resistor should be 1k to 10k.
The capacitor should be 100nF to 1µF.

If you put two diodes on the output of a 741 you will be able to turn off an LED. I recommended to use a 330 ohm resistor on the output of the 741 connected to an LED.

Remember to replace the ground with a virtual ground (i.e. 1/2 Vcc)

This should then work, though it might still have problems with the 555. You will have to tweak the resistor/capacitor combination.

Yes, you can use a LM324, and that has the advantage that the output can go to ground, so you can omit the diodes.
 

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
The resistor should be 1k to 10k.
The capacitor should be 100nF to 1µF.

If you put two diodes on the output of a 741 you will be able to turn off an LED. I recommended to use a 330 ohm resistor on the output of the 741 connected to an LED.

Remember to replace the ground with a virtual ground (i.e. 1/2 Vcc)

This should then work, though it might still have problems with the 555. You will have to tweak the resistor/capacitor combination.

Yes, you can use a LM324, and that has the advantage that the output can go to ground, so you can omit the diodes.

Thanks for the reply. Would I need to put the diodes in series?

And What exactly do you mean by the output can go to ground? Is this simply connecting the output to ground? If so, why can't you connect the 741's output straight to ground. I don't understand why you would even want the output to go to ground. Seems like you'd just be wasting whatever was coming out of the op amp.
 

Audioguru

Joined Dec 20, 2007
11,248
What exactly do you mean by the output can go to ground? Is this simply connecting the output to ground? If so, why can't you connect the 741's output straight to ground. I don't understand why you would even want the output to go to ground.
No. You do not connect the output to ground.
The output of a lousy old 741 opamp goes to about 2V above its negative supply which is 0V in your circuit. So it cannot turn off a 1.7V red LED unless it has a diode or two in series with the LED or a level-shifting transistor.
But the outputs of an LM358, LM324 and MC3317x can go to 0V in your circuit. Then the LED will completely turn off.
 

tom66

Joined May 9, 2009
2,595
A LM741 is an ancient chip (been around for 30+ years, I think), and it was always designed to operate on dual supplies. It is for this reason that it cannot go all the way to either supply rail, also due to its push-pull output stage.

The two diodes are in series with the LED. You can mix the order of any of the components in this chain. Basically it goes 1N4148(diode) -> 1N4148 -> LED -> resistor (330) or however you like. The diodes drop approximately 0.6V-0.7V, meaning the voltage the LED gets is far too low to turn it on when 2V is supplied.
 

Audioguru

Joined Dec 20, 2007
11,248
A LM741 is an ancient chip (been around for 30+ years, I think)
It is 42 or 43 years old.

it was always designed to operate on dual supplies.
Any opamp will work from a single polarity supply if its inputs are biased at half the supply voltage.

It is for this reason that it cannot go all the way to either supply rail, also due to its push-pull output stage.
No.
Its output transistors are darlington emitter-followers with a 1.4V to 3V drop.
Modern rail-to-rail opamps are Cmos with almost no voltage drop.
 

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
I think I'm gonna give the two op amp triangle generator another try using two of the op amps on a LM324 quad. Do I need to bias the input terminals that aren't used instead of tying them straight to ground?
 

Wendy

Joined Mar 24, 2008
23,429
Just tie them down somewhere, it can be ground or to the voltage divider. The main thing is don't leave them floating.
 

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
Well, I've had some success. I was able to put a two op am triangle generator on an oscilloscope today and it is generating triangle waves. There is a problem though. There seems to be a DC component that is producing a noticeable offset. Is there anyway to get rid of this? I tried adding a capacitor to the output like is explained in this article:
http://pcbheaven.com/circuitpages/Triangle_Wave_Generator/

but, it pretty much eliminated the triangle wave and made the output go to almost zero. I tried a few different capacitors but the result was the same.

Any ideas?
 

Audioguru

Joined Dec 20, 2007
11,248
You forgot to post your opamps triangle-wave generator schematic so we don't know if it uses a single supply or a dual-polarity supply. We don't know which opamp was used. We don't know if the input resistors have values so high that an offset voltage is created. The timing capacitor might be a single polarized electrolytic with a reverse voltage on half the triangle-wave which causes the capacitor to rectify.
 

Wendy

Joined Mar 24, 2008
23,429
I went to the link, I have a problem believing a 741 uses a single power supply voltage of 5V. 741 is rated for ±15V, I've used it with ±9V (two 9V batteries).

A LM358 or a LM324 are both rated for 3VDC for a minimum power supply spec. Have you tried either of these op amps?

The LM741 has no minimum power supply spec, that particular number is just blank. I interpret that to mean they have no idea what an individual part will work down too. The 1458 (an old dual op amp) is in the same boat. There are reasons the 741 isn't recommended much, it really has a lot of limitations, but this makes it a perfect teaching tool.

Radio Shack sells something called a TL082. It is a good part, but it can not take either input getting near the power supply values, either plus or minus. If this happens it does something called phase reversal, the input stops working in a unique way. The phase of the wave form flips. This op amp can only work in the middle of its range on the inputs. Good enough for a lot of circuits, but nothing that involves rail to rail on the inputs.
 

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
Ok, I've got a schematic here now. Like I've said, I'm trying to make this circuit into a low frequency oscillator for a phaser. I'd like to be able to sweep between about 0.5 Hz and 20 Hz. What component values should I select to accomplish this? Or, should the frequency range of the LFO be larger? Tell me what you think. Also, the formula that I included in my schematic can be found in this article:
http://www.play-hookey.com/analog/triangle_waveform_generator.html


Thanks
 

Attachments

Last edited:

Wendy

Joined Mar 24, 2008
23,429
I suspect your switch points defined by R2 and R1 are too high. Let me work the math. BRB, if someone doesn't beat me to it.

**********

OK, this op amp will not go rail to rail. That is, they won't reach the power supply voltage, so this limits my math.

Assuming the output of the first op amp goes rail to rail, the two switch point are 2.7V and 6.3, but this is a bogus number.

Lets assume the op amps go between 8V and 1V out. This puts the switch points to 3.7 to 5.87. Hmmm, a perfectly good theory busted.

Anyhow, you might try decreasing R1, with will narrow the hysteresis point down a bit. What are the two output voltages of the first op amp for a high and a low? This number is op amp dependent.
 
Last edited:

Audioguru

Joined Dec 20, 2007
11,248
The output of an LM324 can get closer to ground than to the positive supply so you should reduce the "half the supply voltage" bias to about 4.0V instead of 4.5V.

It is a low power opamp so it does not have much output current when its ouput is low.
Typically not much current more than 10mA.
 

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
The output of an LM324 can get closer to ground than to the positive supply so you should reduce the "half the supply voltage" bias to about 4.0V instead of 4.5V.

It is a low power opamp so it does not have much output current when its ouput is low.
Typically not much current more than 10mA.
Have any idea what would be causing the offset of the waveform? There is a pretty noticeable vertical offset just like is pictured in the first article I linked.
 

Audioguru

Joined Dec 20, 2007
11,248
Have any idea what would be causing the offset of the waveform? There is a pretty noticeable vertical offset just like is pictured in the first article I linked.
You have a single-polarity power supply. If it is 10V then the average of the triangle-waveform is at 5V so that the output can swing up 3V and swing down 3V.
If you use a dual-polarity power supply then the average of the triangle-waveform is at 0V.

If you use an output coupling capacitor as shown in the article and calculate its value to have a low loss at the lowest frequency you need then its output will have an average of 0V. It might be a 100uf electrolytic and its + terminal connects to the output of the integrator opamp.

The opamp does not have enough output current to drive a speaker. It can drive a power amplifier that feeds a speaker.
 

Thread Starter

GatorCpE

Joined Jul 14, 2010
29
You have a single-polarity power supply. If it is 10V then the average of the triangle-waveform is at 5V so that the output can swing up 3V and swing down 3V.
If you use a dual-polarity power supply then the average of the triangle-waveform is at 0V.

If you use an output coupling capacitor as shown in the article and calculate its value to have a low loss at the lowest frequency you need then its output will have an average of 0V. It might be a 100uf electrolytic and its + terminal connects to the output of the integrator opamp.

The opamp does not have enough output current to drive a speaker. It can drive a power amplifier that feeds a speaker.

I thought that the LM324 Quad only accepted single polarity power supplies. On the pinout diagram, it only shows connections for Vcc and Gnd. I don't see one for Vcc-. Also, you said I could calculate the value of the output capacitor. How can I do that? Is there a formula?

Thanks
 

Audioguru

Joined Dec 20, 2007
11,248
Any opamp works from a single-polarity supply if its inputs are biased at half the supply voltage and the input, output and feedback resistor to ground have coupling capacitors. The negative supply pin connects to ground.

The LM324 works from a dual-polarity supply when its GND pin is connected to the negative supply. Its inputs can be biased at ground or at the negative supply pin.

The value of a coupling capacitor is calculated at the lowest frequency you use and the value of its load resistance. The formula is: 1 divided by (2 x pi x R x f). R is in ohms, f is in Hz and C is in Farads.
The calculation answer gives the output at that frequency that is -3db which is a level that is 0.707 times the level at much higher frequencies.
 
Status
Not open for further replies.
Top