Is there some much better way to do this that I've overlooked?
To generate a staircase waveform, I have a circuit that uses a 74HC393
4-bit ripple counter,
followed by four resistances with values that are a sequence of powers
of two of the lowest resistance and form a simple D-to-A converter.
The other ends of the D-to-A's resistors are joined at the "-" input of
an opamp that is configured as an inverting summing amplifier. Power
to the counter is 5v. (Power to the opamp is + and- 17.5v.)
I noticed that when the 74HC393's outputs go from high to low, they get
down to something below 0.5v (from 5v) in less than 10 ns. BUT, to get
from there to their lowest value, they can take a relatively long time,
i.e. many milliseconds. And, of course, per the datasheet, they are
not guaranteed to even go all the way to zero. Something like 0.1v is
typical for VOL.
Naturally, this "problem" is most noticable when the counter's 4-bit
output switches from 15 to 0.
The resulting analog staircase waveform is meant to have 0v as the
bottom step. And every transition needs to be completed in less than 6
us. The clock rate can vary from 60 Hz to 22 kHz.
Simply using smaller resistances for the D-to-A did not come close to
making the end of the high-to-low transistions fast enough. And I want
to use resistances that are, within reason, as large as possible,
there, anyway, for other reasons. And, at any rate, using smaller
resistances would not help overcome the fact that the counter's outputs
don't really go all the way to 0v.
Spice was not much help with this, since it (the 74HC393 model I have,
anyway) doesn't model these effects for the 74HC393.
I came up with a few possible solutions (diode/resistor-based,
comparator-based or opamp-based, and diode-transistor-based) and
breadboarded them and found one that I decided to use. But I am
wondering if I have missed some obvious approach that might have a
lower parts count or take less PCB space. (It has to be all
through-hole, btw.)
The circuit that I finally settled on has several diodes in series with
each of the counter outputs, which then connect to a resistor to ground
and the base of an NPN transistor. That transistor's emitter is
connected to the base of a second NPN transistor. Both collectors are
connected to 5v. The second transistor's emitter is connected to one
of the D-to-A's resistors, and also to a smaller resistor to ground
that's paralleled by a small capacitor.
e.g. When using six 1N4148 in series from each counter output, to two
2N4401s (per above) with 50K from each base1 to gnd and approximately
50K || 18pF from each emitter2 to ground, x4, with four D-to-A
resistors of 250K, 500K, 1Meg, and 2Meg, the max output transition time
(from "15" to "0") is about 3.6 us.
So it works more-or-less OK, that way. But the 74HC393 counter
(14-DIP), (24) 1N4148s, (8) 2N4401s, and the D-to-A's resistors,
altogether, take about 3 square inches of PCB space.
Is there some much better way to do this that I've overlooked?
Thanks.
- Tom Gootee
To generate a staircase waveform, I have a circuit that uses a 74HC393
4-bit ripple counter,
followed by four resistances with values that are a sequence of powers
of two of the lowest resistance and form a simple D-to-A converter.
The other ends of the D-to-A's resistors are joined at the "-" input of
an opamp that is configured as an inverting summing amplifier. Power
to the counter is 5v. (Power to the opamp is + and- 17.5v.)
I noticed that when the 74HC393's outputs go from high to low, they get
down to something below 0.5v (from 5v) in less than 10 ns. BUT, to get
from there to their lowest value, they can take a relatively long time,
i.e. many milliseconds. And, of course, per the datasheet, they are
not guaranteed to even go all the way to zero. Something like 0.1v is
typical for VOL.
Naturally, this "problem" is most noticable when the counter's 4-bit
output switches from 15 to 0.
The resulting analog staircase waveform is meant to have 0v as the
bottom step. And every transition needs to be completed in less than 6
us. The clock rate can vary from 60 Hz to 22 kHz.
Simply using smaller resistances for the D-to-A did not come close to
making the end of the high-to-low transistions fast enough. And I want
to use resistances that are, within reason, as large as possible,
there, anyway, for other reasons. And, at any rate, using smaller
resistances would not help overcome the fact that the counter's outputs
don't really go all the way to 0v.
Spice was not much help with this, since it (the 74HC393 model I have,
anyway) doesn't model these effects for the 74HC393.
I came up with a few possible solutions (diode/resistor-based,
comparator-based or opamp-based, and diode-transistor-based) and
breadboarded them and found one that I decided to use. But I am
wondering if I have missed some obvious approach that might have a
lower parts count or take less PCB space. (It has to be all
through-hole, btw.)
The circuit that I finally settled on has several diodes in series with
each of the counter outputs, which then connect to a resistor to ground
and the base of an NPN transistor. That transistor's emitter is
connected to the base of a second NPN transistor. Both collectors are
connected to 5v. The second transistor's emitter is connected to one
of the D-to-A's resistors, and also to a smaller resistor to ground
that's paralleled by a small capacitor.
e.g. When using six 1N4148 in series from each counter output, to two
2N4401s (per above) with 50K from each base1 to gnd and approximately
50K || 18pF from each emitter2 to ground, x4, with four D-to-A
resistors of 250K, 500K, 1Meg, and 2Meg, the max output transition time
(from "15" to "0") is about 3.6 us.
So it works more-or-less OK, that way. But the 74HC393 counter
(14-DIP), (24) 1N4148s, (8) 2N4401s, and the D-to-A's resistors,
altogether, take about 3 square inches of PCB space.
Is there some much better way to do this that I've overlooked?
Thanks.
- Tom Gootee