๐น Overview
An IR Obstacle Sensor is used to detect obstacles using infrared light. It is commonly used in robots, line-following cars, and automatic doors. In this tutorial, we will connect an IR sensor to Raspberry Pi 3 and detect obstacles.
๐ ️ Components Required
✔️ Raspberry Pi 3
✔️ IR Obstacle Sensor
✔️ Breadboard & Jumper Wires
๐ Circuit Diagram
๐ IR Sensor to Raspberry Pi Connections
IR Sensor Pin | Connection |
---|---|
VCC | 3.3V (Raspberry Pi) |
GND | GND |
OUT | GPIO 17 (Detects obstacle) |
๐ Python Code to Read IR Sensor
Save the following Python script as ir_sensor.py
and run it on Raspberry Pi.
๐ก How It Works
- The IR sensor emits infrared light and detects if it is reflected back from an obstacle.
- If an object is detected, the sensor's output is LOW (0), otherwise, it remains HIGH (1).
- The script continuously checks for an obstacle and displays the result on the screen.
๐ฏ Applications
✅ Obstacle-avoiding robots
✅ Automatic doors
✅ Line-following vehicles
๐ เคฎเคฐाเค ीเคค เคธเคฎเคाเคตเคฃी (Marathi Explanation)
๐น เคชเคฐिเคเคฏ
IR เค เคกเคฅเคณा เคธेเคจ्เคธเคฐ (Obstacle Sensor) เคนा เคเค เคธेเคจ्เคธเคฐ เคเคนे เคो เค เคฆृเคถ्เคฏ (Infrared) เคช्เคฐเคाเคถ เคชाเค เคตเคคो เคเคฃि เคช्เคฐเคคिเคฌिंเคฌ เคชเคฐเคค เคเคฒ्เคฏाเคธ เค เคกเคฅเคณा เคถोเคงเคคो. เคฏाเคा เคตाเคชเคฐ เคฐोเคฌोเค्เคธ, เคเคोเคฎॅเคिเค เคฆเคฐเคตाเคे เคเคฃि เคฒाเคเคจ-เคซॉเคฒोเคंเค เคाเคฐ्เคธเคฎเคง्เคฏे เคेเคฒा เคाเคคो.
๐ ️ เคเคตเคถ्เคฏเค เคเคเค
✔️ เคฐाเคธ्เคชเคฌेเคฐी เคชाเคฏ เฅฉ
✔️ IR เค
เคกเคฅเคณा เคธेเคจ्เคธเคฐ
✔️ เคฌ्เคฐेเคกเคฌोเคฐ्เคก เคเคฃि เคเคฎ्เคชเคฐ เคตाเคฏเคฐ
๐ เคธเคฐ्เคिเค เคเคจेเค्เคถเคจ
IR เคธेเคจ्เคธเคฐ เคชिเคจ | เคฐाเคธ्เคชเคฌेเคฐी เคชाเคฏ เคเคจेเค्เคถเคจ |
---|---|
VCC | 3.3V |
GND | GND |
OUT | GPIO 17 |
๐ เคชाเคฏเคฅॉเคจ เคोเคก
เคนा เคोเคก ir_sensor.py
เคจाเคตाเคจे เคธेเคต्เคน เคเคฐा เคเคฃि เคाเคฒเคตा.
๐ก เคนे เคเคธे เคाเคฐ्เคฏ เคเคฐเคคे?
- IR เคธेเคจ्เคธเคฐ เคเคจ्เคซ्เคฐाเคฐेเคก เคฒाเคเค เคชाเค เคตเคคो เคเคฃि เคคो เคชเคฐเคค เคชเคฐाเคตเคฐ्เคคिเคค เคाเคฒा เคी เค เคกเคฅเคณा เคถोเคงเคคो.
- เค เคกเคฅเคณा เคเคขเคณเคฒ्เคฏाเคธ, เคธेเคจ्เคธเคฐเคा เคเคเคเคชुเค LOW (0) เคนोเคคो, เค เคจ्เคฏเคฅा เคคो HIGH (1) เคฐाเคนเคคो.
- เคोเคก เคธเคคเคค เคธेเคจ्เคธเคฐ เคตाเคเคคो เคเคฃि เค เคกเคฅเคณा เคเคนे เคा เคจाเคนी เคคे เคช्เคฐिंเค เคเคฐเคคो.
๐ฏ เคเคชเคฏोเค
✅ เค
เคกเคฅเคณा เคाเคณเคฃाเคฐे เคฐोเคฌोเค्เคธ
✅ เคเคोเคฎॅเคिเค เคฆเคฐเคตाเคे
✅ เคฒाเคเคจ-เคซॉเคฒोเคंเค เคตाเคนเคจ
Comments