Arduino Based Glasses for Blind People

by MechMinds in Circuits > Arduino

832 Views, 1 Favorites, 0 Comments

Arduino Based Glasses for Blind People

Screenshot (530).png

This is an Arduino-based project for blind people that uses ultrasonic sensors mounted on each side of glasses to detect objects infront of the person. It has a variable range and can vary from 1 meter to 5 meters, depending on the need and the power of the ultrasonic sensors.

Supplies

hc-sr04-ultrasonic-sensor.png
2-Men-Sunglasses-300x300.jpg
arduino-uno-r3.jpg

Mounting the Ultrasonic Sensors:

Attach one ultrasonic sensor to each side of the glass frame using adhesive tape or glue. Ensure that the sensors are facing forward and positioned at eye level.

Connect Ultrasonic Sensors to Arduino:

Screenshot 2024-03-28 193409.png
  • Connect the VCC pin of each sensor to the 5V pin on the Arduino.
  • Connect the GND pin of each sensor to the GND pin on the Arduino.
  • Connect the TRIG pin of one sensor to digital pin 2 on the Arduino.
  • Connect the ECHO pin of the same sensor to digital pin 3 on the Arduino.
  • Connect the TRIG pin of the other sensor to digital pin 4 on the Arduino.
  • Connect the ECHO pin of the other sensor to digital pin 5 on the Arduino.

Powering the Arduino

Connect the Arduino to a power source using a USB cable or a battery pack. Connecting to the laptop is okay but in that way you won't be able to carry this anywhere and would be limited to the range of cable; therefore, it is necessary to use an external power supply for the same

Verifying the Connections

Verify Connections: Double-check all connections to ensure they are properly made and secure. Loose connections are one of the most common problems in circuits.

Arduino Sketch

  // Set ultrasonic sensor pins as input/output
pinMode(trigPin1, OUTPUT);
pinMode(echoPin1, INPUT);
pinMode(trigPin2, OUTPUT);
pinMode(echoPin2, INPUT);
}

void loop() {
// Trigger ultrasonic sensor 1
digitalWrite(trigPin1, LOW);
delayMicroseconds(2);
digitalWrite(trigPin1, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin1, LOW);

// Measure duration for ultrasonic sensor 1
duration1 = pulseIn(echoPin1, HIGH);

// Calculate distance for ultrasonic sensor 1
distance1 = duration1 * 0.034 / 2;

// Trigger ultrasonic sensor 2
digitalWrite(trigPin2, LOW);
delayMicroseconds(2);
digitalWrite(trigPin2, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin2, LOW);

// Measure duration for ultrasonic sensor 2
duration2 = pulseIn(echoPin2, HIGH);

// Calculate distance for ultrasonic sensor 2
distance2 = duration2 * 0.034 / 2;

// Output distance readings to serial monitor
Serial.print("Distance from sensor 1: ");
Serial.print(distance1);
Serial.println(" cm");
Serial.print("Distance from sensor 2: ");
Serial.print(distance2);
Serial.println(" cm");

// Check for obstacles in front
if (distance1 < 30 || distance2 < 30) {
// Obstacle detected
Serial.println("Obstacle detected in front!");
// Add feedback mechanism here (e.g., sound, vibration)
}

// Delay before next reading
delay(100);
}

Explanation of the Sketch

  • The setup() function initializes serial communication and sets the ultrasonic sensor pins as input/output.
  • In the loop() function, the ultrasonic sensors are triggered one by one to measure the distance to the nearest obstacle.
  • The distance readings are calculated based on the time taken for the ultrasonic waves to bounce back.
  • If an obstacle is detected within a specified range (e.g., 30 cm), a message is printed to the serial monitor and appropriate feedback can be added (e.g., sound, vibration).

Conclusion

Congratulations! You have successfully created Arduino Glasses for the visually impaired using ultrasonic sensors. Feel free to customize the design and functionality further to better suit the user's needs. These glasses can greatly enhance the mobility and safety of individuals with visual impairments.