R
Robert Monsen
Guest
Jonathan Kirwan wrote:
its emitter is at the base of Q2, base is at the collector of Q2, and
its collector is grounded. That will minimize the current swiped from
the collector, and make the mirror more accurate.
[R4] [R5]
| |
| |
| |
| |
| | |
| |< Iout
o-------|
| |\
| |
| GND
|
o
Iin
created by Andy´s ASCII-Circuit v1.25.250804 www.tech-chat.de
Also, the current ratio isn't really R4/R5, because there is a small
correction factor. It can easily be derived from ebers-moll. Assuming a
desired ratio of x:1, a control current of I, and a resistance on the
control transistor of R, the emitter resistance on mirror transistor is
Rm = (R*I - 25.3e-3 * ln(x))/(x*I)
So, for the example above, you have
Rm = (1k * 4m - 25.3m * ln(4))/(4 * 4m) = 247.8
Not much of a difference unless the ratio is large. For a 10x mirror
with a 1mA steering current, for example, the resistance Rm will be 94.2
rather than 100. TC will also adversely affect the linearity.
A more obvious way (for me...) to generate the steering current would be
Iout+
|
15V |/
--------------o--------|
| |>
| |
| |
| |/
| .----|
| | |>
|\| | |
.-----|-\ | |
| | >--o o------.
Vin----------|+/ | | |
| |/| | | |
| | | | |
'------------------o |
| | | |
| | |< \
| '----| / R=2.5k
| |\ \
| | /
| | |
| |< ===
--------------o--------| GND
-15V |\
|
Iout-
created by Andy´s ASCII-Circuit v1.25.250804 www.tech-chat.de
It's basically the same as Win's solution, but the driver for his is
internal to the opamp package. With this one, however, you can easily
make the steering current equal to the output current, even up to fairly
large currents, and thus eliminate one source of non-linearity in the
mirrors (ln(1) = 0). This might also help with any tempco problem.
One can use a cheapo opamp like an LM324 if crossover distortion or slew
rate isn't an issue. It sounds like the OP will want to set the current,
then either shunt it to ground using his optoisolator control, or let it
rip into the poor torture victim/grad student. If so, opamp slew rate
won't be an issue.
--
Regards,
Robert Monsen
"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.
Add the traditional PNP transistor between base and collector of Q2, soOn 24 Oct 2004 09:24:22 -0700, Winfield Hill <Winfield_member@newsguy.com
wrote:
. +Vs o------+----------------+-------,
. 40 - 55V | | |
. R4 R5 BFC
. 1k00 249 |
. | npn | gnd
. Q2 e\| |/e
. pnp |----+-------| Q3
. c/| | |\c 100V pnp
. | | | small heat sink
. +------' |
. | |
. |/c Q1 | bipolar current source
. +15V --| npn | 20mA fs, 30V compliance
. |\e |
. | | R4 R2 1
. R1 ,----|--R2--, | Io = - Vin -- ( ---- + -- )
. 10k0 | _| 10k0 | | R5 R1 R3 R1
. Vin --/\/\--+--|- \ | x |
. -10V pk in | >----+ +---- Io out
. = +20mA out ,--|+_/ | |
. | | R3 2k49 |
. gnd | | |
. | gnd |
. | |
. and etc for neg portion
I ran some simulations on the extended version of this schematic and output
current isn't particularly flat relative to the driving voltage as one might
hope for. (I selected the OPA227 as the opamp, the 2N3906/2N3904 for the Q1
equivalents, and the 2SB709A and the 2SD601A for the (+) and (-) side pairs.)
Firstly, accuracy is off for reasons I cannot completely fathom. I'm getting an
Iout that is about 12% lower than what the equation predicts. I can see where
the equation arises, I think, but my understanding doesn't appear to change the
simulation results (of course):
[1] The current from Vin to the (-) input node is Vin/R1.
[2] The current flowing from the (-) input node to the opamp output
is then -Vin/R1.
[3] This current, [2], must flow through R2, thus the voltage at
the opamp output must be -R2*(Vin/R1).
[4] The current flowing through R3 is then -R2*(Vin/R1)/R3.
[5] These currents sum, [2] and [4], so the total current arriving at
(or leaving) is -Vin/R1 + -R2*(Vin/R1)/R3 or -Vin*(1/R1+R2/(R1*R3)).
The output must either source or sink this, so this is what either draws an
extra from the V+ or the V- of the opamp, yielding the behavior. As I see it,
anyway.
[6] So, this is then applied to one side of the current mirror and is
gained up by the ratio of R4/R5.
But regardless of this logic above, I still get 9.293mA at -5V. The calculation
suggests:
-5V*1k/249*(1/10k+10k/(10k*2.49k)) = 10.072mA
That's about 92% of the predicted value. Of course, this is simulation. But
I'm curious if you think this is a simulation problem or if you think it's
probably real.
Aside from this accuracy difference from the equation, I'm curious about another
behavior I noticed in simulation. The relative gain varies rather widely as the
controlling input varies from -5V to +5V. (I used a .dc sweep.) As I sweep the
DC controlling voltage from -5V towards 0V, the relative change (using -5V as
the standard of 1.000) is:
Vin Iout gain Rel %
------ ------- ---------- -------
-5V 9.293mA 1.859mMhos 1.000
-1 1.947 1.947 1.047
-.5 1.026 2.052 1.104
-.4 842.1uA 2.105 1.132
-.3 657.8 2.193 1.180
-.2 473.4 2.367 1.273
-.1 289.0 2.890 1.555
-.05 196.7 3.934 2.116
etc.
Does this mean it needs a micro to support a correction table? Or is this more
likely to be some problem in my simulation?
Jon
its emitter is at the base of Q2, base is at the collector of Q2, and
its collector is grounded. That will minimize the current swiped from
the collector, and make the mirror more accurate.
[R4] [R5]
| |
| |
| |
| |
/| | |\| |
|-------o-------------|
| | |
| |< Iout
o-------|
| |\
| |
| GND
|
o
Iin
created by Andy´s ASCII-Circuit v1.25.250804 www.tech-chat.de
Also, the current ratio isn't really R4/R5, because there is a small
correction factor. It can easily be derived from ebers-moll. Assuming a
desired ratio of x:1, a control current of I, and a resistance on the
control transistor of R, the emitter resistance on mirror transistor is
Rm = (R*I - 25.3e-3 * ln(x))/(x*I)
So, for the example above, you have
Rm = (1k * 4m - 25.3m * ln(4))/(4 * 4m) = 247.8
Not much of a difference unless the ratio is large. For a 10x mirror
with a 1mA steering current, for example, the resistance Rm will be 94.2
rather than 100. TC will also adversely affect the linearity.
A more obvious way (for me...) to generate the steering current would be
Iout+
|
15V |/
--------------o--------|
| |>
| |
| |
| |/
| .----|
| | |>
|\| | |
.-----|-\ | |
| | >--o o------.
Vin----------|+/ | | |
| |/| | | |
| | | | |
'------------------o |
| | | |
| | |< \
| '----| / R=2.5k
| |\ \
| | /
| | |
| |< ===
--------------o--------| GND
-15V |\
|
Iout-
created by Andy´s ASCII-Circuit v1.25.250804 www.tech-chat.de
It's basically the same as Win's solution, but the driver for his is
internal to the opamp package. With this one, however, you can easily
make the steering current equal to the output current, even up to fairly
large currents, and thus eliminate one source of non-linearity in the
mirrors (ln(1) = 0). This might also help with any tempco problem.
One can use a cheapo opamp like an LM324 if crossover distortion or slew
rate isn't an issue. It sounds like the OP will want to set the current,
then either shunt it to ground using his optoisolator control, or let it
rip into the poor torture victim/grad student. If so, opamp slew rate
won't be an issue.
--
Regards,
Robert Monsen
"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.