element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experimenting with Thermistors
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Thermistors
  • More
  • Cancel
Experimenting with Thermistors
Challenge Blog Using Multiple Thermistors
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ntewinkel
  • Date Created: 10 Sep 2022 2:24 AM Date Created
  • Views 1715 views
  • Likes 8 likes
  • Comments 0 comments
  • molex
  • thermistor
  • temperature sensor
  • Molex thermistors
  • experimenting with thermistors
  • sensor
Related
Recommended

Using Multiple Thermistors

ntewinkel
ntewinkel
10 Sep 2022
Using Multiple Thermistors

This last week or so I've been experimenting with a way to read temperatures from multiple thermistors.

But First... before we talk about thermistors some more, let’s hear it for the case they came in, ok? These things are often overlooked, but I was just admiring it today, and also the fact that the compartments have solid divisions between them. Anyone who’s had tiny parts migrating and mingling can appreciate that detail. The lid properly overlaps and interlocks with the bottom too, to keep things from falling out, and it has actual hinges! - not just thinner bits of bendy plastic. Aaaah. It’s the little things in life that make the difference! Like a good cup of coffee.

But I digress… let’s talk about thermistors!

After my success with a single thermistor I gained so much confidence that I decided to go wild, and plonk ALL of my thermistors onto a breadboard! Scary, right? What am I getting myself into? You’re probably wondering how this is going to turn out, aren’t you? Oh the suspense!

Uno with many thermistors

My original plan was to connect a few good candidates onto my ESP2866 board and have it report data back to my Raspberry Pi server, ultimately making a nice multi-line graph. But, sadly, as it turns out, the ESP8266 can only handle one analog input at a time (unless we employ some fancy and sneaky methods). So that plan has been set aside… for now.

Thankfully, the Arduino IDE has a built-in Serial Plotter that turns out to be super handy for exactly the testing I was planning to do. By simply printing the temperatures to the Serial output, the plotter can turn it into a nice line graph. And it even handles multiple sensors to provide a very lovely multi-line graph!

Now, those of you paying careful attention will have noticed that I have all 10 thermistors on that breadboard, but only 5 of them are hooked up to the Uno. Unfortunately, the Uno can't handle all 10 at once. That's usually not a problem, as a normal everyday project is not likely to need that many analog inputs.

The Arduino Uno I’m using has 6 analog inputs, so I thought it best to run my tests in 2 groups.

Handling multiple thermistors can lead to some very cluttered software if it's not built in an organized sort of way, so I decided to build a Thermistor Object to represent each physical thermistor. Then I could just initialize an object with the resistance and beta values, and the object keeps track of the details itself after that. Much easier than looping through arrays of various values every time we want to do something with a thermistor.
I'll share all the code in my final blog post, which is coming soon. (I hope! Sweat smile)

The most frustrating part was, of course, when I made a "tiny" change in the code while organizing it into an object... and accidentally changed the math of the crucial formulas. Face palm
I eventually found, and fixed, the mistakes and the result is that it is now super easy to set up and use an analog pin with a thermistor!

Now I was able to easily run multiple sensors at once, to compare them.

I had planned to do some more detailed experimenting, in 2 batches, measuring the temperature of water cooling in a bottle, to get a feel of which thermistors would work best for my hummingbird feeder monitoring project, but I quickly noticed some oddities in my results - the Arduino Serial Plotter made it very easy to notice.

Multi thermistor test results

For the testing I would touch the thermistors to see the graph going up and down a bit. The idea was just to get a basic graph at first, mostly testing the graphing.

However; when I barely touched sensor #9, or even just brushed it, the graph would spike the temperature far out of the expected range. Like, I know I'm not that hot.
And I don't even know what happened to sensor #10... the chart legend says it's reporting, but I don't see a purple line.

So this leaves me with a few hypotheses:

1. I was using 10k resistors for all of the thermistor dividers. I think it's probably wise to match the resistor to the value of the thermistor resistance @25 degrees

2. Matching the divider resistor to the thermistor... I -think- that puts the middle point of the ADC range at 25degC. Thinking  (I mean, the Uno has range 0..1023, so I'm guessing a matched resistor would return 512 at 25degC)

3. Further to 2... I'm guessing that the divider resistor could be tuned to place the mid point of the ADC range to the middle of the desired temperature range. For my desired range of -20 to +40, I'm guessing the ideal mid-point would give ADC of 512 at 10degC.

For thoughts 2 and 3: can someone who is more mathematically inclined... more voltage divider savvy... comment on this? Is my hunch on the right track?

For my next step, I think I'll just concentrate on looking at the provided "resistance vs temperature characteristics" charts to see if I can pick out a few thermistors that will work best for my application.

Oh hey, speaking of divider resistors, that reminds me: in a previous blog post I mentioned that the value specified in code for the resistor could be set to be the exact value of the physical resistor, for a more accurate result.
So I tested my 10k resistors... wow, I think I can live with that accuracy!

10k resistor

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube