Robotic Car with IMU Accelerometer Based Navigation

Put pictures here

Project Background
The idea is to design a robotic car to be able to move a certain path based on gesture commands that it receives such as “turn left”, “go forward”, and “turn right.” IR sensor(s) is/are used to detect the wall and prevent the robot from hitting the wall if there is a bad command given. The team will use two mbeds for this implementation. The mbeds uses Xbees to communicate with each other. One of the mbed will utilize the IMU to gather gesture commands and then send the gesture commands to another Mbed base on IMU values. The second Mbed is to receive commands and navigate the robot.

Team Members

  • Tho Huynh
  • Like Deng
  • Xiaofei Qiu
  • Yushan Cai

Parts Used

  • Two mbeds
  • Pair of Xbee
  • H-Bridge
  • IR Sensor
  • ECE 4180 Robotic Car kit
  • Hall Effect Wheel Encoder
  • IMU

System Design

  • System Layout
    /media/uploads/thuynh42/system_design.png
  • Robot Car Image and Schematics
    /media/uploads/thuynh42/system_design_ii.png
  • Controller Image and Schematics
    /media/uploads/thuynh42/system_design_iii.png

Wiring

It outputs a serial TTL signasl and runs off of 3.3V, but can also run off 5V. The basic connections are to plug in the microphone, hook up power, and then the serial RX/TX pins. The RX and TX swap when connecting to mbed (i.e., RX-TX and TX-RX).

Column 1Column 2
MBEDEASYVR3
Vu5V
GNDGND
TX(p13)RX
RX(p14)TX

Using EasyVR3 for basic Speech Recognition Commands to light up an RGB LED

The demo below shows an RGB LED lighting up different colors based on speech commands. When a user says "Hello," the LED will light up green. Following by the command "Run," the LED will blink red, green, and blue continuously until a command of "Stop" is requested by the user which will turn the LED off. For the status, if the MBED's LED1 light up then the EasyVR3 is ready for listening. The green light on the EasyVR3 module also indicates a listening status. When the EasyVR3 takes a command, the MBED's LED4 will toggle.

Some downside to using this module is that the mic can sometimes not pick up your voice correctly and will not respond to your command. Depending on how well you project your voice, the module may or may not pick it up the first time.

Picture
/media/uploads/thuynh42/photo.jpg

MBED Code

main.cpp

#include "mbed.h"
#include "EasyVR.h"
 
DigitalOut led1(LED1);
DigitalOut led4(LED4);

EasyVR VR(p13, p14);  // tx, rx
Serial pc(USBTX,USBRX);

PwmOut red(p21);
PwmOut blue(p22);
PwmOut green(p23);

void ledDance();
 
int main() {
    char buffer=0;

    if(VR.awake())                //wake up device - needs more work and a timeout
    {
        led1 = 1;
    }
    
    while (1)
    {
        VR.sendCmd(CMD_RECOG_SI); // Start Recognition
        VR.sendArg(1);            // Use Wordset 3 - the numbers 0..10
        
        buffer = VR.recv();       // Receive a byte from easyVR 
        
        if(buffer == CMD_SLEEP)   // If easyVR is sleeping
        {
            VR.sendCmd(' ');      // Send blanck to activate it
        }
        else
        {
            VR.decrypt(&buffer);  // If not sleeping, decrtpt received message
            pc.printf("%d\n",buffer);
        }
        
        // if command is taken by easyVR, the LED4 will toggle
        if (buffer==7) {red = 0; green = 1; blue = 0;led4=!led4;}   // hello
        if (buffer==6) {red = 0; green = 0; blue = 0;led4=!led4;}   // stop or turn off
        if (buffer==3) {led4=!led4;ledDance();}                     // run
        if (buffer==7) led4=!led4;
        wait(0.1);
    }
}

void ledDance()
{
    for(int i=0;i<5000;i++)
    {
        red = !green;
        green = !blue;
        blue = !red;
        wait(0.001);
    }
    red = 1;
    green = 0;
    blue = 0;
    
}

Demo Video

Import MBED Program

Import programEasyVR3_LED

EasyVR3_LED

Library

Import libraryEasyVR3_LED_Library

EasyVR3_LED_Library


Please log in to post comments.