background image

Document No. ODD-008 

 

Fall 2014 

 

 

 
 
 
 
 
 
 

Arduino 
Robotics Kit 
With 
Motor Shield 

 

 

Summary of Contents for Arduino Robotics Kit With Motor Shield

Page 1: ...Document No ODD 008 Fall 2014 Arduino Robotics Kit With Motor Shield...

Page 2: ...with Arduino on Linux 6 Your First Arduino Sketch 7 Sweeping the Servo by 180 Degrees 10 HC SR04 Ultrasonic Distance Sensor 12 Code 13 Constructing the Chassis 14 Installing the Arduino Uno 18 Instal...

Page 3: ...unt an Arduino Uno together with a stackable Arduino motor shield that comes assembled You do need to solder some pin headers to the board This shield has terminals for the two motors a terminal for t...

Page 4: ...all components Install the Arduino IDE and if necessary USB drivers Construct the chassis and the 6V power supply Install the Arduino Uno and the motor shield Add the servo and the ultrasonic distance...

Page 5: ...r Driver Board Motor Shield 1 Connecting Wire 2 colors 2 Inline Terminal Block 1 Servo Servo with Lead and Accessories 1 20 way M M Split able Ribbon Cable split off what you need for testing 1 Breadb...

Page 6: ...Pan Headed 4 Arduino Uno M3 x 10mm Female Female Stand Offs 4 M3 x 6mm Screws Pan Headed only two stand offs are screwed to chassis base 6 Motors Motor Mounts 2 Rotors 2 M3 x 30mm Screws Pan Headed 4...

Page 7: ...spite its best efforts Click on the Start Menu and open up the Control Panel While in the Control Panel navigate to System and Security Next click on System Once the System window is up open the Devic...

Page 8: ...nnect the board The Arduino Uno automatically draws power from either the USB connection to the computer or an external power supply Connect the Arduino board to your computer using the USB cable The...

Page 9: ...Kit 7 Your First Arduino Sketch Open the blink example Open the LED blink example sketch File Examples 1 Basics Blink Select your board You ll need to select the entry in the Tools Board menu that co...

Page 10: ...f the Arduino board from the Tools Serial Port menu On Windows this is likely to be COM3 or higher COM1 and COM2 are usually reserved for hardware serial ports To find out you can disconnect your Ardu...

Page 11: ...X LEDs on the board flashing If the upload is successful the message Done uploading will appear in the status bar A few seconds after the upload finishes you should see the pin 13 L LED on the board s...

Page 12: ...rcuit Servomotors have three wires power ground and signal The power wire is typically red and should be connected to the six volt power supply The ground wire is typically black or brown and should b...

Page 13: ...vo position void setup myservo attach 9 attaches the servo on pin 9 to the servo object void loop for pos 0 pos 180 pos 1 goes from 0 degrees to 180 degrees in steps of 1 degree myservo write pos tell...

Page 14: ...stens for a pulse on the echo pin The duration of this second pulse is equal to the time taken by the ultrasound to travel to the object and back to the sensor Using the speed of sound this time can b...

Page 15: ...id loop digitalWrite TriggerPin LOW delayMicroseconds 2 digitalWrite TriggerPin HIGH Trigger pin to HIGH delayMicroseconds 10 10us high digitalWrite TriggerPin LOW Trigger pin to HIGH Duration pulseIn...

Page 16: ...sis Arduino Robotics Kit 14 Constructing the Chassis Identify the chassis components 1 x chassis plate 2 x wheels 2 x motors 1 x castor wheel 1 x hardware pack 1 Here s the chassis plate with its prot...

Page 17: ...that the piece that will hold the motors to the base will be on the top of the finished chassis Loosely tighten the nuts until you have the motors aligned and then tighten You should not over tighten...

Page 18: ...the castor wheel requires 4 x 15 mm standoffs 4 x pan head screws to attach the standoffs to the base 4 x pan head screws to attach the castor to the mounts Screw the stand offs to the chassis with th...

Page 19: ...oddWires Arduino Robotics Kit 17 Here is the assembled chassis Another view Battery box installed underneath...

Page 20: ...ing the Arduino Uno Insert two of the smaller standoffs from Hardware Pack 2 in the position shown in the photo and fix with a couple of 6mm M3 screws Add a standoff to the Uno in the position shown T...

Page 21: ...oddWires Arduino Robotics Kit 19 Solder two red wires cut from the supplied connecting wire to the switch Snap the switch into place just in front of the Uno...

Page 22: ...older the three strips to the bottom right hand corner of the shield where the rows are labeled A0 A5 GND 5V You could simply solder the connecting wires later but this way you get to easily use these...

Page 23: ...k to M1_B 2 Connect Motor 2 to M2 Connect the Red from second motor to M2_B the Black to M2_A Note the reversal each motor must run the opposite to the other otherwise the robot will go arund in circl...

Page 24: ...Servo to SER1 Brown to Red to Yellow to S 6 Connect Ultrasonic Sensor to the A4 A5 5V and GND on the motor shield You will need to solder header pins into these holes to be able to connect the ultras...

Page 25: ...oddWires Arduino Robotics Kit 23 Installing the Servo Servo attachment Note the nut below the standoff as a spacer Servo connected to Servo 1 Brown GND Red Power Orange Signal...

Page 26: ...s Sensor Arduino Vcc Arduino 5V Trig Arduino Pin A4 Echo Arduino Pin A5 GND Arduino GND The ultrasonic distance sensor mount is attached to the servo mount and the mount is connected to the servo usin...

Page 27: ...on there is a completed sketch You will be able to enhance this sketch as you develop your robot car further You can find the download on the oddWires site for the kit Note Remember to download the AF...

Page 28: ...voltage divider to sense the light Read the values from an Arduino analog pin and move the robot to the source of light PIR Sensor movement sensor Use a PIR sensor to detect movement Have it chase a...

Reviews: