12
The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

Embed Size (px)

Citation preview

Page 1: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

The iBlueBot

By Walid Mnif, Tamer Shadid, Lim Seang

FINAL PRESENTATION

ECE4006

07/24/2003

Page 2: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

Project Goals

Primary goal: control an amigo bot using an iPaq through a Bluetooth link

Secondary goal: send feedback from robot and PIC sensors to be displayed on the iPaq

DONE

Page 3: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

The Current iPAQ GUI

Create a virtual portAnd connect seriallyTo the AmigoBot

Search for the botAnd establish a Bluetooth link

Rotate left Rotate right

Go forward Stop button

Steering Controls

Speed ControlStatus Panel

Page 4: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

Bluetooth Implementation on iPAQ

BTAccess

C++ library for accessing the Widcomm Bluetooth Protocol Stack built in the iPAQ

Sample functionality:

CBtStack *pStack; // create pointer to stack

CBtDevice *pDevice; //create device pointer

pStack->BtRadioOn();

CString name=pDevice->m_strDeviceName;

Page 5: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

Control Protocol

One byte is transferred for each control command:

- The upper nibble defines the command type

- The lower nibble contains the command parameter

Multi threads implemented:

- A sender thread: sends one byte to converter after each button push

- A receiver thread: monitor the serial port for any arriving packets

Page 6: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

The PICs Setup

PIC1

- Interrupts routine when receives data from converter via UART

- Transfer data via SPI to PIC2

- Send acknowledgment to the iPAK

- Read PIC2 SPI buffer around mainloop and forward to iPAQ

PIC2

- Interrupts when it receives data from PIC1 via SPI

- Analyze data and send control packets to Amigobot via UART

Page 7: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

The Amigobot Controls

The Amigobot has a Built-in

AmigoOS that receives and

transmits data packets

- A series of initialization

packets must be sent to

the Amigobot to establish

an active line of communication

- Commands must be sent periodically to so that the WatchDog timer on the robot does not expire and thus disabling the motors

Page 8: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

The Amigobot Controls

Sample Command:unsigned char TXcommand[] =

{0xFA,0xFB,0x06,0x20,0x3B,0x05,0x05,0x25,0x40};

The Header The number of data bits + 2 The command issuedPositive, signed or string The parameter associated with the command

The checksum

Checksum calculation:CSUML = TXcommand[4] + TXcommand[6];

if(TXcommand[4] > CSUML){//check if carry bit

CSUMH = 1 + TXcommand[3] + TXcommand[5];}//endif

else{

CSUMH = TXcommand[3] + TXcommand[5];}//endelse

TXcommand[7] = CSUMH;

TXcommand[8] = CSUML;

Page 9: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

Encountered Problems

The Bluetooth Converter:

- The RTS and CTS pins of its UART have to be grounded for it to be able to send

- It has to be connected to the iPAQ before it is connected to the PIC

- When the PIC is first turned on, if it is connected to the converter, its memory is erased

The circuitry had to be rebuild because the PICs were blown out.

One of the PICs had an earlier version of Quikbug that didn’t allow it to interact correctly with converter

Page 10: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

Possible enhancement

With the full duplex communication all ready implemented, any device could be appended to the PICs and send data wirelessly to the iPAQ

- Suggested devices: Camera, Heat sensors

Implement Bluetooth on other Amigobots and have them interact in order to accomplish an assigned task

Page 11: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

Updated Gant Chart

Accomplished

Remaining

Added

Page 12: The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003

Questions?