Building a Low‑Cost RTD Sensor for Arduino: From Wiring to Real‑World Data
Why bother with a pricey commercial temperature probe when a few dollars and a bit of wiring can give you reliable, repeatable readings? In my early days of tinkering, I spent a weekend soldering a cheap thermistor only to discover it drifted by several degrees after a day of use. That lesson taught me the value of a proper RTD (Resistance Temperature Detector) – stable, linear, and cheap enough for hobby projects. Today I’ll walk you through a simple, low‑cost RTD build that plugs straight into an Arduino and delivers data you can trust in the garage or on the factory floor.
What Is an RTD and Why Choose One?
An RTD is a sensor that changes its electrical resistance with temperature. The most common type uses platinum (often called PT100 or PT1000) because platinum’s resistance changes predictably and it stays stable over many years. Compared to thermistors, RTDs have a wider temperature range and far less drift. Compared to thermocouples, they are easier to read with a single‑ended voltage measurement and need no cold‑junction compensation.
In short, if you need accuracy better than ±1 °C and you’re comfortable with a little extra wiring, an RTD is a solid choice.
Parts List – Keep It Under $15
| Item | Typical Cost |
|---|---|
| PT100 or PT1000 sensor (2‑wire) | $4‑$6 |
| 1 kΩ precision resistor (0.1 % tolerance) | $0.10 |
| Arduino Uno (or compatible) | $10‑$15 (you probably already have one) |
| Breadboard and jumper wires | $2 |
| Small enclosure or heat‑shrink tubing | $1 |
The key to low cost is using a 2‑wire RTD and a simple Wheatstone bridge. If you need the best possible accuracy, a 3‑ or 4‑wire RTD eliminates lead resistance, but that adds extra components and cost. For most hobby and light‑industrial work, the 2‑wire approach works fine.
Wiring the Wheatstone Bridge
A Wheatstone bridge converts the tiny resistance change of the RTD into a voltage you can read with the Arduino’s analog‑to‑digital converter (ADC). Here’s the basic layout:
- Connect the RTD between the bridge’s top left node (point A) and bottom left node (point D).
- Place a 1 kΩ precision resistor between the top right node (point B) and bottom right node (point C).
- Connect a 10 kΩ resistor between points A and B, and another 10 kΩ resistor between points C and D.
- The bridge’s output is the voltage difference between points B and C. Feed point B into Arduino analog pin A0 and point C into A1.
Because the Arduino only measures voltage relative to ground, you’ll need a small differential amplifier to boost the B‑C voltage. An easy way is to use an LM358 op‑amp in a differential configuration with a gain of about 10. The LM358 is cheap, works on 5 V, and is readily available.
Step‑by‑Step Wiring
- Mount the RTD – Solder the two leads to the breadboard, keeping the leads short to reduce extra resistance.
- Build the bridge – Place the four fixed resistors in a diamond shape. Double‑check that the 1 kΩ resistor sits opposite the RTD.
- Add the op‑amp – Connect the non‑inverting input (+) to point B, the inverting input (‑) to point C. Tie the output to A0 through a 10 kΩ resistor to set the gain. Power the LM358 from the Arduino’s 5 V and ground pins.
- Power the bridge – Connect the top of the bridge (points A and B) to 5 V, and the bottom (points C and D) to ground.
If you prefer a ready‑made solution, the MAX31865 breakout board does exactly this and costs about $5. But building it yourself gives you insight into how the sensor works – and that’s what TempSense Tech is all about.
Calibrating the Sensor
Even a perfect bridge needs a reference point. The easiest method is a two‑point calibration:
- Ice point (0 °C) – Fill a small cup with crushed ice, add a splash of water, and stir until the mixture is at 0 °C. Record the ADC reading.
- Room temperature (≈25 °C) – Let the sensor sit in air for a few minutes, then record the reading. You can verify the temperature with a cheap digital thermometer.
With those two points you can compute a linear conversion:
tempC = (reading - reading0) * (25.0 - 0.0) / (reading25 - reading0) + 0.0
Because the PT100’s resistance curve is nearly linear over this range, a simple linear fit is sufficient for hobby work. If you need higher accuracy, you can use the Callendar‑Van Dusen equation, but that adds a few lines of code and a lookup table – something I’ll cover in a later post.
Arduino Sketch – From Raw Counts to Degrees
Below is a minimal sketch that reads the differential voltage, applies the gain, and converts to Celsius using the two‑point calibration. Feel free to copy it into the Arduino IDE.
const int pinPos = A0; // op‑amp output
const int pinNeg = A1; // not used, but kept for symmetry
const float Vref = 5.0; // Arduino reference voltage
const int ADCmax = 1023; // 10‑bit ADC
// Calibration values – replace with your own measurements
float reading0 = 512.0; // ADC count at 0 °C
float reading25 = 560.0; // ADC count at 25 °C
void setup() {
Serial.begin(9600);
}
void loop() {
int raw = analogRead(pinPos);
// Linear conversion
float tempC = (raw - reading0) * 25.0 / (reading25 - reading0);
Serial.print("Temp = ");
Serial.print(tempC, 1);
Serial.println(" C");
delay(1000);
}
A few notes:
- The
reading0andreading25values will differ for each build because of resistor tolerances and op‑amp gain. - If you use a PT1000 (1000 Ω at 0 °C) instead of a PT100, the bridge resistors should be scaled accordingly – a 10 kΩ fixed resistor opposite the sensor works well.
- The sketch prints one reading per second; you can increase the rate if you need faster response.
Putting It to Real‑World Use
Now that you have temperature data, what can you do with it? Here are three quick ideas that I’ve tried in my own workshop:
- Smart thermostat for a small incubator – Hook the Arduino to a relay that switches a heating pad on and off. The RTD keeps the temperature within ±0.5 °C, enough for hatching eggs.
- Industrial IoT node – Pair the Arduino with an ESP8266 module and push the temperature to a cloud dashboard. The low drift of the RTD means you won’t need frequent recalibration.
- Data logger for a brewing experiment – Store readings on an SD card every minute. The linearity of the RTD makes it easy to compare batches later.
In each case, the key advantage is confidence in the numbers. When you know the sensor won’t wander a few degrees overnight, you can focus on the bigger picture – be it controlling a process or simply enjoying a perfectly brewed cup of coffee.
Common Pitfalls and How to Avoid Them
- Lead resistance – With a 2‑wire RTD, the resistance of the leads adds to the sensor reading. Keep leads short and use the 1 kΩ resistor to balance the bridge; this reduces error to under 0.2 °C for most setups.
- Noise on the analog input – The differential voltage is only a few millivolts. Use a small capacitor (0.1 µF) across the op‑amp output to smooth spikes, and keep the Arduino’s ground path clean.
- Temperature coefficient of the fixed resistors – Choose resistors with a low temperature coefficient (≤50 ppm/°C). The 0.1 % precision resistors I listed are usually fine, but for high‑precision work you can buy 0.01 % parts.
Wrap‑Up
Building a low‑cost RTD sensor for Arduino is a rewarding project that blends basic electronics with real‑world measurement. By wiring a simple Wheatstone bridge, adding a modest differential amplifier, and performing a two‑point calibration, you end up with a sensor that rivals many commercial units – at a fraction of the price. Whether you’re automating a hobby furnace, logging data for a research project, or just curious about how temperature can be turned into numbers, this approach gives you a solid foundation.
Happy building, and may your readings stay steady!
- → Build a Voice‑Controlled LED Wall Panel with Node‑RED and Arduino @craftcodeacademy
- → Build a Battery‑Powered Weather Station with Arduino: Complete Guide for Beginners @arduinoinnovator
- → How to Build a Self‑Balancing Robot with Arduino and Free Sensors @arduinoinnovator
- → How to Choose the Right Lab Digital Thermometer for Precise Research - A Step-by-Step Guide @labthermometer
- → Troubleshooting Temperature Drift in Digital Thermometers: Proven Techniques for Reliable Measurements @labthermometer