Shop OBEX P1 Docs P2 Docs Learn Events
buffering DAC output — Parallax Forums

buffering DAC output

ArchiverArchiver Posts: 46,084
edited 2000-05-25 18:10 in General Discussion
I have a DAC hooked up to stamp to provide me with a variable voltage from 0
to 5 volts. What I need to do is put this through an op-amp to change it to
a proportional voltage from 0-8 volts (or whatever voltage the op-amp is
running at). I need a single supply op-amp to do this, can somebody
recommend one? Now here comes the tricky part, I need to buffer the output
of the op-amp to supply a current of up to 2A peak. My devices (IR LEDS)
will be on for at most 100 msec, at a time. How could I do this? Would an
emitter-follower work? how about a single supply audio op-amp, can they
amplify a DC voltage? I know there are some audio op-amps that supply up to
6A. Could I have the op-amp charge a large capacitor? Help me out here.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-05-24 01:07
    You can use a 741 op amp, single supply circuit that will float 1/2 above V
    and probally do part of what you want. Part # 62-5011, Op Amp Book from
    Radio Shack might help you out.

    Ralph in Fl
    Original Message
    From: ED Ward <punk__rocker@h...>
    To: <basicstamps@egroups.com>
    Sent: Tuesday, May 23, 2000 7:56 PM
    Subject: [noparse][[/noparse]basicstamps] buffering DAC output


    > I have a DAC hooked up to stamp to provide me with a variable voltage from
    0
    > to 5 volts. What I need to do is put this through an op-amp to change it
    to
    > a proportional voltage from 0-8 volts (or whatever voltage the op-amp is
    > running at). I need a single supply op-amp to do this, can somebody
    > recommend one? Now here comes the tricky part, I need to buffer the
    output
    > of the op-amp to supply a current of up to 2A peak. My devices (IR LEDS)
    > will be on for at most 100 msec, at a time. How could I do this? Would an
    > emitter-follower work? how about a single supply audio op-amp, can they
    > amplify a DC voltage? I know there are some audio op-amps that supply up
    to
    > 6A. Could I have the op-amp charge a large capacitor? Help me out here.
    > ________________________________________________________________________
    > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-24 01:15
    Ed,

    Audio power amps like the LM1875 (3A) can definitely handle DC. I've used
    them successfully for DC motor drive amplifiers. BUT, the input common mode
    range doesn't include ground, and the output doesn't get any closer than
    about 2V from either supply rail. You can fix the first problem by
    providing a small negative supply voltage, possibly from a little DC/DC
    converter module. It doesn't have to handle a lot of current unless you
    want to drive the load negative. The second problem can be fixed by
    providing a positive supply at least 2V higher than the necessary output
    voltage. One more thing... These guys are unstable at gain values below
    10x, so you may be compelled to attenuate your DAC output in order to
    retain the resolution that you're paying for.

    >I have a DAC hooked up to stamp to provide me with a variable voltage from 0
    >to 5 volts. What I need to do is put this through an op-amp to change it to
    >a proportional voltage from 0-8 volts (or whatever voltage the op-amp is
    >running at). I need a single supply op-amp to do this, can somebody
    >recommend one? Now here comes the tricky part, I need to buffer the output
    >of the op-amp to supply a current of up to 2A peak. My devices (IR LEDS)
    >will be on for at most 100 msec, at a time. How could I do this? Would an
    >emitter-follower work? how about a single supply audio op-amp, can they
    >amplify a DC voltage? I know there are some audio op-amps that supply up to
    >6A. Could I have the op-amp charge a large capacitor? Help me out here.

    Mike Hardwick, for Decade Engineering -- <http://www.decadenet.com>
    Manufacturer of the famous BOB-II Serial Video Text Display Module!
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-24 02:41
    >I have a DAC hooked up to stamp to provide me with a variable voltage from
    0
    >to 5 volts. What I need to do is put this through an op-amp to change it
    to
    >a proportional voltage from 0-8 volts (or whatever voltage the op-amp is
    >running at). I need a single supply op-amp to do this, can somebody
    >recommend one? Now here comes the tricky part, I need to buffer the
    output
    >of the op-amp to supply a current of up to 2A peak. My devices (IR LEDS)
    >will be on for at most 100 msec, at a time. How could I do this? Would an

    >emitter-follower work? how about a single supply audio op-amp, can they
    >amplify a DC voltage? I know there are some audio op-amps that supply up
    to
    >6A. Could I have the op-amp charge a large capacitor? Help me out here.

    The LM358 is a popular single supply op amp that should work okay for this.
    And yes, an emitter follower is a good bet to increase the power and
    current levels. Include the transistor in the feedback loop, something
    like this:

    12 volts
    ;
    o
    | |
    0-4V |\| /
    DAC ----| \ |/
    | >-/\/-| TO220 NPN
    ;--| / 47 |> Darlington
    | |/| \
    | Vss |
    ;-/\/\-o
    /\/\---o---load----Vss
    | 10k 10k 0-8 volts
    Vss

    The emitter follower is a stable and reliable circuit. The supply voltage
    has to be at least 4 volts higher than the maximum output level. I don't
    recommend the audio op-amp, for the reasons Mike pointed out. I'm not clear
    what the IR LEDs will be doing that requires a DAC driver.

    -- Tracy Allen
    Electronically Monitored Ecosystems
    http://www.emesystems.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-24 05:23
    That's an emitter-follower? I thought that in an emitter-follower the
    transistor was controlled via the emitter. What am I missing? Why does the
    supply voltage have to be 4v higher? Is it the op-amp? or the transistor?
    Could I maybe use a mosfet in some way so as to aviod this overhead voltage?
    Maybe I should have pointed this out earlier, but I need to be able to
    switch the LED on and off and control the intensity via this varying
    voltage. maybe this will help.

    o 0-8 volts@2A
    |
    _
    ^
    |
    D__|/
    |\
    >
    |
    o GND

    The D is a serial data input, thats what the switch on and off is all about.
    I know the diode is in there backward, ASCII art is kinda hard.
    >From: Tracy Allen <emesys@c...>
    >Reply-To: basicstamps@egroups.com
    >To: "INTERNET:basicstamps@egroups.com" <basicstamps@egroups.com>
    >Subject: Re: [noparse][[/noparse]basicstamps] buffering DAC output
    >Date: Tue, 23 May 2000 21:41:44 -0400
    >
    > >I have a DAC hooked up to stamp to provide me with a variable voltage
    >from
    >0
    > >to 5 volts. What I need to do is put this through an op-amp to change it
    >to
    > >a proportional voltage from 0-8 volts (or whatever voltage the op-amp is
    > >running at). I need a single supply op-amp to do this, can somebody
    > >recommend one? Now here comes the tricky part, I need to buffer the
    >output
    > >of the op-amp to supply a current of up to 2A peak. My devices (IR LEDS)
    > >will be on for at most 100 msec, at a time. How could I do this? Would
    >an
    >
    > >emitter-follower work? how about a single supply audio op-amp, can they
    > >amplify a DC voltage? I know there are some audio op-amps that supply up
    >to
    > >6A. Could I have the op-amp charge a large capacitor? Help me out here.
    >
    >The LM358 is a popular single supply op amp that should work okay for this.
    > And yes, an emitter follower is a good bet to increase the power and
    >current levels. Include the transistor in the feedback loop, something
    >like this:
    >
    > 12 volts
    > ;
    o
    > | |
    > 0-4V |\| /
    > DAC ----| \ |/
    > | >-/\/-| TO220 NPN
    > ;--| / 47 |> Darlington
    > | |/| \
    > | Vss |
    > ;-/\/\-o
    /\/\---o---load----Vss
    > | 10k 10k 0-8 volts
    > Vss
    >
    >The emitter follower is a stable and reliable circuit. The supply voltage
    >has to be at least 4 volts higher than the maximum output level. I don't
    >recommend the audio op-amp, for the reasons Mike pointed out. I'm not clear
    >what the IR LEDs will be doing that requires a DAC driver.
    >
    > -- Tracy Allen
    > Electronically Monitored Ecosystems
    > http://www.emesystems.com
    >
    >
    >

    ________________________________________________________________________
    Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-24 13:45
    Hi Tracy,

    I have been trying to interface the 8254 programmable interval
    timer to the Bs2. I am writing an 8 byte word to one of the counters.
    I then trigger the counter. I use the latch command to latch the value
    of the counter before reading the value of the counter.

    However, If I load the counter with a value of 100 when I read back the
    count I am getting value like 253 etc.

    This device is the heart of my project. As it is responsible for producing a
    pulse between 1 and 8ms.

    Tracy mentioned that she had interfaced a DAC to the controller.
    Could I use a DAC to generate a square wave? The width of pulses
    is determined by a dec value between 1 and 255?

    Tracy I am interested in the DAc you are using and the code.



    ________________________________________________________________________
    Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-24 13:45
    I haven't been following this thread but could it be you are sending binary
    00000100

    256 - 3 = 253 ??


    richard



    Original Message
    From: fernando hood <hoodey@h...>
    To: <basicstamps@egroups.com>
    Sent: Wednesday, May 24, 2000 7:45 AM
    Subject: Re: [noparse][[/noparse]basicstamps] buffering DAC output


    >
    > Hi Tracy,
    >
    > I have been trying to interface the 8254 programmable interval
    > timer to the Bs2. I am writing an 8 byte word to one of the counters.
    > I then trigger the counter. I use the latch command to latch the value
    > of the counter before reading the value of the counter.
    >
    > However, If I load the counter with a value of 100 when I read back the
    > count I am getting value like 253 etc.
    >
    > This device is the heart of my project. As it is responsible for producing
    a
    > pulse between 1 and 8ms.
    >
    > Tracy mentioned that she had interfaced a DAC to the controller.
    > Could I use a DAC to generate a square wave? The width of pulses
    > is determined by a dec value between 1 and 255?
    >
    > Tracy I am interested in the DAc you are using and the code.
    >
    >
    >
    > ________________________________________________________________________
    > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-24 16:13
    The counters have to modes of counting binary and decimal.

    In Binary 8 bits = 256
    In BCD to 2 four Bits = 99

    I am using Binary. I am doing the following


    OUTH=256

    I am assuming the PINS from 15 to 8 will have
    11111111 in case of OUTH=100 the Binry value
    of 100.

    The count seem to be decrementing but the values
    are questionable.

    >From: "dakota" <rfriedrich@i...>
    >Reply-To: basicstamps@egroups.com
    >To: <basicstamps@egroups.com>
    >Subject: Re: [noparse][[/noparse]basicstamps] buffering DAC output
    >Date: Wed, 24 May 2000 07:45:34 -0500
    >
    >I haven't been following this thread but could it be you are sending
    >binary
    >00000100
    >
    >256 - 3 = 253 ??
    >
    >
    >richard
    >
    >
    >
    >
    Original Message
    >From: fernando hood <hoodey@h...>
    >To: <basicstamps@egroups.com>
    >Sent: Wednesday, May 24, 2000 7:45 AM
    >Subject: Re: [noparse][[/noparse]basicstamps] buffering DAC output
    >
    >
    > >
    > > Hi Tracy,
    > >
    > > I have been trying to interface the 8254 programmable interval
    > > timer to the Bs2. I am writing an 8 byte word to one of the counters.
    > > I then trigger the counter. I use the latch command to latch the value
    > > of the counter before reading the value of the counter.
    > >
    > > However, If I load the counter with a value of 100 when I read back the
    > > count I am getting value like 253 etc.
    > >
    > > This device is the heart of my project. As it is responsible for
    >producing
    >a
    > > pulse between 1 and 8ms.
    > >
    > > Tracy mentioned that she had interfaced a DAC to the controller.
    > > Could I use a DAC to generate a square wave? The width of pulses
    > > is determined by a dec value between 1 and 255?
    > >
    > > Tracy I am interested in the DAc you are using and the code.
    > >
    > >
    > >
    > > ________________________________________________________________________
    > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
    > >
    > >
    > >
    > >
    >
    >
    >
    >

    ________________________________________________________________________
    Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-24 17:17
    >>>
    Date: Tue, 23 May 2000 16:56:47 PDT
    From: "ED Ward" <punk__rocker@h...>
    .....
    Now here comes the tricky part, I need to buffer the output
    of the op-amp to supply a current of up to 2A peak. My devices (IR LEDS)
    will be on for at most 100 msec, at a time. How could I do this? Would
    an
    emitter-follower work? how about a single supply audio op-amp, can they
    amplify a DC voltage? I know there are some audio op-amps that supply up
    to
    6A. Could I have the op-amp charge a large capacitor? Help me out here.
    <<<

    In regard to supplying peak current from a capacitor for .1 seconds
    without having to have a supply that can put out 2 amps continuously:

    You can calculate the supply current by knowing the duty cycle of the
    2 amperes. I.e. if you have .1 seconds of 2 amperes every 1 second
    then the average current is .1/1 x 2 amps = .2 amps [noparse][[/noparse]ideally - give
    it a bit more...].

    The capacitor on the supply can be calculated from the allowable voltage
    drop on the capacitor during the high current draw.

    Q=CxV=IxT : Charge = farads x volts = amps x seconds. Therefrom
    C=IT/V. If a 2 volt drop for .1 seconds is allowed with 2 amps then
    C=2x.1/2 = .1 FARAD! Capacitors in this range tend to be either very
    large or high lacking in high current discharge capability.

    A useful alternative to a large capacitor is often a battery which
    supplies the short term current pulses.

    The emitter follower circuit Tracy provided is a good solution keeping
    in mind that the current gain of the current driver transistor must
    be high enough to supply the 2 amps with the lower drive current from
    the Opamp - say 20 ma. into its base [noparse][[/noparse]i.e. the dc gain of the driver
    at 2 amps must be 2/.02 = 100].

    Good luck with the project.


    ________________________________________________________________
    YOU'RE PAYING TOO MUCH FOR THE INTERNET!
    Juno now offers FREE Internet Access!
    Try it today - there's no risk! For your FREE software, visit:
    http://dl.www.juno.com/get/tagj.
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-25 18:10
    >> And yes, an emitter follower is a good bet to increase the power and
    >>current levels. Include the transistor in the feedback loop, something
    >>like this:
    >>
    >> 12 volts
    >> ;
    o
    >> | |
    >> 0-4V |\| /
    >> DAC ----|+\ |/
    >> | >-/\/-| TO220 NPN
    >> ;--|-/ 47 |> Darlington
    >> | |/| \
    >> | Vss |
    >> ;-/\/\-o
    /\/\---o---load----Vss
    >> | 10k 10k 0-8 volts
    >> Vss

    >That's an emitter-follower? I thought that in an emitter-follower the
    >transistor was controlled via the emitter. What am I missing?

    Hi Ed,

    It's an emitter follower, because the voltage at the emitter is always
    about 0.6 volt less than the voltage at the base--It "follows" the base.
    The voltage gain is unity. But the transistor is capable of supplying lots
    of current, much more than op-amp has to supply to the base (=current and
    power gain). You may be thinking of an "common emitter" amplifier, in
    which the output is taken from the collector circuit, or "common base"
    which is the configuration in which the signal is injected to the emitter.
    The emitter follower is also known as "common collector". But I think the
    terminology gets in the way of understanding how it works. If you want a
    good book on the subject, everyone recommends "Art of Electronics" by
    Horowitz & Hill.

    By designing the transistor into the feedback loop of the op-amp, the
    overall voltage gain is controlled very accurately, e.g., 4 volts in->8
    volts out. The emitter of the transistor is connected both to the load
    (your LEDs) and to the feedback point for the op-amp.

    >Why does the
    >supply voltage have to be 4v higher? Is it the op-amp? or the transistor?

    >Could I maybe use a mosfet in some way so as to aviod this overhead
    voltage?

    There is a voltage drop from base to emitter of the transistor. If you use
    a Darlington transistor as suggested (for high current gain) this voltage
    drop is ~1.2 volts. Also, the LM358 op-amp will only swing up to within
    1.5 volts of the Vdd power supply, up to 10.5 volts maximum on a 12 volt
    power supply. Adding the op amp's 1.5 volts to the transistor's 1.2 volts
    goves 2.7 volts. So "4 volts" is a conservative margin. So you might be
    able to get 8 volts output with a 10.7 volt power supply. There are many
    op amps available that will swing all the way up to the positive supply
    rail, such as the LMC6482, or the old CA3130. Using one of those would
    allow the circuit to swing higher. You could certainly use a power mosfet
    in place of the bipolar transistor. Then it is a "source follower" ciruit.
    But MOSFETs too have a threshold voltage, and it is usually quite a bit
    greater than the 1.2 volts of the bipolar transistor. There are ways to
    make it swing all the way to the rail ("lo dropout") , by using a PNP
    transistor or a P-channel MOSFET, but those are a little more complicated,
    to make them stable performers.

    10 volts
    ;
    o----o
    | | |
    | 1k \ |
    0-4V |\| / /
    DAC ----|-\ | |<
    | >-/\/-o--| PNP
    ;--|+/ 5k |\ Darlington or
    | |/| \ Zetex super-beta
    | Vss |
    ;-/\/\-o
    /\/\----o-o---load----Vss
    | 10k 10k||0.01uf | 0-8 volts
    Vss ===
    1000uf |
    Vss

    That circuit can swing a lot closer to the power supply. It requires an
    op-amp capable of swinging all the way to the + rail at the output, and a
    big capacitor on the output for stability, because the transistor adds
    voltage gain in the feeback loop. (It is a PNP transistor, in common
    emitter configurattion.) Note the reversed connections to the (+) and (-)
    inputs, because the transistor inverts. This is basically the circuit of a
    "low dropout voltage regulator". The big capacitor helps supply pulses of
    current to your load, and also is necessary to prevent "ringing" in the
    output voltage.

    > Maybe I should have pointed this out earlier, but I need to be able to
    >switch the LED on and off and control the intensity via this varying
    >voltage. maybe this will help.
    >
    > o 0-8 volts@2A
    > |
    > _
    > ^
    > |
    >D__|/
    > |\
    > >
    > |
    > o GND
    >
    >The D is a serial data input, thats what the switch on and off is all
    about.
    > I know the diode is in there backward, ASCII art is kinda hard.

    That does help with understanding what you are up to. This additional
    control circuit could then go into the ground lead for switching the leds.
    BTW, this is a "common emitter" NPN switch circuit.


    -- Tracy Allen
    Electronically Monitored Ecosystems
    http://www.emesystems.com
Sign In or Register to comment.