suhail jr
Published © TAPR-OHL

DIY Smart Cane Using Arduino

This is a simple and effective project for beginners using Arduino and an ultrasonic sensor. It only takes a half hour to make this project.

BeginnerFull instructions provided1 hour25,574
DIY Smart Cane Using Arduino

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Buzzer
Buzzer
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
DC motor (generic)
its not a ordinary motor, it is a micro vibrating motor that i took from old celphone.
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Slide Switch
Slide Switch
Here in this project i used a toggle switch, but you can use a slide switch . it also work
×1
9V battery (generic)
9V battery (generic)
×1
9V to Barrel Jack Connector
9V to Barrel Jack Connector
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Blind stick schematics

this is the schematics to connect components with arduino

Code

Blind stick Arduino Code

C/C++
this is the arduino code for making the blind stick
#define trigPin 13
#define echoPin 12
#define motor 7
#define buzzer 6

void setup()
{ pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(motor, OUTPUT);
pinMode(buzzer,OUTPUT);
}

void loop()
{ long duration, distance;
digitalWrite(trigPin, LOW); 
delayMicroseconds(2); 
digitalWrite(trigPin, HIGH);
delayMicroseconds(10); 
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;

if (distance < 70) // Checking the distance, you can change the value
{ 
digitalWrite(motor,HIGH); // When the the distance below 100cm
digitalWrite(buzzer,HIGH);
} else
{
digitalWrite(motor,LOW);// when greater than 100cm
digitalWrite(buzzer,LOW); 
} delay(500);
}

Credits

suhail jr
8 projects • 75 followers
Maker and electronics enthusiast

Comments