Convert 555 square wave to triangle wave

Status
Not open for further replies.

boylesg

Advanced Member level 4
Joined
Jul 15, 2012
Messages
1,023
Helped
5
Reputation
10
Reaction score
6
Trophy points
1,318
Location
Epping, Victoria, Australia
Activity points
11,697
I have a 555 setup as extended duty cycle / 60kHz.

How would you go about passing the output of this through an opamp interrogator to convert it to a triangle wave.

In multisim it seem to produce a very small amplitude triangle wave where I would have expected an amplitude close to that of the 555 output.

I used this circuit for the interrogator

**broken link removed**

where A = C358C, Rin = 8.2k and C = 330nF

I am then passing the triangle wave and a sine wave (representing an audio signal) into a comparator (LM393) in order to get a PWM representation of the audio signal.

In multsim all I get out is a regular square wave and on my breadboard there is no audio output out of the speaker.

Does anyone know of any websites that explain how to do this properly as I have not had much luck.
 

If you're happy with a "triangular-ish" waveform, the 555 already has one conveniently available for you on pin 7!

The charge/discharge voltage of the timing capacitor oscillates with an RC rise/fall characteristic [consistently] between 1/3 Vcc and 2/3 Vcc. The waveform looks better than you'd expect (i.e. more triangular and less exponential) by virtue of its amplitude being constrained - I suspect it'd be sufficiently 'linear' for your PWM generation application.

Worth a peek before adding extra circuitry
 
Last edited:

So it does - a saw tooth waveform.

After a bit of playing around I have found that the 555 generates a perfect triangle wave rather than a square wave, from pin 3, at higher frequencies (above 300kHz or so). According to multisim anyway. Does that sound right to you?

It would be interesting to see what PWM sound quality I get with a my 555 going off at 480kHz.

It is a much simpler circuit too.
 

Hmm... a triangular output from pin 3 sounds fishy since the output of the 555 is a totem-pole (i.e. actively pulled up/down) with low output impedance (as it can sink source 200 mA, so the [Texas Instruments] datasheet at https://www.ti.com/lit/gpn/lm555 tells me).

While the (nominally square) output waveform will certainly have finite rise/fall times, it's shown on page 4 of the linked datasheet as ~100ns, so I wouldn't expect the output to look triangular until a frequency of a few MHz which is getting a little fast for the 555. Page 11 illustrates an application idea which replaces the timing resistor(s) with a constant current source to achieve a (truly) linear sawtooth capacitor voltage - something like that would probably be a better approach.

I never cease to be amazed at just how useful the old 555 can be!
 

but I can't try it until I get a 2.7V zener.
Of course you can, use a resistor voltage divider to 2.7V for the time being.
 

Of course you can, use a resistor voltage divider to 2.7V for the time being.

I did do exactly that but there was no measurable frequency according to my multimeter.
Unless multimeters struggle to detect triangle waves?
 

O.K., the circuit won't necessarily work over the claimed supply voltage range.
 

I had pulled out a couple of wires which was why my multimeter was not detecting any frequency.

But I think I have cracked it. This circuit works nicely on my breadboard with excellent sound quality.

I adjusted R2 to give me about 200kHz and adjusted the other R2 to give me 2.7V on the base of the BC558.

Nice and simple. I will use this to audio modulate my ss tesla coil.




But either the formula (f = (Vcc-2.7)/(R*C*Vpp)) on this page https://www.circuitstoday.com/saw-tooth-wave-generator-using-ne555 is wrong or I have made the wrong assumption about the units perhaps.

I have assumed that the units are Hz, ohms and Farads. My spreadsheet calculator is way off.
 

O.K., the circuit won't necessarily work over the claimed supply voltage range.

It seems to work well at 12V on my bread board. I wired it up as per the multim screen shot and got excellent sound quality from my 8R speaker.

Can you help me out with this formula though. I want to put it my spreadsheet calculator but it is not coming close to calculating the correct frequency that I measured with my multimeter.

So this is the formula the author quoted: f = (Vcc-2.7)/(R*C*Vpp

And this is the formula in my spread sheet =((A98 - E98)/((B98*1000)*(C98/1000000000)*F98))/1000

Column A is Vcc, column E is the zener voltage, column B is R (in kΩ), column C is the value of C (in nF) and column F is Vpp (=Vcc in this case)
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…