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

Build a Simple Obstacle Sensor with Arduino – Easy IR LED & Photodiode Tutorial

Components and supplies

IR transmitter (generic)
×1
Photo Diode
×1
Build a Simple Obstacle Sensor with Arduino – Easy IR LED & Photodiode Tutorial
Arduino UNO
×1
3k resistor
×1
150 ohm resistor
×1
Build a Simple Obstacle Sensor with Arduino – Easy IR LED & Photodiode Tutorial
Breadboard (generic)
×1
Build a Simple Obstacle Sensor with Arduino – Easy IR LED & Photodiode Tutorial
Jumper wires (generic)
×1
Build a Simple Obstacle Sensor with Arduino – Easy IR LED & Photodiode Tutorial
LED (generic)
×2

Apps and online services

Build a Simple Obstacle Sensor with Arduino – Easy IR LED & Photodiode Tutorial
Arduino IDE

About this project

Step 1: Gather Stuff

Stuff you are gonna need:

  • Arduino
  • 150 ohms resistor
  • 3k ohms resistor
  • IR LED
  • Photodiode
  • jumpers
  • breadboard
  • LEDs

Step 2: Assemble

  • IR LED Anode => 150 ohms resistor => 5v
  • IR Cathode => GND
  • PhotoDiode Anode => GND
  • PhotoDiode Cathode => 3k ohms resistor => D2
  • PhotoDiode Cathode => A0
  • Green LED => D13
  • Red LED => D12
Build a Simple Obstacle Sensor with Arduino – Easy IR LED & Photodiode Tutorial

Step 3 Upload The Code:

Upload the code given. See my other projects:

Thank You!

Support:

Please support me by Going to Instructables and voting my Work. Without your work I can't keep on making stuff.

Vote For Me!

https://www.instructables.com/id/How-to-Make-Remote-Controlled-Bulb-With-Arduino/

https://www.instructables.com/id/How-to-Make-a-Parabolic-Microphone-With-an-Old-TV-/

https://www.instructables.com/id/How-to-Make-Secret-Drawer-Alarm/

Code

  • Code
CodeArduino
Arduino Code
int photoDiode=2;                      
int GreenLed=13;                     
int senRead=0;                  
int SenseRate=905;                   
 void setup()    
 {  
  pinMode(photoDiode,OUTPUT);  
  pinMode(GreenLed,OUTPUT);
  pinMode(12,OUTPUT);
  digitalWrite(photoDiode,HIGH);       
  digitalWrite(GreenLed,LOW);      
  Serial.begin(9600);           
 }  
 void loop()  
 {  
  int val=analogRead(senRead);    
  Serial.println(val);            
  if(val <= SenseRate)               
  {
   digitalWrite(12,HIGH);  
   digitalWrite(GreenLed,LOW);       
   delay(20);  
  }  
  else if(val > SenseRate)            
  {  
   digitalWrite(12,LOW);
   digitalWrite(GreenLed,HIGH);       
   delay(20);  
  }  
 }  

Schematics

SchematicsBuild a Simple Obstacle Sensor with Arduino – Easy IR LED & Photodiode TutorialSchematicsobstacl_GeLzd2U2jr.fzz

Manufacturing process

  1. DHT11 Temperature & Humidity Sensor Project with LED Indicators and Piezo Speaker
  2. K30 CO2 Sensor: Real‑Time Indoor Air Quality Monitoring
  3. Integrating a DFRobot Capacitive Fingerprint Sensor with Arduino or ESP8266
  4. Compact Arduino Radar System with HC‑SR04 Ultrasonic Sensor & 1.8" Display
  5. Build an Ultrasonic Range Detector Using Arduino UNO and SR04 Sensor
  6. Master Modbus on Arduino: Step‑by‑Step Guide
  7. Hysteresis-Based Arduino Temperature Control System
  8. Real-Time Soil Moisture Monitoring with LCD Display – Arduino DIY Kit
  9. Build an IR Sensor Project with Arduino UNO – Simple Guide
  10. Android Motion‑Detection Camera Controlled by Arduino MCU