Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
NSUDE, MADUKA EVARISTUS
Published © GPL3+

Smart GSM-Equipped Walking Stick for the Blind

Navigating everyday life can be daunting and unsafe for many blind individuals. Hence, I developed this smart walking stick to help them.

AdvancedFull instructions providedOver 1 day240
Smart GSM-Equipped Walking Stick for the Blind

Things used in this project

Hardware components

Arduino Nano
×1
HCSR-04 ultrasonic sensor
×1
Buzzer
×1
SIM800L GSM/GPRS module
×1
Push button (the panic button)
×1
Vibration motor
×1
Four way RF wireless remote controller
×1
Water sensor
×1
Solar panel
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Drilling machine
Soldering iron

Story

Read more

Custom parts and enclosures

The Plastic Pipe used for the Smart Stick

This plastic pipe was used for the smart stick. It also housed the electronic components.

Schematics

Schematics

This is a schematics of the smart GSM-equipped walking stick for the blind designed with Proteus design software.

Code

Source Code

C/C++
This is source code of the firmware controlling the smart stick. The code was uploaded to the Arduino Nano board used.
#define TINY_GSM_MODEM_SIM800

#define SerialMon Serial
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(10,11); // RX, TX

#define DUMP_AT_COMMANDS
#define TINY_GSM_DEBUG SerialMon

#define SMS_TARGET  "+2349048805190" //My number. Change it to yours.
#define CALL_TARGET "+2349048805190"

#include <TinyGsmClient.h>
#ifdef DUMP_AT_COMMANDS
#include <StreamDebugger.h>
StreamDebugger debugger(SerialAT, SerialMon);
TinyGsm modem(debugger);
#else
TinyGsm modem(SerialAT);
#endif

#include <Sim800l.h>
Sim800l Sim800l;  

uint8_t index;
bool error;

char* charLocation;
String text;
String location;

#define trigPin 6
#define echoPin 7
#define PanicButton 8
#define buzzerPin 9
#define vibratorPin 12

long duration, distance;

void setup() 
{
  Sim800l.begin();
  SerialAT.begin(9600);
  SerialMon.begin(9600);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(PanicButton, INPUT_PULLUP);
  pinMode(buzzerPin, OUTPUT);
  pinMode(vibratorPin, OUTPUT);
  digitalWrite(buzzerPin,LOW);
  digitalWrite(vibratorPin,LOW);
}

void loop() 
{
  if(PanicButton==LOW)
  {
    call();
    sendSMS();
  }

  checkObstacle();
  delay(1000);
  
  if(distance>40)
  {
    digitalWrite(buzzerPin,LOW);  
    digitalWrite(vibratorPin,LOW);  
  }

  else if(distance>30&&distance<45)
  {
    digitalWrite(vibratorPin,HIGH); 
    digitalWrite(buzzerPin,HIGH);  
    delay(500);
    digitalWrite(buzzerPin,LOW); 
    delay(500);

    digitalWrite(buzzerPin,HIGH);  
    delay(500);
    digitalWrite(buzzerPin,LOW); 
    delay(500);

    digitalWrite(buzzerPin,HIGH);  
    delay(500);
    digitalWrite(buzzerPin,LOW); 
    delay(1000);
  }

  else if(distance>15&&distance<30)
  {
    digitalWrite(vibratorPin,HIGH); 
    digitalWrite(buzzerPin,HIGH);  
    delay(500);
    digitalWrite(buzzerPin,LOW); 
    delay(500);

    digitalWrite(buzzerPin,HIGH);  
    delay(500);
    digitalWrite(buzzerPin,LOW); 
    delay(1000); 
  }

  else if(distance<15)
  {
    digitalWrite(buzzerPin,HIGH); 
    digitalWrite(vibratorPin,HIGH); 
    call1();
    sendSMS1();
    call2();
    sendSMS2();
    digitalWrite(buzzerPin,LOW); 
    digitalWrite(vibratorPin,LOW); 
  }

  else
  {
    digitalWrite(buzzerPin,LOW);  
    digitalWrite(vibratorPin,LOW); 
  }
}

double checkObstacle()
{
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2) / 29.1;
  Serial.print(distance);
  Serial.println("cm");
}

void call()
{
  boolean res = modem.callNumber(CALL_TARGET1);
  
  if (res) 
  {
    delay(1000L);
    // Play DTMF A, duration 1000ms
    modem.dtmfSend('A', 1000);

    // Play DTMF 0...4, default duration (100ms)
    for (char tone='0'; tone<='4'; tone++) 
    {
      modem.dtmfSend(tone);
    }
 
    delay(9000);
    res = modem.callHangup();
  }                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
}

void sendSMS()
{
  #if defined(SMS_TARGET)  
  boolean res = modem.sendSMS_UTF16(SMS_TARGET, u"ALERT! The visually impaired person has possibly hit an obstacle. Please, call him IMMEDIATELY!", 95);
  #endif
}

Credits

NSUDE, MADUKA EVARISTUS

NSUDE, MADUKA EVARISTUS

3 projects • 4 followers
IoT & Software Developer | Electronic Engineer | Project Assistant. My Awards (+ 2 Int'l): lnkd.in/dECgkdN7 My works: lnkd.in/dEvBTszb

Comments