De Anza Tech
  • Home
  • Digital Design
    • GIMP >
      • GIMP 1
      • GIMP 2
      • GIMP3
      • GIMP 4
    • INKSCAPE
    • Documents
    • Presentation >
      • Keynote
      • Powerpoint
    • Sketchbook Pro
    • Comic Life
    • Mud box
  • 123D Design (3D Printing)
  • Engineering/Physics
    • Physics of Sound
    • Hydraulics
    • Solar Boat
    • Moustrap Car
    • WInd Power
    • Flight
    • Gears and Pulleys
    • Mission To Mars
    • Beetle Bot
  • Robotics
    • Arduino LED's
    • Arduino Buzzer
    • LCD Display
    • Servos
    • Motors
    • Ultra Sonic Sensor
    • Weather Sensors
    • Crawler Bot
    • Robot Arm
    • Robot Rover
  • Coding
  • Contact
  • Intermediate Projects
  • 123D Design Tutorials
  • Physics Games
  • Actobitty Tutorials

Autonomous Roving Robot

Build an autonomous roving robot with the Arduino Uno. Following the parts list and code, build the robot. Test the motors using the code on the page called motors. You will test the ultrasonic sensor and incorporate it into your robot to avoid obstacles. See the parts list below and code.
Picture
Picture
Picture
Picture
1 - Arduino Uno Micro Controller   $30
1 - Seeed Studio Motor Shield V2  $20
1 - Set geared Motors $10
2 - Square Plastic Electrical Box Covers $3.50
4 - Jumper wires with alligator clip ends  $3.50
Assorted Arduino jumper wires $1.00
1 - Ultrasonic Sensor $5.00
1 - Bag of 5, 10x24x2 Machine screws with nut $3.00
1 - Battery Holder 4xAA with barrel connector $3.00
1 - Battery Holder 4xAA bare ends $2.00
1 - Package Zip Ties $1.99
2 - Robot Wheels $5.00

Approx. $88.00
Picture
Below is the code use to test the Motors. Use this code and modify it to test the forward, back, left and right functions. It is ok to erase or add to it to see what results you'll get. Be sure you download the Motor Driver Library from Seeed Studio. Just go to their website and search for the motor shield  V2 and you'll find the link to the correct wiki and then you'll find the link to download the motor library.

1. Practice with the Motor Driver code to make robot go different directions.

Picture

2. Review Ultra Sonic Sensor code from previous projects.

3. Final Robot Code

Once you've experimented with movement and direction and understand how an Ultrasonic Sensor work, follow the Fritzing Sketch to wire everything up correctly. Also use the pictures provided. Then copy or type in the code below that combines the motor driver code with the Ultra Sonic sensor code. Notice the important parts are the "if" and "else" statements. These tell the Arduino micro controller to make the robot go forward until it reaches an obstacle 10 cm away. Then turn right.     if robot senses object at < 10 cm else turn right. The word "else" mean "then do".
Picture
Ultrasonic Sensor - Attach the Sensor to the Arduino using a small breadboard. Use the instructions in the code to see which pins will be for Echo and Trig. Follow the code. You will use the pins that are located on the Motor Shield board that is connected on top of the Arduino Uno.
Picture
Picture
After you copy code, make sure all connections are correct. Set up some obstacles. Attach batteries and give it a try.
You will notice that the robot stops after a few centimeters and then continues. Why? how can we eliminate that pause.
Powered by Create your own unique website with customizable templates.