Maker Pro
Maker Pro

Simple but precise ramp/triangle generator

T

Tilmann Reh

Fred said:
Sounds like a 555 application to me-

You're so right. :)

In the meantime I think I found the simplest solution:
The (CMOS) 555 in its basic astable circuit, however the discharge
pin is connected to the cap by a schottky diode - so the voltage
at the cap will not fall below about 0.2 V.
Charging is done by BJT current source, or eventually with a
resistor connected to a larger voltage available.
Supply is 12 V, but the control voltage (Pin 5) is drawn to a low
impedance 4.8 V potential which I can easily make from the 5 V
supply with two resistors.

The voltage at the cap is a nice ramp from 0.2 to 4.8 volts, and
tolerances should not make it vary too much. A connected comparator
safely outputs 0 to 100% PWM for 0..5 V input voltage (with some
margin at both ends, as intended).

(I didn't look deeper at the 555 before since the tolerances of
the internal control voltage divider seemed to high for this
application. However, since the upper treshold can be set by
external voltage and the internal circuitry is slow enough to
completey discharge the cap, this really is the solution.)

Anyway, thanks to all for your comments.
 
J

Joerg

Hi Jeff,
Add some ROM with the address driven by the counter and DAC on the data
lines (cheap R 2R ladder in my case), and you can generate any waveform you
want! Did that once before using a AVR to replace a lot of stuff.
That's how I did a function generator once. I was almost too embarrassed
to show the schematics to anyone. It was dirt cheap though and never
needed alignment.

Regards, Joerg
 
J

Joerg

Hi Tilmann,
Maybe I can delay the comparator output after discharging by a small
cap (with an open collector output, that should work) to make sure
the integrating cap gets completely discharged. Will have to try
that...
If you use a FET such as a BSS123 for the discharge then a series
resistor with a diode across towards the gate plus a cap from gate to
ground would do it. The diode would make sure it turns on fast. But
don't exceed the load on the comparator output or you'd need another R
in series with the diode. The BSS123 goes below 10 Ohms so it'll
discharge a timing cap pretty quickly. Done that many times.

Regards, Joerg
 
G

Genome

Tilmann Reh said:
Hello,

I am looking for a simple but reasonably precise ramp (sawtooth)
or triangle generator. It is intended as part of a PWM circuit that
must output constantly OFF for low input voltages and constantly
ON for an input voltage of 5 V.

Dipl.-Ing. Tilmann Reh
Autometer GmbH Siegen - Elektronik nach Maß.
http://www.autometer.de

Have a look at the discrete version in ABSE.

DNA
 
R

Rich Grise

I'd use a BJT current source and a capacitor and a comparator for a
50kHz sawtooth. The amplitude can be nice and stable, and I assume for
this application you don't care if the frequency varies a bit, so a
ceramic cap would work.
Just a nitpick, but does a ceramic cap actually vary, or is it just
that with their wide tolerance, your absolute freq. could be off
from design freq, which, of course would have some "variance" from
unit to unit.

Or is an individual ceramic cap really unstable? I know they're leaky,
and have crap TC, and +70-20 tolerances, but that's what makes them
good bypasses.[0] :)

Thanks,
Rich

[0] or, of course, decoupling caps, depending on the phase of the moon. ;-)
 
S

Spehro Pefhany

Just a nitpick, but does a ceramic cap actually vary, or is it just
that with their wide tolerance, your absolute freq. could be off
from design freq, which, of course would have some "variance" from
unit to unit.

Possibly both in this case. Economy of words, y'know.
Or is an individual ceramic cap really unstable? I know they're leaky,
and have crap TC, and +70-20 tolerances, but that's what makes them
good bypasses.[0] :)

The X7R type would probably be appropriate for this. NPO would be
pretty good stability wise depending on the value.
BTW, none of them are inherently leaky, despite their other dubious
chararacteristics.

Okay, let's say the charging current is a fairly robust 100uA, and the
sawtooth or triangle is 20usec long, with a 5V or 10V swing. Then the
cap is ~400pF, so an NPO would be ideal and it shouldn't vary much
either (though the simple-minded current source I had in mind would
vary noticably with temperature).
Thanks,
Rich

[0] or, of course, decoupling caps, depending on the phase of the moon. ;-)

Best regards,
Spehro Pefhany
 
K

Ken Smith

Hi Tilmann,
[...]
I'd use a BJT current source and a capacitor and a comparator for a
50kHz sawtooth. The amplitude can be nice and stable, and I assume for
this application you don't care if the frequency varies a bit, so a
ceramic cap would work.
Just a nitpick, but does a ceramic cap actually vary, or is it just
that with their wide tolerance, your absolute freq. could be off
from design freq, which, of course would have some "variance" from
unit to unit.

X7Rs are about 100 times worse than COG

COG -> 30PPM / C
X&R -> 15% from 0 C to 50C = 3000PPM
 
J

Joerg

Hi Rich,
Just a nitpick, but does a ceramic cap actually vary, or is it just
that with their wide tolerance, your absolute freq. could be off
from design freq, which, of course would have some "variance" from
unit to unit.
They have a high tolerance because except NPO they aren't meant for
frequency critical applications. The X7R market is bypassing and
coupling where capacitance doesn't matter much. So it's hard to get,
say, a 2% X7R cap. In NPO you can but that may turn into a nightmare for
the purchasing department unless they buy several years worth. It
wouldn't be the first time that a certain value is on back order and
nobody knows when you can get some again. Unless you can design
everything around 100pF, 1000pF and maybe 470pF.
Or is an individual ceramic cap really unstable? I know they're leaky,
and have crap TC, and +70-20 tolerances, but that's what makes them
good bypasses.[0] :)
As the other posters said, I also found drift to be an issue with
non-NPO ceramics.

Regards, Joerg
 
Top