You are viewing an older revision! See the latest version

Gesture Controlled Robot Project

Team

Jordan Hughes
Stephen Piper
Alex Simoneaux
Kevin Whitmore

Overview

The purpose of our project is to construct a robot that can be controlled by hand movements with several other add-ons, like numerous LED's and a speaker which plays a song.

Components Needed

Wiring Diagrams

For each Mbed, a visual overview is included first to give an easy overview of how the entire Mbed is pinned out the various components. Following this general overview are the various pin outs for specific components, as well as any general reminders for that specific part (ex: attaching a resistor in series with an LED).

Mbed 1 Hardware & Wiring

Mbed1 is solely responsible for interpreting the users hand gestures and transmitting the appropriate command to Mbed2 using one of the Zigbees.

Visual Overview

The visual overview is provided below, and is a nice way to quickly reference the various hookups to Mbed1 to ensure that the general wiring is correct. /media/uploads/knownasnoone/mbed1finalfinal.png

Zigbee1 Connection

Here is a schematic demonstrating how Zigbee1 connects to Mbed1 /media/uploads/knownasnoone/zigbeeschem.png


The following is a table which states how to wire Zigbee1 to MBed1

Mbed 1Zigbee 1
Pin 8Reset - Pin 5
Pin 9DIn - P3
Pin 10DOut - P2

Ultrasonic Connections

This table shows how to connect both sonar devices to MBed1.

Mbed 1Ultrasonic RightUltrasonic Left
Pin 6EchoNo Connect
Pin 7TriggerNo Connect
Pin 30No ConnectEcho
Pin 29No ConnectTrigger

Mbed 2 Hardware & Wiring

MBed2 is responsible for receiving commands sent from MBed1 and controlling the lighting and DC motors.

Visual Overview

An overview of the pin out for MBed2 is seen below. This focuses on the numerous connections between the MBed2 and various devices. /media/uploads/knownasnoone/mbed2finalfinal.png

Voltage Regulator

The voltage regulator schematic is included below: /media/uploads/knownasnoone/voltregulator.png

Zigbee Connections

Here is a schematic showing Zigbee2's connection to MBed2 /media/uploads/knownasnoone/zigbeeschem.png
The following is a table which states how to wire Zigbee2 to MBed2

Mbed 2Zigbee 2
Pin 8Reset - Pin 5
Pin 9DIn - P3
Pin 10DOut - P2

Class-D Amplifier

Here is a pin out for the Class-D Amplifier which shows its connections to the speaker and MBed 2. /media/uploads/knownasnoone/classdaudioamppinout.png Connections not drawn are simply not connected.

H Bridge Connections

The following is a pin out demonstrating how to connect the H-Bridge to the two DC motors. /media/uploads/knownasnoone/hbridge.png Note that in this picture, all of the ground connectors on the H-bridge are connected to ground. The following is a table which focuses on the connections between the Mbed2 and the H-bridge.

Mbed 2H Bridge
Pin 30RV-L - AIN2
Pin 29FW-L - AIN1
Pin 26SPD-L - PWMA
Pin 25RV-L - BIN2
Pin 24FW-L - BIN1
Pin 23SPD-R - PWMB

SD Card Reader

Here is a pin out diagram of the SD Card Reader. /media/uploads/knownasnoone/sdcardpinout.png Note that you will need to save the file you wish to play onto the SD Card and alter the code for MBed2 to play your chosen wav file. This line of code is found in main.cpp for the MBed2 code.

main.cpp

void speaker()
{
    //Mount the filesystem
    //sd.mount();
    //wave_file=fopen("/sd/wavfiles/police_siren.wav","r");
    //waver.play(wave_file);
    //Thread::wait(31000);  //wait 31 seconds
    while(1)
    {
        if (RX_char == 'w')
        {
            wave_file=fopen("/sd/wavfiles/police_siren.wav","r");
            waver.play(wave_file);
            fclose(wave_file);
            Thread::wait(31000);  //wait 31 seconds
        }
        Thread::wait(500);  //wait 500ms
    }
}

Specifically, the police_siren.wav should be changed to nameofyourwavfilehere.wav

HeadLamp LED Connections

The headlamps for the robot car are not connected to MBed2, but are hardwired to accept voltage from the regulator. In other words, when the robot car is on, the headlamp LEDs are on. Here is a schematic which shows how the headlamps should be wired. /media/uploads/knownasnoone/headlampschematic.png

Turn Signals & Brake Lights

The four yellow LEDs should be connected to output pins P22 and P21 on the MBed2 to enable the turn signals on the car.A schematic for the left turn signal is shown below :/media/uploads/knownasnoone/leftturnsignal.png
And the right turn signal is similar: /media/uploads/knownasnoone/rightturnsignal.png
The brake lights are the same, but are hooked to P20 on Mbed2 and use the red LEDs as shown: /media/uploads/knownasnoone/brakelights.png


For quick reference, here is a table showing just the connections between the LED networks and the Mbed2 pins:

MBed 2LED network
Pin 20Brake LEDs
Pin 21Right Turn LEDs
Pin 22Left Turn LEDs

MCP23S17

The MCP23S17s are responsible for controlling all of the RGB LEDs, allowing the car to have more than would be possible with just the MBed.

Note that each MCP is responsible for one of the RGB LED values (one MCP for red, one for green, etc). The schematic for how the Red and Green LED control MCP's is connect to the series of led is shown below:/media/uploads/knownasnoone/cmpredandgreen.png
And the Blue LED control MCP, as well as the resistor values, is included in the next image: /media/uploads/knownasnoone/mcpblue.png


Also, for quick checking the connections between each MCP and Mbed2 can be seen below

Mbed 2MCP23S17 (all)
Pin 5SI- Pin 13
Pin 6SO- Pin 14
Pin 7SCK - Pin 12
VoutVDD - Pin 9
GndVSS - Pin 10
Pin 15Reset - Pin 18
Mbed 2MCP23S17 (1)
Pin 16Pin 11
Mbed 2MCP23S17 (2)
Pin 17Pin 11
Mbed 2MCP23S17 (3)
Pin 19Pin 11

Software Components

Mbed 1

Import programMBed1

Needed program to run the mbed responsible for interpreting hand gestures and transmitting them to the second mbed

Mbed 2

Import programECE4180_PROJECT_ROBOT

Initial Release

Additional Information

Mbed

For more information about the mbed LPC1768, check out the product page and datasheet

Ultrasonic Senors

For more information about the ultrasonic sensors, check out the mbed page or examine the datasheet.

Speaker

For additional readings, see the mbed speaker wiki page, or view the datasheet

LEDs

Additional information on the red LED's can be found in its datasheet. More information about the RGB LED's can be found on the mbed wiki page or in the datasheet.


All wikipages