My robot consist of a reused remote control tank chassis and a couple of other components which can be found below in the "Materials Needed" section. I've never used an Arduino before but I have heard of them since the 7th grade and now I'm psyched in having to use one. I've completed this robot with the help of many sources for example websites, books about Arduinos, family, and friends.
Step 1: Materials Needed
1. RC Tank Chassis
2. Arduino Uno
3. Breadboard w/ Jumper Wire Set
4. SN754410NE Motor Driver
5. Standard Servo
6. Ping Ultrasonic Range Finder
7. 9 Volt Snap Connector
8. 9 Volt Battery
9. DC Power Plug
10. x4 D Size Batteries
11. x4 D Battery Holder
12. Male Servo Extension
13. USB A to B Cable
14. 6" x 6" Base Plate (Optional)
1. Screw Driver Set
2. Hot Glue Gun
3. Solder Pencil
Step 2: RC Tank Chassis
So the base plate I'm using was hot glued into place as in the picture shown(exact position of the plate doesn't matter), but i preferred to place mine in the center.
Step 3: SN754410NE Motor Driver
Okay, so I will now be explaining how to connect the motor driver to the Arduino Uno. First, connect all ground pins to ground on the breadboard, which are pins 4,5,12, and 13 of the motor driver. Then connect Pins 1 and 16 of the motor driver to Pins 9 and 10 on the Arduino. Next, connect pins 2 and 7 of the motor driver to pins 3 and 4 on the Arduino, which are the inputs of the left motor. After that is complete, connect pins 10 and 15 of the driver to pins 5 and 6 on the Arduino, which are the inputs of the right motor. Pins 3 and 6 of the motor driver have to connect to the left motor and pins 14 and 11 have to connect to the right motor. Pins 3,6,11, and 14 are all output pins, which mean that they will send the signal from the Arduino to the motors and tell it when to move or when to be stationary. And the last two pins which are pins 8 and 16 of the motor driver need to be connected to power on the breadboard. The power source will be a 9 volt battery hooked up to the breadboard as shown in one of the pictures.
Step 4: Attaching the Ping Sensor
The first step to this is to attach the Male Servo Extension to the ping sensor so that it can connect from the front of the tank to the middle. Next, tape the ping sensor with the extension on top of the Standard Servo so that it wont move when the servo turns both 90 and 180 degrees(Left or Right).
There are three pins on the sensor, ground, 5v, and signal. The ground obviously will be connected to ground, the 5v to the Arduino's regulated pin, and the signal pin on pin 7 of the Arduino.
Step 5: Power Supply
For the Arduino power supply, you would have to solder the DC Power Plug to the 9V Snap Connector. Then for the motor power supply, you would have to just connect the Battery holder straight to the Breadboard containing the SN754410NE motor driver.
Step 6: Putting Everything Together
Step 7: A.A.T. Source Code
First, the program will tell the robot to move in a forward direction until it is within 10 cm away from an object. If it is in this range the program will now tell the robot to stop and scan both sides using the Ping sensor. Once both sides been scanned the program can now determine which side is most clear and safest for the robot to move towards that direction. If both sides aren't clear and have objects blocking the robots' way, it will turn a full 180 degrees and continue its trajectory without colliding.
The sketch for this robot can be found in the link below. Feel free to use it and modify it to your preference.