Automated Boom Barrier System

The Automated Boom Barrier System is a cutting-edge undertaking that presents a solution to the hassle of access control. At the core of this system is the combining of an ultrasonic distance sensor and a servo motor, performing a multitude of tasks to automate the entry of cars into the boom barrier according to their distance from each other.  This creates a high degree of expandability and moldability, which makes the system to the pinnacle of versatility. It can be used in a wide of applications. 

Upon detection, the system activates a servo motor to lift the boom barrier. Allowing the object to pass it before closing it again. This automated mechanism aims to enhance efficiency in vehicle management and access control in various settings, reduce the need for manual operation, and improve security by regulating entry and exit points. barrier. This installation pays not just security attention through controlling vehicle entry but also facilitate the traffic flow by reducing manual power and waiting times.

In addition to its practical applications, the Automated Boom Barrier System is also a teaching aid which one can use to fully comprehend the fundamentals of electronics and programming, such as sensor integration, motor control, and conditional logic. It illustrates how complex systems can be made just by putting together easy parts to build machine’s connecting with the real world. With the technology constantly innovate, projects like this will give the opportunity for the advanced automation solutions to develop so this could be a platform that should be considered more seriously as it can revolutionize how we manage and interact with the environment.

See also  Netflix Magic With Intel Galileo!

Components:

Connections:

Micro Servo to Arduino:

  • Signal Wire (usually orange or yellow): Connect to Digital Pin 9 on the Arduino.
  • Power Wire (usually red): Connect to the 5V pin on the Arduino.
  • Ground Wire (usually brown or black): Connect to one of the GND pins on the Arduino.

Ultrasonic Sensor:

  • VCC: Connect to the 5V pin on the Arduino.
  • Trig: Connect to Digital Pin 6 on the Arduino.
  • Echo: Connect to Digital Pin 7 on the Arduino.
  • GND: Connect to another GND pin on the Arduino.

Additional Notes:

  • For the servo motor, it’s a good practice to use an external power source if your servo requires more current than the Arduino board can provide, to avoid damaging the board. Make sure to connect the ground of the external power source to the Arduino’s ground.

Code:

#include <Servo.h>

Servo myservo;   

int pos = 0;

int cm = 0;

long readUltrasonicDistance(int triggerPin, int echoPin)
{
  pinMode(triggerPin, OUTPUT); 
  digitalWrite(triggerPin, LOW);
  delayMicroseconds(2);
  digitalWrite(triggerPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(triggerPin, LOW);
  pinMode(echoPin, INPUT);
  return pulseIn(echoPin, HIGH);
}



void setup() {
  digitalWrite(12,LOW);
  myservo.attach(9); 
  Serial.begin(9600);
}

void loop() {
   cm = 0.01723 * readUltrasonicDistance(6, 7);

  if(cm<5){
  Serial.print(cm);
  Serial.println("cm");
  
 for (pos = 0; pos <= 120; pos += 1) { 
    myservo.write(pos);             
   delay(15);                       
  }
  delay(100);

  for (pos = 120; pos >= 0; pos -= 1) { 
    myservo.write(pos);
    delay(15);                                     
  }
  delay(15); 
  }                          
}

Troubleshooting:

  • Power Issues: Verify that the servo is correctly powered. If using the Arduino’s 5V, ensure it can supply adequate current. Servos under load might need more power than the Arduino can provide, necessitating an external power source.
  • Code Verification: Ensure the servo control code is correctly implemented in your sketch and that there are no syntax errors.
  • Sensor Alignment: Make sure the ultrasonic sensor is not obstructed and is facing the direction from which you expect objects to approach.
See also  Greet Your Visitors With a Christmas Song

QUICK LINKS:

GITHUB reference