Shop OBEX P1 Docs P2 Docs Learn Events
Problem with AD592 temperature sensor — Parallax Forums

Problem with AD592 temperature sensor

Jason GulbinasJason Gulbinas Posts: 17
edited 2007-02-27 17:40 in BASIC Stamp
Hello:

I am trying to set up a simple temperature sensor using my BS2. The final product must measure liquid from around 20 C to 100 C with an accuracy no better than +/- 1 deg. After looking at the options for the BS2 I found that the AD592 should work fine for that range and accuracy.

Since I am a beginner I started with the Applied Sensors workbook...which is great! But when I got to Chapter 3 my AD592 circuit gave me some issues. First I have to find a constant with the sensor dipped in an ice bath. This "Kal" constant for me is 466 which correlates to a "Kal" value of 12722. This yields a nice range of -2 to +2 C when the sensor remains in the ice bath.

This is the program using pin 15:

' {$STAMP BS2}
' {$PBASIC 2.5}

Kal CON 12800

rct VAR Word
tk VAR Word
tc VAR Word

DO
LOW 15
RCTIME 15, 0, rct
tk = kal/rct*10+(kal//rct*10/rct)
tc=tk-273
DEBUG DEC rct, TAB, DEC tk,
TAB, SDEC tc, CR
PAUSE 1500
LOOP


The problem is when I take the sensor out of the ice bath the temperature reading VERY slowly increases beyond room temperature (around 21C) and goes to around 49C (that is around 120 F!) I have tried using different pins, different .22uF caps and 100 ohm resistors but get the same issue.

Just to check what would happen in really hot water I placed the sensor (still running the same program) into a thermos with water close to boiling and the temperature read 171 C .....this is way wrong!

My questions are:

- If I calibrate "Kal" for the program to work at 0C what range of temperatures should this program and sensor work correctly for? When I called Tech support the person I spoke with indicated perhaps the Kal constant needs to be re-calibrated for different temperature ranges...but this seems crazy!

- Could it be a faulty sensor or my BS2 that is creating this problem?

- It seems like the temp readings fluctuate A LOT. I shortened the lead lengths (as indicated in another forum) and it seemed to hold the readings a bit closer but when I translate into fahrenheit I am getting fluctuations of +/- 10 degrees...this can't be correct! So basically the readings are wrong and they fluctuate a lot.

Thanks in advance for any help with this topic.

Jason

Comments

  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-02-20 23:41
    You are right, the results don't make sense. The program looks correct and does calculate to 274 Kelvin when the rct value is 466.

    Try inserting a PAUSE 5 command right after the LOW 15 to allow more time for discharge. Does that change the rct and tk values?

    The observation that there is a lot of bounce in the signal leads me to suspect that there is not a good ground connection for the capacitor, or that there is too much wire from the capacitor to ground. Try moving the capacitor ground as close as possible to the Stamp Vss ground, and be sure that no high current devices like pumps and servos share the same ground loop. Check too that the + side of the sensor is attached to a solid +5 or higher voltage source, away from the high current pumps and motors. Sensor not installed backwards! The sensor itself and the BS2 are the last things to suspect.

    Once nice feature of the AD592 is that its calibration line is pretty straight and passes through zero current at absolute zero temperature, which makes a single point calibration possible. One calibration should apply for the whole range of interest.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Jason GulbinasJason Gulbinas Posts: 17
    edited 2007-02-21 02:10
    GENIUS!!!!!!!!!!! Thanks Tracy.


    That worked right away! I am getting values of rct that are closer to normal (487) and the values are much closer and do not vary more than a few points up/down...less fluctuation. If the program runs for around 5 minutes the rct does seem to wander upward however. (When I started writing this response rct was at 487 and now it is at 494..the temperature of the water bath has not changed (I have a digital thermometer to verify that) Perhaps is I play around with the Pause value this will fix the upward creeping rct value.

    I tried adding a Pause 5, Pause 10, Pause 500 to see what happens with the rct values. I get different rct values each time. This seems a bit wierd since if the Capacitor is fully discharged then the response whould be the same regardless of how long the pause is before the cap is cycled from low to high. I am happy the Stamp or Sensor is not the problem and perhaps I can play around with the pause and find a point where the rct value does not creep upward.
  • Jason GulbinasJason Gulbinas Posts: 17
    edited 2007-02-21 02:52
    I think I responded too soon with a SUCCESS response.

    Okay so I have been looking into this "creeping rct" issue. So adding a PAUSE between Low and RCTIME did help (by bringing rct values closer to "normal") but did not fix the creeping.

    So I played with the Pause value (the pause proposed by Tracy below).

    If PAUSE = 5 (as proposed) the rct value continues to creep upward (but slowly)
    If PAUSE = 1000 the rct value continues to creep DOWNWARD (first try)
    Then I did it again and it creeped upward...so I cannot find a pattern here!

    It seems wierd that the time the capacitor has to discharge has such an affect on rct values.

    So I have changed the PAUSE a few times and get upward creeping most every time. The biggest problem is after I take the CALIBRATED sensor out of the bath the temperature reading still surpassed room temperature and tells me that my room is 131 degrees F...that is wrong!

    So the Pause helped a little but this problem is yet to be totally solved!

    Any other ideas?

    Thanks
  • Jason GulbinasJason Gulbinas Posts: 17
    edited 2007-02-21 03:28
    Just some more info on what is happening here.

    So I calibrated the AD592 to to ice bath and am now getting more consistent values with the added PAUSE between LOW and RCTIME but when I take it out of the ice bath it shoots way past room tamperature...so something is not right here.

    I tinkered a bit and calibrated it to room temperature. It stays pretty constant until I place my finger on the sensor. The temp goes from around 70 deg F to 111 deg F (way too much) and then , when I remove my finger, takes forever to get back down...never getting back to 70 but lingering at 83 deg F.

    So this sensor seems to be very sensitive. I can't calibrate it to the range of temperatures and it respondes wierd.


    Any help...thanks in advance!
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-02-21 05:34
    Do you have a multimeter that has a 0 to 2 milliamp range with a resolution of 1 microamp? If so, put the AD592 in series with that and a 9V battery and verify that the current in microamps is in fact close to 1 microamp per Kelvin. That would verify that the sensor is working properly. Are you using the shrink wrapped sensor? Maybe water has gotten into it or maybe there is a weak connection inside. It can happen. The shrink wrap is the kind that has a melting liner that is supposed to protect the sensor underwater.

    You are correct that the discharge time should not drift too much and the PAUSE time should not make that much difference. A 0.22 microfarad capacitor discharging into a 150 ohm resistor has a time constant of around 33 microseconds, and the 200 microseconds that pass between the LOW 15 and the PULSIN should be adequate to discharge it fairly well. The extra PAUSE gives extra margin. There are other things going on. The sensor may be heating internally due to electrical power dissapation, but that should not be much in a water bath.

    It is the whopping incorrect response you get when you take it out of the calibration bath or when you touch it that has me more puzzled and makes me wonder about the sensor or the internal connections.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Jason GulbinasJason Gulbinas Posts: 17
    edited 2007-02-21 06:03
    My meter does not have that resolution.· I do have a new temp sensor on order so I can check if it is the sensor.· I will let you know how it goes....thanks for the help!
    ·
  • Jason GulbinasJason Gulbinas Posts: 17
    edited 2007-02-26 15:02
    So I figured out the solution to my wandering rct issue. I ordered a new AD592 sensor and when started the program it worked perfectly. Stable and consistent rct values.

    So here is the prognosis.....The AD 592 sensor I received with my "Applied Sensors" kit was working well UNTIL I placed it into hot water (about 190 degF) The hot water damaged the sensor and caused the rct values to skew and wander. I don't believe this should happen since the sensor is rated to 105 degC. I will try this again with my new AD592 and report if there are any issues. I assume I had a sensor that may have not been waterproofed completely with the outer sleeve.

    Tracy - Thanks for your help with this problem.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-02-26 17:36
    A dip in tool handle dip might be a good precaution if you need to leave it in the hot water for extended periods.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-26 21:02
    Jason,

    Are you dipping the sensor directly into the water, or is it inside some kind of protective case/sleeve?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Jason GulbinasJason Gulbinas Posts: 17
    edited 2007-02-26 21:51
    The AD592 has a (what looks like) heat-shrunk tubing around the sensor and I can see some type of adhesive at the open ends that I assume suppose to keep water from entering the inside. The sensor assembly, as purchased from Parallax, has a high range of 125 degC.

    Listed Here: http://www.parallax.com/detail.asp?product_id=28130

    If it is rated for 125 degC then it should withstand 98 degC without any extra precautions...am I right? If not please let me know how to measure boiling water with this sensor...thanks!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-27 16:46
    Jason,

    The sensor can handle the temperature range…And yes, there is heat-shrink tubing to offer some protection to the leads, but if you’re submersing this sensor completely under water you will need some sort of sealed sheath. Only the tip is intended to go in as is. My guess is you got some water up inside where the leads are which is affecting the readings.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Jason GulbinasJason Gulbinas Posts: 17
    edited 2007-02-27 17:40
    Chris:

    Thanks for the help...I will not submerse the sensor past the sheathing tip.

    Please note that in the "Applied Sensors" text it is recommended that the sensor be placed in ice water (for calibration) at a depth of "at least 5CM aboe probe tip." This is far past the sheathing and may affect the sensor. (or perhaps the sensor sheathing is not affected by ice water as it is with boiling water)

    If the sensor is only meant to be submersed to the tip only this needs to be well documented...or perhaps a max depth line can be added to the product....just as an added precaution. At $15 a pop these sensors are not cheap to replace.


    Thanks a lot for the assistance.
Sign In or Register to comment.