Communica

How to Integrate Temperature Sensors with Arduino: A Practical South Africa Guide

Learn how to integrate temperature sensors with Arduino: wiring, code, calculations, troubleshooting and local sourcing tips for South African makers and labs.

sensors and semiconductors
March 14, 2026
5 min read

Sensor types explained

Compare analogue, 1-Wire, I2C and thermocouple options and when to use each.

Wiring & code samples

Step-by-step LM35, DS18B20 and BME280 examples with wiring diagrams and formulas.

Local procurement tips

Plan for branch pickup, VAT invoices and stock checks to avoid lead-time delays.

Overview: temperature sensors and Arduino ecosystems

This guide explains how to integrate temperature sensors with Arduino boards, covering common sensor types, wiring, sample code, selection criteria and troubleshooting. Whether you are a South African student building a lab project, a maker prototyping an IoT node, or a technician evaluating parts for production, the steps below focus on practical, locally relevant details such as availability, lead times and branch pickup options.

Common sensor types and their uses

  • Analogue sensors (thermistors, LM35) for simple, low-cost projects.
  • Digital one-wire sensors (DS18B20) for accurate, multi-sensor runs on a single bus.
  • I2C sensors (TMP102, BME280) for combined measurements (temperature, humidity, pressure) and easy wiring.
  • Thermocouples (via amplifier chips like MAX6675/MAX31855) for high-temperature ranges.

Quick comparison

Sensor Interface Typical accuracy Notes
LM35 Analogue ±0.5°C Easy to read with ADC, needs calibration for offset.
NTC Thermistor Analogue / Voltage divider Varies with type Cheap, needs nonlinear conversion (Steinhart-Hart).
DS18B20 1-Wire (digital) ±0.5°C Multiple sensors on one line, waterproof probes available.
BME280 I2C / SPI ±1.0°C Also measures humidity and pressure; popular for weather stations.

Basic electrical principles and formulas

When using analogue sensors with Arduino, you read a voltage via the ADC and convert it to temperature. Key formulas:

  • ADC conversion: ADC_voltage = (ADC_reading / 1023) * Vref (for 10-bit ADC on classic Arduino).
  • LM35: Temperature (°C) = ADC_voltage (mV) / 10.
  • Thermistor (approx): Use Steinhart-Hart equation: 1/T = A + B ln(R) + C (ln(R))^3, where T is in Kelvin.
Note: On Arduino Uno, Vref defaults to the 5V rail. For better accuracy use the internal 1.1V reference for low-voltage sensors, or an external reference and stable supply to reduce drift.

Example wiring: DS18B20 (single sensor)

DS18B20 uses a single data pin plus power and ground. If using parasite power mode, only data and ground are needed, but the recommended method uses three wires.

Arduino 5V ----+---- 5V of DS18B20
GND ----------+---- GND of DS18B20
Digital pin 2 -+---- DATA of DS18B20
               |(4.7k pull-up resistor between DATA and 5V)

For code and libraries, the OneWire and DallasTemperature libraries provide straightforward functions to read temperature values and enumerate multiple sensors on the same bus.

Locally, popular parts such as DS18B20 modules and waterproof probes are often stocked; check availability at Communica branches or browse sensor categories to confirm current stock and branch pickup options: where to find temperature sensors in south africa and buy temperature sensing components.

Related Sensors & Semiconductors Products

Discover quality sensors & semiconductors products related to How to Integrate Temperature Sensors with Arduino: A Practical South Africa Guide

Ema Ta1004 Programmable Temp Sensor Stainless Steel -40 - +150 Deg. C 4-20ma Output 1 Npn/pnp Output 2 - M18 X 1,5 External Thread Ip68

Ema Ta1004 Programmable Temp Sensor Stainless Steel -40 - +150 Deg. C 4-20ma Output 1 Npn/pnp Output 2 - M18 X 1,5 External Thread Ip68

EmaTemperature Sensors
ZAR4986.98

Ema Ta1004 Programmable Temp Sensor Stainless Steel -40 - +150 Deg. C 4-20ma Output 1 Npn/pnp Output 2 - M18 X 1,5 External Thread Ip68

Step-by-step integration: examples and code snippets

Example 1 - Reading LM35 (analogue)

Wiring: LM35 Vout to A0, Vcc to 5V, GND to GND. Use formula:

float voltage = analogRead(A0) * (5.0 / 1023.0); float tempC = voltage * 100.0; // LM35 outputs 10mV/°C

Calibration tip: measure a known reference (ambient air or ice bath) and apply an offset if necessary. For better ADC resolution, consider using Arduino's analogReference(INTERNAL) when operating at lower voltages.

Example 2 - Multiple DS18B20 sensors

Connect multiple DS18B20 sensors in parallel to a single data pin with a single pull-up resistor. Use OneWire to search for device addresses and DallasTemperature to read by index or address.

// Pseudocode
OneWire oneWire(2);
DallasTemperature sensors(&oneWire);
sensors.begin();
sensors.requestTemperatures();
float t0 = sensors.getTempCByIndex(0);

This setup is ideal for long cable runs in classrooms or farm sensor arrays. Waterproof probes and cable assemblies commonly stocked locally simplify deployment.

Example 3 - Using BME280 over I2C

I2C reduces wiring complexity: connect SDA to A4 (Uno), SCL to A5, Vcc to 3.3V and GND to ground. Use an I2C library to read temperature, humidity and pressure in one module. Many BME280 breakout boards are 3.3V devices - ensure level compatibility.

Troubleshooting checklist

  • No reading from sensor: check power, ground, and correct data pin; verify pull-up resistor for one-wire devices.
  • Inaccurate readings: confirm reference voltage, add calibration offset, or use shielded cable for long runs.
  • Multiple sensors not detected: verify unique addresses for DS18B20 and check bus wiring polarity.
  • Intermittent values: noisy power supply - add decoupling capacitors or a regulated supply.

Practical South Africa notes: sourcing, stock and project planning

Communica stocks a broad range of sensors and related components suitable for education and prototyping. For student projects or short development cycles, plan for local branch pickup at Samrand, Pretoria CBD or Cape Town to avoid international lead times; check branch trading hours and stock: Branches & Trading Hours.

When procuring parts for labs or small production runs, request VAT invoices and account quotes via Communica's corporate channels. For an overview of the company, history and operations, see the About page: About Communica. For broader browsing by brand, use the Shop by Brand page to find familiar maker favourites and sensor manufacturers: Shop by Brand.

Example calculations and a small bill of materials (BOM)

Item Purpose Notes
DS18B20 probe Temperature sensing Waterproof probe for outdoor use
4.7k resistor Pull-up for 1-Wire bus Use metal-film for stability
Breadboard & jumper cables Prototyping Consider IDC ribbon for long runs

Price planning: sensor modules and basic BOM items in South Africa typically range from modest ZAR values for single sensors to higher for industrial probes; always check current stock and lead times before finalising lab kits or procurement lists. For sourcing guidance in Samrand, see supplier-of-temperature-sensors-in-samrand.

Sources

Communica Samrand — Electronic Component Experts

Communica supplies semiconductors and electronic components to industries such as automotive, electrical, automation, mining, and education.

Last updated: March 14, 2026

Disclaimer: This content is for educational purposes only. Product availability, pricing, and specifications are subject to change. Always verify current details on the retailer's website before making a purchase. We may earn affiliate commissions from qualifying purchases.

Frequently Asked Questions

Get answers to common questions about Sensors And Semiconductors

Why Choose Communica?

*Free Shipping

Free shipping for orders over ZAR 1,000.00.

7-Day Returns

Get a full refund if you had the product for less than 7 days.

Quick Delivery

Nationwide delivery within 2 - 4 working days.