Go Down

Topic: Multiplexing thermistors with only one reference resistor (Read 566 times) previous topic - next topic

padmoo

Hi everyone,

I'm working on my first arduino project for work where I am trying to build a temperature probe with each thermistor read and saved with an arduino. I'm a biologist so my electric engineering knowledge is very limited but very happy to learn.

For now, I would like to use 8 thermistors with only one reference resistor (they are too expensive to buy one for each thermistor). I have the 4067 multiplexer but I am struggling to figure out how to connect everything so it does what I want it to do.

I've attached a picture of how I've wired everything. I'm not sure how the current flows through the multiplexer and would greatly appreciate some help with this.
My logic behind connecting it the way I did was:
Current starts at 3.3V goes through thermistor C9 (selected in code) through multiplexer to Sig which is connected to the resistor and A0, hopefully creating a voltage divider. Resistor is connected to ground on multiplexer.
Multiplexer gets power from the 5V arduino pin. Does that work? Or should that also be the 3.3V?

I'd also like to add a SD and RTC module but they all us the same pins like the multiplexer. Is there a way to do this? Can I use the same pins for multiple modules?

I have not figured out the code yet.

Thank you in advance for taking time to help me!!



larryd

OP's schematic:



That should work.

"one reference resistor (they are too expensive to buy one for each thermistor)"

Not that expensive.


However, each thermistor can have its own ground resistor, you would multiplex the divider voltages instead.


No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

larryd

;)





SD card uses SPI.
RTC uses SDA, SCA.

No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

padmoo

Thanks for the symbols. I've learned from an american but I'm actually european  :D

The one I am using is $20 each and I need about 30-40 of them... so not really in my budget.

Thanks for the tip with multiplexing the divider voltage.


larryd

Your thermistors will not be exactly the same so why you need a precision resistor?

What temperature range do you need to measure?





No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

There might be a issue with you design:

The 4067 is not an ideal switch, but has a resistance around 60ohm (It varies a bit) that will be added to the thermistors resistance, reducing you precision. How much depends on the resistance range of you thermistors.

The ADC on a Arduino is not very precise with only 10 bits.

You precision will also be depend of how stable the 3.3V output is compared to the 5V or the internal Arduino reference.




Smajdalf

If you need such expensive resistor it is probably you want it very precise. I think this will not work!
1) The 4067 have some ON resistance - about 200 Ohm IIRC. The resistance changes slightly with applied voltage, supply voltage, temperature...
2) Arduino's ADC is not precise enough. If you need anything better than 1% resistor you need better ADC.

Possible fix is taking 1% resistor and calibrating the whole thing?

Also you don't need a multiplexer for this. Connect thermistor to Arduino's pins. Turn one as OUTPUT HIGH and other as INPUT and it will be as if it the one were connected to 5V and the others disconnected.
Why you want to connect them to 3V3? Connecting them to 5V makes the output of the voltage divider proportional to 5V. Since output of the Arduino's ADC is also proportional to 5V by default (in 5V system) this makes the reading independent on the supply voltage (in theory).
How to insert images: https://forum.arduino.cc/index.php?topic=519037.0

Wawa

Which Arduino, and why the 3.3volt thermistor supply.
A thermistor/resistor pair is ratiometric, and must be powered from the same VCC (Vref) as the Arduino.
Powering the thermistor/resistors from a different supply defeats ratiometric compensation, and results in a less stable supply dependent readout.
$0.10 1% metalfilm resistors are perfectly ok for for thermistors. Calibration of that resistor/thermistor pair can must be done in software anyway.

If you switch thermistor/resistor pairs with a 74HC4067, then 4067 switch resistance is not important.
If you switch thermistors to one resistor, there will be dragons.
Leo..

PaulRB

Why not use ds18b20? More accurate than thermistor+Arduino ADC, multiplexing not needed. Many sensors can be attached to a single wire & read independently.

Paul__B

The 4067 is not an ideal switch, but has a resistance around 60ohm (It varies a bit)
No ...

The 4067 have some ON resistance - about 200 Ohm IIRC.
Correct.  It depends you see, the 4067 is in the order of 200 Ohms, the 74HC4067 is around 60 Ohms.

It certainly is nonsensical to be concerned about any sort of precision resistors and then consider using an analog multiplexer as part of the potential divider.  :smiley-eek:

Correct.  It depends you see, the 4067 is in the order of 200 Ohms, the 74HC4067 is around 60 Ohms.

It certainly is nonsensical to be concerned about any sort of precision resistors and then consider using an analog multiplexer as part of the potential divider.  :smiley-eek:
Can you even get the 4067 anymore?
Anyway you are wrong about the on resistance for it, it can be well above 200ohm, here is from a old CD4067 datasheet:



Note: I removed some rows form this datasheet to make the picture smaller. The full datasheet is here: http://www.ti.com/lit/ds/symlink/cd4067b.pdf

Paul__B

"In the order of 200 Ohms," - yeah, well, 1k is in that order.  :smiley-lol:

The only use for the non-HC version of the 4000 series is where you want to use odd voltages - like 12 V.  And analog multiplexing is about the only place where you would.  :smiley-roll:

padmoo

Thanks everyone for the input, it was a lot to digest and read about.

Here are some more details about my setup.

I'm using the following thermistor: https://www.digikey.com/product-detail/en/PS103J2/615-1003-ND/1014531/?itemSeq=303925140

And resistor: https://www.digikey.com/product-detail/en/USR2G-25KX1/USR2G-25KX1-ND/1650031/?itemSeq=303925474

These were recommended by a sea ice physics lab which they used for the same purpose that I will use them for.

I will use the thermistors to build a thermistor probe to use for ice core measurements. Temperatures will range from -10 to +10 deg C.

I have the HiLetgo CD74HC4067 CMOS 16 Channel 16 CH Digital Analog Multiplexer, which has more channels than I currently need but I wanted to be on the safe side as I might increase the number of thermistors.

Another group is using an Arduino for the same purpose and they gave me the tip of averaging several reads to account for noise.

Paul__B, are there any better options than a multiplexer?

larryd

"Paul__B, are there any better options than a multiplexer?"

As PaulRB said, Why not use ds18b20?

 -55 to 125°C (-67°F to +257°F)

Use multiple sensors on the same wires.



No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

Using a 0.01% resistor is completely mismatched to the rest of the parts.

To get high precision use two muxes, one for the sense and one for the resistor. Use a better ADC (ADS1115 modules is cheap and has good precision) and also measure on the resistor, this way you can calculate around the loss in the mux that is used to switch the resistor.

Go Up