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

Raspberry Pi Temperature & Humidity Network Monitor – DIY Setup Guide

Raspberry Pi Temperature & Humidity Network Monitor – DIY Setup Guide

Build a reliable, network‑connected temperature and humidity monitor using a Raspberry Pi and an inexpensive sensor. This guide provides a complete parts list, step‑by‑step instructions, and the software needed to capture, store, and visualize data.

Bill of Materials (BOM)

Step 1: Physical Assembly

1. Separate the case halves and set aside the rubber feet.
2. Mount the Raspberry Pi on the bottom half with the supplied hardware.
3. Remove the GPIO knockout using a razor blade or X‑acto knife.
4. Cut a 1.1×2.4×0.75 in. plastic standoff (Azek) to isolate the sensor from the Pi’s heat output.
5. Apply hot‑melt glue to the standoff, sensor, and case halves as shown in the diagram, ensuring the LED cutouts and camera ribbon cutout remain unobstructed.
6. Attach rubber feet to the bottom of the PoE adapter for stability.
7. Set the PoE splitter’s voltage‑output switch to 5 V and lock it in place with a dab of glue.

Step 2: Electrical Wiring

The DHT22 has a spare ground wire; trim it off. Then:

  1. Wire the sensor to a 5‑pin female header: Red (+3.3 V), Yellow (Data), Black (Ground). The middle two pins are unused.
  2. Connect the header to the Raspberry Pi’s GPIO as follows:
    • Red → GPIO Pin 1 (3.3 V)
    • Yellow → GPIO Pin 7 (GPIO 4)
    • Black → Ground (GPIO Pin 9)
  3. Use a short CAT5 cable to link the PoE splitter’s LAN OUT to the Pi’s Ethernet jack.
  4. Splice a Micro‑USB cable to the PoE splitter’s power output. For an Adafruit connector, follow the wiring diagram at Adafruit; otherwise, identify +5 V and GND with a multimeter (white stripe = positive).

Step 3: Raspberry Pi Software Setup

1. Download the latest NOOBS image from Raspberry Pi Downloads and format your SD card using SD Card Formatter.
2. Install Raspbian, selecting English‑US keyboard and enabling SSH and headless boot. Set a memorable hostname (e.g., rpithon) and a 16 M memory split.
3. Log in via SSH (ssh [email protected]) and update the system:

sudo apt-get update && sudo apt-get upgrade && sudo rpi-update && sudo reboot
4. For convenience, enable the root account and remove the default pi user:
sudo passwd root
sudo deluser --remove-home pi
5. Install essential utilities: apt-get install emacs23-nox and configure SSH for no X11 forwarding, no DNS, and a 60‑second keep‑alive.
6. Set the SD card to perform a file‑system check on every boot: tune2fs -c 1 /dev/mmcblk0p6.

Step 4: LAMP Server Installation

Install the web stack to host data visualizations:

sudo apt-get install apache2 php5 mysql-client mysql-server vsftpd
Choose a secure MySQL root password during the installation. Afterward, verify the web server by navigating to https://rpithon or https://.

Step 5: Python Environment & Data Handling

Install Python packages for MySQL and plotting:

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python ez_setup.py
sudo apt-get install python-mysqldb libmysqlclient-dev
sudo easy_install MySQL-python
sudo apt-get install libblas-dev liblapack-dev python-dev libatlas-base-dev gfortran python-setuptools python-scipy python-matplotlib

Step 6: WiringPi GPIO Interface

Use Gordon Henderson’s WiringPi library to interface with the DHT22 and to log data to the MySQL database. Refer to the WiringPi documentation for detailed API usage.

Maintenance & Troubleshooting

With the hardware assembled, software configured, and the sensor data flowing to a web interface, you now have a fully functional, network‑connected environmental monitor suitable for home, office, or small‑scale industrial use.

Manufacturing process

  1. Build a Raspberry Pi Temperature Logger with a $5 I2C Sensor
  2. How to Read Temperature with a DS18B20 on Raspberry Pi 2
  3. Professional Raspberry Pi Temperature Monitoring with DS18B20
  4. Measuring Temperature on Raspberry Pi with Maxim 1‑Wire Sensors and DS2482 I2C Bridge
  5. Seamless Temperature & Humidity Monitoring on Raspberry Pi with EzTemp
  6. Build a Raspberry Pi Weather Station that Emails Daily Weather Data
  7. Accurate Temperature Monitoring in a Server Closet with Raspberry Pi
  8. Build a ThingSpeak Temperature Monitor with Raspberry Pi & BrickPi
  9. Monitor Your Home Temperature with a Raspberry Pi Dashboard
  10. Build a Raspberry Pi Home Temperature Monitor with MCP9808, InfluxDB & Grafana