Ibra_94
Posts: 3
Joined: Thu Nov 24, 2022 12:22 am

Multi Temperature sensors on Raspberry pi 4

Thu Nov 24, 2022 12:33 am

Hello everyone,

I have a project of measuring the temperature in 45 spots, the temperature ranges between 0-250 Celsius degrees.
After searching on temperature sensors, I found out that the best is to use pt100 or pt1000 class A or B, the problem is these sensors are Analog, and as far as I know I have to use amplifier or ADC or maybe both.

Is there a better way to connect 45 temperature sensors like 1-wire connection sensor instead of i2c which used by pt100/1000 which can measure up to 250 Celsius degrees?
If no, do you if it’s even possible to connect 45 pt100/1000 sensor to the same raspberry pi 3/4 computer?
Do i need amplifier and ADC, or one of them is enough? And is it/ are they needed for each sensor?

Thanks in advance.

ame
Posts: 6423
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Multi Temperature sensors on Raspberry pi 4

Thu Nov 24, 2022 3:00 am

Hmm. What can I put here?

Ibra_94
Posts: 3
Joined: Thu Nov 24, 2022 12:22 am

Re: Multi Temperature sensors on Raspberry pi 4

Thu Nov 24, 2022 4:49 pm

ame wrote:
Thu Nov 24, 2022 3:00 am
You could start here:

https://learn.adafruit.com/adafruit-max ... -amplifier
Can you please give me more details, like if it is even possible to connect 45 sensors on the same Pi computer?

danjperron
Posts: 4275
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Multi Temperature sensors on Raspberry pi 4

Thu Nov 24, 2022 5:45 pm

Yes PT1000 or PT100 could be a good fit.

What is your needed precision?

I will use ADC converter for that with analog multiplexer.

The question is how far away are each probe? Maybe split them in 8 or 16 probes per junction box.
Even a Pico could be use with a adc converter like the ADS1115 which is 16bits. and connect all three box together via RS-485 to your Rasberry Pi . The ADC will just read the resistor divider voltage and via the calibration curve specified by the manufacturer return the correct temperature.

The other method is thermocouple which is better but way more expensive. On thermocouple you need to read the voltage of the probe and the temperature of the terminal connector where you read the voltage. This is to counteract the junction voltage at the terminal since the terminal connector is the same metal on both side. Yeah maybe this is too much technical but hat for thermocouple exist with the temperature compensation I.C. build in.

N.B. Be aware that some of the PT sensors aren't up to 200C. You need to check that when you ordering them.

ame
Posts: 6423
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Multi Temperature sensors on Raspberry pi 4

Thu Nov 24, 2022 7:01 pm

Ibra_94 wrote:
Thu Nov 24, 2022 4:49 pm
ame wrote:
Thu Nov 24, 2022 3:00 am
You could start here:

https://learn.adafruit.com/adafruit-max ... -amplifier
Can you please give me more details, like if it is even possible to connect 45 sensors on the same Pi computer?
That's your job. Only you know your requirements in detail.

To connect 45 sensors you either need 45 MAX3185 chips and some way to select between them, or try a different approach and use an analog multiplexer (as suggested by danjperron). Here's an example:

https://learn.openenergymonitor.org/ele ... re-sensing
Hmm. What can I put here?

vffgaston
Posts: 89
Joined: Wed May 13, 2020 3:33 pm

Re: Multi Temperature sensors on Raspberry pi 4

Fri Nov 25, 2022 10:19 am

Which task are the sensors for?. An oven?; an engine?.
May be you have to pay close attention to the environment ...

Ibra_94
Posts: 3
Joined: Thu Nov 24, 2022 12:22 am

Re: Multi Temperature sensors on Raspberry pi 4

Thu Dec 01, 2022 10:25 am

Hi everyone, thanks for all of your solutions and suggestions, I will try to explain a little bit more.

So I have 3 simulation models, wherein in each model, I have to measure the temperature in 8 spots, the medium is sand basically, so in total 24 pt100 sensors (not 45 sensors anymore, plan changed), and I am going to measure one model by a time (so one-meter cord long of pt100 would be more than enough)
so I am thinking to connect the multiplexer (TCA9548A I2C Multiplexer) to the RPi 4, and then the 8 sensors.
now my question is, do I need to have an amplifier (Adafruit PT100 RTD Temperature Sensor Amplifier - MAX31865)? if yes, do I need 8 of them to connect the sensors to the amplifier and then to the multiplexer, or do I need one amplifier to connect it between the multiplexer and the RPi 4?

Thanks again

ghp
Posts: 3040
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany

Re: Multi Temperature sensors on Raspberry pi 4

Thu Dec 01, 2022 1:49 pm

The MAX31865 is a SPI device, can't be used with an I2C multiplexer.
If using MAX31865, then one PT sensor needs one MAX31865.

SPI devices in theory can be run in parallel. Then each device needs its own CS signal. A line decoder as the 74HC138D could be used to distribute a single CS to many selectable outputs.

Having many logic lines connected to each other raises other problems. Input capacitance of chips add up and makes the signals slow. Especially the SCK, SDI(MOSI) line driving 24 chips would benefit from cascaded line drivers. A not used chip has its SDO line high-z, but if SDO is used it has to drive 23 other inputs plus the RPi input. So a multiplexer would be useful here.
Looks easier to have one pico for a group of eight sensors. In case of pico then collect the data in RPi for further processing. Also better for development: make one board for the sensors, test it and produce then as much as needed.

User avatar
robin48gx
Posts: 21
Joined: Mon Jul 16, 2012 11:20 am
Location: Brighton

Re: Multi Temperature sensors on Raspberry pi 4

Thu Dec 15, 2022 8:51 am

You could use TH7 thermocouple readers. These allow 7 thermocouples per raspberry pi and come with logging software.

memjr
Posts: 2563
Joined: Fri Aug 21, 2020 5:59 pm

Re: Multi Temperature sensors on Raspberry pi 4

Thu Dec 15, 2022 6:24 pm

Ibra_94 wrote:
Thu Dec 01, 2022 10:25 am
Hi everyone, thanks for all of your solutions and suggestions, I will try to explain a little bit more.

So I have 3 simulation models, wherein in each model, I have to measure the temperature in 8 spots, the medium is sand basically, so in total 24 pt100 sensors (not 45 sensors anymore, plan changed), and I am going to measure one model by a time (so one-meter cord long of pt100 would be more than enough)
so I am thinking to connect the multiplexer (TCA9548A I2C Multiplexer) to the RPi 4, and then the 8 sensors.
now my question is, do I need to have an amplifier (Adafruit PT100 RTD Temperature Sensor Amplifier - MAX31865)? if yes, do I need 8 of them to connect the sensors to the amplifier and then to the multiplexer, or do I need one amplifier to connect it between the multiplexer and the RPi 4?

Thanks again
No need to multiplex I2C. There are chips out there that you can connect 8 (or more) sensors to each. Then you'd need only 2 or 3 of those per pi. Here's an example of an 8 channel chip https://www.analog.com/en/products/ad71 ... t-overview

Here's another one with an AD7193, also 8 channel with schematics too https://www.farnell.com/datasheets/1731361.pdf

This LTC can handle up to 20 sensors by itself https://www.digikey.com/en/products/det ... LX/9180699


If you want to go with easy to find (and overpriced modules from adafruit, etc), you can get 24 pico with one probe and mudule each and have each of them report their measurements to a central locations, perhaps a Pi acting as the collection server.

What are the requirements for you project, other than the number of probes? Off the shelf parts? make PCBs so you can work with on of those other ICs that allow you to connect multiple probes to them? Do whatever it takes, no matter what (in which case 1 pico/probe works superbly well).

Then can *you* get it done? This is not meant as an insult, it is a very important. We can help with sugestions and sometimes some of us have been known to provide working code to a reader or another, but that's more of a "I feel charitable today and have the time so I wrote this for you" than something you're going to be able to rely on.

This last point may make a difference on whether you need a solution that already has drivers for your chose chip or not because you'd need to write code to drive that chip because you can't find code for it already out there.

Return to “Beginners”