Skip to main content

Posts

Showing posts from June, 2025

Interfacing GPS Module with Raspberry Pi 3 🌍

Interfacing GPS Module with Raspberry Pi 3 🌍 Interfacing GPS Module with Raspberry Pi 3 🌍 Global Positioning System (GPS) modules help us get location data like latitude, longitude, speed, altitude, and more! Let's learn how to connect a GPS module (like NEO-6M) to Raspberry Pi 3 and read real-time location. 🛰️📡 🔧 Components Required Component Quantity Raspberry Pi 3 1 GPS Module (NEO-6M) 1 Jumper Wires 4 USB to TTL Converter (Optional) 1 🔌 GPS Module to Pi Connections GPS Pin Raspberry Pi Pin Pin Number VCC 3.3V / 5V Pin 1 or 4 GND Ground Pin 6 TX GPIO15 (RXD) Pin 10 RX GPIO14 (TXD) Pin 8 Figure: GPS Module connected to Raspberry Pi 3 ⚙️ Enable Serial Interface Run: sudo raspi-config Go to Interfacing Options > Serial Disable shell access over serial and enable serial hardware Reboot your Raspberry Pi 📦 Install Required Packages...

Interfacing Load Cell with Raspberry Pi 3 (via HX711) ⚖️

Interfacing Load Cell with Raspberry Pi 3 (via HX711) ⚖️ Interfacing Load Cell with Raspberry Pi 3 (via HX711) ⚖️ A load cell is a transducer that converts force (weight) into an electrical signal. The HX711 is a precision 24-bit analog-to-digital converter (ADC) designed for weigh scales. Today we’ll connect a load cell to Raspberry Pi 3 using the HX711 module. 🧪 🔧 Components Required Component Quantity Raspberry Pi 3 1 Load Cell 1 HX711 Module 1 Jumper Wires 6 Breadboard (optional) 1 🔌 Pin Connections HX711 Pin Raspberry Pi Pin Pin Number VCC 5V Pin 2 GND Ground Pin 6 DT GPIO 5 Pin 29 SCK GPIO 6 Pin 31 Figure: Load Cell connected to Raspberry Pi 3 via HX711 💻 Python Code from hx711 import HX711 import RPi.GPIO as GPIO import time hx = HX711(dout_pin=5, pd_sck_pin=6) hx.set_reading_format("MSB", "MSB") hx.set_reference_unit(1) hx.reset()...

Interfacing Color Sensor (TCS3200) with Raspberry Pi 3 🎨

Interfacing Color Sensor (TCS3200) with Raspberry Pi 3 🎨 Interfacing Color Sensor (TCS3200) with Raspberry Pi 3 🎨 The TCS3200 color sensor can detect various colors using its array of photodiodes and filters. Let’s interface it with Raspberry Pi 3 and detect different object colors! 🌈 🔧 Components Required Component Quantity Raspberry Pi 3 1 TCS3200 Color Sensor 1 Jumper Wires 8 🔌 Pin Connections Sensor Pin Raspberry Pi Pin Pin Number VCC 3.3V Pin 1 GND Ground Pin 6 S0 GPIO 17 Pin 11 S1 GPIO 27 Pin 13 S2 GPIO 22 Pin 15 S3 GPIO 23 Pin 16 OUT GPIO 24 Pin 18 Figure: TCS3200 Color Sensor connected to Raspberry Pi 3 💻 Python Code import RPi.GPIO as GPIO import time # Set up GPIO pins for S0-S3 and OUT GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.OUT) GPIO.setup(27, GPIO.OUT) GPIO.setup(22, GPIO.OUT) GPIO.setup(23, GPIO.OUT) GPIO.setup(24, GPIO.IN) GPIO.output(...

Interfacing pH Sensor with Raspberry Pi 3 🌿

Interfacing pH Sensor with Raspberry Pi 3 🌿 Interfacing pH Sensor with Raspberry Pi 3 🌿 pH sensors help us monitor the acidity or alkalinity of water and soil. This guide explains how to interface a pH sensor (via MCP3008 ADC) with Raspberry Pi 3 for real-time monitoring. 🧪🌱 🔧 Components Required Component Quantity Raspberry Pi 3 1 pH Sensor 1 MCP3008 ADC 1 Jumper Wires Several Breadboard 1 🔌 Pin Connections MCP3008 Pin Connection Raspberry Pi Pin VDD, VREF 3.3V Pin 1 AGND, DGND GND Pin 6 CH0 pH Sensor Output - DIN MOSI GPIO10 (Pin 19) DOUT MISO GPIO9 (Pin 21) CLK Clock GPIO11 (Pin 23) CS Chip Select GPIO8 (Pin 24) Figure: pH Sensor interfaced with Raspberry Pi 3 using MCP3008 💻 Python Code import spidev import time spi = spidev.SpiDev() spi.open(0, 0) spi.max_speed_hz = 1350000 def read_channel(channel): adc = spi.xfer2([1, (8 + channel...

Interfacing Joystick Module with Raspberry Pi 3 🎮

Interfacing Joystick Module with Raspberry Pi 3 🎮 Interfacing Joystick Module with Raspberry Pi 3 🎮 A joystick module is a fun way to capture directional input using two potentiometers and a switch. With Raspberry Pi 3, it’s great for games, robot control, and UI navigation! 🕹️ 🔧 Components Required Component Quantity Raspberry Pi 3 1 Joystick Module (Analog) 1 ADC MCP3008 1 Jumper Wires Multiple 🔌 Pin Connections The joystick gives analog values. Since RPi doesn't support analog input, we use MCP3008 ADC. MCP3008 Pin RPi Pin Joystick Channel CH0 Joystick VRx X-axis CH1 Joystick VRy Y-axis DOUT GPIO 9 (MISO) - DIN GPIO 10 (MOSI) - CLK GPIO 11 (SCLK) - CS GPIO 8 (CE0) - VDD/VREF 3.3V - AGND/DGND GND - Figure: Joystick interfaced using MCP3008 to Raspberry Pi 3 💻 Python Code import spidev import time spi = spidev.SpiDev() spi.open(0, 0) sp...

🪪Interfacing RFID Reader (RC522) with Raspberry Pi 3

Interfacing RFID Reader (RC522) with Raspberry Pi 3 🪪 Interfacing RFID Reader (RC522) with Raspberry Pi 3 🪪 The RC522 is a widely used RFID reader for 13.56 MHz tags. With a Raspberry Pi 3, we can use it to identify and authenticate users using RFID cards. 🧾 🔧 Components Required Component Quantity Raspberry Pi 3 1 RC522 RFID Reader 1 RFID Tags/Cards 1+ Jumper Wires 7 🔌 Pin Connections RFID Pin Raspberry Pi Pin Pin Number SDA GPIO 8 (CE0) Pin 24 SCK GPIO 11 (SCLK) Pin 23 MOSI GPIO 10 (MOSI) Pin 19 MISO GPIO 9 (MISO) Pin 21 IRQ Not Connected - GND Ground Pin 6 3.3V 3.3V Pin 1 Figure: RFID Reader RC522 connected to Raspberry Pi 3 💻 Python Code # Install library # git clone https://github.com/pimylifeup/MFRC522-python.git import RPi.GPIO as GPIO from mfrc522 import SimpleMFRC522 reader = SimpleMFRC522() try: print("Place your tag...") ...

🌫️ Interfacing Raspberry Pi 3 with MQ-135 Air Quality Sensor

MQ-135 Sensor with Raspberry Pi 3 🎯 Objective In this project, we will use the MQ-135 Air Quality Sensor with Raspberry Pi 3 to monitor air pollution levels. This sensor is often used in indoor air quality systems. 🧰 Components Required Component Quantity Raspberry Pi 3 1 MQ-135 Air Quality Sensor 1 MCP3008 ADC Module 1 Breadboard 1 Jumper Wires As needed Power Supply 1 💡 MQ-135 provides analog output. RPi needs MCP3008 ADC to convert analog to digital. ⚡ Circuit Connections Sensor to MCP3008: From (MQ-135) To VCC 5V (RPi3) GND GND (RPi3) AOUT CH1 (MCP3008) MCP3008 to RPi3: MCP3008 Pin RPi3 GPIO VDD, VREF 3.3V AGND, DGND GND CLK GPIO11 DOUT GPIO9 DIN GPIO10 CS GPIO8 🧠 Python Code import spidev import time spi = spidev.SpiDev() spi.open(0, 0) spi.max_speed_hz = 1350000 def read_channel(channel): adc = spi.xfer2([1, (8 + channel) << 4, 0]) data = ((adc[1] & 3) << 8) + ...