Shop OBEX P1 Docs P2 Docs Learn Events
AD592 Temperature Sensor Resolution — Parallax Forums

AD592 Temperature Sensor Resolution

smattstonesmattstone Posts: 5
edited 2010-06-28 11:26 in BASIC Stamp
Hi All!

I am new to the forum and to the Basic Stamp.· I would like to request some help.· I am building a water temperature sensor using the BS2 and a AD592 temperature probe.· I have a program written that reads the probe and reports the temperatue in degrees K and C.· The problem is I need the reported temperature to resolve to .1 degree.· I used the rctime command.· The section in the applied sensors book indicates that the codes rounds the output to the nearest degree.· Is ther away to get around this rouning function or at least alter it to round to another significant digit.· Your assistance is appreciated.

Comments

  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-06-20 16:24
    The RCTIME command is not stable enough for 0.1°C accuracy. You will need a 12 bit ADC such as the MCP3202 with a 4.096 Volt supply/reference. Terminate the current with a 10kΩ resistor, so 1µA/°C becomes 10mV/°C at the input to the ADC and then the resolution will be 1 mV = 0.1°C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • smattstonesmattstone Posts: 5
    edited 2010-06-27 13:36
    Tracy:

    Thanks for the response.· I have serched but can't come up with a schematic or source code to operate the adc.· I may be over-complicating.· Can you assist?· Greatly apreciated.

    Steven
  • FranklinFranklin Posts: 4,747
    edited 2010-06-27 16:26
    Have you tried here? www.parallax.com/StoreSearchResults/tabid/768/txtSearch/mcp3202/List/0/SortField/4/ProductID/575/Default.aspx

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • smattstonesmattstone Posts: 5
    edited 2010-06-27 16:44
    I'm looking at that now. I don't quite understand it. I'll try to muddle through it. Thanks
  • smattstonesmattstone Posts: 5
    edited 2010-06-27 19:37
    Okay Guys -- I admit I need some more help. I think I've missed something here. I using a AD592 temp probe and added a MCP3202 ADC with a 10K ohm resistor trying to obtain temperatures resolving to .10 degrees c. here is what I've done thusfar.

    Using a BS2 / Board of Education / AD592 / MCP3202 / MCP3202 sample code / all connected as follows

    BS2 Pin 0 to 3202.1 CS/SHDN
    1 to 3202.7 Clock
    2 to 3202.6 Dout
    3 to 3202.5 Din

    Vdd to 3202.8 Vref
    Vss to 3202.4 Common

    AD592 + (red) to Vdd
    AD592 to 10Kohm to 3202.2 Channel 0

    Any assistance is appreciated
  • FranklinFranklin Posts: 4,747
    edited 2010-06-27 22:43
    What do you get when you run the code? The - lead of the ad592 should go to the 3202 pin and through a ~1k resistor to ground. take a look here www.analog.com/static/imported-files/data_sheets/AD592.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • smattstonesmattstone Posts: 5
    edited 2010-06-27 23:39
    Using the 10k resistor the debug screen displays the following.

    ADC CH0 2106
    Volts 2.574

    I am trying to create a temperature sensing program that resolves to the tenth of one degree celsius. Therefore converting the 1uA/1K current output of the AD592 to 10mV/1K so 1 mV = .1K. I believe I have missed something.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-06-28 01:36
    Oh, you should connect the AD592 + lead to Vin not to Vdd. The AD592 needs more than 2.5 Volts across it in order to operate correctly.

    With 5 volt reference for the MCP3202, you will need a 12.2 kΩ resistor in order to achieve 0.1 degree resolution. That could be a 12k 1% resistor in series with a 500Ω pot, or something equivalent to set the calibration.

    12207 Ω * 0.1 E-6  A = 0.0012207 V
    


    That is the resolution of the converter with a 5 Volt supply, 1.2207 mV per bit, and 0.1 µA is the sensor change in current for 0.1°C change in temperature.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-06-28 11:26
    I did the same thing how ever I used a MAX186

    I use the code bellow and works very well


     DO
    
      PAUSE 5
      LOW CS                                          ' Enable ADC
      SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%10111101]   ' Select CH6, Single-Ended [noparse][[/noparse]%1XXX1101]
      SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]KLN\12]       ' Read ADC
      HIGH CS                                         ' Disable ADC
    
      [color=red]tf = KLN  - 273 * 9 / 5 + 32  ' convert to tenths F[/color]
    
      SEROUT TX, T2400, [noparse][[/noparse]LcdLine1,"T_F ",  DEC  TC]   ' Displays voltages & digital value
    
      LOW CS                                          ' Enable ADC
      SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%11111101]   ' Select CH7, Single-Ended
      SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]KLN1\12]      ' Read ADC
      HIGH CS                                         ' Disable ADC
    
     [color=red] tC = KLN1 - 274 ' convert to tenths C[/color]
     
      SEROUT TX, T2400, [noparse][[/noparse]LcdBLon, LcdLine1_1,"T_C ",  DEC  TC]  '
    
    



    I hope this helps

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 6/28/2010 11:31:43 AM GMT
Sign In or Register to comment.