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.

/media/uploads/kkulkarni36/pastedimage0.png

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

  1. Mbed LPC1768
  2. HC-SR04 Sonar Sensor
  3. H-Bridge Motor Controller
  4. Adafruit Bluetooth LE UART Friend
  5. Android Phone
  6. 9V Battery (2)
  7. DC Motors (2)
  8. Robot Chassis
  9. Barbecue Lighter

System Schematic

/media/uploads/kkulkarni36/new_doc_2018-05-02_21.16.20_1.jpg

Wiring

mBEDH-Bridge= Motor
Vcc5 V (DC)
GNDGND
P15, fwdAIN1
P14, revAIN2
P25, PWMPWMA
P19, fwdBIN1
P20, revBIN2
P26, PWMPWMB
AO1+ Motor 1
AO2+ Motor 2
mBEDAdafruit BLE
GNDGND
VU(5v)Vin (3.3-16V)
ncRTS
GndCTS
p9 (Serial RX)TXO
p10 (Serial TX)RXI
mBEDServo= 9V External DC supply
GNDGNDGND
POWER+9V
P24PWM Input
mBEDHC-SR04
Vu (5V)Vcc
GNDGND
p6Trig
p7Echo

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.