Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Triangular Wave Guidance

Status
Not open for further replies.
In post #47 you had the follower in the correct loaction, but you were getting oscillations which I think were caused by the U3A/U4A loop with 1uF capacitor. You need a follower to prevent U5A from loading the output of U3A, but you also need to solve the oscillation issue. You'll have to do a stability analysis of the curcuit, particularly U3A and U4A to understand the source of the oscillations. I can't do that right now for you, maybe someone else has more time.
 
In post #47 you had the follower in the correct loaction, but you were getting oscillations which I think were caused by the U3A/U4A loop with 1uF capacitor. You need a follower to prevent U5A from loading the output of U3A, but you also need to solve the oscillation issue. You'll have to do a stability analysis of the curcuit, particularly U3A and U4A to understand the source of the oscillations. I can't do that right now for you, maybe someone else has more time.

Okay. I really appreciate your help through all of this! Thank you very much!

JP
 
The key to preventing oscillation is to kill the loop gain at the frequency of oscillation, while not affecting the signal you want to observe. That's why you need a stability analysis. You'll use reactive components to attenuate the gain to less than unity. You can try out different capacitors and see if you can get someting to work. You're circuit is inherantly unstable however, and you might need to being that to the attention of whomever is specifying it. Anyway, good luck.

PS, you might want to start another thread asking about stability. Some members might complain, but it seems that nobody else is interested in reading 7 pages to respond to this thread.
 
Last edited:
The key to preventing oscillation is to kill the loop gain at the frequency of oscillation, while not affecting the signal you want to observe. That's why you need a stability analysis. You'll use reactive components to attenuate the gain to less than unity. You can try out different capacitors and see if you can get someting to work. You're circuit is inherantly unstable however, and you might need to being that to the attention of whomever is specifying it. Anyway, good luck.

PS, you might want to start another thread asking about stability. Some members might complain, but it seems that nobody else is interested in reading 7 pages to respond to this thread.

haha good point. I really appreciate you sticking it out with me, though!

Oh, and if you're curious, I went in and got a bit of help from a prof, but a couple things are still unclear. He told me to put a series resistor and parallel capacitor/resistor as feedback on U3A. He also told me to just take out the transimpedance amplifier as it was redundant. So we came up with this circuit, (I organized it so it's easier to understand what's going on):

**broken link removed**

and here are the following transient traces that came about:

**broken link removed**

He told me to pick a relatively low value for the series resistor Rfb1 and a high value for Rfb2. He said something about having the integration time on the capacitor Cfb to be at least 3 times longer than the delay from the feedback loop and also to have the delay to be at least three times faster than the triangular signal frequency (500 mHz), for the system to operate properly.

I am not 100% on his guidelines, I will have to confirm tomorrow, but do you have any idea on what he is talking about? I basically want V(reference) to be the same magnitude as V(tri) but 180 degrees out of phase. V(counter) can do as it pleases and I have now tied V(working) to a bias source, virtual ground in this case.

I tediously worked out the Laplace frequency response in terms of variables for the U3A feedback network, but I don't even know where to start for using limitations for giving Rfb1, Rfb2, and Cfb values.

I guess my restrictions are:

- V(reference) = -V(tri)
- Rcounter and Rworking both range between ~10k to 50k and V(reference) should retain its form while in this range
- Ccounter and Cworking both range between ~1uF to 10uF and " "


Sorry to harp on this topic still, but the game has changed now that the circuit has been modified for the better, I think.

Cheers,
JP
 
Last edited:
Taking the load off U3A makes things much better. The last amp in the line did seem redundant. No, I don't really know what he's talking about. What I would have done is a bode plot of all the components in the feedback loop and made a composite bode plot of the resultant frequency plot from them. I suspect the prof has done this and is just using relative valules he has determined will work.
 
Hello everyone. I have the same problem. I need to biuld triangle wave generator( range from 0 to 5 volts). I used this curcuit and many others, but i can't get triangle wave with good ramps. Another problem, that i have no LT1800( 1801,1802...) in my OrCAD. So, if somebody knows how to make circuit for triangle wave in PSpice, please help me.
Circuit with IC 555 don't give triangle wave( it's more swatooth), i found many circuits in internet but it doesn't work in PSpice( can't get triangle wave in the end)
 
I need to biuld triangle wave generator( range from 0 to 5 volts). I used this curcuit and many others, but i can't get triangle wave with good ramps. Another problem, that i have no LT1800( 1801,1802...) in my OrCAD. So, if somebody knows how to make circuit for triangle wave in PSpice
What frequency?
So what op amps do you have available that you want to use?
 
10-20 kHz, any op amps .
Below is the LTspice simulation of a triangle-wave generator that uses an LM339/393 comparator package to perform both the integrator and the comparator function.
That avoids having to using a high frequency op amp to get sharp corners on the triangle wave and a fast rise-time on the square-wave output..

upload_2017-3-18_19-43-50.png
 

Attachments

  • Triangle Gen LM339.asc
    3 KB · Views: 94
Last edited:
Below is the LTspice simulation of a triangle-wave generator that uses an LM339/393 comparator package to perform both the integrator and the comparator function.
That avoids having to using a high frequency op amp to get sharp corners on the triangle wave and a fast rise-time on the square-wave output..

View attachment 105034
Thank for your help, but after few days in OrCAD( i must use this software) i couldn't get triangle signal with your circuit. I have just line
 
Thank for your help, but after few days in OrCAD( i must use this software) i couldn't get triangle signal with your circuit. I have just line

Post your schematic.

Are you doing anything to initialize the nodes in the circuit?

Note that Zapper used the "startup" directive in his simulation. That helps oscillators start oscillating.

Try using an "initial condition" on one of the feedback nodes to displace it from the initial voltage found by the "DC bias solution" of the Spice simulator before it begins the time-based part of the simulation. Often, with oscillators, you have to introduce a bit of "noise" into the feed back loop of an oscillator to get it to start. Noise is present in real circuits; Spice is noiseless unless told otherwise.

For example: Here is the oscillator. If I just "simulate" it, then all you get is flat lines = 0V for V(x), V(y), and V(z): (that is a stable condition found by the DC bias solution before the transient simulation begins; it is like a perfectly balanced child's teeter-totter. Google "metastability")

36.png



If I introduce even 1uV of "noise" at node V(z) by using the Spice directive .IC V(z)=1u, then the oscillator starts, and you get the expected waveforms... (that is like displacing the child's teeter-toter just a bit, and it over-centers and one end touches the ground)

36a.png


Also note that (my) R4 must be > R3 for it to oscillate.
 
Last edited:
It is just sitting there in that balanced state where there is a bit of numerical "noise", but not enough to start the "oscillation". I see no evidence that you followed my advice and forced one of the nodes in the feedback path to a starting value away from what your simulation shows now.

That is easy to do in LTSpice using the .IC directive. You will have to find out how to do this in ORCAD.

RTFM
 
Last edited:
Add a pulse voltage source between U2A pin 2 and ground.
Set it to output one 0-1mv, 1ms pulse at the start of the simulation.
 
Did you intend C2 to be 0.1 FARADs ? That makes the R6C2 time constant 200 seconds, but your sim is running for only 200uS :rolleyes:.
 
Did you intend C2 to be 0.1 FARADs ? That makes the R6C2 time constant 200 seconds, but your sim is running for only 200uS :rolleyes:.

Good catch; likely won't fix the meta-stability problem though. You can see that his plot is periodic, returning back to zero. If it was going to take off toward oscillation, then the node he plotted would have been monotonic away from the initial value.
 
Last edited:
It is just sitting there in that balanced state where there is a bit of numerical "noise", but not enough to start the "oscillation". I see no evidence that you followed my advice and forced one of the nodes in the feedback path to a starting value away from what your simulation shows now.

That is easy to do in LTSpice using the .IC directive. You will have to find out how to do this in ORCAD.

RTFM

Did you mean this?
 

Attachments

  • 3.png
    3.png
    20.1 KB · Views: 122
  • 4.png
    4.png
    13.2 KB · Views: 118
You fixed the capacitor value, but as I predicted, it is still not oscillating. Looks like you did not "Read The Flipping Manual" to determine how to add the .Initial Conditions directive as I asked you to...

Here is a way to accomplish the start-up by including a pulse voltage source V1 in the feedback loop. Note that for the first 3ms, the pulsed source V1 makes a voltage of 1uV, and then at 3ms, it turns off to 0V thereafter; (see V(z)-V(w) in the lower plot pane). The little -1uV step at 3ms is enough to "kick" the oscillator into starting. Note that V(z), V(y), and V(x) are flat-line prior to 3ms, and show the oscillator behavior after 3ms.

It is the dv/dt of V1 that begins the oscillation. A real circuit would easily have 1uV of noise at V(z) due to thermal effects, but the simulated circuit doesn't, so we have to add it artificially.

Good example of why ORCAD is a crap simulator. It tries to hide all of the capability (and complexity) of Spice from the user.

39.png
 
You fixed the capacitor value, but as I predicted, it is still not oscillating. Looks like you did not "Read The Flipping Manual" to determine how to add the .Initial Conditions directive as I asked you to...

Here is a way to accomplish the start-up by including a pulse voltage source V1 in the feedback loop. Note that for the first 3ms, the pulsed source V1 makes a voltage of 1uV, and then at 3ms, it turns off to 0V thereafter; (see V(z)-V(w) in the lower plot pane). The little -1uV step at 3ms is enough to "kick" the oscillator into starting. Note that V(z), V(y), and V(x) are flat-line prior to 3ms, and show the oscillator behavior after 3ms.

It is the dv/dt of V1 that begins the oscillation. A real circuit would easily have 1uV of noise at V(z) due to thermal effects, but the simulated circuit doesn't, so we have to add it artificially.

Good example of why ORCAD is a crap simulator. It tries to hide all of the capability (and complexity) of Spice from the user.

View attachment 105166

Hei, what OP you used in the circuit?
 
Hei, what OP you used in the circuit?
Do you mean "what simulator" I used? I use LTSpice, free download from Linear Technology (now becoming part of Analog Devices).
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top