Page 1
All rights reserved. No portion of this instruction sheet or any artwork contained herein may be reproduced in any shape or form without the express written consent of DAGU Hi-tech Electronic Co., Ltd. The manufacturer and distributor cannot be held responsible for any damages occurred by mishandling, mounting mistakes or misuse due to non-respect of the instructions contained in this manual.
Contents Product description Warnings Required tools Parts list Assembly instructions Wiring Instructions Installing the Software Controlling the robot Understanding the code Uploading via the ISP socket Burning the bootloader Trouble Shooting Controller specifications...
Product Description Thank you for selecting the Playful Puppy for your next do-it-your-self project. This kit allows you to build and program a small quadruped robot that can track moving objects and respond to your hand movements. Product Features 1. Arduino compatible robot controller with USB interface.
Assembly Instructions: Step 1£º Before you begin assembly set all your servos to center Servo position as shown. output shaft Servo stop shown in center position Step 2£º attach legs so knee bent at 90°. Step 3£º Please note that servo mounts differently for left and right legs.
Page 6
Step 4£º Step 5£º Step 6£º Note position of hip servos and mount legs at 90° to body. Step 7£º 30 x2 30 x2 Install 8x Magnets in both clutch pieces so the poles alternate as shown. Pay careful attention to which bracket you use.
Page 7
Step 8£º (2pcs) 25(2pcs) 30 x2 Install 8x magnets in both clutch pieces so the poles alternate Step 9£º as shown. Step 10£º 10mm 20mm 30mm 40mm 50mm 0 inch 1 inch 2 inch...
Page 8
Step 11£º Step 12£º Remove protective paper 10mm 20mm 30mm 40mm 50mm from adhesive strips and mount battery holder with velcro. 0 inch 1 inch 2 inch Step 13£º Ready for wiring!
Wiring the robot: Start by plugging the rainbow cable into the eye. Pay careful attention to the colours to ensure correct function of the eye. Thread the cable under the tilt servo an use a cable tie to hold it in place. Leave this cable tie very loose so that the cable can move a bit if necessary.
Page 10
In this robot, A0 and A1 are being used as digital outputs instead of analog inputs to drive the pan and tilt servos. These servos are getting power through the 5V regulator so they cannot be heavily loaded. Connect the "tilt" servo to A1 as shown in the first photo. Make sure the brown ground wire is closest to the outer edge of the PCB.
The Playful Puppy robot uses the Mini Driver robot controller from DAGU. Before we can upload the sample code we must select the correct board type and serial port. This is done in the Tools menu. Select "Arduino NG or older w/ATmega8" as your board type.
Page 12
Installing the software ( cont.): Before you plug the robot into the computer make sure you have 4x freshly charged AAA NiMh batteries installed and the power connector plugged in the correct way. Turn off the robot while uploading the new program to stop the robot from trying to move. The processor and head servos will be powered from the USB port but the leg servos will not have power.
Controlling the robot: Using the sample code provided, the puppy responds to movement. When your hand or any object is in range (within 15cm - 20cm) of the puppy's compound eye the puppy will track the movement of your hand with it's head. When standing the puppy will follow your hand and if necessary, will turn to try and keep your hand in front of it.
Understanding the Code: Although you can play with the robot using just the sample code provided, the real fun is in teaching it new tricks! This section explains some of the basic features of the code and how they can be changed. Do not be afraid to experiment, you can always restore the original code if you make a mistake.
Page 15
Understanding the code (cont.) If you are new to Arduino then a guide to all the main commands and functions can be found by going to help and selecting reference. The first tab is the main program. In the beginning the <Servo.h> library and definitions are added. Then global variables and servos are defined.
Page 16
Understanding the code (cont.) The second tab is [Constants.h]. This tab contains definitions for constant values that do not change when the program is running. In this tab we can set the center position of each servo and experiment with some other values that affect the way the robot walks and tracks movement.
Page 17
Understanding the code (cont.) The [IOpins.h] tab is your programs wiring diagram. If you want to change which pins are used for a servo or sensor then that change must be reflected here. If you need to replace a servo or even if you are wiring up the robot for the first time then this tab is your guide as to what device connects to which pin.
Page 18
Understanding the code (cont.) The tab [IRtrack] is where the data from the compound eye is used to control the pan and tilt servos. If there are no objects nearby then the head will slowly return to center position. Basically the code adjust the pan servo to keep the left and right IR values equal. The tilt servo is adjusted to keep the upper and lower IR values equal.
Page 19
Understanding the code (cont.) This robot uses some timers in the code to control certain functions. This is done using the millis() function which counts the number of milliseconds since the robot was turned on. We will briefly look at how the unsigned long variable sit is used to measure boredom in the robot.
Page 20
Understanding the software (cont.) If the robot is not bored then the code in the [Play] tab determines if the puppy walks or jumps. Normally the puppy will walk unless the size of the steps, determined by the distance is too small. If the head tilts far enough upward to track the object then the robot will jump.
Page 21
Understanding the software (cont.) When the puppy first becomes bored, the code in the [SittingMotion] tab is called. So that the robot does not just suddenly drop down, the same timer used to measure boredom is used to control the robots sitting speed with the rear legs slowly straightening at the knee and moving forward at the hips.
Uploading via the ISP socket: Since version 1.0 of the Arduino IDE it has been possible upload your programs directly to the processor using the ISP socket. This will overwrite the bootloader making more memory available and cause your program to start immediately on power up or reset.
Page 23
Uploading via the ISP socket (cont.) You can connect the wires directly from the ISP socket of the programmer to the ISP socket of the puppy or you can use the digital pins. Note that D10 or D53 of the programmer is connected to the reset pin of the puppy. / MISO Configuration for boards using:...
Uploading via the ISP socket (cont.) For no apparent reason you may get an error message. If you try and upload a second time then the program should upload ok. If you continue to get this message then check your robot is turned on and that the batteries are fully charged.
Trouble Shooting: Please note that this robot is designed to work only with good quality, AAA NiMh batteries. Alkaline batteries will not be able to deliver the current necessary and should not be used. Do not use a 2S LiPo battery as the voltage is too high and may damage the servos.
Robot Controller: The Playful Puppy uses the Mini Driver which is a general purpose robot controller from DAGU. T h i s i s a s m a l l , A r d u i n o c o m p a t i b l e controller that comes with the Arduino bootloader pre-installed.