iX


The best team in the world

iX

Introduction

iX is designed to help blind people cross the road. It includes 4 components: hub, range finder, traffic light and buzzer carried by user. The buzzer will get connected to the wifi when it is near to the surver. Whenever the range finder detect anyone trying to cross the road, the buzzer will play different sounds to inform user the state of the traffic light. /media/uploads/sann5100/cwm_-_20160610_102317_-_1.png

Network

/media/uploads/sann5100/fullsizerender_Fd7TLro.jpg

Range detector

The range detector sends a flag to the hub if it detects anyone crossing the road.

http://www.maxbotix.com/pictures/LV/LV-EZ%20Ultrasonic%20Range%20Finder_200px.jpg

We are using the MB1000 LV‑MaxSonar‑EZ0 ultrasonic rangefinder.

data sheet: http://www.maxbotix.com/documents/MB1000_Datasheet.pdf

pin numbersMB1000 pinsmbed pins
1BWnot connected
2PWnot connected
3ANp15
4RXnot connected
5TXnot connected
6VCC3.3V
7GND0V
  • Ranging

Outputs analog voltage with a scaling factor of (Vcc/512) per inch. 3.3V yields 6.4mV/in. The output is buffered and corresponds to the most recent range data.

/media/uploads/xiaohonglv/firefox_screenshot_2016-06-10t08-58-24.410z.png

  • Operating Range

The sensor minimum reported distance is 6-inches (15.2 cm). However, the LV-MaxSonar-EZ will range and report targets to the front sensor face. Large targets closer than 6-inches will typically range as 6-inches.

The sensor saturation distance is 254-inches (6.45 m).

Because of acoustic phase effects in the near field, objects between 6-inches and 20-inches may experience acoustic phase cancellation of the returning waveform resulting in inaccuracies of up to 2-inches. These effects become less prevalent as the target distance increases, and has not been observed past 20-inches (50.8 cm).

  • Response

Our designed road width is 20cm. Whenever the range detector detects a target nearer than 20cm, it will send a flag back to the hub telling there is someone crossing the road.

obstruction.cpp

#include "mbed.h"
AnalogIn ranger(p15);                         
 
 int obstruction_finder()
{
    AnalogIn ranger(p15);                                  //read analogue input from range detector
    float r;                                                            //define r
    float d;                                                           //define d
    int obstruction;                                             //define obstruction
    r = ranger;                                                     //read ranger
    d = r / 0.00084;                                              //calculate distance in cm
    if (d < 20) {                                                           
        obstruction = 1;                                        //when d<20, there is obstruction
    } else {
        obstruction = 0;                                        //when d>20, there is no obstruction
    }
    return obstruction;                                      //return the value of obstruction
}

Cross counter

/media/uploads/sann5100/fullsizerender.jpg

The Cross counter counts the no. of crosses happen when the red light is on, and display the counting on the TextLCD.

We are using a HD44780 TextLCD.

data sheet: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf

Pin numberTextLCD pins mbed pins
1GND0V
2VCC3.3V
3VO0V, via 1k resistor
4RSp15
5RW0V
6Ep16
7D0not connected
8D1not connected
9D2not connected
10D3not connected
11D4p17
12D5p18
13D6p19
14D7p20

The counter will receive a flag from the hub whenever there is someone crossing the road during a red light. We do a for loop, so the counter will keep checking the input flag and increment by one when the flag is high.

Buzzer and traffic light

/media/uploads/sann5100/fullsizerender_dIZdIIt.jpg The traffic light repeats the same pattern: green-quick yellow-red-yellow-green. We devide them into 3 situations and send the corresponding flag to the surver. /media/uploads/sann5100/img_0416.jpg /media/uploads/xiaohonglv/firefox_screenshot_2016-06-10t08-19-33.253z.png The buzzer receives both flags sent by range detector and traffic light. The buzzer is triggered when the range finder detects a cross. The reactions of Buzzer is according to 3 statements of traffic light.

/media/uploads/xiaohonglv/firefox_screenshot_2016-06-10t08-23-49.205z.png

  • VOICE 3

buzzer_green.cpp

#include "mbed.h"
PwmOut buzzer(p23);

//green light
 
while (flag = 3);
 
{
 
     int main() {
            
            buzzer.period_ms(1);                     //1ms period    1k Hz //
 
            buzzer = 0;                           //0% duty cycle  //
 
}
  • VOICE 1

buzzer_red.cpp

#include "mbed.h"
PwmOut buzzer(p23);

// red light   
 float frequency[]= {500,0,500,0,500,0,500,0,500,0} ;//alarm frequency array
 
 
    float beat[]= {1,1,1,1,1,1,1,1,1,1};  //beat array
    int main()
    {
        for (
            int
            i=0;
            i<=9 ;
            i++) {buzzer.period(1/(frequency[i]));                  // PMW period   1/frequency
            buzzer=0.5;                                             //50% duty cycle
            wait(0.5*beat[i]);                                      //hold for beat period
    }            
 }

This voice is for the red light and quick yellow light (from green to red).

  • VOICE 2

buzzer_yellow.cpp

#include "mbed.h"
PwmOut buzzer(p23);

// yellow light
 
while (flag = 2);
 
{
    float frequency[]= {659,554,659,554,550,494,554,587,494,659,554,440};         //music frequency array
 
 
    float beat[]= {1,1,1,1,1,0.5,0.5,1,1,1,1,2};    //beat array
    int main()
    {
        for (
            int
            i=0;
            i<=11;
            i++) {buzzer.period(1/(frequency[i]));                  // PMW period   1/frequency
            buzzer=0.5;                                             //50% duty cycle
            wait(0.5*beat[i]);                                      //hold for beat period
                
    }            
 }
}

All wikipages