Triangle wave generator?

Thread Starter

GiovaGiov

Joined Apr 3, 2015
30
@MikeML

When I open this file in LTspice i get the following error: 'Can't find definition of model "2N3370"', maybe because I don't have this element in my LTspice installation; can you provide me this file?

EDIT: No problem: I've found this model.

However:

And anyway: the previous version works as expected. So: why I need this new circuit? Can you explain me the difference?

EDIT2: Ok; I noticed that the 2nd version is able to "draw", in facts, a more linear triangle waveform. But there is a more simple way to better define the shape without implement these JFET? It's just curiosity.

Thank you.
 
Last edited:

Søren

Joined Sep 2, 2006
472
My mainly needs is to find a schematic that would me assure an excursion of the triangle wave between 0 and 15 volt, and would be nice if I can adjust this waveform between 200 and 1200 hz.
You can't go all the way to the rails, but if a range of ~18mV to ~14.99V would do, a 555 is an easy way to make a reasonably nice saw tooth waveform.
A rail-rail in- and output op-amp to buffer this waveform would be needed for any practical use of course.

If you really need 0..15V of sawtooth, easily adjustable from 200Hz to 1200Hz, DDS is the only viable way to go and it will still need a quite hyper op-amp (unless you can dig up an internally buffered low output impedance DDS).
I think it's a safe bet to say, that you won't find anything absolutely on par with your demands, so why not do as the rest of the world and up the supply 1..2V, making it an economically feasible project?

Perhaps tell us what you intend it for and we can advice further - oftentimes some people exaggerate their actual needs tremendously.
 

crutschow

Joined Mar 14, 2008
34,407
Below is the LTspice simulation of a dual rail-rail op amp circuit that will generate close to a 0V to 15V adjustable frequency, linear triangle-wave from a single 15V supply. It uses no 555 which is not well suited to generating a linear triangle wave.
It consists of a square-wave generated by a comparator circuit with hysteresis of 1/2 the rail-rail output driving an integrator to generate the triangle-wave.
Pot U3 adjusts the frequency.

Edit: C3 should be 10uF instead of 1uF.

Sawtooth Gen.gif
 

Attachments

Last edited:

Søren

Joined Sep 2, 2006
472
Below is the LTspice simulation of a dual rail-rail op amp circuit that will generate close to a 0V to 15V adjustable frequency, linear triangle-wave from a single 15V supply.
Apart from the slight delay at top and bottom, it's quite fine, as long as you don't hit it with a serious real world load (like 500 Ohm). and that describes very well, why I advocate a bit more supply voltage, than what the output should be.

It uses no 555 which is not well suited to generating a linear triangle wave.
Arrrgh, I somehow got the impression that a saw tooth was asked for and the family calls for (and deserves :)) my attention, holiday considered, but perhaps I'll change it at a later time.
However, the 555 is a actually a very clever little oldie, especially when you have the imagination to really use it, so please don't put it down just because of a multitude of bad designs (this term may be a stretch though, as the majority is plain old copy-paste) using it is floating the net - have some respect for a senior circuit ;)


Blue trace is 5V/div, generated with a LM555N. Just like with your circuit, it gets a teeny bit ugly near the rails, but apart from that, linearity is A-OK!
 

Attachments

crutschow

Joined Mar 14, 2008
34,407
.....................
Blue trace is 5V/div, generated with a LM555N. Just like with your circuit, it gets a teeny bit ugly near the rails, but apart from that, linearity is A-OK!
Depends upon your definition of A-OK. :rolleyes: Unless you add circuitry to linearize it, the sawtooth from a 555 is actually part of an RC charging exponential curve.
 

Søren

Joined Sep 2, 2006
472
Depends upon your definition of A-OK. :rolleyes: Unless you add circuitry to linearize it, the sawtooth from a 555 is actually part of an RC charging exponential curve.
And your definition likewise ;)

I must admit, that I can't put a deviation percentage on the linearity, on neither your circuit nor mine, but disregarding the trouble of both near the rails, their linearity is well within my definition of A-OK - you may disagree if you like, but that would only fall back on your circuit as well of course.

Does it look exponential to you???
Does it look less linear than your circuit to you???


When did I ever say I didn't add circuitry?
To repeat myself...
[...] the 555 is a actually a very clever little oldie, especially when you have the imagination to really use it
Does that exclude other components in your book?
All 555 circuits in use are composed of more than the chip - circuitry selected to get it to do one or the other thing.
 

crutschow

Joined Mar 14, 2008
34,407
...................
Does it look exponential to you???
Does it look less linear than your circuit to you???

When did I ever say I didn't add circuitry?
You didn't and I didn't say you didn't.
........................
Does that exclude other components in your book?
Of course not. I didn't say that either. I was just trying to determine if you added extra circuitry to make the waveform more linear (such as adding a constant-current source to charge the timing capacitor).
.....................
"Look" is not how you determine linearity. You determine linearity by measurements along the waveform and calculating the deviation from an ideal straight line. How linear an RC charging waveform looks depends upon the display settings and the portion of the curve you have displayed.

My other answers are above in blue.
 

Alec_t

Joined Sep 17, 2013
14,312
Does the triangle wave really need to go as high as 15V? You would have a wider choice of components if you could manage with, say, 10V.
 

Søren

Joined Sep 2, 2006
472
"Look" is not how you determine linearity. You determine linearity by measurements along the waveform and calculating the deviation from an ideal straight line. How linear an RC charging waveform looks depends upon the display settings and the portion of the curve you have displayed.

My other answers are above in blue.
I've never mentioned RC charging and even a blind man can see that the waveform that I posted is CC charging, so I'll write off your repeated mentioning of RC charging as a slightly antagonistic way of being "right" (as I'm sure you know better).

I do know a wee bit about measurement techniques, but that doesn't mean that I calculate any random circuit I make (or I'd be tied to a voltmeter and a calculator) - I have a feeling that you didn't do the math on your circuit either ;) and while I can't speak for others, personally, I have no trouble eyeballing whether a waveform is, for the purpose of non-extremely-critical uses, to be considered linear enough.

You shouldn't pay that much attention to the linearity which is easy to obtain even for a first year student - try getting me on the ~o..15V range of the waveform instead and I'm sure you'll have a horde of fellow non-believers around to bash the poor 555 ;)
 

crutschow

Joined Mar 14, 2008
34,407
I've never mentioned RC charging and even a blind man can see that the waveform that I posted is CC charging, so I'll write off your repeated mentioning of RC charging as a slightly antagonistic way of being "right" (as I'm sure you know better).
.................
All I wanted to know was whether a constant current source had been added to the 555 circuit and now you have finally verified that, but only after several condescending comments from you. Eyeballing circuit design details from a waveform is not something I do (even though I'm not blind).
If you think that's being antagonistic, so be it. I'm not a curmudgeon for nothing. :rolleyes:
 
Last edited:

Thread Starter

GiovaGiov

Joined Apr 3, 2015
30
Since I see the LT1498 in the DigiKey list, so I repeated the sim with that part. Note I can increase the gain of the buffer amp a bit, and get pretty close to the rails.
View attachment 83392
Hi,
So I have decided for this circuit, which works very well! Thank you again :)
However, there is a way, adding some components to this circuit, to invert the output wave? I mean: obtain a triangular wave which can go from 0 to -15 volt.

Kind regards.
 

Søren

Joined Sep 2, 2006
472
However, there is a way, adding some components to this circuit, to invert the output wave? I mean: obtain a triangular wave which can go from 0 to -15 volt.
Just use the positive supply for your 0V reference and it will be - don't feed your other circuitry from the same supply then.

If that won't do, you need an inverter to generate a negative supply, but if you do, converting to eg. -20V will be doing yourself a favor.

Why do you need it negative?
I got a feeling that revealing exactly what you're trying to do (in as much details as possible), might provide for a better, perhaps entirely different, solution.
 
Top