| |
 |
|
|
Science Forum Index » Electronics Forum » DAC zero code = zero volts, best way??
Page 1 of 1
|
| Author |
Message |
| John |
Posted: Mon Jul 24, 2006 3:30 pm |
|
|
|
Guest
|
Instead of manually adjusting a pot (voltage divider) to set the
desired current level through a servo loop (op-amp driving a FET), I'd
like to use a PIC controlling a DAC. My problem is that even
rail-to-rail DACs only go down to a few millivolts, not true zero
volts, when the DAC code is zero. This few millivolts prevents me
from setting my current levels low enough for my use. I have a bunch
of servo loops and it adds up quickly.
I was thinking that I could have the PIC multiply the desired DAC
output code by X and then set up a resistor voltage-divider on the
output of the DAC to divide the voltage by that same X amount (before
going on to the servo loop's op-amp). This would reduce the zero-code
output voltage level by X times and give me a much lower minimum
current level for each servo loop. Using my existing setup, I can set
X = 30 or so, maximum.
Is this a reasonable way to reduce the effect of the DAC output not
being able to reach a true zero volts? Is there a better way? Level
shifting of some kind?
Thanks!
-- remove SPAMMENOT for e-mail responses -- |
|
|
| Back to top |
|
| Phil Hobbs |
Posted: Mon Jul 24, 2006 3:50 pm |
|
|
|
Guest
|
John wrote:
Quote: Instead of manually adjusting a pot (voltage divider) to set the
desired current level through a servo loop (op-amp driving a FET), I'd
like to use a PIC controlling a DAC. My problem is that even
rail-to-rail DACs only go down to a few millivolts, not true zero
volts, when the DAC code is zero. This few millivolts prevents me
from setting my current levels low enough for my use. I have a bunch
of servo loops and it adds up quickly.
I was thinking that I could have the PIC multiply the desired DAC
output code by X and then set up a resistor voltage-divider on the
output of the DAC to divide the voltage by that same X amount (before
going on to the servo loop's op-amp). This would reduce the zero-code
output voltage level by X times and give me a much lower minimum
current level for each servo loop. Using my existing setup, I can set
X = 30 or so, maximum.
Is this a reasonable way to reduce the effect of the DAC output not
being able to reach a true zero volts? Is there a better way? Level
shifting of some kind?
Thanks!
-- remove SPAMMENOT for e-mail responses --
Hmm. Why not post a schematic on a.b.s.e?
Cheers,
Phil Hobbs |
|
|
| Back to top |
|
| Tim Wescott |
Posted: Mon Jul 24, 2006 4:37 pm |
|
|
|
Guest
|
John wrote:
Quote: Instead of manually adjusting a pot (voltage divider) to set the
desired current level through a servo loop (op-amp driving a FET), I'd
like to use a PIC controlling a DAC. My problem is that even
rail-to-rail DACs only go down to a few millivolts, not true zero
volts, when the DAC code is zero. This few millivolts prevents me
from setting my current levels low enough for my use. I have a bunch
of servo loops and it adds up quickly.
I was thinking that I could have the PIC multiply the desired DAC
output code by X and then set up a resistor voltage-divider on the
output of the DAC to divide the voltage by that same X amount (before
going on to the servo loop's op-amp). This would reduce the zero-code
output voltage level by X times and give me a much lower minimum
current level for each servo loop. Using my existing setup, I can set
X = 30 or so, maximum.
Is this a reasonable way to reduce the effect of the DAC output not
being able to reach a true zero volts? Is there a better way? Level
shifting of some kind?
Thanks!
-- remove SPAMMENOT for e-mail responses --
You mention in your add-on that you have no negative voltages available.
You may find that the easiest and most compact solution you can do is
to supply a negative rail so you _can_ bring your voltages down to some
true zero.
An alternative is to supply yourself with a virtual ground. Normally
I'd choose a voltage that's 1/2 my supply voltage (less if I'm using el
cheapo op amps like the LM358 that go close to ground but only approach
the top rail to within 2V or so). It sounds like you don't need to
servo on the negative side, so you may be able to do OK with a 0.5V, or
some other low value which you know your DACs can always fall below. If
you need a really precise zero you'll have to develop this voltage
carefully.
If you don't need an exact amount of shift you can drive a resistor
through a diode. This will always put you one diode drop below the DAC
output, but you will learn amazing things about how much a diode drop
can vary with current and temperature. This technique also won't work
if your following stages are dumping current into the resistor.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Posting from Google? See http://cfaj.freeshell.org/google/
"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html |
|
|
| Back to top |
|
| John |
Posted: Mon Jul 24, 2006 5:14 pm |
|
|
|
Guest
|
Yea, I shold have posted the circuit. It's Win Hill's recommended
circuit from a while ago and has worked well when manually adjusting
the pot off the reference.
I'm using a .005-ohm shunt so if the DAC (MCP4921) can only drop to
10mV with a DAC code of zero (instead of 0.000V) then each FET will
set up to pass (0.010mV/0.005 ohms) = 2 amps per FET as the minimum
current level I can set. Too high. I can't increase the resistance
of the shunt anymore (current level is too high) so I was thinking I
could drop the DAC's min. output voltage with a voltage divider.
Using my example of divide-by-30 resistors on the output of the DAC,
the 10mV output for a DAC code of zero would drop to 0.33mV. This
would give me a min. current level of 67mA through each FET. Not
ideal, but I could live with that.
I'll look over the other ideas brought up in other posts. I'm sure
I'll have a couple more questions though. :-)
SHUNT = 0.005 ohm, 1%, 5W
R6 = 1K, 1%
.. Vcc R2, R3 = 49.9K, 1%
.. | R4, R5 = 10K, 1%
.. R1
.. |
.. +------, Vcc ,-----+-----
.. | | | LT1013 | x |
.. 1V REF POT <-+--R2--+-----|+\ D |
.. | | | | | >--+--R6-- G |
.. -+------+-, | | ,--|-/ | S |
.. | | | | | === C1 | |
.. low-level | | | | | | | |
.. signal GND +--|--R3--|--+----|---+---R5----+ |
.. | | | | | |
.. | | | | SHUNT |
.. | | | | | y |
.. | | '--R4---+-------------+-----|-+--- RTN
.. | | | |
.. | | | |
.. | | Vcc ,-----+ |
.. | | | | | |
.. | +--R2--+-----|+\ D | |
.. | | | | >--+--R6-- G | |
.. | | | ,--|-/ | S | |
.. | | | | | === C1 | | |
.. | | | | | | | | |
.. GND +--|--R3--|--+----|---+---R5----+ | |
.. | | | | | | |
.. | | | | SHUNT | |
.. | | | | | | |
.. | | '--R4---+-------------+-----|-+
.. | | | |
.. : : etc etc - N stages : :
.. : : : :
-- remove SPAMMENOT for e-mail responses -- |
|
|
| Back to top |
|
| Jamie |
Posted: Mon Jul 24, 2006 9:28 pm |
|
|
|
Guest
|
John wrote:
Quote: Instead of manually adjusting a pot (voltage divider) to set the
desired current level through a servo loop (op-amp driving a FET), I'd
like to use a PIC controlling a DAC. My problem is that even
rail-to-rail DACs only go down to a few millivolts, not true zero
volts, when the DAC code is zero. This few millivolts prevents me
from setting my current levels low enough for my use. I have a bunch
of servo loops and it adds up quickly.
I was thinking that I could have the PIC multiply the desired DAC
output code by X and then set up a resistor voltage-divider on the
output of the DAC to divide the voltage by that same X amount (before
going on to the servo loop's op-amp). This would reduce the zero-code
output voltage level by X times and give me a much lower minimum
current level for each servo loop. Using my existing setup, I can set
X = 30 or so, maximum.
Is this a reasonable way to reduce the effect of the DAC output not
being able to reach a true zero volts? Is there a better way? Level
shifting of some kind?
Thanks!
-- remove SPAMMENOT for e-mail responses --
you need some small amount of - Voltage.
--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5 |
|
|
| Back to top |
|
| Jamie |
Posted: Mon Jul 24, 2006 9:31 pm |
|
|
|
Guest
|
John wrote:
Quote: Yea, I shold have posted the circuit. It's Win Hill's recommended
circuit from a while ago and has worked well when manually adjusting
the pot off the reference.
I'm using a .005-ohm shunt so if the DAC (MCP4921) can only drop to
10mV with a DAC code of zero (instead of 0.000V) then each FET will
set up to pass (0.010mV/0.005 ohms) = 2 amps per FET as the minimum
current level I can set. Too high. I can't increase the resistance
of the shunt anymore (current level is too high) so I was thinking I
could drop the DAC's min. output voltage with a voltage divider.
Using my example of divide-by-30 resistors on the output of the DAC,
the 10mV output for a DAC code of zero would drop to 0.33mV. This
would give me a min. current level of 67mA through each FET. Not
ideal, but I could live with that.
I'll look over the other ideas brought up in other posts. I'm sure
I'll have a couple more questions though. :-)
SHUNT = 0.005 ohm, 1%, 5W
R6 = 1K, 1%
. Vcc R2, R3 = 49.9K, 1%
. | R4, R5 = 10K, 1%
. R1
. |
. +------, Vcc ,-----+-----
. | | | LT1013 | x |
. 1V REF POT <-+--R2--+-----|+\ D |
. | | | | | >--+--R6-- G |
. -+------+-, | | ,--|-/ | S |
. | | | | | === C1 | |
. low-level | | | | | | | |
. signal GND +--|--R3--|--+----|---+---R5----+ |
. | | | | | |
. | | | | SHUNT |
. | | | | | y |
. | | '--R4---+-------------+-----|-+--- RTN
. | | | |
. | | | |
. | | Vcc ,-----+ |
. | | | | | |
. | +--R2--+-----|+\ D | |
. | | | | >--+--R6-- G | |
. | | | ,--|-/ | S | |
. | | | | | === C1 | | |
. | | | | | | | | |
. GND +--|--R3--|--+----|---+---R5----+ | |
. | | | | | | |
. | | | | SHUNT | |
. | | | | | | |
. | | '--R4---+-------------+-----|-+
. | | | |
. : : etc etc - N stages : :
. : : : :
-- remove SPAMMENOT for e-mail responses --
you need to use a + - rail supply so that you can balance
the op-amp at zero.
--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5 |
|
|
| Back to top |
|
| John |
Posted: Tue Jul 25, 2006 3:26 am |
|
|
|
Guest
|
Quote: You may find that the easiest and most compact solution you can do is
to supply a negative rail so you _can_ bring your voltages down to some
true zero.
I'm beginning to think that may be the case. The neg voltage ripple
might be a problem though but testing will tell.
Quote: An alternative is to supply yourself with a virtual ground.
Yea, might get ugly quick though. A quick&dirty true neg. voltage or
fully regulated one (if needed) seems to be my best bet so far.
Thanks!
-- remove SPAMMENOT for e-mail responses -- |
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Tue Oct 07, 2008 7:48 pm
|
|