Slow triangle wave

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
This is a continuation of a thread I started last year. But it's a little more focused so I think it's better to start a new thread.

I need a triangle wave with a cycle time of ~30 seconds. I've developed a simulation of a standard op-amp circuit that does a nice job. But it requires a 68µF capacitor for the integrator and I don't think I can use a polarized capacitor for that. Sticking to non-polarized capacitors – usually 1µF or below – I can't get anywhere near 30 seconds.

Is there some other way to do this? Could I use the 2nd op-amp on the dual IC to help somehow? If it matters, a little bit of clipping to make a trapezoid would be fine but it needs to be nearly a triangle.

I have a 555 as the input to this. If using the timing cap voltage on the 555 would help, that's an option

Screen Shot 2016-08-09 at 9.30.02 PM.png
Screen Shot 2016-08-09 at 9.41.41 PM.png
 

#12

Joined Nov 30, 2010
18,224
The way I see this is an op-amp square wave oscillator because the cap is connected to ground on one end. Then, either use an RC to make a capacitor charging slope or alternately turn on constant current generators to charge and discharge for a more linear ramp. A third way is to charge a capacitor to a small amount of the Vcc and Vee and get a pretty nice ramp from that, then amplify the ramp.
 

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
Well the last one is something I'm thinking of, amplifying the voltage on the 555's timing cap.

What this circuit is replacing is a big 1000µF cap in an RC tank. It works. Not only is it physically large, though, but when you go through too many RC intervals to get closer to the rails and get more time, it makes the wave shape not so much like a triangle. I'm looking for an alternative.
 

Sensacell

Joined Jun 19, 2012
3,432
30 seconds!
That's where leakage and drift start to kill you!

What does the triangle drive?
What are the accuracy requirements?
Begs for a DAC and a counter, or maybe a charge pump?
Both could be post-filtered to mitigate the voltage steps in between.
 

AnalogKid

Joined Aug 1, 2013
10,987
For a constant current charging ramp, ec=it. Starting with a 10 uF ceramic cap, and noting that a 30 second period means 15 seconds up and 15 seconds down,
9 V x 10 uF = i x 15 s
i = 9 uA
So, you need an opamp with input errors significantly less than 9 uA. I don't see any reason why the classic dual opamp integrator and comparator circuit can't do this, especially if you parallel 3 or 4 caps to get the charging current up. We use 10 uF 50 V ceramic caps in an SMT 1206 package in lots of circuits. Good part.
http://forum.allaboutcircuits.com/threads/triangle-wave-generator.86776/
http://www.tradeofic.com/Circuit/357-TRIANGLE_WAVE_OSCILLATOR.html

ak
 

KL7AJ

Joined Nov 4, 2008
2,229
The way I see this is an op-amp square wave oscillator because the cap is connected to ground on one end. Then, either use an RC to make a capacitor charging slope or alternately turn on constant current generators to charge and discharge for a more linear ramp. A third way is to charge a capacitor to a small amount of the Vcc and Vee and get a pretty nice ramp from that, then amplify the ramp.
My Wavetek function generator has no problems generating a perfect triangle wave at .004 Hz. These are selling dirt cheap on Ebay these days. I picked mine up at a local auction for under $100...best investment I've made in a long time.
 

crutschow

Joined Mar 14, 2008
34,285
Below is the LTspice simulation of a relaxation oscillator triangle-wave generator that uses two switched, complementary current mirrors to charge and discharge a grounded capacitance, giving a low distortion triangle wave.
Grounding the capacitor means you can use a large polarized capacitor to get the long time constants needed for a 30s period without requiring extreme resistance values.
The op amps are in a quad package with RR input and output to give an output amplitude close to the rails.
U1 acts as a comparator with a large hysteresis, U2 act as a comparator to invert the signal, and U3 is a buffer-follower for the triangle output.
Note that the selected op amp has a maximum supply voltage of 5.5V.

upload_2016-8-10_0-42-39.png
 

Attachments

Last edited:

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
This is what I'm leaning towards today.
The input, far left, is the voltage on a 555's timing cap. This is applied to the non-inverting pin of U6 used as a voltage follower, and then amplified ~3X by the second op-amp, U7.
Screen Shot 2016-08-10 at 11.04.38 AM.png
Screen Shot 2016-08-10 at 11.09.21 AM.png
 

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
What does the triangle drive?
The control pin of a 2nd 555 timer.
What are the accuracy requirements?
Low. It just needs to resemble a triangle
Begs for a DAC and a counter, or maybe a charge pump?
Too complex. I'm replacing an RC tank that uses a 1000µF capacitor. I want the solution to be smaller with minimal complexity.

My current solution shown above uses one IC and 5 resistors (one not shown, between the 555 and the first op-amp), which is not bad.
 

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
I wish the component count were lower, but the result is great. It uses about the same footprint as a big capacitor but has a lower profile and works a lot better.
 

Veracohr

Joined Jan 3, 2011
772
I found a 33uF bipolar electrolytic for my own current project, and it's not excessively expensive or anything. IIRC, it's made by Nichion and is series UWP, and may even have a higher capacitance in the series. The 33uF is available at Mouser.
 

RichardO

Joined May 4, 2013
2,270
@wayneh If you feel this is a hijack then spin it off to another thread...

I know this is a little late to the fray but maybe someone will find to be useful or at least serve as food for thought.

This scheme uses mostly digital circuits to generate a low frequency. I uses no large timeing caps. Analog is dead. :D


The basic idea is to generate two frequencies very close together and then mix them to get the difference frequency.

Slow_tri_4060.png
The first circuit uses a CD4060B as an oscillator and reference frequency. The second counter uses the same clock but has an extra clock pulse added every time the counter overflows. The extra clock is made by delaying the MSB of the counter going low, differentiating it and then OR'ing it into the reference clock.

The outputs of the counters are mixed together using an exclusive OR gate. This is roughly equivant to RF mixing. The resulting difference frequency is low pass filtered to get the desired low frequency triangle wave.

There are a some problems with the circuit.
First, It takes a lot of discrete parts (resistorss, capacitors and diode) to create the extra pulse.
Second, The values of the R's and C's must be tailored to match the clock frequency and their values are critical to proper operation.
Third, the extra pulse forces the counter to run at more than twice the speed than is needed the rest of the time.


The second circuit corrects the weaknesses of the first circuit.
Slow_tri_4060f.png
The modified clock is now made by using a pair of J-/K flip-flops in place of the R's and C's. This circuit is not frequency dependant.
The new circuit strips a clock pulse insteading of adding one so that the counter doesn't have wasted speed. This allows for a faster and/or smoother triangle wave.
A "left over" exclusive OR gate is used as an AND gate -- it works in this special case.


Some other notes:
Thanks to Alec_T I was able to simulate the circuit. :D
http://forum.allaboutcircuits.com/t...cd4060b-14-stage-binary-clock-counter.126574/

The simulation uses a CD4060B but a 74HC4060 would also work getting even faster, smoother triangle waves.

The clock frequency and output filter were somewhat arbitrarilly chosen just for simulation. Better values will need to be chosen for a specific triangle frequency.

The output will probably have to be buffered. An op-amp with rail-to-rail output would work best.

The circuit work in simulation but I have not done a rigorous analasys so there may be race conditions in the real world.

The simulations are done with a small frequency division by selecting the "Q5" outputs of the counters. This is to shorten the simulation time. In actual use, higher division Q outputs (probably Q12/Q13 or Q13/Q14) would be chosen.
 

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
More than I need, but interesting.

Ironic that you say "analog is dead" and proceed to simulate a sine wave, which is a distinctly analog feature. The stuff inside electrical black boxes may be digital, but us out here in the real world are still quite analog.
 

RichardO

Joined May 4, 2013
2,270
More than I need, but interesting.
I did not expect that you (or anyone) would actually build the circuit. I just had the idea and had to pass it on. :)

Ironic that you say "analog is dead" and proceed to simulate a sine wave, which is a distinctly analog feature. The stuff inside electrical black boxes may be digital, but us out here in the real world are still quite analog.
Triangle wave, actually. The simulation makes it look like a sine wave only because of the filtering. At larger clock frequency divisions the filter would not kill the peaks of the triangle because the clock frequency would be much higher than the triangle wave.

Yeah, but not a bit of analog until the last 2 parts (unless you count the oscillator components). :D

Here, here. Sooner or later there has to be input and output or the circuit doesn't do anything and might as well be in a welded shut, hermetically sealed box.

p.s. The entire circuit could be done using a 6-pin PIC microcontroller and the RC filter -- only 3 components. :rolleyes:
 

AnalogKid

Joined Aug 1, 2013
10,987
Yeah, but not a bit of analog until the last 2 parts (unless you count the oscillator components). :D
p.s. The entire circuit could be done using a 6-pin PIC microcontroller and the RC filter -- only 3 components. :rolleyes:
Except for the R-C delay, the R-C differentiator/pulse former, and that pesky R-C hysteretic oscillator.
p.s. 4 components - gotta decouple the PIC.

ak
 
Top