Temperature sensor

I want to interface PT100 temperature sensor with Colibri Eval Board via c program. How can i do that?

Hi @sagar1995

Could you provide the version of hardware and software of your module? Do you have a datasheet of the PT100 Temperature Sensor? How is it connected to the Colibri Eval Board?

Best regards, Jaski

Hello jaski,
I have linux with v2.8 image of colibri T20 and…as I know…PT100 will be connected on analog pins…it is of only 2 wire…and for hardware I am using colibri Eval board V 3.2B. If you need some other information…i can give it…

hello @sagar1995

If you want to use the PT100 with Analog Inputs, then you would need also an adequate input circuit to be able to deduce the value of the resistor of the PT100, which can be transformed to Temperature value. However this method is not very accurate since the ADC converter has only 12bit resolution. If this resolution is ok for you, then its ok. If not the better Solution will be to use a small module with i2c or spi connection with Pt100 integrated in it.

Best regards, Jaski

But I think i can try it to connect it with Analog inputs. Will you please provide some documentation for coding in C for analog Inputs?

Find ADC documented on our developer website here.

I have read it…I have connected on Analog0 pin…now which command should i throw to get counts?

What do you mean with count? Which pin did you connect? Can you share a schematic?

I have connected it with Pin number 1 of connector 14 in Eval board . If I am wrong…please understand me how can i connect it with EVAL board?

Let us start by quoting what a Pt100 actually is: “A Pt100 is a Platinum RTD (Resistance Temperature Detector) with a resistance of 100 ohms at 0°C which changes with temperature.”

So it will just change its resistance depending on the temperature, agreed?

Our modules feature ADCs which are capable of converting an analogue voltage between usually 0 and 3.3 volts to a digital value, agreed?

So to hook up a Pt100 to one of our modules you will need a specific circuit that will give you a voltage change between 0 and 3.3 volts rather than vary resistance as an ADC is not an ohm meter, right?

So as @jaski.tx mentioned we would want to check your schematics. You may get some ideas e.g. here.

Thank you so much…Now i am clear with hardware connections…

you are welcome.

I have made Voltage Divider circuit and tested it It is working fine with and giving accurate temperatue. Now i am connecting input at Analog PIN 0…so which command will give me output? Because I have studied your ADC(linux) it uses only two commands one for voltage_now and other for temp…so i am little confused.

Yes, on Colibri T20 AD0 is available as voltage_now with a resolution of 12-bit:

root@colibri_t20:~# cat /sys/class/power_supply/colibri_t20-analog_inputs/voltage_now

What temperature range and precision you are looking for?

the command temp is for internal temperature sensor and not external pt100. So you need to readout the voltage and calculate the pt100 resistor and then the temperature.