Introduction: Build Your First Robot

In this instructable I'm going to show you how to build a really simple robot which can be controlled with a laptop or mac.
This robot is powered with a arduino uno and is very cheap and easy to build . This robot can take temprature values and can transmit it through Bluetooth . You might have already guessed this runs through Bluetooth . For those who don't know what an arduino is it is a micro controller and is easily programed on your PC or mac . It is very user friendly and easy to program .
And you will be needing the arduino software to program it (it is quite similar to processing software). You can visit the arduino web page for more info http://www.arduino.cc/ . For the software visit http://arduino.cc/en/main/software .

So enough of the talking lets start building!!!!


I have worked hard on this instructable so please vote for me in the contest. 

Step 1:

Lets start by getting all the parts and tools to build your robot, almost all of this parts can be found on eBay .

PARTS
1) Arduino UNO
2) L298 IC
3) HC 05 Bluetooth module
4) 2x Geared motors
5) Wires
6) A pair of wheels for the motors
7) 3x AA battery holder

TOOLS
1) Soldering iron

Step 2: BODY

Now that we have all of the parts lets start building the robot . First lets start with the body and the motors.
For this project there's now much of a body its just the motors strapped on the battery holder with of double sided tape.
You can take a look at the pic for more reference . Attach the wheels to the motors with the help of the provided screws and if have a look at he pic you can also see that I have soldered small wires to both the motors and the battery holder.

Step 3: Motor Driver

An arduino doesn't supply enough current to run the motors on its own, so we uses a motor driver to control it.   You can either buy one over eBay or just use l298 IC which can control 2 motors .

For motor driver  l298, refer the pic and 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 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 .

Enable pins like the note suggests turns the motor on and off . If these pins are set low in the code . Then the motors wont turn on.

Step 4: ARDUINO

As seen in the pic the arduino goes over the motors and stuck with some tape again the arduino is powered with a 9V battery. So you could get a power pin as shown in the pic strapped to the battery. For the Bluetooth and connecting the module refer this instructable
https://www.instructables.com/id/Cheap-2-Way-Bluetooth-Connection-Between-Arduino-a/ . It has a easy step by step instuctions on how to connect the arduino to HC05 module. Find some place on front or near of the arduino to get the module taped.

Step 5: Code

Finally your done with the building and the coding begins, If you skipped  to this step i recommend you read the previous steps.
For fist time users of arduino try the example codes before trying this one . In the previous steps you would have seen hoe to connect an arduino to PC or mac . Now you can download the code from the attachment and upload it to the arduino.
Download teraterm form here http://www.ayera.com/teraterm/ and connect it to the arduino.
And thats it your done. This is  the list of commands to run your robot
w - forward
s - backward
a - left
d - right
The code also includes servos and other stuff , thats for another robot which im going to post soon.
Teraterm uses only one case as a command so it is not possible to enter word commands.

Microcontroller Contest

Participated in the
Microcontroller Contest