14 Mayıs 2015 Perşembe

Arduino Project - Guide stick for blind people.



Guide Stick

Summary : We have built a smart stick for blind people to inform blind people by using 3 UltraSound Sensors. For unused times, we make arduino asleep to save power and wake up it just by pushing a button. We used timer to control sensor, interrupt to control sleep / wakeup and eeprom for different Modes.

Design :













Schema





As it is shown above, to measure right distance we will use Sensor1, for left we will use Sensor 2 and for front distance, we will use Sensor3. Arduino will be attached at the center of circle. There will be a stimulative which is buzzer; when one of the sensors is close enough to an object, buzzer will warn person. In this project we will also use;

Requirements :

  •          1x Buzzer
  •          3x UltraSound Sensor
  •          1x Button
  •          1x Arduino
  •          1x Stick
  •          1x 9V battery
  •          2x LED
Timer : To control sensor, check interval.
Interrupt : Checks inactivity time / sleeps arduino.
EEPROM : Saves configuration / Loads configuration at the start
Button :  To change mode of interrupt.

Implementation
Note : The code below is just important / wanted code. Not all codes included.
EEPROM.write(0,10); // We wrote the eeprom all modes that we used. 0. İndex has 10, 1. İndex 20 and 3. index has 30 cm.
EEPROM.write(1,20);   
EEPROM.write(2,30);
.
attachInterrupt(1, pin2_isr, LOW);   // When  clicked the button, arduino calls , pin2_isr method to wake up. It includes only “detachInterrupt(0); “
Timer1.initialize(750000);
Timer1.attachInterrupt(Sensor); // We used timer to call Sensor method every 750 ms. (It is optimum value for buzzer to work with no problem.

if(distance<border) {  // Which alarm triggered.
    AlarmCounter++;     
    if(AlarmCounter ==15) {  // To sleep arduino by using interrupt
.
     sleep_enable();
}
if (buttonState == LOW)
  {
      buttonCount++;
       if(buttonCount>3) {   // We want to have 3 modes so if it bigger than 3, we initiaize it to 1.
          buttonCount = 1;
          }
         if(buttonCount==1) {
              border = Config;  // if buttonCount = 1 (which is mode 1), we assign our border to first index of eeprom.
            }
            if(buttonCount ==2) {
                border = Config2;  // if buttonCount = 2 (which is mode 2), we assign our border to second index of eeprom.
                  }
             if(buttonCount == 3) {
                    border = Config3; }// if buttonCount = 3 (which is mode 3), we assign our border to third index of eeprom

Results

     In this project, we have built a guide stick to help blind people to understand whether there is an object around the stick or not. That can be useful for blinds to walk carefully. By constracting this project, we have learned how to use timer and interrupt and understand their methods / implementations. We also recognized that how to make arduino sleep by using interrupt. Cell phones that we use have the same process to wake up. So it was very beneficial for us to understand how cell phones are listening buttons. Furthermore, we examined the ultrasound sensors and researched their structure to understand how does that sensor measure distance by using ultra sound voice that beyond 20KHZ which a human cannot hear.


Hiç yorum yok:

Yorum Gönder