Shop OBEX P1 Docs P2 Docs Learn Events
Op amp implementation with DO sensor — Parallax Forums

Op amp implementation with DO sensor

Erik FriesenErik Friesen Posts: 1,071
edited 2009-11-02 16:02 in General Discussion
I am amplifying a 30 - 150 mv signal coming in from 50-100 feet of wire. ( A galvanic oxygen probe).

Here is an op amp I am looking at using - www.analog.com/static/imported-files/Data_Sheets/AD623.pdf

This is probably a dumb question but - will this do what I want? I don't have a full understanding of the bottom input voltage range that will work properly.

I am handicapped also because of trying to keep this in a dip format. 100 feet of wire in water + possible lightning in the area makes me think about replacement.

Post Edited (Erik Friesen) : 4/20/2009 2:07:29 AM GMT
«1

Comments

  • PainlessPainless Posts: 69
    edited 2009-04-17 20:43
    What you need to do is to configure the op-amp chip as a non-inverting amplifier, take a look at this link:

    ourworld.compuserve.com/homepages/Bill_Bowden/opamp.htm

    You will want to connect your incoming signal to the + (non-inverting input), the output (carrying your amplified signal) to the resistor series as depicted in the diagram on the link.

    The -Vs and +Vs connectors will determine how much you will amplify your signal, for example, if you connect -Vs to ground and +Vs to a 5v supply, this range will be used to amplify your input (depending on the resistor values you use, you will need to experiment with those).

    I hope this helps.

    Russ.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-04-17 20:54
    Erik Friesen,

    The distance here of '50-100 feet" is sending up a red flag here... what kind of signal are you looking at? Is it a DC voltage, frequency, current loop, what exactly?

    Can you process any of the signal closer to the sensor, so that the signal over that distance becomes less critical?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-17 20:55
    The reason for my questions lies partly in the fact that apparently there are instrumentation op amps available that do not accept an input below 100mv.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-17 21:00
    Here is the deal. I am hooking up to an existing probe setup that was designed by an unnamed manufacturer. The probe is a galvanic oxygen sensor (it creates its own signal similar to a battery). It is a straight dc voltage in the mv range. Not only that but the existing control design runs motors through the same cable while sampling ( many red flags here I know). The long cable cannot be changed, and the folks want to keep the same probe system.
  • kwinnkwinn Posts: 8,697
    edited 2009-04-17 21:59
    The op amp should be ok, but the 150 foot run next to motor cables may be problematic. I hope the cable is shielded or at least a twisted pair. If a twisted pair or unshiielded then you will most likely want to use the op amp as a differential input amp to reduce the noise pickup. Matching the sensor impedance will also help.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-17 22:03
    I am not clear on the source impedance from a galvanic probe. My guess it would be around 500 ohms. Part of the reason I want to use an instrumentation amp is for the differential measurement.

    Get this - it is a shielded cable. One cable with all the wires.

    Post Edited (Erik Friesen) : 4/17/2009 10:18:42 PM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-04-18 04:00
    Erik Friesen,
    ·
    In order to do differential measurements, you need to have a signal that has a differential output.· Otherwise you have no noise immunity.·
    ·
    From what you have indicated the sensor seems to be a single ended type of sensor, i.e. non-differential.· That's not to say that you can't create a differential signal from it, but there are a few questions that need to be answered in order to do that.
    ·
    Does the sensor output share a connection with the shield?· If so, can that be changed to two separate wires?
    Is the·power to the sensor·"isolated" from the receiving power?· Could it be?
    ·
    ·


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-04-18 04:22
    With that feeble a signal over that distance and that much electrical noise to contend with, my first inclination would be to convert the voltage at its source to drive a 4-20mA current transmitter. If your sensor requires less than a couple milliamps or so to operate, this can be accomplished over a two-wire cable. It's the way analog sensors are often interfaced to PLCs in factories and is very robust in noisy environments.

    -Phil
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-18 11:43
    @ beau - The galvanic probe has two wires coming from it. It creates its own power, it is not powered. I see no reason why that would not work similar to a balanced audio input.

    @phil - I don't see a good way to convert a signal from a galvanic sensor to 20ma, as there is no provision for power in the buoy, and I don't believe the sensor could source 20ma.

    Here is a schematic for better understanding.
  • kwinnkwinn Posts: 8,697
    edited 2009-04-18 13:53
    Erik, from your schematic it looks like the probe can be connected as a differential input. You should verify this by measuring the resistance from each connection to ground near the probe. You can calculate the impedance of the probe by measuring the probe output voltage with no resistor on the leads, and then with a resistor connected. If you have a resistance decade box you can connect it across the leads and adjust it until the voltage across it is half the no load voltage. At that point the resistance of the decade box matches the probe impedance.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-18 15:28
    Is it better in this situation to tie the negative side of the sensor and op amp to ground through a resistor or directly to ground?
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-18 15:36
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-04-18 15:50
    Erik,

    A 4-20mA transmitter does not need a separate cable for power or a source of power at the probe end. It would work over the same 2-wire cable you're now using. The probe would feed the transmitter, and the transmitter then sinks a current (4-20mA) proportional to the voltage from the probe. The current consumption is then detected at the other end of the cable. This has the advantage of both high noise immunity and zero effects from resistive cable losses. Whatever voltage is used to power the motors could be used to excite the transmitter. This is done at the cable end, though, not on the buoy. At the cable end, the current can be converted back to a voltage (1-5V) by means of a 250-ohm resistor.

    Here is an example of a two-wire oxygen probe with a built-in 4-20mA transmitter. This wiki article discusses current loops in general and provides some useful references in the footnotes.

    -Phil
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-18 15:53
    I am currently including in the design an option to use the 4-20 ma style probe for all the reasons you stated. I still have to be able to use the old style because that is what they want.
  • kwinnkwinn Posts: 8,697
    edited 2009-04-18 15:57
    More like the .jpg. I have included the app note it came from. There is a lot of good info in there. Keep in mind R2 is equivalent to the gain resistor on your op amp.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-18 16:04
    That makes sense. Can R4 effect the gain in any way? How does one determine the proper value?

    Post Edited (Erik Friesen) : 4/18/2009 4:33:26 PM GMT
  • kwinnkwinn Posts: 8,697
    edited 2009-04-18 16:40
    Yes, it can have some effect. See the calculations on the jpg. Not sure exactly what the effect will be since the gain of the AD623 is not set by the output to inverting input feedback resistor. I think the effect will be relatively small.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2009-04-18 16:57
    I'd go at first with a circuit like the one that kwinn posted. If the sensors wires in the cable are a twisted pair, that would be great, but even if not, one thing about oxygen probes is that a very low low pass filter can be applied to get rid of high frequency noise.

    Yes R4 affects the gain, as seen the equations under the schematic. For the first stage, you want to make the gain x1, so R1=R2=R3=R4 and all of them as high as you can go with accurate (1% or better) resistors. Say 332 kohms. There are two reasons for choosing high values. 1) High values minimize the error due to the output resistance of the sensor, which is probably around 1 kohm, but will change as the sensor ages. 2) The circuit is intrinsically quite resistant to ESD, best when the input resistor values are high. Some low pass filtering can be introduced at the input too, by means of a snap on ferrite core and also by a capacitor in parallel with the input.

    You will make up the gain and add more low pass filtering in the second stage, which will be a simple non-inverting amplifier of gain=x30, assuming you want to bring the signal up to around 4 or 5 volts fs. If the noise problem is severe, be sure to use dual supplies for the op amp, so that it won't rectify noise.

    The questions about connection to the shield and how it is terminated at each end are important because they will affect the rejection of external noise and ESD.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-18 17:14
    @ tracy - I could be wrong here but does not using an instrumentation op amp take care of the need of dual op amps?

    This is what I have so far.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-18 21:28
    R47 and 48 are 10K. R49 - 20K R46 - gain 11k = 10x

    Yes, it is the ad623. Do I need capacitance on the input?

    I figure on shutting down the motors and waiting for a bit, then reading the sensor. I intend to do a 10+ read average.

    I hadn't thought about the DO probe picking up any voltage from the water. Would using a lower value resistor to pull down the low side do any good? I also could bump the voltage with a voltage reference.

    I don't see any real way to protect this from a close lightning strike, but I figure that if the chip is replaceable that will help.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2009-04-18 21:40
    Is U7 the AD623? I have not used that one myself, but it looks good. And what values for the resistors R46 to R49? The amplifier will have to have a high enough frequency response to reject the expected noise frequencies. If you set the gain at 20, that will bring the closed loop bandwidth down to about 40 kHz. Its a good idea to have the surge suppressor connected as you have it on the input, and you might consider capacitors in parallel with those to shunt away high frequencies, and a clamp-on ferrite or two at the inputs before the capacitors.

    Input impedance should be high also to avoid loading sensor, and this amplifier does offer that. The input resistors R47-R49 will help protect against ESD, but they do not seem to enter the gain equation.

    A lot depends on how harsh the crosstalk is from other wires in the cable, and especially how much extraneous noise comes in from the DO probe contact to the water. As shown, your circuit appears to be set for a common mode resting voltage near ground, with U7 on a single supply. If the common mode noise is harsh, it could drive the inputs below ground and out of the range that the amplifier can handle. The AD623 can handle signals 0.15 volt below Vss, but that is not much. You would be safer with a +/- 5 volt supply. Or with an industrial strength amplifier that can operate on +/- 15 volts supplies and handle larger common mode excursions. One advantage of the circuit that Kwinn posted above, when operated on dual supplies, is that the op amp inputs sit very near ground and with gains <=1 it can have great common mode capabilities.

    Things like DO probes and pH sensors in natural or industrial environments are difficult to instrument, because they by their very nature have to be in contact with the medium, which acts both as an antenna for the nearby country and western station and also as the electrolyte for a battery formed with the hull of the nearby sunken battleship. One solution is to sample the medium and bring it in a small cup to the sensor, and another solution is to use a isolation amplifier, which effectively puts the sensor electrically in a world of its own. Quite often you can go out and get a perfectly good measurement with a hand-held instrument, but then it proves difficult when connected to a system.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-18 22:06
    Realistically how many of these type of input designs would use an isolation amplifier?

    What are some reasons why bumping the ground with a precision reference would not do what I want?
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2009-04-18 23:40
    Realistically I can't answer the question. You'll notice that the DO probe that Phil linked to above is not only 4-20 mA output, but also isolated. Most DO probes will recommend isolation in any situation where other parts of the system will be in electrical contact with the same fluid, and that is to avoid ground loop effects. Add to that large bodies of water with sunken battleships and talk radio stations nearby. You can try it without isolation, and it may work fine. But IMHO you can never be confident that it will work as well the day after you install it and the day after that. With an isolation amplifier from the start, and spending $20 more, a whole can of worms can be avoided. There is the AD202 from Analog devices, which is a dip or sip package, kind of large, but it includes transformer isolation and isolated power. The Burr-Brown ISO122 is capacitor isolated, and it comes in a 16-pin size DIP but with only 8 pins. However, you also have to supply the isolated power also, which can come from the DCP01 series power modules, available in the same DIP package. But again, all that may be overkill.

    The reference pin 5 sets the output level when the differential input is zero. You have that at ground. The Vss pin 4 is the negative power supply, and in your schematic it is also at ground. But it could be at -5 volts. Then you would connect the bottom of R49 to ground pin 5. That would put the common mode voltage smack in the middle at ground between the -5 and +5 supply, where the common mode rejection for noise going either way will be a maximum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-20 02:20
    An update to what I am thinking.

    I also figured out that my signal wire has its own shielding after all, although it is in the same cable as the motors.

    I have a 24v supply that I could bring down to 15 or 12 or whatever.

    The DO probe I am using has about a 20k ohm resistance from the probe leads to water (tested in my sink)

    Galvanic isolation is recommended on some websites. These are small fish ponds.

    Options include -

    1. Using a ad202 on each input.(there are 3) www.analog.com/static/imported-files/Data_Sheets/AD202_204.pdf $50 each

    would I need further signal conditioning or could the input handle these voltages well?

    I believe that the ad202 would work on a single supply of 12v

    However, there are no sockets to be found for this setup.

    2. using a ad629 www.analog.com/static/imported-files/Data_Sheets/AD629.pdf fed from a 12v supply, which would feed into a ad623 www.analog.com/static/imported-files/Data_Sheets/AD623.pdf which would be set to a gain of 10. The ad629 would provide the isolation.(although not a true isolator) I would hold the reference high with somewhere around 2 volts if necessary.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2009-04-20 15:23
    If your wires have their own shielded twisted pair, that is really great from the standpoint of crosstalk within the cable.

    I have some experience with small fish ponds (pH, for growing algae in a paper-making project). It may be a small headache now, but I think you will be rewarded in the long run if you do go with the isolation amplifier.

    I haven't used the AD202 myself, but I think it would do the job well. The socket could DIY with SIP socket strips. The AD202 can provide the gain of x10 or x20 that you need on the input side using the circuit shown in the data sheet. However, I think they have a typo on the data sheet figure 8a. There is an extra dot that should not be there showing a connection between the feedback and the input signal.

    An alternative option #3 is the ISO122 from TI. It comes in a standard 16 pin DIP package and is around $15. You need to supply it with isolated power, and if you have 24 volts DC available, you could use the DCP012415DB in 14 pin DIP format to supply that (~$10). The ISO122 is x1 gain, but the isolated power can also supply a simple non-inverting x10 or x20 amplifier on the input side.

    You option 2 sounds correct. If the sensor does have 20kohm output resistance, that is going to be significant in relation to the 380 kohm nominal input resistance of the AD629.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-20 16:25
    So in your opinion the ad202 would not need another op amp before the input? The 202 can supply only 750 microamps on its input side for driving an external op amp.l

    The issue with the iso122 is that it appears to require +-15v, which 24v cannot supply. I am leaning toward a simple replaceable setup, and the complexity of the iso122 setup has me a little leery.

    Actually what I meant by the 20k ohm measurement is that there is only 20k isolation from the body of water.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2009-04-20 17:47
    It appears that the AD202 would be capable of the gain required. Follow the diagram and gain equation in figure 6 on the data sheet. Figure 8a too, but it has a little typo, I think, as mentioned above.

    There are some very good op amps that run on less than 750 microamps, but I don't think that complication will be necessary for your application.

    It is true the ISO122 would require more parts and wiring, but the BOM cost would be less. A DCP012415DB is a separate part in a 14 pin DIP format that can provide +/- 15 volts isolated power directly from a 24 volt industrial power supply. (You have to use a separate power supply for each amplifier, otherwise there might be interaction between the sensors, and you might need one more to supply all three on the output side, ouch!). And each ISO122 would need another op-amp to supply the x10 gain. There are other DIY methods to achieve isolation, for example with photomos switches and a flying capacitor, more complex, but potentially lower cost and lower quiescent current.

    I see what you mean about the 20k isolation from the water. That is the resistance through the membrane I guess, but that should be closely related to the output resistance of the sensor. Did you measure that directly? The input resistance of the AD202 in non-inverting configuration will be high enough that it probably won't matter.

    Isolation amplifiers makes it as though each sensor is connected to a hand-held meter, each completely in its own electrical space. It is sometimes hard to track down the errors that can arise when multiple sensors and actuators are connected to one system without isolation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-20 19:07
    What about the cable shield? Should I connect it to the main ground?
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-21 00:06
    What type of protection is needed when isolated? (TVS?)
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2009-04-21 04:10
    Yes cable shield tied to the chassis (shield) ground. That may be at one end or at both ends. If the shield over the inner pair is insulated from the overall shield, then the inner shield should be connected to chassis ground at the amplifier end only. To start. Leave room to experiment.

    Not much protection is needed in the way of a TVS, because the isolation amplifier is just that, isolation to the tune of something like +/- 2000 volts. However, do wrap the wires on a snap on ferrite core before they get to the amplifier, and put a good quality capacitor at the amplifier input. Follow the suggestions in the data sheet. That is to get rid of high noise frequencies in the input.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.