

To output the temperature readings to a 16X2 LCD, follow our tutorial, How to Set Up an LCD Display on an Arduino, then upload this code to the board: #include } Code for LCD Output of Temperature Readings This program will display Celsius and Fahrenheit at the same time: int ThermistorPin = 0 To display the temperature in degrees Celsius, just comment out line 18 by inserting two forward slashes (“//”) at the beginning of the line.
#Arduino thermometer serial
Code for Serial Monitor Output of Temperature ReadingsĪfter connecting the circuit above, upload this code to your Arduino to output the temperature readings to the serial monitor in Fahrenheit: int ThermistorPin = 0 įloat c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07 If it’s 340,000 Ohms, it’s a 100K thermsitor. For example, if your thermistor resistance is 34,000 Ohms, it is a 10K thermistor.

You only need to know the magnitude of your thermistor. If you don’t have a multimeter, you can make an Ohm meter with your Arduino by following our Arduino Ohm Meter tutorial. The manufacturer of the thermistor might tell you it’s resistance, but if not, you can use a multimeter to find out. In this case, the resistance of my thermistor is 100K Ohms, so my resistor is also 100K Ohms. The value of the resistor should be roughly equal to the resistance of your thermistor. Connect the CircuitĬonnect the thermistor and resistor to your Arduino like this: This equation can be rearranged and simplified to solve for R2, the resistance of the thermistor:įinally, the Steinhart-Hart equation is used to convert the resistance of the thermistor to a temperature reading. In terms of the voltage divider in a thermistor circuit, the variables in the equation above are: This is known as a voltage divider. The equation for a voltage divider is: The Arduino will measure the voltage at a point between the thermistor and a known resistor. However, the Arduino can’t measure resistance directly, it can only measure voltage. Since the thermistor is a variable resistor, we’ll need to measure the resistance before we can calculate the temperature.

Let’s build a basic thermistor circuit to see how it works, so you can apply it to other projects later. In nickel oxide NTC thermistors, the charge carriers are electron holes. In NTC thermistors made from ferric oxide, electrons are the charge carriers. High temperatures cause the semiconducting material to release more charge carriers. The conducting material contains charge carriers that allow current to flow through it. NTC thermistors are made from a semiconducting material (such as a metal oxide or ceramic) that’s been heated and compressed to form a temperature sensitive conducting material. NTC thermistors are the most common, and that’s the type we’ll be using in this tutorial. In Positive Temperature Coefficient (PTC) thermistors, resistance increases with an increase in temperature. In Negative Temperature Coefficient (NTC) thermistors, resistance decreases with an increase in temperature. They are classified by the way their resistance responds to temperature changes. Thermistors are variable resistors that change their resistance with temperature. It includes all of the parts, wiring diagrams, code, and step-by-step instructions for 58 different robotics and internet of things projects that are super fun to build! How a Thermistor Works

The 3-in-1 Smart Car and IOT Learning Kit from SunFounder has everything you need to learn how to master the Arduino.
