Skip to main content

Interfacing IR Temperature Sensor with Raspberry Pi 3 ЁЯМб️

Interfacing IR Temperature Sensor with Raspberry Pi 3 ЁЯМб️

Interfacing IR Temperature Sensor with Raspberry Pi 3 ЁЯМб️

Infrared temperature sensors are non-contact sensors that detect the temperature of objects by sensing emitted infrared radiation. Today, we’ll learn how to interface an IR sensor (like MLX90614) with a Raspberry Pi 3. ЁЯОУ

ЁЯФз Components Required

ComponentQuantity
Raspberry Pi 31
IR Temp Sensor (MLX90614)1
Jumper Wires4
Breadboard (optional)1

ЁЯкЫ Pin Connections

Sensor PinRaspberry Pi PinPin Number
VCC3.3VPin 1
GNDGroundPin 6
SDAGPIO 2 (SDA)Pin 3
SCLGPIO 3 (SCL)Pin 5
IR Sensor Connection Diagram

Figure: IR Sensor connected to Raspberry Pi 3

⚙️ Enabling I2C on Raspberry Pi

  • Open terminal: sudo raspi-config
  • Go to Interfacing Options > I2C and enable it.
  • Reboot your Raspberry Pi.

ЁЯТ╗ Python Code

import smbus import time bus = smbus.SMBus(1) address = 0x5A def read_temp(): raw_ambient = bus.read_word_data(address, 0x06) raw_object = bus.read_word_data(address, 0x07) temp_ambient = (raw_ambient * 0.02) - 273.15 temp_object = (raw_object * 0.02) - 273.15 return temp_ambient, temp_object try: while True: ambient, obj = read_temp() print(f"Ambient: {ambient:.2f}°C | Object: {obj:.2f}°C") time.sleep(1) except KeyboardInterrupt: print("Stopped")

ЁЯУМ Summary

This setup allows contactless temperature measurement, ideal for COVID screening booths, industrial monitoring, and smart home devices! ЁЯФе❄️

Raspberry Pi 3 рд╕рд╣ IR рддाрдкрдоाрди рд╕ेрди्рд╕рд░ рдХрд╕े рдЬोрдбाрдпрдЪे ЁЯМб️ (рдорд░ाрдаी)

IR (Infrared) рддाрдкрдоाрди рд╕ेрди्рд╕рд░ рд╣े рд╕ंрдкрд░्рдХрд╡िрд░рд╣िрдд рд╕ेрди्рд╕рд░ рдЕрд╕рддाрдд рдЬे рд╡рд╕्рддूंрдкाрд╕ूрди рдЙрдд्рд╕рд░्рдЬिрдд рд╣ोрдгाрд░े рдЗрди्рдл्рд░ाрд░ेрдб рд░ेрдбिрдПрд╢рди рдоोрдЬूрди рддाрдкрдоाрди рдоोрдЬрддाрдд. рдЪрд▓ा рд╣े Raspberry Pi 3 рд╕ोрдмрдд рдХрд╕े рдЬोрдбाрдпрдЪे рддे рд╢िрдХूрдпा. ЁЯШК

ЁЯФз рд▓ाрдЧрдгाрд░े рд╕ाрд╣िрдд्рдп

рд╕ाрд╣िрдд्рдпрдк्рд░рдоाрдг
Raspberry Pi 31
IR рддाрдкрдоाрди рд╕ेрди्рд╕рд░ (MLX90614)1
рдЬंрдкрд░ рд╡ाрдпрд░4
рдм्рд░ेрдбрдмोрд░्рдб (рдкрд░्рдпाрдпी)1

ЁЯФМ рд╡ाрдпрд░िंрдЧ рдЬोрдбрдгी

рд╕ेрди्рд╕рд░ рдкिрдиRaspberry Pi рдкिрдирдкिрди рдХ्рд░рдоांрдХ
VCC3.3Vрдкिрди 1
GNDGNDрдкिрди 6
SDAGPIO2 (SDA)рдкिрди 3
SCLGPIO3 (SCL)рдкिрди 5

⚙️ I2C рд╕ुрд░ू рдХрд░рдгे

  • рдЯрд░्рдоिрдирд▓ рдЙрдШрдбा: sudo raspi-config
  • Interfacing Options > I2C рдпेрдеे рдЬाрдКрди I2C рд╕ुрд░ू рдХрд░ा.
  • Pi рд░ीрдмूрдЯ рдХрд░ा.

ЁЯТ╗ Python рдХोрдб

рдЦाрд▓ीрд▓ рдХोрдб рд╡ाрдкрд░ूрди рдЖрдкрдг рд╕ेрди्рд╕рд░рдХрдбूрди рддाрдкрдоाрди рд╡ाрдЪू рд╢рдХрддो:

# рд╡рд░ीрд▓ рдЗंрдЧ्рд░рдЬी рдХोрдб рдпेрдеे рд╡ाрдкрд░ू рд╢рдХрддा (рддेрдЪ рдЖрд╣े)

ЁЯУМ рд╕ाрд░ांрд╢

рд╣ा рд╕ेрди्рд╕рд░ рд╡ाрдкрд░ूрди рдЖрдкрдг рдХोрдгрдд्рдпाрд╣ी рд╡рд╕्рддूрдЪा рддाрдкрдоाрди рди рд╕्рдкрд░्рд╢ рдХрд░рддा рдоोрдЬू рд╢рдХрддो. рд╣ा рдк्рд░ोрдЬेрдХ्рдЯ рд╕्рдоाрд░्рдЯ рд╣ोрдо, рдЗंрдбрд╕्рдЯ्рд░िрдпрд▓ рд╕ेрдл्рдЯी, рд╡ рд╣ॉрд╕्рдкिрдЯрд▓ рд╕्рдХ्рд░ीрдиिंрдЧрд╕ाрдаी рдЙрдкрдпुрдХ्рдд рдЖрд╣े! ЁЯПеЁЯФе

Comments

Popular posts from this blog

TOUCH PLATE BASED DOOR BELL

Title:  Touch plate based door bell  Circuit:  Components: IC 555 Resistors: 1 M, 100k, 330 ohms Transistor: BC547  PN2222A Capacitor: 10n 1 Copper plate : as touch plate. A 6v battery An LED / Ic UM66 Description: This is the simple circuit for touch plate based security system. In this project what basically done is, circuit detects stray voltages produced by mains voltage and electrostatic built  up in the room.If sufficient static voltage is detected by the plate then chip will charge up. Transistor BC 547 or PN2222A is used basically to increase the sensitivity.In place of led just connect IC um 66(melody IC). Applications: In homes, of course. This can be specially used in places like hospitals, when patients need to call doctor by himself.

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 Sound Sensor with Raspberry Pi 3

ЁЯФ╣ Overview The KY-037 is a high-sensitivity sound detection sensor that can detect noise levels in the environment. It provides both analog and digital outputs. In this tutorial, we’ll interface the digital output of KY-037 with Raspberry Pi 3 Model B+ (without using an ADC like MCP3008) and detect sound events.