Controlled triangle wave

Thread Starter

depropex

Joined Jul 28, 2013
11
Hi. Ive been trying to get triangle under my controll for current project im working on... :D but no succes yet :mad: im using this schematic :

http://www.indiabix.com/electronics-circuits/triangle-wave-generator/

and all i need is actually bistable flip flop circuit with best possible constant rising and falling signal, i mean like a triangle wave generator, just with option to let it turned on or off. As i turn on - voltage constantly rises as on the edge of the triangle, until it reaches max - then it stop rising and stills on actual level. When i turn input signal off ( not whole circuit !) it starts to fall constantly until zero (or close to zero)

I dont know if i expressed my self clear enough to be comprehended, but i hope so.

I just need triangle wave generator with option to stop the wave process on the top or the zero. Thx in advance for any help ;)
 
Last edited:

LDC3

Joined Apr 27, 2013
924
Yes it can.
R1 and C1 are chosen to give you the time to reach maximum voltage. I haven't simulated the circuit so I cannot tell you what values to use.
Also the gain of the amplifier is 20 times, but you can change that if you want. You probably don't want to have a gain less than 5 times since you will start to see the nonlinear charge/discharge of the RC network.
The input on the left is either Vcc (or ground) so the output is either increasing to max (or decreasing to 0).
 

Attachments

Thread Starter

depropex

Joined Jul 28, 2013
11
Thx for reply

heres my simulator im using for quick test, i tryied it but doesnt work... any idea where i messed up ? (notice - in this simulation are V supply ang GND not marked cause they are connected straight since you add OP AMP into schematic)

http://www.falstad.com/circuit/#$+1...1000000.0 o+16+64+0+34+20.0+9.765625E-5+0+-1

notice 2 - i remembered that in previous schematic i posted in first comment, when i remove the left one OP AMP, it works as i want it to, but there is visibly nonlinear charge / discharge.

I think it would be perfect if output of the single OP AMP of this schematic im describing, would lead into another OP AMP that would make the dis/charg make linear.

but thats just my estimate and i tryied to do it... no way, i still have a lot to learn , no idea how to connect OP AMP... :(
 

Thread Starter

depropex

Joined Jul 28, 2013
11
well - i messed up :D i forgor to put the gnd on the input signal when off.

But, as i expected, it works but there is formidable unlinearity. How do i put another OP AMP to amplify output of this AMP ?
 

LDC3

Joined Apr 27, 2013
924
Thx for reply

heres my simulator im using for quick test, i tryied it but doesnt work... any idea where i messed up ? (notice - in this simulation are V supply ang GND not marked cause they are connected straight since you add OP AMP into schematic)

http://www.falstad.com/circuit/#$+1...1000000.0 o+16+64+0+34+20.0+9.765625E-5+0+-1

notice 2 - i remembered that in previous schematic i posted in first comment, when i remove the left one OP AMP, it works as i want it to, but there is visibly nonlinear charge / discharge.

I think it would be perfect if output of the single OP AMP of this schematic im describing, would lead into another OP AMP that would make the dis/charg make linear.

but thats just my estimate and i tryied to do it... no way, i still have a lot to learn , no idea how to connect OP AMP... :(
The switch needs to go to 0V, not floating.
 

LDC3

Joined Apr 27, 2013
924
well - i messed up :D i forgor to put the gnd on the input signal when off.

But, as i expected, it works but there is formidable unlinearity. How do i put another OP AMP to amplify output of this AMP ?
Actually, you don't need to. Increase the resistance or capacitance to get a longer time constant.
 

LDC3

Joined Apr 27, 2013
924
You're right. The circuit I gave you has some problems. If you change the feedback resistor from 20K to 5K, you get closer to what I expected, but the decay is non-linear.

Let me think about merging the 2 circuits.
 

Ron H

Joined Apr 14, 2005
7,063
Hi. Ive been trying to get triangle under my controll for current project im working on... :D but no succes yet :mad: im using this schematic :

http://www.indiabix.com/electronics-circuits/triangle-wave-generator/

and all i need is actually bistable flip flop circuit with best possible constant rising and falling signal, i mean like a triangle wave generator, just with option to let it turned on or off. As i turn on - voltage constantly rises as on the edge of the triangle, until it reaches max - then it stop rising and stills on actual level. When i turn input signal off ( not whole circuit !) it starts to fall constantly until zero (or close to zero)

I dont know if i expressed my self clear enough to be comprehended, but i hope so.

I just need triangle wave generator with option to stop the wave process on the top or the zero. Thx in advance for any help ;)
Draw the waveforms you want and post them here.
 

LDC3

Joined Apr 27, 2013
924
This circuit can be modified for what you want. If you replace the first op-amp network with your on-off control. The output of the second op-amp may need to be amplified (2 to 4 times) to get rail to rail wave forms that are nearly linear.
 

Ron H

Joined Apr 14, 2005
7,063
This circuit can be modified for what you want. If you replace the first op-amp network with your on-off control. The output of the second op-amp may need to be amplified (2 to 4 times) to get rail to rail wave forms that are nearly linear.
Driving an op amp into saturation (if that is what you are suggesting) is not the ideal way to achieve limiting.
I still want to see the waveforms he is wanting to create. It sounds like he wants a slew rate limiter, but he said he wants the
option to stop the wave process on the top or the zero.
We also need to know frequency, voltage range, etc.
 

t_n_k

Joined Mar 6, 2009
5,455
One of the problems you may encounter with an analog solution is stabilizing the output at the hold condition . Amplifier bias currents flowing into or out of a capacitor will possibly require some compensation.

You could consider a partial digital solution with an up/down counter driving a D-to-A converter. You could stop the counter at any point and have a time stable output which would only change once the counter is re-enabled.

The problem with the latter would be a substantial increase in complexity & cost. Better ramp resolution would require more counter bits.

In the end you need a clear specification of your requirements - something that has been missing so far.
 

Thread Starter

depropex

Joined Jul 28, 2013
11
Ron H : LDC3 made exactly what i needed. I know how to deal with voltage and frequency, i just needed this "kick"

Thank you LDC3 - just one more step to make it perfect. I better describe my application and purpose of the circuit to make all clear. I need to drive servo with two buttons, each one for one way. If i press button one, i need servo to slowly (best option if i can regulate the speed with POT) move to right. When i hit button two, servo moves slowly to left. I have build 555 circuit for driving and all around it , so all i need is just something like this - i think you see the dependence. Also , for constant movement speed i need the best possible linearity.

Maybe there is some easier way to do what i want and maybe im expresing like an idiot (most like) but i hope there is someone understanding such a lost soul like me :D

So the last problem with this circuit that LDC3 provided - how do i make a negative potential ? Because, if i remember well, negative outputs of bateries and DC power suppliers are considered as a zero or the GND ... right ? so there comes the question, how to deal with that or how to make a negative voltage ... ? :(
 

WBahn

Joined Mar 31, 2012
30,055
You still need to flesh out your requirements more.

For instance, what should happen when the button is released? Should the servo stop, or should it keep going?

What should happen if the other button is pressed before the servo makes it all the way to the end? Should it immediately reverse direction? Should it continue to the end and then immediately reverse? Should it ignore buttons while it is in motion altogether?

Doing any of these is pretty straight forward, but they are all different.

If you use an op-amp integrator you can get a nice, linear ramp rate with an adjustable slew rate. You can even make the slew rate in each direction independently controllable.

You can also use an adjustable limiter to limit both ends of the excursion and hold the integrator state such that it is ready to start ramping in the other direction right away.
 

Thread Starter

depropex

Joined Jul 28, 2013
11
no, there should be flip flop as a switch, just press button for shor time and servo will move till the end of trace.

absolutely doesnt matter if pressing button two when one have been pressed recently, stops or does nothing, or go another way... all theese options are acceptable.

i know how to regulate the speed ant all what i need, i just dont know how to solve this "negative potential" problem.
 

Thread Starter

depropex

Joined Jul 28, 2013
11
Hi, its me again, as im inventing and bringing it to real, i found something worthy of asking, so here it is : i simulated it and it doesnt make any remarkable change ( at least i didnt notice anything ) if i connect the circled pin to GND or pwr supply , or if i just let it not connected. Im not sure that i fully comprehended op apms but if i did, that pin is just non inverting input so if i use the one input (in this case the negative one), another one might be left so ?

:confused:
 

Attachments

Top