FlameBot
Overview
FlameBot is an MBED controlled robot designed by Chinmay Kulkarni, Kshitij Kulkarni, and Chirag Mendpara for ECE 4180 at Georgia Tech.
It uses the mBED to drive two DC motors via PWM through an H-Bridge controller.
Goals
The goals of the project were as follows:
- Use a smartphone accelerometer to provide input to a rover
- Rover will have two motorized front wheels and one rear swivel wheel
- Attempt to create near instantaneous steering
- Use a sonar sensor to detect objects and bring the robot to a halt
- Attach a barbeque lighter to an RC servo as a makeshift lighter
- Create a proof of concept to create a robot that can actuate a barbeque lighter
- Create a bluetooth override for the “flamethrower”
Parts List
- Mbed LPC1768
- HC-SR04 Sonar Sensor
- H-Bridge Motor Controller
- Adafruit Bluetooth LE UART Friend
- Android Phone
- 9V Battery (2)
- DC Motors (2)
- Robot Chassis
- Barbecue Lighter
System Schematic
Wiring
mBED | H-Bridge | = Motor |
---|---|---|
Vcc | 5 V (DC) | |
GND | GND | |
P15, fwd | AIN1 | |
P14, rev | AIN2 | |
P25, PWM | PWMA | |
P19, fwd | BIN1 | |
P20, rev | BIN2 | |
P26, PWM | PWMB | |
AO1 | + Motor 1 | |
AO2 | + Motor 2 |
mBED | Adafruit BLE |
---|---|
GND | GND |
VU(5v) | Vin (3.3-16V) |
nc | RTS |
Gnd | CTS |
p9 (Serial RX) | TXO |
p10 (Serial TX) | RXI |
mBED | Servo | = 9V External DC supply |
---|---|---|
GND | GND | GND |
POWER | +9V | |
P24 | PWM Input |
mBED | HC-SR04 |
---|---|
Vu (5V) | Vcc |
GND | GND |
p6 | Trig |
p7 | Echo |
Successful Results
The team succeeded at the following:
- Implementation of sonar sensing to detect objects in the near vicinity
- Implementation of bluetooth enabled accelerometer continuous steering
- Implementation of servo control that may actuate the lighter
Challenges Faced
Below are some challenges the team faced when designing FlameBot:
- Lighter actuation requires too much force that our servo cannot deliver
- Mechanical problems with the design of the actuation mechanism
- Space constraints on the body of the robot
- Processing power of Mbed
Future Work
These are ideas for future work that increase the functionality or efficiency of the robot :
- Creating a new body for the rover
- Using threads and RTOS to increase processing speed
- Using a nichrome wire and LiPo battery as a substitute to the lighter
- Using a power MOSFET to control the heating of the nichrome wire
- Using a higher torque servo or solenoid to provide actuation of the lighter
Demonstration Video
Below is a video of FlameBot operating. As can be seen, the gyroscope and accelerometer on the Android phone directs the robot to move. In addition, the sonar sensor prevents the robot from colliding, and every time the sonar sensor detects an object, the servo is actuated, implying that the lighter is ignited.
Source Code
Import programflamebot
ECE 4180 FlameBot Source Code
Snippet of Control Flow for FlameBot
int main() { float s1; float s2; char bchecksum=0; char temp=0; union f_or_char x,y,z; sonar.startUpdates();//start measuring the distance while(1) { bchecksum=0; if (bluemod.getc()=='!') { if (bluemod.getc()=='A') { //Accelerometer data packet for (int i=0; i<4; i++) { temp = bluemod.getc(); x.c[i] = temp; bchecksum = bchecksum + temp; } for (int i=0; i<4; i++) { temp = bluemod.getc(); y.c[i] = temp; bchecksum = bchecksum + temp; } for (int i=0; i<4; i++) { temp = bluemod.getc(); z.c[i] = temp; bchecksum = bchecksum + temp; } if (bluemod.getc()==char(~('!' + 'A' + bchecksum))) { //checksum OK? //pc.printf("X = %f Y = %f Z = %f\n\r",x.f, y.f, z.f); move = 1; if (x.f < -4.0) { s1 = 0.3; s2 = -0.3; m1.speed(s1); m2.speed(s2); myled1 = 1; myled2 = 0; myled3 = 0; myled4 = 0; wait(0.05); } if (x.f > 4.0) { s1 = -0.3; s2 = 0.3; m1.speed(s1); m2.speed(s2); myled1 = 0; myled2 = 1; myled3 = 0; myled4 = 0; wait(0.05); } if (y.f < -3.5) { s1 = -0.2; s2 = -0.2; m1.speed(s1); m2.speed(s2); myled1 = 0; myled2 = 0; myled3 = 1; myled4 = 0; wait(0.05); } if (y.f > 3.0) { s1 = 0.2; s2 = 0.2; m1.speed(s1); m2.speed(s2); myled1 = 0; myled2 = 0; myled3 = 0; myled4 = 1; wait(0.05); } if (x.f > -4.0 && x.f < 4.0 && y.f > -4.0 && y.f <4.0) { s1 = 0.0; s2 = 0.0; m1.speed(s1); m2.speed(s2); wait(0.05); } while(move) { sonar.checkDistance(); move = 0; } } } } } }
Please log in to post comments.