Introduction: Pipe Bot - a Smart Arduino Bluetooth Robot

About: I am Azhar living in India. I am a blogger, maker, hacker and more :) to see my more projects visit my blog robotechmaker.com. I like to show that what I made and how to make it. Go here to follow me on FB - …

This is my first instructables. Here I am showing how to make a cheap two wheeled arduino bluetooth robot, using PVC pipes and its joints(for making the body). It's simple to make and easy to program. It have a lot of fun to play with this robot. It is not only a common bluetooth robot but a robot having many functions and a unique (My own)design make it different from that of other arduino bluetooth robots. I made this robot not only for fun, also have a plan to add accelerometer and a camera to it and some other small sensors. Thus we can use this robot in various fields .This robot is only a basic design. My next plan to upgrade this robot to v2.0 when I purchase the mpu 6050.

Main uses/Possibilities -

  • Disaster management -

This robot have a simple design and only have two wheels and in a cylindrical shape therefore it can travel to almost all terrains and through dangerous areas .

  • Spying agent for military purpose -

This robot is look like a piece of PVC pipe there for no one can simply identify this is a robot since we can use this for taking images and fore collecting information as spying agent.

  • Home surveillance robot


Bluetooth application to control the pipe bot

Click here to download it


Pipe bot in action. Watch the video to understanding the controlling of the pipe bot using the bluetooth app.


Here download all the files -Arduino code, Circuit diagram and fritzing file

Step 1: Tools Required

  • Screwdriver
  • Wire cutting
  • Cutting tool
  • Soldering iron
  • Drilling machine(not important)
  • Glue gun(not important)

Step 2: Materials Required

  1. Arduino pro mini - Buy here
  2. L293d motor controller shield
  3. Hc-06/05 bluetooth module - Buy here
  4. FTDI parallel to serial converter - Buy here
  5. Arduino female pin socket - Buy here
  6. Perfboard
  7. 2* 9 volt battery
  8. 2* 9 volt battery clip
  9. lM 7805 regulator IC - Buy here
  10. Heat sink
  11. 2* Wheel - Buy here
  12. 2* Gear motor - Buy here

Now I used 200 rpm motors when I upgrade this to self balancing function ,have to buy two 500 rpm motors.

Step 3: Size of the Robot (length and Number of Pipe Pieces and Joints)

PVC pipe size - 1.5 inch(diameter)

  • 2 * pipe pieces. Length - 5.6 mm
  • 2 * cup (closer). Length - 65 mm
  • 2 * coupling (double side joint). Length - 37 mm

Step 4: Let's Start Drilling

Make a large hole on the centre of the cup(closer) and small 5 holes around fore connecting the LEDs(use 4.5mm drilling bit) it as shown in the figure. Then connect five red LED's in parallel mode and solder it and take the input wire for giving power to the machine. Then connect the motor and screw it.

Do the same for both of the cups.

Step 5: Drilling the Pipe Pieces

Drill five holes for fixing the LED around the pipe and insert the LEDs and take the connection out.

Do the same for both the pipe pieces

Step 6: Connecting the Two Parts and Battery -

Let's connect the two parts (PVC cup and pipe piece) together before taking cable out from motor. Now there are 3 wires are coming out from this part one from red LEDs another from whit LEDs and third one from motors and now we have 2 such identical parts.

Then insert the two 9 volt battery with the clips into one of such part as shown in the figure and connect the the PVC coupling to this part.

Here I used two '9' volt batteries but you can use some other rechargeable batteries with/above 9 volt and 2 ah current and with same size (or less size) as the two 9 volt batteries.

Step 7: Let's Start Making the Electronic Section

Now make a shield fore placing arduino board after cutting the perfboard in round manner and Try to cut the perfboard and l293d module in round shape as same diameter as pipe (which will fit inside the pvc pipe and to avoid the wastage of place).

Step 8: Wiring All Electronic Parts Together (circuit Diagram)

Insert the arduino to the socket and connect the bluetooth mudule, lm7805 regulator IC and l293d motor controller as shown in the circuit diagram. Now we can see that there are two cables coming out of the board with 4 wires ,these are going to be connected with motor sheild and the LEDs.(the white cables I got from old DVD player).

Wiring Instructions -

Bluetooth module

- "TX of Bluetooth Module" goes to "RX of Arduino"

- "RX of Bluetooth Module" goes to "TXof Arduino"

- "VCC of Bluetooth Module" goes to "5v of Arduino"

- "GND of Bluetooth Module" goes to "GND of Arduino"

- The State & Key pins of the BT modules are unused.

Motor controller

- "C1-A of motor controller" goes to "PIN 8 of Arduino"

- "C1-B of motor controller" goes to "PIN 7 of Arduino"

- "C2-A of motor controller" goes to "PIN 6 of Arduino"

- "C2-B of motor controller" goes to "PIN 5 of Arduino"

LEDs

- "Positive leg of red LEDs" goes to "PIN 10 of Arduino"

- "Positive leg of red LEDs" goes to "PIN 13 of Arduino"

Battery

- "Positive Terminal of battery" goes to "+v input of lm7805 regulator IC "

- "Negative Terminal of battery" goes to "Ground pin of lm7805 regulator IC "

- "Ground pin of lm7805 regulator IC " goes to "GND of Arduino"

- "+v output pin of lm7805 regulator IC " goes to "RAW of Arduino"

Step 9: Gluing Them Together and Programming the Arduino

Connect the wires to motor sheild as shown in the figure. Now there is only one cable free ,that is for connecting with the LEDs. Then glue the the motor controller and arduino sheild together using hot glue gun. In the last image I have shown that the long jumper wires connected to the bluetooth module is winded on the blutooth module board in order to save space.

In next step we are going to insert the electronic parts in to the PVC pipe ,there we need to program it .

I 'am using the FTDI parallel to serial converter to program the arduino pro ,if you don't have this converter . Go through this instructable to program it using arduino uno.

Here is the program ,Download it and upload it to arduino pro mini.Feel free to edit it ;)

//Pipe Bot

//Constants and variable

int motor1Pin1 = 5; // pin 2 on L293D IC

int motor1Pin2 = 6; // pin 7 on L293D IC

int motor2Pin1 = 8; // pin 10 on L293D IC

int motor2Pin2 = 7; // pin 15 on L293D IC

char dataIn = 'S';

char determinant;

char det;

int vel = 0; //Bluetooth Stuff

int whitelight = 13;

int redlight = 10;

void setup() {

Serial.begin(9600); // set up Serial library at 9600 bps

// sets the pins as outputs:

pinMode(motor1Pin1, OUTPUT);

pinMode(motor1Pin2, OUTPUT);

pinMode(motor2Pin1, OUTPUT);

pinMode(motor2Pin2, OUTPUT);

pinMode(whitelight, OUTPUT);

pinMode(redlight, OUTPUT);

//Initalization messages

Serial.println("Arduin pipe bot");

digitalWrite(whitelight, LOW);

digitalWrite(redlight, LOW);

}

void loop() {

det = check(); //call check() subrotine to get the serial code

//serial code analysis

switch (det){

case 'F': // F, move forward

digitalWrite(motor1Pin1, HIGH);

digitalWrite(motor1Pin2, LOW);

digitalWrite(motor2Pin1, LOW);

digitalWrite(motor2Pin2, HIGH);

det = check();

break;

case 'B': // B, move back

digitalWrite(motor1Pin1, LOW);

digitalWrite(motor1Pin2, HIGH);

digitalWrite(motor2Pin1, HIGH);

digitalWrite(motor2Pin2, LOW);

det = check();

break;

case 'L':// L, move wheels left

digitalWrite(motor1Pin1, HIGH);

digitalWrite(motor1Pin2, LOW);

digitalWrite(motor2Pin1, LOW);

digitalWrite(motor2Pin2, LOW);

det = check();

break;

case 'R': // R, move wheels right

digitalWrite(motor1Pin1, LOW);

digitalWrite(motor1Pin2, LOW);

digitalWrite(motor2Pin1, LOW);

digitalWrite(motor2Pin2, HIGH);

det = check();

break;

case 'S': // S, stop

digitalWrite(motor1Pin1, LOW);

digitalWrite(motor1Pin2, LOW);

digitalWrite(motor2Pin1, LOW);

digitalWrite(motor2Pin2, LOW);

det = check();

break;

case 'U': // V, Red light on

//Serial.println("Red LIght On");

digitalWrite(redlight, HIGH);

break;

case 'u': //v, Red light off

//Serial.println("Red Light Off");

digitalWrite(redlight, LOW);

break;

case 'W': //W, Front Lights On

//Serial.println("White LIght On");

digitalWrite(whitelight, HIGH);

break;

case 'w': //w, Front Lights Off

//Serial.println("White Light Off");

digitalWrite(whitelight, LOW);

break;

}

}

//get bluetooth code received from serial port

int check(){

if (Serial.available() > 0){// if there is valid data in the serial port

dataIn = Serial.read();// stores data into a varialbe

//check the code

if (dataIn == 'F'){//Forward

determinant = 'F';

}

else if (dataIn == 'B'){//Backward

determinant = 'B';

}

else if (dataIn == 'L'){//Left

determinant = 'L';

}

else if (dataIn == 'R'){//Right

determinant = 'R';

}

else if (dataIn == 'S'){//Stop

determinant = 'S';

}

else if (dataIn == 'U'){//Red Lights On

determinant = 'U';

}

else if (dataIn == 'u'){//Red Lights Off

determinant = 'u';

}

else if (dataIn == 'W'){//White Lights On

determinant = 'W';

}

else if (dataIn == 'w'){//White Lights Off

determinant = 'w';

}

return determinant;

}

}

Step 10: Finishing the Electronic Section

Connect the remaining cables with the LEDs after connecting all white LEDs and red LEDs together. Then connect the board with battery and let's put the board facing to the motor controller into one section(where coupling is not included ).

In the last image we can see there where only little space on either side of the 9 volt battery and this is the place for bluetooth module and for lm7805 regulator.

Now we have completed the wiring of all electronic parts. The main things to be noted here is ,the space available inside the PVC is very less and we have to utilise all the small space remaining after connecting the battery and motors inside the PVC pipes.

Step 11: Last Step - Adding a Switch

Here we are going to add a small switch to the pipe bot ,for this make a small hole in rectangular shape after measuring the size of the switch. Then connect the switch to the wire coming out of the PVC and Glue the switch to the pipe bot. Insert the bluetooth module and ln7805 regulator IC as described in the previous step.

Then connect all parts together and glue the side of the joints(if not glued they may become loose on running ) At last connect the wheels on both sides .

Now we have finished the work and we have a PIPE BOT !.

Future plans and upgrades -

  • Adding an 'mpu 6050' accelerometer to always face same direction (or to avoid rotation) and to avoid the worm like moment of the pipe bot
  • Adding a camera.
  • Replace the 200 rpm motor with 500 rpm
Robotics Contest 2016

Participated in the
Robotics Contest 2016

Make it Move Contest 2016

Participated in the
Make it Move Contest 2016