Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
tejassunildalvi
Published © GPL3+

Marker Beacon System with IR Sensors, Buzzer and LED

Three marker beacon station (IR Sensors) are on the ground and detecting the aircraft is approaching the runway passing over the Markers.

IntermediateProtip1,650
Marker Beacon System with IR Sensors, Buzzer and LED

Things used in this project

Story

Read more

Custom parts and enclosures

.

Schematics

Circuit Diagram

A) IR Proximity sensor connections:
1. Connect OUT of inner marker (Sensor) to Arduino's digital pin 6.
2. Then connect the OUT of middle marker (Sensor) to Arduino's digital pin 7.
3. Same as inner and middle connect the OUT of outer marker (Sensor) to Arduino's digital pin 8
4. Then connect OUT of NRI (No Return Indication sensor) to Arduino's digital pin 10.
5. Connect the GRD i.e. (ground) of all sensors to Arduino's pin ground.
6. Connect VCC of all sensors to Arduino's pin of +5 V.

B) LED's connections:
1. Connect +ve terminal of inner marker (LED) to arduino's digital pin 4.
2. Then connect the +ve terminal of middle marker (LED) to Arduino's digital pin 2.
3. Connect the +ve of outer marker (LED) to Arduino's digital pin 3.
4. After that connect all the -ve outer marker (LED) to Arduino's pin ground.

C) Buzzer connection:
1. Connect one terminal to Arduino's digital pin 11.
1. Connect another terminal to arduino's Pin GRD.

Diagram for motor

Code

Code for Sensor Part

Arduino
int irInner=6,irMiddle=13,irOuter=12,irRunway=9;
int ledInner=2,ledMiddle=3,ledOuter=4;
int sounds = 11; // Declaration of variables with pin numbers of components
int valIn=0,valMd=0,valOt=0,valRunway=0;
void setup()
{
 pinMode(irInner, INPUT_PULLUP); // input component
 pinMode(ledInner, OUTPUT); //output component
 
 pinMode(irMiddle, INPUT_PULLUP);
 pinMode(ledMiddle, OUTPUT);
 
 pinMode(irOuter, INPUT_PULLUP);
 pinMode(ledOuter, OUTPUT);
 pinMode(irRunway,INPUT_PULLUP); 
}
void loop()
{
 valIn=digitalRead(irInner); //getting current state of sensor(HIGH or LOW)
 valMd=digitalRead(irMiddle);
 valOt=digitalRead(irOuter);
 valRunway=digitalRead(irRunway);
 if(valOt==LOW ) //if obstacle on outer sensor
 {
35
 digitalWrite(ledOuter, HIGH); //led on
 tone(sounds, 1500, 350); //buzzer or speaker starts beeping sound
 delay(350);
 }
 else
 {
 digitalWrite(ledOuter,LOW); //led off
 }
 delay(50);
 
 if(valMd==LOW )
 { 
 digitalWrite(ledMiddle, HIGH);
 tone(sounds, 1200, 100);
 delay(200);
 tone(sounds, 1100, 450);
 delay(250);
 }
 else
 {
 digitalWrite(ledMiddle, LOW);
 }
 delay(50);
 
 if(valIn==LOW )
 { 
 digitalWrite(ledInner, HIGH);
 tone(sounds, 1000, 100);
 delay(100);
 } 
 else
 {
 digitalWrite(ledInner, LOW);
 }
 delay(50);
 
 if(valRunway==LOW)
 { 
 delay(10000);
 } 
}

Code For Motor Part

Arduino
int en = 11, in1 = 7, in2 = 8; 

void setup() {
// put your setup code here, to run once:
pinMode(en, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);

analogWrite(en, 96);

delay(14000);

digitalWrite(in1, LOW);
digitalWrite(in2, LOW);

delay(5000);

digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);

analogWrite(en, 180);

delay(10500);

digitalWrite(in1, LOW);
digitalWrite(in2, LOW);

delay(8000);

}

Credits

tejassunildalvi
2 projects • 1 follower
Contact

Comments

Please log in or sign up to comment.