Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Build a Raspberry Pi Temperature Logger with a $5 I2C Sensor

Follow these concise steps to turn a $5 I2C temperature sensor into a reliable data logger on a Raspberry Pi. The recorded values are written to the SD card, making them ready for Excel or any data‑analysis tool.

Components

Note: The Zagros Raspberry Pi starter kit contains everything except the sensor.

Step 1: Wire the Temperature Sensor

Connect the sensor to the Pi’s GPIO pins as shown. The ADD0 pin set to GND gives the sensor a unique I2C address (0x48). More than one sensor can share the bus as long as each has a distinct address.

Sensor PinRPi GPIO
VCC3.3 V
SDASDA (GPIO 2)
SCLSCL (GPIO 3)
GNDGND
ADD0GND (sets I2C address)
ALTN/C

Safety note: Do not power the sensor with +5 V; this will permanently damage it.

Step 2: Enable the I2C Bus

By default the Pi disables the I2C interface. Edit the blacklist file:

sudo nano /etc/modprobe.d/raspi-blacklist.conf

Change the content from:
# blacklist spi and i2c by default (many users don’t need them)
blacklist spi-bcm2708
blacklist i2c-bcm2708

to:
# blacklist spi and i2c by default (many users don’t need them)
blacklist spi-bcm2708
#blacklist i2c-bcm2708

Step 3: Load the I2C Module at Boot

Add the module to /etc/modules so it loads automatically:

sudo nano /etc/modules

Append the line:

i2c-dev

Step 4: Install I2C Utilities

Install the necessary tools and Python bindings:

sudo apt update && sudo apt install -y i2c-tools python3-smbus

Verify the sensor appears on the bus:

i2cdetect -y 1 – you should see a device at address 0x48.

With the I2C stack ready, you can now run a Python script (not included here) that reads the temperature and appends it to a CSV file on the SD card. The CSV can be opened directly in Excel for analysis.

Manufacturing process

  1. DS18B20 Temperature Sensor – Precise 1‑Wire Digital Thermometer for Industrial & Consumer Use
  2. Professional Raspberry Pi Temperature Monitoring with DS18B20
  3. TMP006 Infrared Temperature Sensor with Raspberry Pi: Python Library & Setup Guide
  4. Build a Remote Temperature Sensor with Raspberry Pi and Python – Step‑by‑Step Guide
  5. Accurate Temperature Monitoring in a Server Closet with Raspberry Pi
  6. How to Connect a DS1820 One‑Wire Temperature Sensor to a Raspberry Pi Using GPIO
  7. How to Connect a DS18B20 One‑Wire Digital Thermometer to a Raspberry Pi – A Step‑by‑Step Guide
  8. Build a Multi‑Sensor Temperature & Light Monitoring System with Raspberry Pi & DS18B20
  9. Build a Raspberry Pi Home Temperature Monitor with MCP9808, InfluxDB & Grafana
  10. Arduino Temperature Sensor Project: Read, Convert, and Display Fahrenheit