Shiven Patel
Published © GPL3+

SPECULUR - A Life changer for the Visually Impaired

SPECULUR is a set of modified glasses and of shoes equipped with Ultrasonic Sensors and Microcontroller to detect obstacle and warn the user

IntermediateShowcase (no instructions)Over 4 days693

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Arduino UNO
Arduino UNO
×1
Ultrasonic Sensor - HC-SR04
SparkFun Ultrasonic Sensor - HC-SR04
×1
Solar Cockroach Vibrating Disc Motor
Brown Dog Gadgets Solar Cockroach Vibrating Disc Motor
×2
Waterproof Ultrasonic Sensor
×1

Software apps and online services

Arduino IDE
Arduino IDE
circuito.io
circuito.io

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Circuit Diagram of Prototype 1

Circuit Diagram of Prototype 2

Circuit Diagram of Prototype 3

Code

Code for the Arduino Microcontroller

Arduino
#define trigPin 12     //trig pin is connected on 12th I/O pin on the motherboard
#define echoPin 11    // echo pin is connected on 11th I/O pin on the motherboard
#define motor 13     // motor pin is connected on 13th I/O pin on the motherboard

void setup()
{
pinMode(trigPin, OUTPUT);// defines the trig pin as output pin

pinMode(echoPin, INPUT);// defines the echo pin as input pin

pinMode(motor, OUTPUT);// defines the motor pin as output pin
}
void loop()
{
  long duration, distance;
  digitalWrite(trigPin, LOW); //First the trig pin is off so no ultrasound is sent
  delayMicroseconds(2);   // Wait for 2 microseconds
  digitalWrite(trigPin, HIGH);  //Then turn on the output that is send out Ultrasound
  delayMicroseconds(10);  // Keep the sound on for 10 microseconds
  digitalWrite(trigPin, LOW); // Then turn it off
  duration = pulseIn(echoPin, HIGH); // The reciever is always on

  distance= duration*0.034/2; // This is the formulae to calculate the distance                                   by
                              // multiplying the speed X time 
                              
if (distance < 100)// This is the inequality where the maximum distance is input and 
                  //  if the distance is less than this number the loop will be run 
{ 
  digitalWrite (motor,HIGH); // When the calculated distance is less than 100 cm the motor is turned on
} else
{
digitalWrite(motor,LOW);// When calculated length is greater than 100cm the vibration motor is turned off
} delay(10); // The delay between calculation of distance in miliseconds.
}

Credits

Shiven Patel

Shiven Patel

1 project • 0 followers

Comments