background image

Pololu Zumo Shield for Arduino

User's Guide

1. Overview  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  2

1.a. Contacting Pololu  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  3
1.b. Included components  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  3

2. Assembly  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  5

2.a. What you will need  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  5
2.b. Assembling the Zumo Shield and chassis .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  5

3. The Zumo Shield in detail  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 16

3.a. Features and components  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 16
3.b. Front expansion  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 18
3.c. Jumper settings  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 19
3.d. 3-axis compass module (accelerometer and magnetometer)  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 20

4. Schematic diagrams  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 22
5. Arduino pin assignment table  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 23
6. Zumo Shield Arduino Libraries  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 24
7. Example project: Border-detecting sumo robot  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 25

7.a. Adding QTR reflectance sensors  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 25
7.b. Arduino sketch  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 26

Pololu Zumo Shield for Arduino User's Guide

© 2001–2012 Pololu Corporation

http://www.pololu.com/docs/0J57/all

Page 1 of 28

Summary of Contents for Zumo

Page 1: ...omponents 16 3 b Front expansion 18 3 c Jumper settings 19 3 d 3 axis compass module accelerometer and magnetometer 20 4 Schematic diagrams 22 5 Arduino pin assignment table 23 6 Zumo Shield Arduino Libraries 24 7 Example project Border detecting sumo robot 25 7 a Adding QTR reflectance sensors 25 7 b Arduino sketch 26 Pololu Zumo Shield for Arduino User s Guide 2001 2012 Pololu Corporation http w...

Page 2: ...king a more interesting robot such as a buzzer for making sounds and a 3 axis accelerometer and compass Zumo Shield for Arduino Assembled Zumo robot with a Zumo Shield Arduino Uno and Zumo blade A Zumo chassis Zumo Shield and Arduino can be combined to become a low profile Arduino controlled tracked robot that is less than 10 cm on each side small enough to qualify for Mini Sumo competitions Zumo ...

Page 3: ...t 2505 that also includes a Zumo chassis http www pololu com catalog product 1418 and a stainless steel Zumo blade http www pololu com catalog product 1410 Zumo Shield The shield itself comes with the following components right angle slide switch two pushbuttons http www pololu com catalog product 1400 buzzer 2 pin battery charging header http www pololu com catalog product 1012 three jumper wires...

Page 4: ... chassis http www pololu com catalog product 1410 You will receive the black acrylic spacer and mounting plates with protective paper masking on both sides You can peel this masking off to expose the acrylic surface or you can leave it on to increase the thickness of the plates The shield and chassis kit include extra parts like jumper wires screws nuts and washers so do not be concerned if you ha...

Page 5: ... the product description for the chassis kit http www pololu com catalog product 1418 for more information and recommendations about selecting these components Additional optional components Basic sumo blade for the Zumo chassis http www pololu com catalog product 1410 Sensors http www pololu com catalog category 7 such as our QTR reflectance sensors http www pololu com catalog category 123 Connec...

Page 6: ...er two 1 8 headers and one 1 6 header older Arduino boards use two 1 8 headers and two 1 6 headers the two pairs of pins highlighted above in red should not be populated if you are using this board with an older Arduino that does not support these additional pins Please make sure you solder the appropriate headers for your particular Arduino An easy way to line up the Arduino headers for soldering...

Page 7: ...ne later though soldering to these pins is more difficult once the robot is assembled especially if you decide later you want to add header pins for use with shorting blocks this would require a lot of disassembly The jumpers are explained in detail in Section 3 c The buzzer and battery level jumpers can be connected by soldering in a short piece of wire between the two holes while the compass I C...

Page 8: ...t only components in the outermost three rows of the front expansion area can extend below the board the fourth front expansion row can only be used for pins extending above the board and if you add any through hole parts to the prototyping areas on the shield you will need to drill corresponding holes in the acrylic spacer plate for the leads to fit into Motors 7 Cut two of the included jumper wi...

Page 9: ...inal closest to the front so you should attach the leads to allow the motors to be oriented this way However don t worry if you accidentally get the orientation of one or both motors wrong You can later compensate for it in software with our ZumoMotors library http www pololu com docs 0J57 6 9 Place the motors into the channel in the front of the chassis aligning the gearbox with the grooves in th...

Page 10: ...sis and motors with the spacer plate pieces and then the Zumo shield The holes in the spacer plate should line up with the through holes in the shield resting on top of it There is only one correct orientation for these plates The plate consists of two separate pieces to make it possible to disassemble the Zumo without having to desolder the motors or battery terminals 13 In each of the four mount...

Page 11: ...o longer 5 16 2 56 machine screws included with the shield through the blade shield spacer plate and chassis Be careful when adjusting the angle of the sumo blade while it is mounted to the chassis as this can crack the acrylic spacer plate if you apply sudden or excessive force We recommend you do not try bending the blade while it is mounted to the chassis 14 Solder each motor lead to the shield...

Page 12: ...ts as shown in the picture below Note that the two individual contacts should be inserted into the chassis so that their solder tabs protrude through the holes in the top of the chassis Pololu Zumo Shield for Arduino User s Guide 2001 2012 Pololu Corporation 2 Assembly Page 12 of 28 ...

Page 13: ...led with solder as shown in the picture below Sprockets and track 17 Place an idler sprocket on each shoulder bolt followed by a washer The side of the sprocket with teeth should face the same direction as the threaded end of the bolt so that the teeth end up pointing in towards the chassis 18 Insert the shoulder bolts through the side of the chassis into the nut Use a 3 mm hex key Allen wrench to...

Page 14: ...is to set the wheel on a table top and press the motor shaft into the wheel until it contacts the table 20 At this point you can add the silicone tracks by stretching them around the sprockets on each side of the chassis Your Zumo Shield and chassis are now complete just add batteries and an Arduino to get your Zumo robot moving Pololu Zumo Shield for Arduino User s Guide 2001 2012 Pololu Corporat...

Page 15: ... the shield to the chassis 4 Squeeze the negative battery terminal spring and gently ease both battery terminals out through the holes in the chassis The motors will stay attached to the shield as it separates from the chassis 5 Carefully bend both motors away from the shield to allow the front piece of the spacer plate to be removed You can reassemble the Zumo afterwards by following this procedu...

Page 16: ...ctor on the left is indicated by a plus sign A charger like the iMAX B6AC http www pololu com catalog product 2260 connected by clipping its alligator clips to a pair of jumper wires inserted into the charge connector works well for charging the Zumo After passing through reverse protection the battery voltage is connected to the rest of the shield by the power switch The switched battery voltage ...

Page 17: ...er pushbutton is located on the rear edge of the shield It is connected to digital pin 12 on the Arduino pressing the button pulls the pin low The Pushbutton library included with our Zumo Shield libraries http www pololu com docs 0J57 6 makes it easy to detect and debounce button presses with this pushbutton Motor driver An integrated DRV8835 http www pololu com catalog product 2135 dual motor dr...

Page 18: ...ront expansion The pins in the front expansion area of the Zumo Shield are shown in the following diagram This diagram is also available as a downloadable PDF Zumo Shield front expansion pinout http www pololu com file download zumo_shield_front_expansion_pinout pdf file_id 0J592 552k pdf The front expansion makes available digital pins 2 4 5 and 11 and analog pins A0 through A5 It also provides a...

Page 19: ... can be accessed from other points on the shield and used for interfacing with additional electronics if free Additionally digital pin 12 can be used for interfacing with many types of additional electronics especially if you are not using the shield s user pushbutton Pin 12 is completely free when the pushbutton is in its default unpressed state and it is pulled low through a 1k resistor when the...

Page 20: ...used for other purposes and the I C pull up resistors will affect readings on these pins even if the compass is not being actively used so you must cut the jumpers to disconnect the LSM303 and pull ups if you want to repurpose the SCL and SDA pins Please note that the SCL and SDA pins do not exist on Arduino hardware versions prior to the Uno R3 so you will have to manually connect SCL to analog p...

Page 21: ... in the environment around the Zumo such as rebar in a concrete floor As a result it is very hard to accurately determine the Zumo s absolute heading based on the magnetometer data However in our tests we found that the magnetometer was still useful for detecting relative orientation changes for example once the magnetic readings are compensated for a particular environment they can be used to hel...

Page 22: ...d are available as a downloadable PDF Zumo Shield schematic diagrams http www pololu com file download zumo_shield_schematic pdf file_id 0J591 121k pdf Pololu Zumo Shield for Arduino User s Guide 2001 2012 Pololu Corporation 4 Schematic diagrams Page 22 of 28 ...

Page 23: ...tion control line 9 right motor PWM control line 10 left motor PWM control line 11 digital I O front expansion 12 digital I O user pushbutton pressing pulls low 13 digital I O yellow user LED high turns LED on Analog pins Zumo Shield function Notes alternate functions A0 analog input and digital I O front expansion A1 analog input and digital I O front expansion optional jumper to battery level vo...

Page 24: ...posite the orientation indicated in the assembly instructions http www pololu com docs 0J57 2 b you can simply call flipLeftMotor true and or flipRightMotor true to make the motors behave consistently with the directions in your code ZumoBuzzer The ZumoBuzzer library provides functions that allow various sounds to be played on the buzzer of the Zumo Shield from simple beeps to complex tunes See Se...

Page 25: ...great for this purpose For border detection it is sufficient to mount two reflectance sensors to the front of the Zumo one on each side This can easily be done by soldering two 1 3 pin female headers under the left and right corners of the front expansion area of the Zumo for two QTR 1RC http www pololu com catalog product 959 or QTR 1A http www pololu com catalog product 958 sensors to plug into ...

Page 26: ...no sketch With the addition of QTR sensors your Zumo should be able to drive around and stay within a sumo ring The following example sketch demonstrates how to program an Arduino controlled Zumo to do this To begin install the Zumo Shield Libraries http www pololu com docs 0J57 6 and our Arduino Library for the Pololu QTR Reflectance Sensors http www pololu com docs 0J19 Then download and open Zu...

Page 27: ...TE_G 3 200 15 delay 1000 buzzer playNote NOTE_G 4 500 15 delay 1000 void setup uncomment if necessary to correct motor directions motors flipLeftMotor true motors flipRightMotor true pinMode LED HIGH waitForButtonAndCountDown void loop if button isPressed if button is pressed stop and wait for another press to go again motors setSpeeds 0 0 button waitForRelease waitForButtonAndCountDown unsigned i...

Page 28: ...everything works right the Zumo should sound a countdown with its buzzer and then start driving forward until it detects the ring border it should then back up turn and continue If not try adjusting some of the parameters as described above Here are some specific troubleshooting tips If the Zumo overshoots the ring border try lowering FORWARD_SPEED especially if it is going very fast or reducing Q...

Reviews: