Audio Navigation System using RFID for Blind

Good day sir/madam, I am currently at my 3rd year level of my course Electronics Engineering, which I gained basic knowledge of electronics principles and some components. I am very interested to make an audio navigation system for my younger brother who is blind since 7 years ago. I am planning of making one where he could speak his destination and then, the device will tell him the directions he needed to reach his destination. I search in different books and in the internet which components should I used and come up with these results: RFID, speech recognition module, text-to-speech module, and a microcontroller (Arduino). I already bought the said components, however, my main problem is how to program the device. Robotics are taught in my school at higher levels, fortunately, C++ programming are already taught to us at the lower level.

I already made syntax for the prototype but in the C++ format only and since I don't have any knowledge about Arduino programming, I would like to ask if you guys could help me to translate the syntax I made suitable to Arduine IDE for the prototype...

I also planning to make it indoor as of now only for prototyping but I also want to implement this at the school of my brother. Thank you guys for your time and consideration. I am looking forward for your favorable response. Have a good day!

Here is the code:

//Audio Navigation System using RFID for Visually Impaired People

int i = 0;
int j = 0;
int RFIDTAG //RFIDTAG stores the scanned RFID tag serial code

while (i != 0) { //i != 0 for infinite loop

 cin<<Destination; //User input his desired destination
  //Valid Destinations are Room 1, Room 2, Room 3, and CR.

 if (Destination == 'Room 1') {

 cout<<"Desired Destination is Room 1"<<endl; //Output of Text-to-Speech module
 Destination = Room1;
 
 cin<<RFIDTAG; //Device begins scanning the RFID tags

 //Each RFID tag has corresponding information
 //Possible startings points are: entrance, Room 1, Room 2, Room 3, and CR
 //For destination = Room 1; Possible startings points are: entrance, Room 2, Room 3, and CR

 if (RFIDTAG == 'RT1') { 

 cout<<"Destination has reached, please stop"<<endl; //Output of Text-to-Speech Module

 }

 if else (RFIDTAG == 'RT2') {

 cout<<"Approaching to a wall, please turn right"<<endl;

 }

 if else (RFIDTAG == 'RT3') {

 cout<<"Please continue walking"<<endl;

 }

 if else (RFIDTAG == 'RT4') {

 cout<<"Approaching to a Wall, please turn right"<<endl;

 }

 if else (RFIDTAG == 'RT5') {

 cout<<"Please continue walking"<<endl;

 }

 if else (RFIDTAG == 'RT6') {
 
 cout<<"Please continue walking"<<endl;

 }

 }

 else if (Destination == 'Room 2') {

 cout<<"Desired Destination is Room 2"<<endl; //Output of Text-to-Speech module
 Destination = Room2;

 cin<<RFIDTAG; //Device begins scanning the RFID tags

 //For destination = Room 2; Possible startings points are: entrance, Room 1, Room 3, and CR

 if (RFIDTAG == 'RT1') { 

 cout<<"Please continue walking"<<endl; //Output of Text-to-Speech Module

 }

 if else (RFIDTAG == 'RT2') {

 cout<<"Approaching to a wall, please turn left"<<endl;

 }

 if else (RFIDTAG == 'RT3') {

 cout<<"Please continue walking"<<endl;

 }

 if else (RFIDTAG == 'RT4') {

 cout<<"Approaching to a Wall, please turn left"<<endl;
 
 }

 if else (RFIDTAG == 'RT5') {

 cout<<"Destination has reached, please stop"<<endl;

 }

 if else (RFIDTAG == 'RT6') {

 cout<<"Please continue walking"<<endl;

 }

 }

 else if (Destination == 'Room 3') {
 
 cout<<"Desired Destination is Room 3"<<endl; //Output of Text-to-Speech module
 Destination = Room3;

 cin<<RFIDTAG; //Device begins scanning the RFID tags

 //For destination = Room 3; Possible startings points are: entrance, Room 1, Room 2, and CR

 if (RFIDTAG == 'RT1') { 

 cout<<"Please continue walking"<<endl; //Output of Text-to-Speech Module

 }

 if else (RFIDTAG == 'RT2') {

 cout<<"Approaching to a wall, please turn left"<<endl;

 }

 if else (RFIDTAG == 'RT3') {

 cout<<"Please continue walking"<<endl;

 }
 
 if else (RFIDTAG == 'RT4') {

 cout<<"Approaching to a Wall, please turn left"<<endl;

 }

 if else (RFIDTAG == 'RT5') {

 cout<<"Please Continue Walking"<<endl;

 }
 
 if else (RFIDTAG == 'RT6') {

 cout<<"Destination has reached, please stop"<<endl;

 }

 } 

 else if (Destination == 'CR') {

 cout<<"Desired Destination is CR"<<endl; //Output of Text-to-Speech module
 Destination = CR;

 cin<<RFIDTAG; //Device begins scanning the RFID tags

 //For destination = CR; Possible startings points are: entrance, Room 1, Room 2, and Room 3
 
 if (RFIDTAG == 'RT1') { 

 cout<<"Please continue walking"<<endl; //Output of Text-to-Speech Module

 }

 if else (RFIDTAG == 'RT2') {

 cout<<"Approaching to a wall, please turn right"<<endl;

 }

 if else (RFIDTAG == 'RT3') {

 cout<<"Destination has reached, please stop"<<endl;

 }

 if else (RFIDTAG == 'RT4') {

 cout<<"Approaching to a Wall, please turn left"<<endl;

 }

 if else (RFIDTAG == 'RT5') {

 cout<<"Please Continue Walking"<<endl;

 }

 if else (RFIDTAG == 'RT6') {

 cout<<"Please continue walking"<<endl;

 }

 }

 else {

 cout<<"Incorrect Input, please speak your desired destination again"<<endl; //Output of Text-to-Speech module
 i = 0; 

 }

}

Here is the floor plan:

The good news:-

I already made syntax for the prototype but in the C++ format only and since I don't have any knowledge about Arduino programming,

The language the Arduino uses is C++ so your current knowledge is valid.

The bad news:-

I am planning of making one where he could speak his destination and then, the device will tell him the directions he needed to reach his destination.

Is almost impossible on the Arduino.

  1. RFID range is very small less than 12" normally.
  2. Speech recognition is difficult at the best of times but on an arduino is not at all practical.

Grumpy_Mike:
The good news:-The language the Arduino uses is C++ so your current knowledge is valid.

Oh, good to hear! I am studying now the other functions use for Arduino IDE such as defining pins, etc. Maybe I'll post further questions if I needed to... tnx!

Grumpy_Mike:
The bad news:-Is almost impossible on the Arduino.

  1. RFID range is very small less than 12" normally.
  2. Speech recognition is difficult at the best of times but on an arduino is not at all practical.

Yes, unfortunately, that's true. The RFID I bought has very limited range of 1-3 in only. Maybe if I get enough money, I will buy a more powerful RFID (parallax?). I think the solution that I can do for now is to integrate the antenna of the RFID into a walking stick, then, the walking stick must be moved in downward sweeping motion in order to synchronize with the RFID tags in the floor.

For the speech recognition, i dont know. haha XD

I have a question regarding the RFID. I have found this code in the internet and it works with my arduino (Mega 2560), however, I don't know which variable he used to store all the read values from the RFID tags. I have tried using the "results" and "Tag" which he used in the program but an error pops up that says I need to defined (or declare) those values. Hope someone can help me. Thanks!

uint8_t buffer[14];
uint8_t* buffer_at;
uint8_t* buffer_end = buffer + sizeof(buffer);
 
String checksum;
boolean tagfound = false;
 
void setup()
{
    Serial.begin(9600);
    Serial.println("Serial Ready");
 
    Serial1.begin(9600);
    Serial.println("RFID Ready");
}
 
void loop()
{
    if (Serial1.available()){
        delay(20);
        buffer_at = buffer;
 
        while ( buffer_at < buffer_end )
        {
            *buffer_at++ = Serial1.read();
        }
        tagfound = true;
        Serial1.end();
        Serial1.begin(9600);
    }
 
    if (tagfound){
        buffer_at = buffer;
        uint32_t result = 0;
 
        // Skip the preamble
        ++buffer_at;
        // Accumulate the checksum, starting with the first value
        uint8_t checksum = rfid_get_next();
        // We are looking for 4 more values
        int i = 4;
        while(i--)
        {
            // Grab the next value
            uint8_t value = rfid_get_next();
            // Add it into the result
            result <<= 8;
            result |= value;
            // Xor it into the checksum
            checksum ^= value;
        }
        // Pull out the checksum from the data
        uint8_t data_checksum = rfid_get_next();
 
        // Print the result
        Serial.print("Tag: ");
        Serial.print(result);
        if ( checksum == data_checksum ) {
            Serial.println(" OK");
        }
        else {
            Serial.println(" CHECKSUM FAILED");
        // We're done processing, so there is no current value
        }
 
        tagfound = false;
    }
 
}
 
uint8_t rfid_get_next(void)
{
    // sscanf needs a 2-byte space to put the result but we
    // only need one byte.
    uint16_t hexresult;
    // Working space to assemble each byte
    static char byte_chars[3];
    // Pull out one byte from this position in the stream
    snprintf(byte_chars,3,"%c%c",buffer_at[0],buffer_at[1]);
    sscanf(byte_chars,"%x",&hexresult);
    buffer_at += 2;
    return static_cast<uint8_t>(hexresult);
}

Try using buffer.

I have found this code in the internet

While finding code can be helpful here you clearly have no idea what it is doing.

I have tried using the "results" and "Tag" which he used in the program but an error pops up that says I need to defined (or declare) those values.

And sadly this indicates you have little or no idea of how programming works.

You have two choices

  1. Make the tags you want to compare into an array of chr like the RFID reader gives you and have a long winded compare routine.

  2. Make the tags you want to compare into a long or long long variable type. Then convert what the RFID reader gives you into this variable type and do the compare with a simple if == statement.

I favor the latter approach.

The code in this project might help
https://code.google.com/p/open-access-control/

BUT - you have to learn the fundamentals of programming even if you just want to hack other peoples code.

wildbill:
Try using buffer.

Have tried it either, still don't work

Grumpy_Mike:
While finding code can be helpful here you clearly have no idea what it is doing.
And sadly this indicates you have little or no idea of how programming works.

You have two choices

  1. Make the tags you want to compare into an array of chr like the RFID reader gives you and have a long winded compare routine.

  2. Make the tags you want to compare into a long or long long variable type. Then convert what the RFID reader gives you into this variable type and do the compare with a simple if == statement.

I favor the latter approach.

The code in this project might help
Google Code Archive - Long-term storage for Google Code Project Hosting.

BUT - you have to learn the fundamentals of programming even if you just want to hack other peoples code.

Ohhh, i'll try it now. I agree, I must learn first the fundamental haha I'm sorry XD

The RFID has working now by having some tweak on the code and I also succesfully integrated it with the text-to-speech module. The device now outputs audio instruction everytime I scan a tag. My problem now is that the sample code (provided by the seller of my speech recognition module) is not working, I don't know where I went wrong...

Here is the code:

/* Demonstration Sketch for e-Gizmo Voice Recognition Module *
*  by e-Gizmo Mechatronix Central
*
*/

// connection guide
/*

This Demo requires a LED Shield

VR TX -> gizDuino RX
VR RX -> gizDuino TX
VR GND -> gizDuino GND
VR VCC -> gizDuino +5V

Record Switch is S2 (A3)
*/

/*
This code is written for gizDuino+ Controller
To use with gizDuino, remove all "1" in the Serial1 object
e.g. Serial1.available to Serial.available
*/

#define  WAITING 00
#define  COMPACT 0x37
#define  QUERY  0x24
#define  CLR1  0x01
#define  CLR2  0x02
#define  CLR3  0x03
#define  REC1  0x11
#define  REC2  0x12
#define  REC3  0x13
#define  LOAD1  0x21
#define  LOAD2  0x22
#define  LOAD3  0x23
#define  ERROR 0xE0

//pin Usage
#define  LEDPIN  13
#define  RECSW  7
#define  VR1    8
#define  VR2    9
#define  VR3    10
#define  VR4    11
#define  VR5    12




byte rxchar;
byte initvr=0;
byte  teachnum=0;

void setup(){
  pinMode(LEDPIN,OUTPUT);
  pinMode(VR1,OUTPUT);
  pinMode(VR2,OUTPUT);
  pinMode(VR3,OUTPUT);
  pinMode(VR4,OUTPUT);
  pinMode(VR5,OUTPUT);
  //Serial.begin(9600);  // Used for debugging
  Serial1.begin(9600);
  // LED Test
  digitalWrite(VR1,HIGH);
  digitalWrite(VR2,HIGH);
  digitalWrite(VR3,HIGH);
  digitalWrite(VR4,HIGH);
  digitalWrite(VR5,HIGH);
  digitalWrite(LEDPIN,HIGH);
  delay(500);
  send_VR(COMPACT);   // switch to compact mode
  delay(500);
  // enable pull up to switches
  digitalWrite(RECSW,HIGH);
  ledOFF();
  digitalWrite(LEDPIN,LOW);
}

void  loop(void)
{
  if(digitalRead(RECSW)==HIGH) {
      voice_command(1);
  }
  else {
      teach_command(1);
      
  }
}

/* Turn OFF voice indicators */
void  ledOFF(void){
      digitalWrite(VR1,LOW);
      digitalWrite(VR2,LOW);
      digitalWrite(VR3,LOW);
      digitalWrite(VR4,LOW);
      digitalWrite(VR5,LOW);
}

/* This routine checks the serial input *
* returns 1 if no message is available
* returns 0 and message on rxchar if available
*/

byte  read_buffer(void){
  if(Serial1.available()>0){
      rxchar=Serial1.read();  // Read one Rxed character
      Serial.println((byte) rxchar,HEX);
      return(0);
  }
  else {
    return(1);
  }
}

/* This function sends the VR command
*  with 0xAA header
*/

void send_VR(byte message){
  Serial1.write(0xAA);      //Header
  Serial1.write(message);
}

/* Teach a Group of Commands */

byte teach_command(byte group){
  send_VR(WAITING);
  ledOFF();
  delay(500);
  // flush serial buffer
  read_buffer();
      
  if((group>3) | (group==0)) return(0);
  // Erase previous content

  
  send_VR(group);
  delay(500);
  if(rxchar==ERROR){
    return(1);  // error occured
  }
  // start teaching
  teachnum=VR1;
  send_VR(group+0x10);

  // Monitor and wait until recording is complete
  do{
  while(read_buffer()==1);
    digitalWrite(teachnum,LOW);
    // flash on board LED if a recording is successful
    if(rxchar==0x45){
      teachnum++;
      digitalWrite(LEDPIN,HIGH);
      delay(500);
      digitalWrite(LEDPIN,LOW);
    }
     // turn ON teach number pin when ready to accept voice
    if(rxchar==0x40) {
      digitalWrite(teachnum,HIGH);
    }
    if(rxchar==0x42){
      digitalWrite(LEDPIN,HIGH);
      delay(100);
      digitalWrite(LEDPIN,LOW);
    }
  }
  while (rxchar != (0x45+group));
  
    digitalWrite(LEDPIN,HIGH);
    delay(1000);
    digitalWrite(LEDPIN,LOW);
    ledOFF();
    initvr=0;
}      
  

/* Set to Voice Recognition mode */

void  voice_command(byte group){
  // put to Voice Recognition Mode
  if(initvr==0){
      send_VR(WAITING);
      delay(500);
      // flush serial buffer
      read_buffer();
      send_VR(0x20+group);
      initvr=1;
      read_buffer();
  }
  group *= 0x10;

    if(read_buffer()==0){
      ledOFF();
      if(rxchar==group+1) digitalWrite(VR1,HIGH);
      if(rxchar==group+2) digitalWrite(VR2,HIGH);
      if(rxchar==group+3) digitalWrite(VR3,HIGH);
      if(rxchar==group+4) digitalWrite(VR4,HIGH);
      if(rxchar==group+5) digitalWrite(VR5,HIGH);
   
    }
}

I am using Arduino Mega 2560, thus the serial1 is appropriate right? I noticed that the code didn't declare any pins to connect with, I assumed that the rx and tx of the SR must be connected to the pin 18 (tx 1) and pin 19 (rx 1), respectively. However, the serial monitor doesn't output anything and the sr doesn't corresponds to the input i make in the serial monitor. I also pressed the record switch (S2) of the LED shield but nothing happens.

Here is a photo of the SR and the LED shield (Pls disregard the arduino that has been used in the photo)

Hello cy102. I'm currently working with the same project as you. My project is Navigation System for the blind and it is intended for both indoors and outdoors. Mind to collaborate? I'm using Inertial Measurement via dead reckoning instead of RFID technology. And I'm using keypad in replacement of the speech recognition.

BlackOut01:
Hello cy102. I'm currently working with the same project as you. My project is Navigation System for the blind and it is intended for both indoors and outdoors. Mind to collaborate? I'm using Inertial Measurement via dead reckoning instead of RFID technology. And I'm using keypad in replacement of the speech recognition.

Sure, why not! Can you tell me more about your project? XD I'll try my best to help :smiley:

My project aims to guide a blind user from its location to its destination. This project requires me several algorithms like the dead reckoning including its filters. Another thing is the path finding algorithm in which I just paused working earlier. This project utilizes the data from a 10dof IMU unit which is connected to the arduino. The data from that IMU unit is double integrated (accelerometer and magnetometer data) to get the displacement via matlab. The device is connected to a server PC via a wireless network. The server makes all the "processing" required to make the system do its function. The device is an arduino with wifi module, 10dof IMU module, ultrasonic sensor for obstacle detection which is attached to the end of the cane, text-to-speech kit, and a keypad for input. What you wanted to do with the arduino is quiet impossible. The arduino don't have the computing capacity to reach your objectives. the arduino on my project is simply for reading the data from the modules and telling the blind person where to go.

BlackOut01:
My project aims to guide a blind user from its location to its destination. This project requires me several algorithms like the dead reckoning including its filters. Another thing is the path finding algorithm in which I just paused working earlier. This project utilizes the data from a 10dof IMU unit which is connected to the arduino. The data from that IMU unit is double integrated (accelerometer and magnetometer data) to get the displacement via matlab. The device is connected to a server PC via a wireless network. The server makes all the "processing" required to make the system do its function. The device is an arduino with wifi module, 10dof IMU module, ultrasonic sensor for obstacle detection which is attached to the end of the cane, text-to-speech kit, and a keypad for input. What you wanted to do with the arduino is quiet impossible. The arduino don't have the computing capacity to reach your objectives. the arduino on my project is simply for reading the data from the modules and telling the blind person where to go.

Ohh I see, your idea is great. I just have one question: Do you also have predetermined landmarks? I mean like a map, I am thinking what's next after that you computed for displacement. :smiley:

cy102:
Ohh I see, your idea is great. I just have one question: Do you also have predetermined landmarks? I mean like a map, I am thinking what's next after that you computed for displacement. :smiley:

My projects have so many different modules, both hardware and software. Well in software, there are location tracking module, communication/interface module, and the routing module so far. In the routing module, I have the path finding algorithm which includes a map editor interface (written in C#). The real floor plan is a requirement of my project however, you can make your own by using the map editor. The map editor is a grid, in which I set to 1000 by 500. The image of a floor plan, if any, is watermarked beneath the grid display. And the watermark of the floor plan will serve as a guide in building the "virtual" map. At first, I think using landmarks is important and I could use that technique to determine the next command, either "left" or "right". But as I go on with my project, I realized that using landmarks is just nonsense that's why I ended up making a grid with a size of 1000x500 with all the boxes inside to be treated by the software as "landmark" making the routing and location tracking more efficient and it even make the system more intelligent.

What you are thinking now is not as simple as you know. In doing such specialized navigation system, specifically for indoors, you must have a vast knowledge in robotics, programming, and of course mathematics. In my project, I even used Gait analysis for my location tracking because using an IMU module is not as simple as "just integrating the data". Great analysis should also be applied. By the way, I'm also a Filipino. It's my 5th year in Computer Engineering.

I also suggest you not to trust the modules in e-gizmo. I have several of those modules especially the gizduinoX. I have two gizduinoX, both are broken. We call those boards "Disposable". Oops! I'm sorry e-gizmo! :smiley:

BlackOut01:
I also suggest you not to trust the modules in e-gizmo. I have several of those modules especially the gizduinoX. I have two gizduinoX, both are broken. We call those boards "Disposable". Oops! I'm sorry e-gizmo! :smiley:

You're mean haha!

Oh, it is like a GPS. I don't know where I can help you, you seems more knowledgeable than me. Your device has complex programming XD

Hello!! I have my university project in which i have to design a navigation system which will navigate on audio. I am very new to arduino and i dont know what components to use to implement this project and i have read all your discussion here and i found it very useful as it seems very similar to my task. Please help me regarding my project as i have very short time and i will be very thankful to you if you can give me programming of this project as i said i am new to this.