+ Reply to Thread
Page 1 of 2
1 2 Last
Results 1 to 15 of 17

Thread: PT100 input to ADC

  1. #1
    slepax Newbie
    Join Date
    Feb 2009
    Posts
    9

    Default PT100 input to ADC

    Hello all,

    I want to use a PT100 to read temperatures using an ADC. I understand the basics [and more] on both sides, the PT100 and the ADC, however joining both for optimum result seems a bit tough:
    • My ADC (ATmega8 to be exact) has 10bit input, which gives me 1024 sampling values.
    • The input for the whole circuit is 5v (Vin).
    • My temperature range is zero to 300deg, which means PT100 resistance of 100ohm at minimum and 217.25ohm at maximum.
    • Theoretically, with 1024 sampling values in this temperature range I should be able to sample at 1/3 deg.
    • Ideally, I would like to have 0v input when the temperature is 0deg and 5v input when the temperature is 300deg.
    My calculations showed it would be impossible to get the full range of 1024 sampling values, the maximum I could get is 2-3deg accuracy.

    I used a voltage divider to make my calculations but I am wondering if there is any better approach for this. I would love some feedbacks/opinions.

    Thanks,
    Ronen


  2. #2
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,831
    Blog Entries
    13

    Default

    Quote Originally Posted by slepax View Post
    Hello all,

    I want to use a PT100 to read temperatures using an ADC. I understand the basics [and more] on both sides, the PT100 and the ADC, however joining both for optimum result seems a bit tough:
    • My ADC (ATmega8 to be exact) has 10bit input, which gives me 1024 sampling values.
    • The input for the whole circuit is 5v (Vin).
    • My temperature range is zero to 300deg, which means PT100 resistance of 100ohm at minimum and 217.25ohm at maximum.
    • Theoretically, with 1024 sampling values in this temperature range I should be able to sample at 1/3 deg.
    • Ideally, I would like to have 0v input when the temperature is 0deg and 5v input when the temperature is 300deg.
    My calculations showed it would be impossible to get the full range of 1024 sampling values, the maximum I could get is 2-3deg accuracy.

    I used a voltage divider to make my calculations but I am wondering if there is any better approach for this. I would love some feedbacks/opinions.

    Thanks,
    Ronen
    hi,
    Are you planning to use an amplifier for the PT100 RTD, so that you can span the 0 to 300C range and apply any required offset.?
    or
    just a resistive potential divider.?

    Do you have a type number or datasheet.?
    Last edited by ericgibbs; 3rd July 2009 at 06:48 AM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  3. #3
    slepax Newbie
    Join Date
    Feb 2009
    Posts
    9

    Default

    Quote Originally Posted by ericgibbs View Post
    hi,
    Are you planning to use an amplifier for the PT100 RTD, so that you can span the 0 to 300C range and apply any required offset.?
    or
    just a resistive potential divider.?

    Do you have a type number or datasheet.?
    Hey Eric, thanks for the prompt reply!

    Not too sure about what you meant by amplifier and offset (I am kinda new to this), but the best results (only in calculations) I managed to get where using a voltage divider and 1200ohm resistor as R1 is:
    • Mininum - 0.453v
    • Maximum - 0.766v

    Then using a x6 voltage multiplier it will give me 2.7v to 4.6v

    And no, sorry, no datasheet.

  4. #4
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,831
    Blog Entries
    13

    Default

    Quote Originally Posted by slepax View Post
    Hey Eric, thanks for the prompt reply!

    Not too sure about what you meant by amplifier and offset (I am kinda new to this), but the best results (only in calculations) I managed to get where using a voltage divider and 1200ohm resistor as R1 is:
    • Mininum - 0.453v
    • Maximum - 0.766v

    Then using a x6 voltage multiplier it will give me 2.7v to 4.6v

    And no, sorry, no datasheet.
    hi,
    Looking at your figures show 0.453V at 0Cdeg and 0.766V at 300Cdeg.
    Which is a range of 0.313V for 300C change

    So for a 10bit ADC 1023, using a +5Vref, would give [0.453/5] *1023 =92 decimal.
    and [0.766/5] * 1023 = 156 decimal.

    Whats ideally needed is an amplifier with offset.
    The offset voltage of 0.453V nulled to 0V and the 'range' of 0.313V multiplied by the amp to give +5V, a gain of 15.9

    This would give the best resolution and span.

    Do you follow.?
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  5. #5
    slepax Newbie
    Join Date
    Feb 2009
    Posts
    9

    Default

    Quote Originally Posted by ericgibbs View Post
    hi,
    Looking at your figures show 0.453V at 0Cdeg and 0.766V at 300Cdeg.
    Which is a range of 0.313V for 300C change

    So for a 10bit ADC 1023, using a +5Vref, would give [0.453/5] *1023 =92 decimal.
    and [0.766/5] * 1023 = 156 decimal.

    Whats ideally needed is an amplifier with offset.
    The offset voltage of 0.453V nulled to 0V and the 'range' of 0.313V multiplied by the amp to give +5V, a gain of 15.9

    This would give the best resolution and span.

    Do you follow.?
    Loud and clear

    Just to summarise. Having an offset of 0.453v to 0, would make:

    0.453v -> 0v
    0.766v -> 0.313v

    That's great, because then I can multiply by 16 and get:
    Code:
    0.453v [offset 0.453v]   ->   0v [x 15]     -> 0v
    0.766v [offset 0.453v]   ->   0.313v [x 15] -> 4.7v
    
    This is great because it will almost give me the full range of 0v to 5v.

    I know how to make the voltage amplifications (LM386 and co.), but how do you make the offset?

  6. #6
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,831
    Blog Entries
    13

    Default

    hi,
    As you dont have any data on the PT100, I have posted a page from a text book that may help guide you.

    I would suggest you consider driving the PT with a constant current in order to get the voltage output for the amplifier.
    Attached Images
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  7. #7
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,831
    Blog Entries
    13

    Default

    hi,
    Multiplying in software will not give you the resolution you are expecting.

    The base value of the ADC will have a range of 64 decimal, so thats
    300/64 = 4.6, say 5C/bit.

    Is that resolution acceptable.?

    With amplification 300/1023 = 0.29C/bit

    EDIT:
    The LM386 is an audio amp..
    Last edited by ericgibbs; 3rd July 2009 at 07:37 AM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  8. #8
    slepax Newbie
    Join Date
    Feb 2009
    Posts
    9

    Default

    Quote Originally Posted by ericgibbs View Post
    hi,
    As you dont have any data on the PT100, I have posted a page from a text book that may help guide you.

    I would suggest you consider driving the PT with a constant current in order to get the voltage output for the amplifier.
    I am familiar with that. I have managed to calculate the various PT100 resistance values using the widely available linearisation equation:

    Rt = R0 * (1 + A* t + B*t2 + C*(t-100)* t3)

    Also see the attached snapshot from my Excel file.

    The questions is how do I reduce the 0.453v of the voltage divider Vout to be 0v?
    Attached Images

  9. #9
    slepax Newbie
    Join Date
    Feb 2009
    Posts
    9

    Default

    Quote Originally Posted by ericgibbs View Post
    hi,
    Multiplying in software will not give you the resolution you are expecting.

    The base value of the ADC will have a range of 64 decimal, so thats
    300/64 = 4.6, say 5C/bit.

    Is that resolution acceptable.?
    For the application I am using 5C/bit is acceptable, but I still want to reach the maximum resolution possible, merely for learning purposes.

    Quote Originally Posted by ericgibbs View Post
    With amplification 300/1023 = 0.29C/bit
    0.3C/bin is just superb! but the question is how to I reduce (offset) 0.453v to 0v?

  10. #10
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,831
    Blog Entries
    13

    Default

    Quote Originally Posted by slepax View Post
    0.3C/bin is just superb! but the question is how to I reduce (offset) 0.453v to 0v?
    The OPA that amplifies the signal also removes the offset voltage.

    Do you have any OPA's in your spares box.?
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  11. #11
    slepax Newbie
    Join Date
    Feb 2009
    Posts
    9

    Default

    Quote Originally Posted by ericgibbs View Post
    The OPA that amplifies the signal also removes the offset voltage.

    Do you have any OPA's in your spares box.?
    Actually yes

    I have a couple of LM386 I played with to learn how to amplify (multiply) voltage. I started searching the net and it seems OP amps can also do voltage offset. Such handy little things they are...

    I forgot to thank you for your help so far - thank you so much!

  12. #12
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,831
    Blog Entries
    13

    Default

    Quote Originally Posted by slepax View Post
    Actually yes

    I have a couple of LM386 I played with to learn how to amplify (multiply) voltage. I started searching the net and it seems OP amps can also do voltage offset. Such handy little things they are...

    I forgot to thank you for your help so far - thank you so much!
    hi,
    As I said earlier, these are audio amps..

    EDIT:
    A circuit like this would do the job.
    Note the OPA type, the LM386 isnt suitable for your application.
    Attached Images
    Last edited by ericgibbs; 3rd July 2009 at 08:35 AM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  13. #13
    slepax Newbie
    Join Date
    Feb 2009
    Posts
    9

    Default

    Quote Originally Posted by ericgibbs View Post
    hi,
    As I said earlier, these are audio amps..

    EDIT:
    A circuit like this would do the job.
    Note the OPA type, the LM386 isnt suitable for your application.
    Hey,

    Sorry for the late reply, but the circuit you posted threw me off a little bit. I searched some info about CA3140 on the net, but I still find it hard reading your circuit.

    My electronic knowledge is very basic but I am eager to learn. Could you please explain the circuit a little bit? What makes the offset? What makes the amplification?

    For the LM386 I played with, the ratio of two resistors defined the voltage amplification, it looks a bit different with your circuit.

    Thanks, Ronen.

  14. #14
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,831
    Blog Entries
    13

    Default

    Quote Originally Posted by slepax View Post
    Hey,

    Sorry for the late reply, but the circuit you posted threw me off a little bit. I searched some info about CA3140 on the net, but I still find it hard reading your circuit.

    My electronic knowledge is very basic but I am eager to learn. Could you please explain the circuit a little bit? What makes the offset? What makes the amplification?

    For the LM386 I played with, the ratio of two resistors defined the voltage amplification, it looks a bit different with your circuit.

    Thanks, Ronen.
    hi,
    I'll post a schematic, that first circuit is from the simulation program.

    Look for a LM358 that should be close enough for your project.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  15. #15
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,831
    Blog Entries
    13

    Default

    hi,
    Look at this simplified drawing.

    Can you follow it OK.?
    Attached Images
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

+ Reply to Thread
Page 1 of 2
1 2 Last

Similar Threads

  1. Question about PT100 + PIC
    By matpaa in forum General Electronics Chat
    Replies: 0
    Latest: 2nd April 2008, 02:56 PM
  2. Help PT100 sensor
    By Algerian in forum Electronic Projects Design/Ideas/Reviews
    Replies: 3
    Latest: 30th June 2007, 07:07 PM
  3. Pt100
    By avinaik in forum General Electronics Chat
    Replies: 2
    Latest: 31st March 2007, 04:36 PM
  4. measuring temperature with PT100
    By Exo in forum General Electronics Chat
    Replies: 8
    Latest: 12th February 2004, 09:18 PM
  5. How to change 8 PIN mini DIN video input to RF input
    By helpmeplz in forum Electronic Projects Design/Ideas/Reviews
    Replies: 0
    Latest: 5th December 2002, 02:32 AM

Tags for this Thread