Need help on converting 0-5v signal to 0-10v signal

Discussion in 'General Electronics Chat' started by Mahonroy, Oct 21, 2014.

  1. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    Hi guys,
    I am currently using a parallax propeller micro controller to generate a signal.
    I am using a ADC to create a 0-5v signal, and an op-amp to convert this into a 0-10v signal. I am experiencing a problem with it. Everything works fine until I go below 1.9v on the input of the op amp... at this point, the output of the op-amp pegs at 3.93v. When I supply 0 volts to the input, it is also stuck at 3.93v for the output of the op amp. Above 1.9v, and the op-amp works perfectly fine and has a gain of 2x which is what I want.

    I'm thinking it has something to do with the op-amp I'm using, and the offset gain associated with this op-amp, but honestly I don't really understand it (I'm still somewhat of a newb with electronics). If I could provide 0 volts to the input of the op-amp, and have it just be closer to 0 (no higher than 0.5 volts) then this would be satisfactory. I attached a schematic which has the parts I'm using as well.

    Thanks and any help is greatly appreciated!
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    The 741 opamp is over 40 years old and has passed its best use date.

    In order to get true 0V operation you need to pull the -VE supply pin below 0V or use a bipolar supply.
    Otherwise look for a modern single supply rail-to-rail opamp such as LMC6081.
     
    Last edited: Oct 21, 2014
    PeterCoxSmith, ErnieM and JohnInTX like this.
  3. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    Thanks for the reply!
    That makes sense. I'll order some of those op-amps that you mentioned and try them out... it looks like its basically the same thing only better in every aspect.
    Just out of curiosity though, how would you go about pulling the -VE supply pin below 0V to make this work using the 741?
     
  4. Lestraveled

    Well-Known Member

    May 19, 2014
    1,957
    1,215
    Another power supply or a positive to negative voltage converter chip. The rail to rail option is much better.
     
  5. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    So I got my hands on a couple LMC6081 to try out, and they appear to work great! Here is the link of the ones I got:
    http://se.mouser.com/ProductDetail/...d/tuq/VxHrLk21o2RNPNmcmVKb2kxIqUcyEmdJHMja3GL

    I am now able to output very precise 0-10v signals.

    Question though..... somewhere along the way of me putting it to use (I was experimenting with grounding different grounds from an external machine to my circuit board, I can only assume this is what caused it)... something happened to the op-amp and it would no longer work properly. As soon as I supplied it with the +15v for power, it would almost instantly heat up to the point of it scorching your finger if you touched it (unfortunately I touched it haha). Also instead of it outputting 0-10v it could only output 0-0.2 volts. I swapped it out for a new one and now its working good as new again. (and is cool to the touch when running)

    Any idea what can happen to the op-amp to make it behave like that? Is there anything I can add to the circuit to maybe protect it better from damage?

    Thanks again for your help!
     
    cmartinez likes this.
  6. wayneh

    Expert

    Sep 9, 2010
    12,100
    3,034
    A fuse comes to mind. But avoiding over-current on the outputs is the usual solution. Some op-amps can tolerate a short-circuit on the output but many cannot. Also make sure the input voltages stay within the power supply voltage range.
     
  7. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    I am currently using the LMC6081 as suggested. Its creating a nice 0-10v signal... but in the field, this op-amp is cooking like crazy. I tried swapping back in my old 741 op amp, and it never fails (though it can't go down low enough like discussed earlier).
    I'm wondering if my 15 volt power is too close to the LMC6081's max power rating.

    Is there another op-amp that you guys can suggest?
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    Shucks, there are literally thousands to choose from. Go to any of the major op-amp manufacturers and search their listing of single-supply rail-to-rail op-amps.

    Here is AD820 from Analog Devices.

    I can be at fault for suggesting a part that doesn't work for you as you have already experienced. So don't take my word for it.
     
    JohnInTX likes this.
  9. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    Can I toss in a 14 volt or 15 volt zener diode to protect the power input at least?
     
  10. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,006
    3,763
    The ABSOLUTE maximum operating voltage of the chip you used is 16V and it may latch up or go into a short circuit protection mode.
    A 15v zener may help but a 10 to 12 volt zener would be better if 10v is all you need for your output. This is a rail-to-rail amplifier after all.

    Could you post a schematic. Is there any chance that it is latching up? Also do you have a resistor on the output of the op amp? It seems like you have a prolonged short circuit that is killing this chip.

    Also, from the datasheet - foot notes absolute max conditions...
    (2) Do not connect output to V+, when V+ is greater than 13V or reliability will be adversely affected.
    (3) Applies to both single-supply and split-supply operation. Continuous short circuit operation at elevated ambient temperature can result in
    exceeding the maximum allowed junction temperature of 150°C. Output currents in excess of ±30 mA over long term may adversely affect reliability.
     
  11. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    I have a schematic in the first post I made. The only difference is the +12v is actually +15v.
     
  12. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    Hey guys, first off I want to say thanks for all of the help so far! (This thread has been stale for a while).

    So I ended up going with a rail-to-rail op amp (OPA171AIDR) and for the most part it has been working great. I provide it a 0-5 volt signal and it outputs 0-10 volts. I am supplying it with 15 volts, and it can take up to 36 volts. I am also using a 15 volt zener diode for protection on the supply, and a 0.1uF decoupling capacitor on the supply.

    Most of the devices work great.... but occasionally the op-amp is having a failure and I am trying to figure out why and how to fix it. Once the op-amp has failed, I give it a varying 0-5 volt signal, and it outputs 1.2 volts no matter what (I have a gain of 2x, so it should be between 0 and 10 volts). This leads me to believe the op-amp is failing and is shorting to ground. The op-amp also begins to heat up.

    Any ideas on what is causing this? Thanks again and any help is greatly appreciated!
     
  13. #12

    Expert

    Nov 30, 2010
    16,261
    6,770
    OPA171, right?
    Put a cap across R9 of the schematic in the first post to make it impossible to go into oscillation. 0.1 uf if you can stand 1 millisecond of delay on its reaction time, but even 100pf would probably work.
    If it still goes nuts, the chip might be bad.
    It is not a rare event, but recovering from a mysterious short is rare, especially after a year of working properly.

    Did you mean an internal short that it's, "recovering" from?
     
  14. #12

    Expert

    Nov 30, 2010
    16,261
    6,770
    Op-amps can do an internal short like an SCR latching, "on". That is a well known failure but I don't see anything mysterious in your schematic, unless the power to your op-amp is getting there after the input signal arrives. Still, that's a low odds event. A 10K just before the input pin (3) would limit the current there, but I don't think that's the problem area.

    Op-amps can also go into a self destructive oscillation. That's why I told you to put a capacitor in. Stray picofarads do exist and an easy way to eliminate their influence is to use a capacitor that is way larger than any stray capacitance that might be lurking around your circuit board. We're talking in the range of 1pf to 10pf most of the time, so a hundred pf should render the strays impotent.
     
  15. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,006
    3,763
    @Mahonroy

    Do you have a resistor in series with the Zener? Otherwise, your diode is dumping everything to ground if you exceed 15 v on a pulse for some reason. Post a schematic of exactly what you built.
     
  16. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    Thanks for your responses! I uploaded a schematic (pretty similar to my original schematic that I had uploaded in the original post):
    opa171_problem.jpg

    #12, Are you referring to put a 100pF cap in parallel with R9? I'm a little confused when you were mentioning the "internal short that its recovering from". It appears that something permanently happened to the op-amp, which causes it now to heat up and only output a small voltage.

    The resistor in front of the Zener diode is just a 10 ohm 1/6 watt resistor. The 15V zener can dissipate 1 watt, the part number for that is "ZM4744A-GS08". Not gonna lie, I had a bit of a hard time trying to figure out the proper combination of zener diode and the resistor to put in front of it, mainly because the +15v input voltage in reality is something between 14.5 and 15 volts, and the resistor zener calculator I was using varied quite a bit.

    Thanks again for the help!
     
  17. #12

    Expert

    Nov 30, 2010
    16,261
    6,770
    The word, "occasionally" means, "not all the time" so I thought you meant the op-amp is not doing bad things all the time. If it doesn't do bad things all the time, that would seem to mean it stops doing bad things and I interpret that as, "recovering" from doing bad things. If it does NOT recover, which means it stays bad permanently, that would seem to indicate that the chip has failed.

    Has this happened more than once? If it did, then, did you replace the op-amp?

    As for putting a capacitor across a resistor, yes, that means, "in parallel".

    As for R6 and D-Zener, the resistor must not use up more than 4.5 volts when the op-amp is outputting current into its load, which is not on your schematic. The op-amp uses 1/2 ma in its feedback loop and 1/2 ma for its own purposes. Add this 1 ma to the load current which you did not describe to find the highest value of resistor which is acceptable, then use half that much resistance. After that, I would select a zener diode rated for at least 16 volts so it doesn't do any work at all unless the power supply goes bad.
     
  18. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    Ok sorry there was some miscommunication here then. When I referred to occasionally, I meant that some circuit boards work just fine (for the time being), and some circuit boards have the op-amp fail permanently.

    I don't have the output current load mentioned because this is an unknown... this device is being used to control a separate device. It would appear that the separate device is just using the signal in an ADC, but there could be more of a heavy load depending on the device its used on. So in that case, it should be as robust as possible, and assume that there is a heavy current load?
     
    Last edited: Sep 1, 2015
  19. #12

    Expert

    Nov 30, 2010
    16,261
    6,770
    Let's work with the spec sheets for the OPA171 and the MCP4921. OPA171 Page 2 says output short circuit to ground operation is survivable continuously. That means, whatever the load is doing, you can't melt the chip with an overload. This says nothing about current being jerked around by the load, like an inductive kick-back, so keep that in mind when thinking about making this bullet-proof.

    OPA171 Input pin current has a 10 ma limit. The inputs must not see more than 10 ma coming from the MCP4921 which has up to +5.5 VDC supply. Your DAC can supply 25 ma. (That's too much.) If everything went wrong, the 5.5 volts from the DAC can be limited to 10 ma by 550 ohms.

    Correct me if I'm wrong: 12 bits means 4096 divisions. 5 volts divided by 4096 counts = 1.22 millivolts for your smallest measurement (LSB). For an error of 1/2 LSB, you can afford 610 microvolts. The resistance you would have to use to cause that much error in the OPA171 is: 610 microvolts /8 pa = 76.25 million ohms. You can put anything between 550 ohms and 76.25 million ohms between the DAC and the OPA without causing more than 1/2 LSB error. Besides that, adding a resistor on the positive input pin which matches the input impedance of the inverting pin helps reduce temperature induced drift in the OPA. That sets a range for resistance into the positive input.

    As for the inverting input. The DAC can settle to 1/2 LSB in 4.5 useconds. We want some capacitance in the negative feedback loop to swamp out any stray picofarads and avoid oscillation, but that slows down the amplifier.

    Using: http://www.bowdenshobbycircuits.info/rc.htm

    I plug in a 2.5 volt change and expect to get to (2.5 volts minus 610 microvolts) 2.4994 volts in 4.5 microseconds. I want to use 100 pf. What resistance do I need? 5.399k or less.

    Let's change the feedback loop to use 4.7k resistors. That allows a 100pf capacitor with a 10% accuracy guarantee to get the OPA as fast as the DAC. It also changes the feedback loop current to 1.0638 ma and the OPA uses 650 ua Max across the full temperature range for a total self used current of 1.7138 ma. The input impedance of the inverting input circuit is 2350 ohms so we will place 2.2k between the DAC and the OPA for input protection at 2.27 milliamps out of a maximum allowable of 10 ma.

    For output load, the OPA can supply 25 ma into a short circuit but the output chart, Figure 9 on page 8 only goes to 15 ma. Fifteen ma included the 1.7 ma used by the chip and its feedback loop so we will use 15 ma for the protective resistor on the power supply. 4.5 volts / 15 ma = 300 ohms. Cut that in half to allow for internal losses in the OPA with a 15 ma load and we can afford 150 ohms. I'm going to split that and place 75 ohms in series with the power supply and 75 ohms in series with the output. Change D-Zener to 16 volts.

    Now to the output. If the load adds or subtracts current, we can give it an escape path with a diode or two.
    Time to whip out the drawing machine.
    And...here is one opinion.
    Use whichever bits you want.
     
    InspectorGadget likes this.
  20. Mahonroy

    Thread Starter Member

    Oct 21, 2014
    189
    5
    Hey #12, thanks a lot for all of the info!
    I'm going to go over this again to make sure I am understanding all of it.
     
Loading...