playful puppy robot instruction manual

Upload: henry-rios

Post on 01-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    1/22

    layful uppy RobotThe playful puppy robot is a simple quadruped robot that uses an infrared compound eye to track movementat close range. These instructions will show you how to assemble and program your robot.

    Required tools:

    - #1 Phillips screwdriver.- Small !."mm or $ ! inch% flat head screwdriver.- &ong nose pliers.

    The kit is supplied with a '! (( battery holder. )ood quality *i+h or *i,d batteries must be used. Do notattempt to use alkaline batteries as the voltage will be too high and could damage the servos. The robot willwork better with a ." &iPo battery as this is lighter.

    There are two variations of the sample code depending on which battery you use. The difference is that the

    *i+h batteries are heavier and the robot needs slightly different code to balance on its hind legs .The latest sample code can be downloaded at/https/$$sites.google.com$site$daguproducts$

    Types of screws used in this kit

    Self-tapping screws have a course thread and pointed tip that can drill into soft materials like plastic andwood.

    Machine screws have a fine thread and are designed to screw into machined parts where a thread is alreadypresent.

    Pan head screws have an e'tra large head. This is the equivalent of using a separate washer and screw.

    https://sites.google.com/site/daguproducts/https://sites.google.com/site/daguproducts/

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    2/22

    Step 1: enter your ser!osThe 0uad ot chassis kit includes 2' miniature servos and the Pan$Tilt kit includes ! miniature servos.These servos have clear cases so you should be able to see through them well enough to check that theyare centered.

    3hen the servo is centered it can physically turn the same amount in each direction appro'imately 45degrees%. ,heck that all 15 of your servos are centered. 6nce the robot is assembled7 the center position of

    each servo can be refined in the software if required.

    Step ": #ttach the foam ru$$er feetThere are 2 identical leg segments included in the kit. Select " of them and attach foam rubber feet using the ' 1!mm pan head screws. There are only " of these screws and they are the largest so they are easy tofind.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    3/22

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    4/22

    Step ': #ttach your thigh segment to your legs6nce you have mounted the servo horns on the thigh segments they can be attached to your knee servosusing " of the 2 supplied ! ' 2mm pan head screws. 3ith your knee servo centered the thighs should be at45 degrees to the leg segment with the foam rubber foot.

    Step (: )eft and Right legsSo far all of your legs should look identical. *ow we will separate them into left and right legs. The onlydifference between a left leg and a right leg is the way in which the thigh servo is mounted. +ount you thigh

    servos as shown in the photo using the ! ' 2mm self-tapping screws. *ote the difference in the position ofthe output shaft in the left leg thigh servos compared to the right leg thigh servos. They are mirror imaged.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    5/22

    Step *: #ttach your legs to the mounting plateThe mounting plate of the 0uad ot chassis is the laser cut acrylic panel that you mount all your parts on.+ount your left and right legs as shown in the photo. +,T : the rounded end is the rear of your robot. Thehole in the center of the rear is where you will mount your tail.

    Step .: /it mounting spacers to pan ser!o0The brass he' spacers used to mount the pan $ tilt kit require a mm screw but the miniature servo housing has a hole designed for a !mmscrew. 8se the Phillips head screwdriver to ream out the holes on each side. :o not press to hard7 you only need to ream out each side of thehole by a small amount so that the mm screw can be inserted without too much force.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    6/22

    6nce you have the mm screw in all the way7 continue turning the screw a few times so that the screwthread can drill out the hole a bit more.

    ;ou can now easily fit your !

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    7/22

    Step : #ttach the pan ser!o to the pan $racketThe pan $ tilt kit comes with two large brackets. =ach bracket has a different hole pattern on it to suit manydifferent sensors. &ook at the photo below and make sure you attach the correct bracket to the pan servo7 asthe compound eye cannot be mounted if you use the wrong bracket. 8se ! ' 9mm pan head screws tomount the bracket to the round servo horn and another ! ' 9mm pan head screw to mount the servo hornonto the pan servo as shown.

    Step 12: #ttach the tilt ser!o-locating $racketThe tilt servo-locating bracket doesn>t actually hold the tilt servo in place. ?ts main purpose is to prevent thetilt servo from twisting while allowing some play so the servo can self center. This bracket is mounted usingtwo ' 9mm machine thread screws and two mm nuts. )ea!e these nuts slightly loose at this stage sothat the bracket can move forwards and backwards slightly. 3e will tighten them once the servo is aligned.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    8/22

    Step 11: #ttach the ser!o horn to the tilt $racket8se two ! ' 9mm pan-head screws to attach a round servo horn to the tilt bracket. 8se holes that will allowthe center hole of the servo horn to align with the bracket as shown without allowing too much play if thescrews come loose.

    Step 1": #lign the tilt ser!o8se a !. ' 1!mm screw to align your tilt servo. The servo will be a firm fit in the tilt servo locating bracket.

    (d@ust the position so that the servo aligns with the pan bracket and allow room for spacer washers and a

    servo horn. 6nce everything is aligned you can tighten the mm screws holding the tilt servo-locating bracketso that it wonAt move.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    9/22

    Step 1% : Mount the tilt $racketThere are some spacer washers that must be inserted so that the tilt assembly can rotate smoothly. Theeasiest way ? know to insert these spacer washers is to lie the pan $ tilt assembly on it>s side with the tiltbracket at about "5 degrees when the tilt servo is centered as shown in the first photo.

    Stack your spacer washers neatly and insert them as best you can with your hand or long nose pliers asshown in the second photo. 8se a plastic cable tie to gently push the washers into position as shown in the

    third photo. 6nce the holes line up it>s easy to insert your !. ' 15mm screw through the brackets andwashers into the servo output shaft.

    Tighten all the way being careful not to over tighten and then back off 1$" of a turn. The tilt bracket should beable to tilt up and down fairly easily. &oosen the screw a little more if required. :o the same on the other sidewith the ' 15mm machine screw and nylon nut. +,T : The nylon nut should be slightly loose so that the tiltassembly can move easily.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    10/22

    Step 1&: Mount the eyeThe ?B compound eye is a simple sensor that measures ambient light and reflected ?B light from an [email protected] eye has seven connectors as shown in the first photo. cc C< % and )round for power. The ?B &=:spin turns the ?B &=:s on or off and then there are " analog outputs for up7 down7 left and right.

    (ttach the four mounting spacers on the tilt bracket as shown in the second photo. +ake sure the mm nutsare tight. ,onnect 2cm female-to-female @umper wires to the eye as shown in the third photo. ?>ve used red

    for cc C< %7 black for ground 5 %7 orange for the ?B &=:s and white for the " analog outputs.ecause 2cm is not long enough ? have then attached 2cm male-to-male @umper wires. This gives me195mm female to male @umper wires as shown in the third photo. y running the wires under the tilt bracketand then over the tilt servo as shown in the fourth photo ? find the head can move freely in any directionwithout pulling on the wires too much.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    11/22

    Step 1': Mount the head onto the $ody8se two ' 15mm pan head machine screws to mount the head. *otice the holes used in the first photo.The servo is mounted slightly to one side so that the pan servo>s output shaft is centered rather than theservo body. The pan servo is mounted a reasonable distance back to improve the balance of the robot andto help protect the pan servo if the robot runs into a wall.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    12/22

    Step 1(: Mount your $atteriesThis robot works best with a small &iPo battery ." 7 ! 55m(D% but rechargeable (( *i+h batteries aremore common and easier to recharge so we will use 9' (( *i+h batteries for these instructions. :o not usealkaline batteries7 the voltage is too high and they cannot put out enough current to drive the servos. This willcause your processor to continually reset. 8se good quality batteries with at least !555m(D capacity.

    Place some tape on the ends of the wires before you start so that they can>t short out before you are ready to

    connect them and then install 9 fully charged batteries.,able tie your battery holder to the centre of the mounting plate with your wires on the right hand side. +akesure all legs can move inward about "< degrees without hitting it. Do not make the ca$le ties too tight E ;oushould be able to @ust slide the battery holder sideways out of the cable ties when it is time to recharge thebatteries.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    13/22

    Step 1*: Mount the Magician ro$ot controller (ttach the four supplied brass spacers to the corners of the controller P, . *ow mount the board on thechassis with the power connection on the right hand side and the analog pins closest to the head as shownin the second photo.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    14/22

    Step 1.: 3ire up the head,onnect your pan servo to (" and your tilt servo to (< with the white signal wire towards the female header.The software reconfigures these pins as servo outputs. Fit small red and black female-to-female @umperwires to cc and ground as shown in the photo. These will provide power for the infrared compound eye.,onnect the red and black power wires from the eye.

    The motor control circuitry connects to the processor via " @umpers. Bemove the @umpers on :2 and :15.&eave the @umpers on : and :4. This allows us to use :2 to control the ?B &=:s on the eye. :15 might beused to control a small speaker or &=:. The left motor control circuit is still connected and is used to drive a

    small shaker motor to make the tail wag.,onnect your orange @umper wire to :2 and connect your " analog outputs from your eye. (5 is up7 (1 isleft7 (! is down7 ( is right.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    15/22

    Step 1 : Power configurationThe power configuration for this robot is slightly unusual. 15 miniature servos combined can draw more than amps when the robot is running around. This is far more than the +agician>s regulator can handle. Themagician controller board does allow you to power up to 2 servos directly from the battery but the servos arerated at 9 and the battery is .! E

    To solve these problems7 the pan and tilt servos7 which are not heavily loaded7 are connected to analog pins

    " and

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    16/22

    Step "2: onnect the leg ser!osStart by fitting the servo e'tension cables to the front leg servos. Feed these under your controller one at atime so you can tell which cable is for which servo. Plug in your leg servos as shown.

    :! - Bear left hip: - Bear left knee:" - Front left hip

    :< - Front left knee:9 - Front right knee:11 - Front right hip:1! - Bear right knee:1 - Bear right hip

    +ake sure your white $ orange control wire is closest to the female header.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    17/22

    Step "1: Mount the tailThe tail is made from a piece of spiral wrap. This is normally used to tidy up wires. 6ne end of the spiralwrap has been plugged with hot glue. +ount the tail by pushing a !. ' 15mm pan head self-tapping screwthrough the hole at the back of the mounting plate and screwing it into the plugged end of the spiral wrap.

    ?nsert your shaker motor in the end of the tail with the wires coming out at the base. ,onnect the wires to theleft motor output.

    +ake sure your power switch is off. Bemove the tape from your red battery wire and screw it into the positivepower terminal. Bemove the tape from the black battery wire and screw it into the negative power terminal.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    18/22

    Step "": 4nstalling the softwareTo install the sample code you must first have the (rduino ?:= version 12 or later running on your computer.The (rduino ?:= can be downloaded for free from here/ http/$$arduino.cc$en$)uide$DomePage .

    The +agician controller uses the ,P!15! 8S interface ?,. :epending on your 6S you may need to installdrivers. ;ou can download the latest 8S drivers. These are included on the ,: or you can download thelatest from here/ http/$$www.silabs.com$products$mcu$Pages$8S to8(BT ridge ,P:rivers.asp'

    6nce you have the (rduino ?:= running7 you can open the program. +ake sure you have the version suitedto the batteries you are using *i+h or &iPo% so that the robot will be able to stand on its hind legs.

    ;ou will see that the code has a constants tab and an ?6 pins tab. The constants tab stores values such asthe centre positions of servos. This makes it quick and easy to fine-tune your code.

    http://arduino.cc/en/Guide/HomePagehttp://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspxhttp://arduino.cc/en/Guide/HomePagehttp://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    19/22

    Step "": 4nstalling the software continuedThe ?6pins tab is like a map for your wiring. ?t tells you which device is connected to what pin.

    )o to the tools menu and select your board type. The +agician controller comes with either the (Tmega2(or the (Tmega !2. ?f you have the (Tmega2( then select G(rduino *) or older $w (Tmega2G. ?f yourcontroller has the (Tmega !2 then select H(rduino :uemilanova or *ano $w (Tmega !2.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    20/22

    Step "": 4nstalling the software continued*ow switch on your robot and plug in your 8S cable. (fter a few seconds your computer should detect the8S interface of the +agician controller. )o back to the tools menu and select your serial port.

    ;ou are now ready to upload your program to the robot.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    21/22

    Step "%: ontrolling your ro$otThe sample code tracks your hand movements with the compound eye and responds accordingly. ?f youleave the robot alone for seconds then it will sit down out of boredom. 6nce it sits down it gets laIy and willonly track your hand with its head.

    ?f you slowly bring your hand within range and move your hand to a paw then the robot will lift that paw foryou to shake hands. ?f you bring your hand between the paws it will lie down.

    6nce sitting you must e'cite the puppy to get it to stand back on its feet. Taking your hand to one side orabove the robot so it can only @ust see your hand will do this. 3hen the robot is standing it will try andmaintain a set distance from your hand. ?t will walk forward7 move backward or turn in order to keep yourhand in range.

    :o not move your hand too quick or it may loose sight of your hand. ?f you move your hand directly over it>shead while the robot is standing then it will try to @ump on its rear legs. ?f your hand stays in range of the eyethe robot will try and walk on its back legs to follow your hand. This trick works the best with the lighter &iPobattery.

  • 8/9/2019 Playful Puppy Robot Instruction Manual

    22/22

    Step "&: Trou$le shootingThe robot probably won>t work very well at first. =ach servo is a little bit different so some tweaking isrequired. (t the start of the main loop add the line GreturnJK This will cause the robot to stand still indefinitely.;ou can now ad@ust the servo center positions in the constants tab until the rear hips are at 45 degrees to thebody and the front hips are slightly forward.

    (ll knees should bend inward slightly. ?f any of your servos are drastically out of alignment then you may

    need to reseat the servo horn. ;our head should look straightforward with the head looking up at about a 5- "5 degree angle.

    ;ou may need to ad@ust these values and re-upload the program several times to get all servos in the correctposition. 6nce your robots servos are set correctly you can remove the GreturnJG line from your main loop.

    ?f the head does not track your hand then check your eye connections. ?f the head turns away from yourhand then you may have accidentally swapped your sensor wires or mounted the eye upside down thewires should come out at the bottom%. :ouble-check everything in steps 1" and 12. (re your servos pluggedin correctlyL

    ?f the robot frequently resets then you may have a bad battery or battery connection. ,heck your batterieshave a good charge and are making a good connection with the battery holder terminals. (re the battery

    terminal screws tightL Some cheap batteries may not be able to deliver enough current.?f the head works but the legs don>t move then your diode that replaced the servo power @umper in step 14may be around the wrong way or not plugged into the correct pins. ,heck step !5 to make sure you have theservos plugged in correctly with the signal wire closest to the female header.

    ?f the robot does not walk correctly then you may have accidentally swapped hip and knee servos. The hipservo allows the leg to move forward and backward. The knee servo allows the leg to move up and down.

    ?f the robot cannot stand on it>s hind legs then check you have the correct version of the code. *i+h batteriesare heavier than &iPo batteries. This affects the robots balance. ;ou may need to play with the code orad@ust the position of your batteries a bit.

    ?f you are 8sing *i+h then you will probably need to remove the voltage drop diode and re-install the voltageselection @umper for the servo power. This will run your servos at 9.9 giving them more power but there is agreater chance of the servo stripping a gear or overheating.