Introduction: ATOM

Picture of ATOM
Hey

This is my first instructables .I finally made my tracked robot , after some plans not going right . This is a tacked robot with two 12v high torque and speed. Being tracked it can climb over a lot of things and even steep lifts . It can be controlled over a android device or pc. But my suggestion is using pc as it can even stream video signals over internet or wifi.

What did you make: I made a arduino powered tracked robot with high performance and speed. It has a camera attached in ts front to stream videos wireless to pc or android. It is bluetooth controlled and powered by 12v battery + 9v battery (arduino).

How did you make it : I like building robots since I got my arduino I started working on a lot of project but this is my second robot using arduino. As I said this is android powered, with bluetooth control and l298 . Using l298 in my H-bridge circuit it controls the motors. It also uses an ip camera to transmit video wirelessly.

Where did you make it: I made it at my house . After my long never ending exams.


What did you learn: Well I learnt a whole lot of things. A lot of engineering stuff  bluetooth programming . L298 behavior etc.
But most of all I learn to make a robot.

 

Step 1: Supplies

Picture of Supplies
PARTS

1. Arduino Uno.

2. Bluetooth Transceiver Chip ( Serial Bluetooth Modem).

3. L298 Dual H-Bridge IC.

4. 2pcs of Geared Motor (Specifications depend on application of the robot).

5. 4pcs of wheels.

6. 12v 1Ah Battery.

7. Wood for base

8. PCB.

9. Male Header Pins (Straight).

10. Wire.

11. Small Screws and nuts.

12. Resistors ( 1pc 10K ohms and 1pc 20k ohms).

13. Android phone / ip camera.

14. Servo

TOOLS

1. Soldering iron.

2. Solder.

3. Soldering wax.

4. Drill.

Step 2: Chassis

Picture of Chassis

The chassis is made of plywood on which the pulleys and motors are mounted after which the track is mounted into position.
wires are connected from these motors to the arduino. The motor drives the track which in return drives the front wheels.
I would suggest to use 12v geared  motors for more performance. Make sure both the wheels are parallel to each other.
solder the wires to the motors.

Step 3:

Picture of

For motor driver i used l298, connect the pins as mentioned bellow.

1----Ground

2----Pin 1 of Left Side Motors  

3----Pin 2 for Left Side Motors

4---- +12v battery

5---- Arduino Pin 2 

6---- Arduino Pin 3

7---- Arduino Pin 4

8---- Ground

9---- +5v from Arduino

10---- Arduino Pin 5

11---- Arduino Pin 6

12---- Arduino Pin 7 

13---- Pin 1 of Right Side Motors

14---- Pin 2 of Right Side Motors

15---- Ground

Connect 12v battery to pin 4 and arduino 5v+ to pin 9.  Pin 11 and 6 act as enable pins make sure these are high in the code.
If low the motors will not function. Connect all the ground pins together . from arduino and supply . 

Step 4: BLUETOOTH

Picture of BLUETOOTH

Connect the bluetooth module as shown in the circuit below.
The arduino sends serial output of 5v through the Tx pin, whereas the bluetooth transceiver module uses 3.3v logic. So a voltage divider circuit ( level shifter ) is required to convert this 5v output to 3.3v
I manged to solder the bluetooth on a PCB along with the resistors and a led. An led can be connected to 32 pin along with a 470ohm resistor. If everything went right you shou have the led blinking when powered ON and staying constant when you connect your pc to it.
For more details reffer to the pdf guide bellow.

WARNING!!!!
Never conect the rx pin from the bluetooth module directly to the arduino as u my loose both your arduino as well as your module.
Make sure the 3.3+ is connect to 3.3v+ on the arduino and not 5v.

Step 5: SERVO

Picture of SERVO

As for angular rotation of the camera i used a servo which turns to 0,45,90,270,180 degrees which can also be controlled. 
The servo pins are connected as-
Orange/yellow - arduino pin 10
Red- arduino 5v+
Black- ground
The servo is to be mounted on the front of the chassis . Using some screws. The camera should be mounted in front of the servo.
I used an android device so I created a stand in the front to hold it.

Step 6: VIDEO

Now for the camera part , you can use either an ip camera or an an old android phone.

For android users
you can use ip webcam app from play store
Link-https://play.google.com/store/apps/details?id=com.pas.webcam&hl=en
Install the app and start the sever make sure you have an internet connection.
Then enter the URL ip as seen below on the phone on your computers URL bar.
Then follow the options and select a media player 

For ip camera users
Follow the manual that came with it.

To view from another android device install tiny cam from android market.

Step 7: ARDUINO CODE

Picture of ARDUINO CODE

ARDUINO CODE

#include <Servo.h>
Servo servoMain;
int r_motor_n = 2;  //PWM control Right Motor -
int r_motor_p = 4;  //PWM control Right Motor +
int l_motor_p = 5;   //PWM control Left Motor +
int l_motor_n = 7;   //PWM control Left Motor -
int enable = 3;
int enable2 = 6;

int incomingByte = 0; // for incoming serial data


void setup()
{
  servoMain.attach(10);
  pinMode(r_motor_n, OUTPUT);  //Set control pins to be outputs
  pinMode(r_motor_p, OUTPUT);
  pinMode(l_motor_p, OUTPUT);
  pinMode(l_motor_n, OUTPUT);
  pinMode(enable, OUTPUT);
  pinMode(enable2, OUTPUT);
 
  digitalWrite(r_motor_n, LOW);  //set both motors off for start-up
  digitalWrite(r_motor_p, LOW);
  digitalWrite(l_motor_p, LOW);
  digitalWrite(l_motor_n, LOW);
  digitalWrite(enable, LOW);
  digitalWrite(enable2, LOW);

 
  Serial.begin(9600);  
 
  Serial.print("Whats up im ATOM, geared up!!!! \n");
  Serial.print("w = Forward \n");
  Serial.print("s = Backward \n");
  Serial.print("d = Right \n");
  Serial.print("a = Left \n");
  Serial.print("f = Stop  \n");
  Serial.print("stive robotics");
}

void loop()
{

 
      
 
   if (Serial.available() > 0) {
  // read the incoming byte:
  incomingByte = Serial.read();
  }

 
 
 
  switch(incomingByte)
  {
     case 'f':
       digitalWrite(r_motor_n, LOW);  //Set motor direction, 1 low, 2 high
       digitalWrite(r_motor_p, LOW);
       digitalWrite(l_motor_p, LOW); 
       digitalWrite(l_motor_n, LOW);
       digitalWrite(enable, LOW);
       digitalWrite(enable2, LOW);
       Serial.println("Stop\n");
       incomingByte='*';
     
     break;
    
     case 'd':
       digitalWrite(r_motor_n, HIGH);  //Set motor direction, 1 low, 2 high
       digitalWrite(r_motor_p, LOW);
       digitalWrite(l_motor_p, HIGH); 
       digitalWrite(l_motor_n, LOW);
       digitalWrite(enable, HIGH);
       digitalWrite(enable2, HIGH);
       Serial.println("right\n");
       incomingByte='*';
     break;
   
      case 'a':
       digitalWrite(r_motor_n, LOW);  //Set motor direction, 1 low, 2 high
       digitalWrite(r_motor_p, HIGH);
       digitalWrite(l_motor_p, LOW); 
       digitalWrite(l_motor_n, HIGH);
       digitalWrite(enable, HIGH);
       digitalWrite(enable2, HIGH);
       Serial.println("left\n");
       incomingByte='*';
     break;
    
     case 'w':
       digitalWrite(r_motor_n, HIGH);  //Set motor direction, 1 low, 2 high
       digitalWrite(r_motor_p, LOW);
       digitalWrite(l_motor_p, LOW); 
       digitalWrite(l_motor_n, HIGH);
       digitalWrite(enable, HIGH);
       digitalWrite(enable2, HIGH);
       Serial.println("forward\n");
       incomingByte='*';
     break;

    
       case 's':
       digitalWrite(r_motor_n, LOW);  //Set motor direction, 1 low, 2 high
       digitalWrite(r_motor_p, HIGH);
       digitalWrite(l_motor_p, HIGH); 
       digitalWrite(l_motor_n, LOW);
        digitalWrite(enable, HIGH);
       digitalWrite(enable2, HIGH);
       Serial.println("backwards\n");
       incomingByte='*';
     break;
  
    case '1':
    servoMain.write(0);
    break;
   
     case '2':
    servoMain.write(45);
    break;
    
      case '3':
    servoMain.write(90);
    break;
   
     case '4':
    servoMain.write(135);
    break;
   
     case '5':
    servoMain.write(180);
    break;
    
     case 'v':
     Serial.print("atom ");
     Serial.println();
     Serial.print("stive robotics atom");
     incomingByte='*';
     break;
    
    delay(5000);
  
  
  }
 
 
           
 



NOTE
If any problems with the code , its tested so no problem.
Leave comments

TO reduce speed change 

digitalWrite(enable,HIGH);
digitalWrive(enable2,HIGH);

to
analogWrite(value)
value should be equal to 0-255 any value will do 255 is maximum and 0 is minimum.
 

Step 8: PC SETUP

Picture of PC SETUP

After following the above procedures u must uplode the code and your robot should all set up with a working video stream now for controlling your robot you'll need  teraterm on your computer.
http://hp.vector.co.jp/authors/VA002416/teraterm.html

After installing start the on the teraterm right com port , if u successfully set up every thing, the controls will be displayed and you'll be able to control the robot successfully.
If any error please comment below.

For ANDROID control

You'll need to install an bluetooth serial emulator there are plenty of these in market any one will do to control.
For video receive stream download tiny camera from play store.

Step 9: GEARED UP!!!!

Picture of GEARED UP!!!!

Now u must have a robot with working video stream. And a robot climbing over things .
IF ANY PROBLEM COMMENT.

NOTE

Make sure both the front and black pulleys are parallel to each other . If not the track will keep poping out .
If any connection error check com port on pc . Check if the device is paired pairing code '1234' .

Part 2 - Of project with fully internet control using php releasing soon......
.

Comments

HavocRC (author)2013-04-12
So how come if I change any of the two letter to two letter words it won't work. For instance,

  switch(incomingByte)
{
  case'on':
  digitalWrite(LED, HIGH);
  break;
  case'off':
  digitalWrite(LED, LOW);
  break;
}

It won't work until I change 'on' to 'o' and off to 'k'
Reichenstein7 (author)HavocRC2014-09-02

"case" has to be assigned as a variable, they do not have to be in order;

Such as:

case '1'

case '2'

or

case 'a'

case 'b'

etc.

Neat robot btw. =)

I should have mentioned in a comparator they probably do need to be in order of the comparator.

--

For something like,

switch (inByte) {

case ‘1’:

the switch case will correspond to the press of the corresponding keyboard key and will not need to be in any order; any key will do.

--

If you have variables defined in your code and its linked to "case", they will need to be single variables too.

steve_hassan (author)2013-04-13

Hey the terminal emulators can write only one case so its not possible to command two or more case. But if required you could use processing to give multiple case.

steve_hassan (author)2013-04-09

hey thanks mariam nice to know your are intrested, if you need any help feel free to ask....

mariam_shalini (author)2013-04-08

hey steve really cool project..hope to make a robot just like yours...!!!

About This Instructable

6,393views

30favorites

License:

More by steve_hassan:ATOM
Add instructable to: