Advertisement

Quick Links

Arduino
Robotics Kit
With
Motor Shield
Document No. ODD-008
Fall 2014

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Arduino Robotics Kit With Motor Shield and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for oddWires Arduino Robotics Kit With Motor Shield

  • Page 1 Arduino Robotics Kit With Motor Shield Document No. ODD-008 Fall 2014...
  • Page 2: Table Of Contents

    Contents Overview ............................1   Robot Construction Steps 1   Kit Contents ........................... 3   Hardware Pack Contents ......................4   Install the Arduino IDE and USB Drivers ..................5   Getting Started with Arduino on Windows 5   Getting Started with Arduino on Mac 6  ...
  • Page 3: Overview

    Arduino Uno to control and manage the robot. If you want the version where you do more with LEDs, MOSFETs and so on see the oddWires Robotics Kit for Arduino. In that version you build a robot with the same chassis, but you develop a motor control board from a prototype board.
  • Page 4: Robot Construction Steps

    Robot Construction Steps • Check your kit contents list and ensure you have 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. •...
  • Page 5: Kit Contents

    40 pin header (break up with snips for the size you need) Ultrasonic Distance Sensor Mount 1 x 4 way ribbon cable F-F or 4 F-F wires 20 way F-M Split-able Ribbon Cable (split off what you need for testing) oddWires Arduino Robotics Kit...
  • Page 6: Hardware Pack Contents

    Hardware Pack Contents Part List Quantity Motor Mounts Rotors M3 x 30mm Screws, Pan-Headed M3 x 8mm Screws, Pan-Headed M3 Nuts M3 x 12mm Female-Female Stand-Offs M3 x 25mm Female-Female Stand-Offs M3 x 15mm Female-Female Stand-Offs M3 x 6mm Screws, Pan-Headed On/Off Switch Castor Wheel These parts are used as follows:...
  • Page 7: Install The Arduino Ide And Usb Drivers

    On Windows 8, 7 or Vista, the driver should be automatically downloaded and installed. You can check that the drivers have been installed by opening the Windows Device Manager (in the Hardware tab of System control panel). Look for a "USB Serial Port" in the Ports section; that's the Arduino board. oddWires Arduino Robotics Kit...
  • Page 8: Getting Started With Arduino On Mac

    Launch the Arduino application Double-click the Arduino application. (Note: if the Arduino software loads in the wrong language, you can change it in the preferences dialog. See the environment page (http://arduino.cc/en/Guide/Environment#languages) for details.) Getting Started with Arduino on Mac Download the Arduino environment Get the latest version from the download page (http://arduino.cc/en/Main/Software).
  • Page 9: 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 corresponds to your Arduino. oddWires Arduino Robotics Kit...
  • Page 10 Selecting an Arduino Uno Select your serial port Select the serial device of the Arduino board from the Tools > Serial Port menu. Select the serial device of 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).
  • Page 11 A few seconds after the upload finishes, you should see the pin 13 (L) LED on the board start to blink. Congratulations! You've got Arduino up-and-running. If you have problems, please see the troubleshooting suggestions http://arduino.cc/en/Guide/Troubleshooting). oddWires Arduino Robotics Kit...
  • Page 12: Sweeping The Servo By 180 Degrees

    Sweeping the Servo by 180 Degrees In this section we learn how to use a servo with Arduino. We will sweep the shaft of a RC servomotor back and forth across 180 degrees. This example makes use of the Arduino servo library.
  • Page 13 // waits 15ms for the servo to reach the position for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position oddWires Arduino Robotics Kit...
  • Page 14: Hc-Sr04 Ultrasonic Distance Sensor

    HC-SR04 Ultrasonic Distance Sensor The HC-SR04 is an ultrasonic distance sensor. It detects the distance of the closest object in front of the sensor (from 2 cm up to 3m). It works by sending out a burst of ultrasound and listening for the echo when it bounces off of an object.
  • Page 15: Code

    // ((time)*(Speed of sound))/ toward and backward of object) * 10 long DistanceCalc; // Calculation variable DistanceCalc = ((time /2.9) / 2); // Actual calculation in mm //DistanceCalc = time / 74 / 2; // Actual calculation in inches return DistanceCalc; // return calculated value oddWires Arduino Robotics Kit...
  • Page 16: Constructing The Chassis

    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 protective paper removed. Constructing the Chassis Arduino Robotics Kit...
  • Page 17 Both of the motors attached with mounts (note mirror image). Keep the screw heads on the outside to avoid the wheels being fouled by the screw ends. Here’s another view of the motors installed on the chassis base. oddWires Arduino Robotics Kit...
  • Page 18 Mounting 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 the pan-head screws. Mount the castor wheel with more screws.
  • Page 19 Here is the assembled chassis. Another view. Battery box installed underneath. oddWires Arduino Robotics Kit...
  • Page 20: Installing The Arduino Uno

    Installing 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. Then fix the Uno into position using another two M3 screws.
  • Page 21 Solder two red wires cut from the supplied connecting wire to the switch. Snap the switch into place just in front of the Uno. oddWires Arduino Robotics Kit...
  • Page 22: Installing The Motor Shield

    Installing the Motor Shield Snip off 3 x 6 pin strips from the 40 pin header (tip: hold onto the small piece when you snip so it doesn’t go flying off). Solder the three strips to the bottom right hand corner of the shield where the rows are labeled A0-A5, GND &...
  • Page 23 3. Connect GND (black wire) of battery box to GND of Power Terminals (EXT_PWR) on Motor Shield. 4. Install on/off switch using inline connector (battery box red wire to on switch, other red wire from switch to +M on shield). oddWires Arduino Robotics Kit...
  • Page 24 5. Connect 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 ultrasonic pins to the motor shield. Solder 3 x 6 header pins Installing the Motor Shield...
  • Page 25: Installing The Servo

    Installing the Servo Servo attachment. Note the nut below the standoff as a spacer. Servo connected to Servo 1. Brown Power Orange Signal oddWires Arduino Robotics Kit...
  • Page 26: Installing The Ultrasonic Distance Sensor

    Installing the Ultrasonic Distance Sensor Use the female-female connecting wires to connect the Ultrasonic sensor as follows: Sensor Arduino Arduino +5V Trig Arduino Pin A4 Echo Arduino Pin A5 Arduino GND The ultrasonic distance sensor mount is attached to the servo mount and the mount is connected to the servo using double-sided tape –...
  • Page 27: Final Construction And Testing

    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 AFMotor and NewPing libraries. These are used in the supplied sketch...
  • Page 28: Ideas For Extending Your Robot

    Ideas for Extending your Robot Here are a few ideas for extending your Arduino-based robot. LDR (moth) Use a Light Dependent Resistor as part of a 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.

Table of Contents