3.5v 8 bit DAC circuit to drive 25ohm load

Discussion in 'General Electronics Chat' started by radetonator, Aug 14, 2011.

  1. radetonator

    Thread Starter Member

    Aug 1, 2011
    50
    0
    How should the circuit be adjusted in order to have 0-5v output?

    Opamp is LM741CN, BJT are BD139 and BD140.
     
    • dac.jpg
      dac.jpg
      File size:
      174.1 KB
      Views:
      23
  2. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Replace LM741 with an LM324 or similar op-amp which can go to ground, or use a -12V supply. Find an op-amp which is capable of sourcing the required 200mA. (A power op-amp.)
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Your resistor network of R2 through R9 should be more like an R-2R ladder. Google that name and see what you find.

    The opamp is connected improperly. Look up "non-inverting amplifier". Since your input range is 0v-3.5v and you require an output of 0v-5v, you will need a gain of ~1.4286.

    The 741 opamp is not rail-to-rail, so you will need a negative supply as well as a positive supply. This is also true of your Q1/Q2 current amplifier; it won't reach the power rails.

    However, you have Q2 connected upside-down, D1/D2 are shorted out, R15, R10 and R11 should not be there, and your opamp needs to take its' feedback from the junction of the Q1/Q2's emitters.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Q1 & Q2 look like an attempt to make a push pull output stage, but this app only requires a push amp; if the feedback of the amp comes from the emitter then the b-e drop can be removed as an error term.
     
  5. radetonator

    Thread Starter Member

    Aug 1, 2011
    50
    0
    Yes. It's a R/2nR DAC with buffer to drive 25 ohm load.

    The circuit has been changed. But output could only reach 3.1V.
    What should be done?
     
    • dac.jpg
      dac.jpg
      File size:
      175 KB
      Views:
      24
  6. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Change the R17/R13 pair to 5k/20k and ditch the LM741 as it will not be able to output below about 1.5V which will keep the transistor switched on. Use an LM358/LM324, or even better, a modern RRIO op-amp such as MCP6002 (available for around 20 pence.)
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You don't need U2.
    The 741 is OK if you have a dual-rail supply, which I see you have done.

    5 Ohms and 20 Ohms are far too low of a resistance for feedback to the opamp.

    However, you did not pay attention to my statement that you needed to use a non-inverting amplifier with a gain of ~1.4286.
    Here is a page on non-inverting amplifiers:
    http://en.wikipedia.org/wiki/Operational_amplifier#Non-inverting_amplifier
    Note that the simplified formula for gain is:
    Vout = Vin(1+(R2/R1))
    I suggest that you start by using 43k for R2 and 100k for R1.

    Also, you are taking the feedback from the wrong place. Instead of taking the feedback from the output of the opamp, take it from the emitter of the transistor.

    ErnieM has a good point in that a push-pull current amplifier is not required.
     
    Last edited: Aug 14, 2011
  8. radetonator

    Thread Starter Member

    Aug 1, 2011
    50
    0
    according to http://www.allaboutcircuits.com/vol_4/chpt_13/2.html
    Resistor ladder should be connected to Ve-, Can it be connected to Ve+? if only use one amp from LM324, how should be done in order to have 0-5v when digital input changes from decimal 0 to 255?
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The page you referenced shows an inverting summer. You said you need an 0v-5v output, which requires a non-inverting configuration.

    Try it with the non-inverting amplifier that I linked to in my previous reply, with 43k for R2 and 100k for R1, the output of the amp to the base of the transistor, and the feedback from the emitter instead of the opamp output; this last part means that the right side of R2 needs to connect to the transistors' emitter instead of the opamp output.
     
  10. radetonator

    Thread Starter Member

    Aug 1, 2011
    50
    0
    Thank you!

    can you help me check whether this circuit is ok?
     
    • dac.jpg
      dac.jpg
      File size:
      285.2 KB
      Views:
      22
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    That's looking MUCH better.

    Did you check to make sure that the gain of the opamp is now proper?

    Did you notice that you are exceeding the power limitations for Q1?

    Do you have any ideas how you could reduce the power dissipation in Q1, without changing Vcc?
     
  12. radetonator

    Thread Starter Member

    Aug 1, 2011
    50
    0
    A resistor connected to the collector is needed? Then change the gain of the opamp?
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    If you insert a resistor in series with the transistors' collector, it will help to take the power dissipation away from the transistor.

    Assuming that the output of the opamp can go no higher than the supply voltage -2v, and that the transistors' emitter will always be at least 0.7v less than the base voltage, how much resistance can you put in series with the collector without affecting the desired current through the load?

    No, I asked you if you checked to make certain that the opamp gain is correct.

    Start by putting 0v to the non-inverting input. What is the output voltage that you read on the transistors' emitter?

    Then put 3.5v on the non-inverting input. What is the output voltage that you read on the transistors' emitter?
     
  14. radetonator

    Thread Starter Member

    Aug 1, 2011
    50
    0
    A 20ohm resistor is added to collector. But BD139 has maximum power of 12W. i think without the resistor is still ok?

    The simulation shows that output is 5v. Anything wrong of this circuit? Thank you.
     
    • dac.jpg
      dac.jpg
      File size:
      215 KB
      Views:
      23
    Last edited: Aug 15, 2011
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You should be able to go up to 33 Ohms with R12.
    It should be rated for at least 2 Watts.

    I don't know what you're doing with all of the resistors and voltage sources on the left, but that's OK. If it works for you, that's fine.
     
  16. radetonator

    Thread Starter Member

    Aug 1, 2011
    50
    0
    It's a DAC circuit which converts 8 bits 3.5V TTL into 0-5V analog voltage.
    Thank you
     
    • dac.jpg
      dac.jpg
      File size:
      274.3 KB
      Views:
      24
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, your DAC might work in simulation, but it won't work very well with real parts.

    You should make it like this instead:

    [​IMG]
     
  18. radetonator

    Thread Starter Member

    Aug 1, 2011
    50
    0
    The circuit has been modified. For the R-2R ladder, should the value of the resistor be 1K and 500ohm enough? The digital signal is driven by the NI data acquisition box.
     
    • dac.jpg
      dac.jpg
      File size:
      277.3 KB
      Views:
      21
  19. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I don't know what the current source/sink capability of the NI data acquisition box is.

    If the DAC is entirely contained within the NI box, then you don't really have to worry about it, as the opamp will have a fairly high input impedance and won't load the analog signal much.

    If the NI box output is digital, then you should increase your resistor values very significantly. I suggest using 10k and 20k, as they are standard values that are easy to obtain, and won't load the digital outputs very much. However, you may need to use an opamp with a much higher input impedance to get accurate results, like a TL071 or newer JFET-input opamp.
     
  20. radetonator

    Thread Starter Member

    Aug 1, 2011
    50
    0
    so LM324 needs to be replace by TL081? i have tried the circuit,which is very unstable. sometimes output was 5V,sometimes was 3.6V. :(
     
    Last edited: Aug 18, 2011
Loading...