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 Thermistor Easy Quick Start - Using Molex Thermistors The Easy Way.
  • 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: 23 Aug 2022 1:55 AM Date Created
  • Views 721 views
  • Likes 7 likes
  • Comments 1 comment
  • molex
  • winners
  • thermistor
  • temperature sensor
  • uno
  • Molex thermistors
  • adc
  • arduino
  • experimenting with thermistors
  • sensor
Related
Recommended

Thermistor Easy Quick Start - Using Molex Thermistors The Easy Way.

ntewinkel
ntewinkel
23 Aug 2022
Thermistor Easy Quick Start - Using Molex Thermistors The Easy Way.

I'm Keeping It Simple Today.

There is a lot of complex math and science that goes into the manufacturing of and using of thermistors, but as a humble hobbyist end-user that can get overwhelming very quickly!

So my experiment today is going to be very simple: can I just hook up a thermistor and get reasonable results, without getting into all of the technical details?

Thankfully, a quick online search reveals a nice tutorial by a nice company: Adafruit - one of the element14 store’s suppliers.
They make it look easy, like something a young experimenter or a not-so-young weekend hobbyist might be able to handle.
Even the URL looks approachable: https://learn.adafruit.com/thermistor/using-a-thermistor

They are, of course, not the only ones out there with thermistor tutorials, but I like how they explained and simplified it down to exactly what I need to get a quick start with a thermistor.
And since I'm not looking to re-invent a wheel that's been built and optimized many times before, by minds much more brilliant than mine, using a tutorial like this seems to be the best approach to kick off my experimenting.

The Hardware:
One thermistor, one resistor, and a few wires. And a microcontroller of course.

The wiring is quite straight-forward. The tutorial also includes a wiring diagram which makes it even easier.

Thermistor with Uno wiring

It can be a bit tricky working around my co-workers here.

Charlie Kat helps with thermistor experimenting

He left before I could poke the thermistor into his fur Smiley

The Software

Their tutorial steps through and explains how it all works, and how to go about getting the best results, so I won’t repeat all of that here.
Ultimately, the part I’m interested in is towards the bottom of the article where they pull everything together into a neat little sketch that gives us the temperature readings we are after.
The math can get complicated, but they've already done the hard part of turning it all into a few lines of code.

No Charts, just 2 numbers!

One thing that’s really nice about the final summary sketch is that we only need to know 2 bits of information about the thermistor: the Beta coefficient, and the resistance at room temperature - both are on the data sheet, and probably even on the store listing. We don’t have to worry about typing out long tables of figures, and the typos that come with it.

For their tutorial they suggest a 10k resistor on the other side of the voltage divider. They are using a thermistor rated 10k at 25 °C, so I’ll just go along with that too, choosing my Molex 10k thermistor from the kit element14 so kindly provided, and using a 10k resistor for the voltage divider. I know that the fixed resistor can be tuned for my target temperature range, but that’s one of those technical details that I’m trying to avoid (for now), and such tuning is not necessary to get our first results.

Plugging it all in, here are my results…

First thermistor test results

Conclusion?

That was surprisingly easy! And the temperature looks to be right on target (compared to what my thermostat says).
Thermistors are not that complicated to use!

Seriously the part that took me the longest was when I soldered breadboard-friendly ends onto all of the thermistors in the kit!
Hooking up the wiring was straightforward, and the sketch was already built by Adafruit (MIT licence, so it's free to use, just be kind to give credit where credit is due). All I had to do was copy and paste the code into a new sketch, and update the Beta Coefficient to match my thermistor.

If we don’t require scientific-level accuracy, we can get a pretty good results by just picking a thermistor, hooking it up with a resistor, and using a basic microcontroller to read the temperatures.

Notes on increasing accuracy:

The Adafruit tutorial does a little bit of math and suggests that for our setup we can assume accuracy of maybe +/- 0.5 °C, and at best maybe +/- 0.1 °C.
That’s good enough for my intended use of monitoring my hummingbird feeder in winter, so I could just leave it at that.

However, there are a few ways we can tweak the accuracy, which I will be exploring in my next experiments:

  1. Use a DMM to measure the actual resistance of the fixed “10k” resistor, and use that value in the code.
  2. Calibrate the thermistor by measuring the resistance in an ice bath and adjusting the code with any offset found.
  3. Avoid self-heating of the thermistor by using a digital pin to only supply power when taking a reading.
  4. More complicated: do the math to see if a better value of fixed resistor will give a better resolution from the analog input for my desired temperature range. ie, tune it so that temperatures under -20 °C or over +40 °C will be out of range, and all analogRead values from 1 to 1022 map to my desired -20 °C to +40 °C range.
  5. Use a microcontroller with better ADC resolution. For example, use an Arduino MKR board or ESP32-based board.

Ultimately I'd be thrilled to hit a predictable +/- 0.2 °C level of accuracy, but I have to say I'm pretty happy with the current situation.

The other thing I will do for in an upcoming experiment is to, of course, verify that the reported temperatures are indeed correct. I'll likely have to use the ice-water and boiling-water methods, as I don't know how accurate any of my existing thermometers are.

Happy Experimenting! Slight smile
-Nico

ps, The wiring diagram and all of the code is available as part of the aforementioned tutorial, so I won't duplicate it here.

  • Sign in to reply
  • DAB
    DAB over 3 years ago

    Simple experiments are always a good way to start with new components.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
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