J
Jim Thompson
Jim Thompson wrote...
Not really, you grossly exaggerate.
I'll let it, if you'll measure it ;-)
...Jim Thompson
Jim Thompson wrote...
Not really, you grossly exaggerate.
A uC and a DAC is a possible solution; in fact I just spent a while poking
around datasheets trying to figure appropriate components, and I just
finished coding the algorithm. There are two reasons I hesitate.
First, I want separate rates for ramp up and ramp down, so I can't just vary
the clock. I want the rates settable by trimpots. So, I need to
incorporate measuring the trimpots; usually AIUI the way that's done with
uC's is to charge a cap with a current source, compare the trimpot voltage
with the cap voltage, and count clock ticks. Sheesh, by that time, why not
just use a current source for my ramp?
Second, the disadvantage of a uC is that if it fails for whatever reason in
the field, it can't just be replaced; it has to be replaced and
reprogrammed, effectively meaning that the manufacturer - me - is on the
hook forever for replacement parts.
I could use discrete logic: two clocks with rates set by trimpot, switch
between them with a gate, feeding an 8-bit up/down counter. Have to be
careful to get the clocking right between the counter incrementing and the
DAC latching, and make sure that the power-on resets the counter to zero.
Either those, or SSM2164. THAT have large MOQ and no USA distributors, a
problem for one-off projects.
Well, you guys eat more Mexican food down there than we do up here in the
Northwest, I think. But I share your concern.
A uC and a DAC is a possible solution; in fact I just spent a while poking
around datasheets trying to figure appropriate components, and I just
finished coding the algorithm. There are two reasons I hesitate.
First, I want separate rates for ramp up and ramp down, so I can't just vary
the clock. I want the rates settable by trimpots. So, I need to
incorporate measuring the trimpots; usually AIUI the way that's done with
uC's is to charge a cap with a current source, compare the trimpot voltage
with the cap voltage, and count clock ticks. Sheesh, by that time, why not
just use a current source for my ramp?
Second, the disadvantage of a uC is that if it fails for whatever reason in
the field, it can't just be replaced; it has to be replaced and
reprogrammed, effectively meaning that the manufacturer - me - is on the
hook forever for replacement parts.
I could use discrete logic: two clocks with rates set by trimpot, switch
between them with a gate, feeding an 8-bit up/down counter. Have to be
careful to get the clocking right between the counter incrementing and the
DAC latching, and make sure that the power-on resets the counter to zero.
-walter
[...]
And if accuracy is not of great importance he could use the much simpler
calculate R for
IC about 0.5/1uA
___
+Vs-----|___|---+-----.
R | |
| .-.
| | |10M
| | |
| '-'2N5087 |---+------> 50nA
/|
|
|
===
GND
That one has about -0.4%/C tempco, needs not matching, and can also be
temp
compensated with an additional R and a PTC.
Winfield Hill said:[...]
You don't want current sources and a capacitor, instead think
about using a capacitor in an opamp integrator configuration.
Go ahead and use a low-cost chopper amp, and use low voltages
to a modest-sized integrator resistor, trimpot-controlling the
voltage to this resistor with conventional low-value stuff.
You can create a slew-lmited circuit that goes from one voltage
to another, as requested externally, but at the slow slew rate.
Winfield Hill said:[...]
You don't want current sources and a capacitor, instead think
about using a capacitor in an opamp integrator configuration.
Go ahead and use a low-cost chopper amp, and use low voltages
to a modest-sized integrator resistor, trimpot-controlling the
voltage to this resistor with conventional low-value stuff.
You can create a slew-lmited circuit that goes from one voltage
to another, as requested externally, but at the slow slew rate.
How do I clamp the voltage across the capacitor?
It won't do to just clamp the output of the circuit, because then it
wouldn't immediately start ramping down when the logic changes.
One end of the capacitor is at ground (the inverting input of the opamp),
nothing to clamp there. The other end is at the opamp output, a
low-impedance point so no point clamping there either.
I could put a resistor in series with the opamp output, thus making it a
relatively higher-impedance point that I could then clamp. Since it would
be inside the feedback loop, it shouldn't affect the integrator. Like this:
--/\/\/------o-----||---------.
| |
'-|\ |
| >--/\/\/----o--- OUTPUT (clamped to 0V < Vo < Vmax)
,-|/
|
===
As long as the clamps are low leakage, and the output is driving a very high
impedance (another opamp input), this should work. Right?
By the way, thanks very much, everyone!
-walter
I could put a resistor in series with the opamp output, thus making it a
relatively higher-impedance point that I could then clamp. Since it would
be inside the feedback loop, it shouldn't affect the integrator. Like this:
--/\/\/------o-----||---------.
| |
'-|\ |
| >--/\/\/----o--- OUTPUT (clamped to 0V < Vo < Vmax)
,-|/
|
===
As long as the clamps are low leakage, and the output is driving a very high
impedance (another opamp input), this should work. Right?
By the way, thanks very much, everyone!
-walter
Jim said:What are you using for a VCA, maybe from http://www.thatcorp.com/ ??
Why not just use a DAC, and vary the clock rate, to generate your
ramp?
I'm leery of using low currents in the "outside world". They're fine
on-chip, but in the "outside world" a dry fart will conduct 50nA ;-)
...Jim Thompson
Jim Thompson said:[...]
Could you repeat your desired voltage limits/bounds? I don't think I
got all the thread. Also, what power supplies do you have available?
If you clamp the output as shown above, the OpAmp output will rail,
then the summing node will wander off somewhere, giving the same kind
of unknown-starting-point problem.
How do I clamp the voltage across the capacitor? [ snip ]
--/\/\/------o-----||---------.
| |
'-|\ |
| >--/\/\/----o--- OUTPUT (clamped to 0V < Vo < Vmax)
,-|/
|
===
Winfield said:Here's one way, with empirically-determined setpoint voltages:
. ,----- setpoint - 0.4V
. b
. ,------c e -,
. | |
. --/\/\/------+--+----||-------+
. | |
. '-|\ |
. | >--/\/\/----o--- OUTPUT
. ,-|/
. |
. ===
If you want more control over the clamping voltage, it's necessary
to define the clamping-transistor's current, which is easily done
with a diode plus a sinking current (e.g., a resistor to V-):
. ,----- setpoint - ~0.4V
. b
. ,--|<|--+----c e -, pnp
. | | |
. | sink R (to stabilize the loop)
. | |
. --/\/\/---+--+---------||-----+
. | |
. '-|\ |
. | >--/\/\/----+--- OUTPUT
. ,-|/
. |
. ===
Fred said:Winfield said:Here's one way, with empirically-determined setpoint voltages:
. ,----- setpoint - 0.4V
. b . ,------c e -,
. | |
. --/\/\/------+--+----||-------+
. | |
. '-|\ |
. | >--/\/\/----o--- OUTPUT . ,-|/
. |
. ===
If you want more control over the clamping voltage, it's necessary
to define the clamping-transistor's current, which is easily done
with a diode plus a sinking current (e.g., a resistor to V-):
. ,----- setpoint - ~0.4V
. b . ,--|<|--+----c e -, pnp
. | | |
. | sink R (to stabilize the loop)
. | |
. --/\/\/---+--+---------||-----+
. | |
. '-|\ |
. | >--/\/\/----+--- OUTPUT . ,-|/
. |
. ===
The OP seems to be having problems recognizing his requirements, but
this is just a bog standard slew-rate controlled amplifier with three
input parameters: final value, sr(+), and sr(-). No inaccurate clamping
required and very uncomplicated, like so:
View in a fixed-width font such as Courier.
.
.
. +----------------[R]--------------+
. | |
. | |
. | |
. | | |
. | - |
. | ||| |
. | V ---> |V| BCS1 |
. | SR1 ||| |
. | - |
. Vin>--[R]-+--|+\ | C |
. | >--+--|<|-+-|>|--+----||----+--->Vout
. +-|-/ | | |
. | | | |
. REF | | |
. +--|>|-+-|<|--+-----|-\ |
. | | >-+
. - +-|+/
. ||| |
. V ---> |V| BCS2 REF
. SR2 |||
. -
. |
.
.
.
.
. BCS2 BCS1
. Vout= - Vin SR(+)= ---- SR(-)= ----
. C C
.
BCS can be the Bartoli Current Source under rheostat control or voltage
control.
Fred said:Maybe a little capacitor multiplication for reasonable CS numbers:
View in a fixed-width font such as Courier.
.
.
. +----------------[R]-----------------------------+
. | |
. | |
. | |
. | | |
. | - |
. | ||| |
. | V ---> |V| BCS1 |
. | SR1 ||| |
. | - |
. Vin>--[R]-+--|+\ | C |
. | >--+--|<|-+-|>|-+-----[R2]----+-----+--||--+->Vout
. +-|-/ | | | | |
. | | | [R2/n] | |
. REF | | | | |
. +--|>|-+-|<|-+-[Rx]-+-[Rx]-+ +-|-\ |
. | | | | >-+
. - +-|-\ | +-|+/
. ||| | >-+ |
. V ---> |V| BCS2 +-|+/ REF
. SR2 ||| |
. - REF
. |
.
.
.
.
. BCS2 BCS1
. Vout= - Vin SR(+)= ---- SR(-)= ----
. nC nC
.
Winfield said:Walter Harley wrote...
How do I clamp the voltage across the capacitor? [ snip ]
--/\/\/------o-----||---------.
| |
'-|\ |
| >--/\/\/----o--- OUTPUT (clamped to 0V < Vo < Vmax)
,-|/
|
===
Here's one way, with empirically-determined setpoint voltages:
. ,----- setpoint - 0.4V
. b
. ,------c e -,
. | |
. --/\/\/------+--+----||-------+
. | |
. '-|\ |
. | >--/\/\/----o--- OUTPUT
. ,-|/
. |
. ===
If you want more control over the clamping voltage, it's necessary
to define the clamping-transistor's current, which is easily done
with a diode plus a sinking current (e.g., a resistor to V-):
. ,----- setpoint - ~0.4V
. b
. ,--|<|--+----c e -, pnp
. | | |
. | sink R (to stabilize the loop)
. | |
. --/\/\/---+--+---------||-----+
. | |
. '-|\ |
. | >--/\/\/----+--- OUTPUT
. ,-|/
. |
. ===
Jim Thompson said:[...]
Could you repeat your desired voltage limits/bounds? I don't think I
got all the thread. Also, what power supplies do you have available?
Goal is to make a linear voltage ramp from 0v to 1v, and back down,
with separate time constants for up and down, each adjustable by
trimpot from 0.1s to 5s.
Fred Bloggs said:If he knows that it's always between 0 and 1V then he can get away with
a digital pot and using fixed current sources and Vin. The digital pot
might be loaded every time he goes to make a transition, and that's
about it:
View in a fixed-width font such as Courier.
.
.
. +----------------[R]-----------------------------+
. | |
. | |
. | |
. | | |
. | - I=W*CS <-> |
. | ||| +------------+ |
. | CS1|V| | | |
. | ||| -- | |
. | - | / | digi | |
. Vin>--[R]-+--|+\ | W | \ | pot | C |
. | >--+--|<|-+-|>|-+--->| / | +--||--+->Vout
. +-|-/ | A | | \ | | |
. | | | -- | |
. REF | B | | | |
. +--|>|-+-|<|-+ | +-|-\ |
. | | | >-+
. - | +-|+/
. ||| | |
. CS2|V| REF REF
. |||
. -
. |
.
.
.
.
. W*CS2 W*CS1
. Vout= - Vin SR(+)= ---- SR(-)= ---- 0< W < 1
. C C
Fred said:If he knows that it's always between 0 and 1V then he can get away with
a digital pot and using fixed current sources and Vin. The digital pot
might be loaded every time he goes to make a transition, and that's
about it:
View in a fixed-width font such as Courier.
.
.
. +----------------[R]-----------------------------+
. | |
. | |
. | |
. | | |
. | - I=W*CS <-> |
. | ||| +------------+ |
. | CS1|V| | | |
. | ||| -- | |
. | - | / | digi | |
. Vin>--[R]-+--|+\ | W | \ | pot | C |
. | >--+--|<|-+-|>|-+--->| / | +--||--+->Vout
. +-|-/ | A | | \ | | |
. | | | -- | |
. REF | B | | | |
. +--|>|-+-|<|-+ | +-|-\ |
. | | | >-+
. - | +-|+/
. ||| | |
. CS2|V| REF REF
. |||
. -
. |
.
.
.
.
. W*CS2 W*CS1
. Vout= - Vin SR(+)= ---- SR(-)= ---- 0< W < 1
. C C
In that case, if you notice that the A & B points voltages are V(W) +/- one
diode drop, then the current sources can even more be simplified and reduced
to a simple resistor.
I'll also fixe the current divider ratio to say about 50. Then I'll delete
the voltage reference and switch the input to the other opamp input.
Then we arrive at this simple schematics with Vin being directly a 0/5V
logic CMOS output.
+----------------[R]-----------------------------+
| 4.7M |
| ___ |
| .--|___|-+--+15V |
| | A | |
| | | | |
| .-. ---' |
| 100K| | |
| | | |
| '-' 1M |
GND--[R]-+--|+\ | W ___ C |
| >--+--|<|-+-|>|-+------+------|___|-+--||--+->Vout
Vin>-[R]--+-|-/ | A | | | |
| | | .-. | |
[R] | B | | | | |
| +--|>|-+-|<|-+ | |18K +-|-\ |
=== | '-' | >-+
GND .-. | +-|+/
100K| | | |
| | GND GND
'-' 4.7M
| ___
'--|___|-+-- -15V
A |
| |
---'
Walter Harley said:"Fred Bartoli"
[...]
And if accuracy is not of great importance he could use the much simpler
calculate R for
IC about 0.5/1uA
___
+Vs-----|___|---+-----.
R | |
| .-.
| | |10M
| | |
| '-'2N5087 |---+------> 50nA
/|
|
|
===
GND
That one has about -0.4%/C tempco, needs not matching, and can also be
temp
compensated with an additional R and a PTC.
It's very simple! As you say, it's not very accurate, but that's not really
a big problem for me. It's a little awkward to adjust over a large range,
too; for any particular value of R, the range of adjustment (by changing the
10M resistor) is limited by the transistor's beta, because of the base
current needed to switch the current through R to ground. But I only need
an adjustment range of 1:20; this suffices. To get down to 50nA it needs a
10MEG trimpot, which I can't find, but I could double up my capacitance
(and/or scale up my voltage) and work with 100nA to 2uA.
2N5087 |---+ || | |
2N5087 |----+--->50nA
Winfield said:. ,------ R2 --------------------------------,
. | C |
. | __ A1 ,---||----+
. -- R1 --+--|+ \ | __ A2 |
. | >--+--|>|-- pot --+-- R4--+--|- \ |
. ,--|-_/ | | | >--+--- out
. | '--|<|-- pot --+ ,--|+_/
. gnd | | G = - R2/R1
. R3 gnd slew set by pots,
. | R3, R4, C and supply
. gnd
The slew rate is set independently by the two pots, and by R3,
R4, C and the supply voltages (A1 rails when the output slews).
Low values of R3 will create slow slew rates (note, the two
pots should have series resistors, to avoid zero resistance).
Fred Bloggs said:Fred said:If he knows that it's always between 0 and 1V then he can get away with
a digital pot and using fixed current sources and Vin. The digital pot
might be loaded every time he goes to make a transition, and that's
about it:
View in a fixed-width font such as Courier.
.
.
. +----------------[R]-----------------------------+
. | |
. | |
. | |
. | | |
. | - I=W*CS <-> |
. | ||| +------------+ |
. | CS1|V| | | |
. | ||| -- | |
. | - | / | digi | |
. Vin>--[R]-+--|+\ | W | \ | pot | C |
. | >--+--|<|-+-|>|-+--->| / | +--||--+->Vout
. +-|-/ | A | | \ | | |
. | | | -- | |
. REF | B | | | |
. +--|>|-+-|<|-+ | +-|-\ |
. | | | >-+
. - | +-|+/
. ||| | |
. CS2|V| REF REF
. |||
. -
. |
.
.
.
.
. W*CS2 W*CS1
. Vout= - Vin SR(+)= ---- SR(-)= ---- 0< W < 1
. C C
In that case, if you notice that the A & B points voltages are V(W) +/- one
diode drop, then the current sources can even more be simplified and reduced
to a simple resistor.
I'll also fixe the current divider ratio to say about 50. Then I'll delete
the voltage reference and switch the input to the other opamp input.
Then we arrive at this simple schematics with Vin being directly a 0/5V
logic CMOS output.
+----------------[R]-----------------------------+
| 4.7M |
| ___ |
| .--|___|-+--+15V |
| | A | |
| | | | |
| .-. ---' |
| 100K| | |
| | | |
| '-' 1M |
GND--[R]-+--|+\ | W ___ C |
| >--+--|<|-+-|>|-+------+------|___|-+--||--+->Vout
Vin>-[R]--+-|-/ | A | | | |
| | | .-. | |
[R] | B | | | | |
| +--|>|-+-|<|-+ | |18K +-|-\ |
=== | '-' | >-+
GND .-. | +-|+/
100K| | | |
| | GND GND
'-' 4.7M
| ___
'--|___|-+-- -15V
A |
| |
---'
Very good- I added REF in case someone was thinking of single supply. I
prefer more certain protection for the output- not as nice a CMOS input-
but that's just a shift- all Radio Shack stuff, TL082- protection only
kicks in when you have hardware failure of some kind- these values
should get him 0.1->5sec slews, and assumes VCA input is Hi-Z:
View in a fixed-width font such as Courier.
.
.
.
.
. 0.33U
. +15V +----+----------||-----+
. | | | |
. | --10K | |
. [1.5M] | / | | |
.Vin>-[10K]-+----|+\ | | \ | | |
. | | >+-|<|-+--|>|----->| / | | |
. | +-|-/ | W- | \ | | |
. | | | --- +--------|-\ |
. | | | | | | >-----+
. | | 0.1u| +--------+----|+/ |
. | +-||--+ | | | |
. | | | --- | | [1K]
. | | | | / | | | |
. | [5k] | W+ | \ | | +-----|>|-----+
. | | +-|>|-+--|<|----->| / | | | |
. | | | | \ | | | +-|<|-|<|---+
. | | [1.5M] --10K | | | [1K]
. | gnd | | | | +---------+ |
. | | +----+ | | |
. | -15V +---|<|-|<|-+ |
. | | |
. +----------------[10K]----------------|-------------+-->Vout
. | |
. | [1K]
. | |
. +-------------+
. |
. gnd
.