Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 3rd July 2009, 07:30 AM   #1
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
slepax is offline  
Old 3rd July 2009, 07:48 AM   #2
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.?
__________________
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/

Last edited by ericgibbs; 3rd July 2009 at 07:48 AM.
ericgibbs is offline  
Old 3rd July 2009, 07:57 AM   #3
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.
slepax is offline  
Old 3rd July 2009, 08:12 AM   #4
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/
ericgibbs is offline  
Old 3rd July 2009, 08:23 AM   #5
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?
slepax is offline  
Old 3rd July 2009, 08:25 AM   #6
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 Thumbnails
PT100 input to ADC-pt100_data1.png  
__________________
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/
ericgibbs is offline  
Old 3rd July 2009, 08:33 AM   #7
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..
__________________
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/

Last edited by ericgibbs; 3rd July 2009 at 08:37 AM.
ericgibbs is offline  
Old 3rd July 2009, 08:33 AM   #8
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 Thumbnails
PT100 input to ADC-2009-07-03_152644.jpg  
slepax is offline  
Old 3rd July 2009, 08:38 AM   #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?
slepax is offline  
Old 3rd July 2009, 08:41 AM   #10
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/
ericgibbs is offline  
Old 3rd July 2009, 08:46 AM   #11
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!
slepax is offline  
Old 3rd July 2009, 09:16 AM   #12
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 Thumbnails
PT100 input to ADC-aaaimage01.gif  
__________________
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/

Last edited by ericgibbs; 3rd July 2009 at 09:35 AM.
ericgibbs is offline  
Old 4th July 2009, 03:25 PM   #13
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.
slepax is offline  
Old 4th July 2009, 03:48 PM   #14
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/
ericgibbs is offline  
Old 4th July 2009, 06:16 PM   #15
Default

hi,
Look at this simplified drawing.

Can you follow it OK.?
Attached Thumbnails
PT100 input to ADC-pt100_01.gif  
__________________
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/
ericgibbs is offline  
Reply

Tags
adc, input, pt100

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Question about PT100 + PIC matpaa General Electronics Chat 0 2nd April 2008 03:56 PM
Help PT100 sensor Algerian Electronic Projects Design/Ideas/Reviews 3 30th June 2007 08:07 PM
Pt100 avinaik General Electronics Chat 2 31st March 2007 05:36 PM
measuring temperature with PT100 Exo General Electronics Chat 8 12th February 2004 10:18 PM
How to change 8 PIN mini DIN video input to RF input helpmeplz Electronic Projects Design/Ideas/Reviews 0 5th December 2002 03:32 AM



All times are GMT. The time now is 01:08 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker