Stanford Pupper 2.1 Installation instructions

Stanford Pupper 2.1
Assembly and Operation

Overview
Mechanical Design
Bill of Materials
Software
Build Instructions
IMPORTANT
Build notes
Steps to complete before following the build video
Changes to video instructions
Setting motor controller IDs
Calibrating motors
Reference diagrams for screw sizes (review before watching video)
Build video
Software Installation
Running the robot
Troubleshooting
Reference
Actuator Numbering

Overview
Mechanical Design
●Fusion 360 CAD
○Outdated, need to upload latest files
Bill of Materials
●Pupper V2.1 BOM
●Costs about $2k to build
Part files
●DJI Pupper -> DJI Pupper STLs
○Outdated, need to upload latest files
○A readme is included in this folder for printing instructions
●DJI Pupper -> PCB Production Files
○Outdated, need to upload latest files
○A readme is included in this folder for fabrication instructions
○Videos for purchasing the pcbs
■Teensy shield: https://www.youtube.com/watch?v=Jm57xkEqToU
■Bottom PCB: https://www.youtube.com/watch?v=D_1yNNPYND0
■Top PCB: https://youtu.be/Av4CbTJec8I
Software
●Laptop code: https://github.com/stanfordroboticsclub/StanfordQuadruped/tree/dji
●Laptop joystick emulator:
https://github.com/stanfordroboticsclub/PupperKeyboardController
●Teensy code: https://github.com/Nate711/DJIPupperTests/tree/master

Assembly
Important: Read before starting
●Parts that differ between the left and right side are correspondingly embossed with
an L or R.
●The embossed triangles indicate the correct direction of the motor wires.
●The following image shows a cross-section of a correctly-inserted hex nut. Note that
the flats of the nut are parallel to the pocket walls.

●Apply Loctite Blue 242 to all M3x6 flat-head cap screws used to mount the motors.
This is mandatory, as otherwise these screws will quickly loosen from repeated
foot-ground impacts.
●Melt the cut ends of the cable sleeving to prevent them from unravelling.

Electronics
1. Wiring the bottom PCB
1. Solder the XT-60 leads.
2. Mount the Teensy to the bottom PCB in the indicated orientation.
3. Insert the ends of the power switch wires into the screw terminals on the bottom
PCB. There are labels on the PCB indicating which color wire goes where.
2. Set motor controller IDs
Each C610 motor controller needs an ID number so that it knows which motor commands
to listen to. The front and back motor controllers are on separate CAN networks so their
IDs can overlap, but on each network, each controller must have a unique ID.
Review the diagram below to see which motor controllers have what ID.
Setting the ID
1. Press the C610 button once to tell it to enter ID-setting mode
2. Without pausing (aka within 1s), press the button additional times, with the number
of presses indicating the ID. For example, press it once to put it into ID-setting
mode, then press the button 6 more times to assign it the ID number 6. After each
of the presses after the first press to change the mode, you should see the blue light
flash.
3. The C610 will now reboot and the number of green flashes indicates the ID. After
the flashing sequence is complete, it’ll wait a little and repeat the sequence.

3. Calibrate motors
Whenever you connect the C610 motor controller to a motor (the M2006), the pairing must
be calibrated. Before calibrating, check that the motor is free to move. This often means
taking off the attached legs.
Steps
1. Long-press the C610 button to enter calibration mode, release once it starts beeping
2. The motor will now slowly turn to calibrate itself
3. The controller will reboot once finished
4. Remove ferrite rings from motor controllers
The ferrite rings are the black plastic cylinders attached to the power cables. You can
remove them by lifting the small tabs on the side of the plastic housing.

Subassemblies
1. Lower Leg L/R
Quantity to assemble: 4
Parts: Qty. Descr. ID
(1) M2.5 hex nut 91828A113
(1) Rubber foot 9541K82
3D-printed parts:
(1) Lower leg L/R
Instructions: Lower Leg L_R - All Steps.mp4
2. Upper Leg
Quantity to assemble: 4
Parts: Qty. Descr. ID
(3) M3x6 flat-head cap screw 92125A126
(4) M3x16 dowel pin 91585A379
(1) M2.5 hex nut 91828A113
(1) Motor DJI M2006
(1) Motor driver DJI C610
(1) Cable sleeving, 20cm length
3D-printed parts:
(1) Upper leg
(1) Upper leg cover
Instructions: Upper Leg - All Steps.mp4
3. Hip L/R
Quantity to assemble: 4
Parts: Qty. Descr. ID
(3) M3x6 flat-head cap screw 92125A126
(1) M2.5 hex nut 91828A113
(4) Motor DJI M2006
(2) Cable sleeving, 15cm length
(4) Zip-tie
3D-printed parts:
(1) Hip L/R
Instructions: Hip L_R - All Steps.mp4
4. Motor Bulkhead
Quantity to assemble: 2
Parts: Qty. Descr. ID

Assemblies
1. Leg L/R
Quantity to assemble: 4 (2 L, 2 R)
Parts: Qty. Descr. ID
(8) M2.5x16 shoulder screw 90265A420
Subassemblies:
(1) Lower Leg L/R
(1) Upper Leg
(1) Hip L/R
Instructions: Todo: add video
2. Bulkhead Module
Quantity to assemble: 2
Parts: Qty. Descr. ID
(2) M2.5x16 shoulder screw 90265A420
(4) Zip-tie
Subassemblies:
(1) Leg L
(1) Leg R
Instructions: Todo: add video
3. Pupper
Quantity to assemble: 1
Parts: Qty. Descr. ID
(16) M3x6 button-head cap screw 92125A126
(12) M3x6 flat-head cap screw 92125A126
(1) Top PCB
(1) Bottom PCB
3D-printed parts:
(1) Electronics bulkhead
(1) Front cover
(2) Side cover L/R
(1) Bottom PCB cover A
(2) Bottom PCB cover B
Subassemblies:
(2) Bulkhead Module
Instructions: Todo: add video

Software Installation
1. Requirements
a. Mac or Linux machine. Windows instructions are experimental.
b. MicroSD card reader
c. USB-C data cable
2. Teensy
a. Clone https://github.com/Nate711/DJIPupperTests.git
git clone https://github.com/Nate711/DJIPupperTests.git
b. Cd that directory
cd DJIPupperTests
c. Update the submodules:
git submodule update --init
d. Install VSCode and the Platformio VSCode extension
e. This video shows the next few steps:
https://knowledge.autodesk.com/community/screencast/cbf5a477-08e8-4b5
4-aa1b-aeffc3e5aa3d
f. Install “ArduinoJson” by Benoit Blanchon and “BasicLinearAlgebra” by Tom
Stewart
g. Linux only
i. Download the following file:
https://www.pjrc.com/teensy/00-teensy.rules and put it under
/etc/udev/rules.d/
ii. Reload udev rules.
sudo udevadm control --reload-rules && udevadm trigger
h. Use platformio to upload the code (click upload)
i. When the firmware is uploaded correctly, the teensy will flash over 5 seconds
and then start printing debug information over the usb serial cable.
3. Raspberry Pi
a. Download Balena Etcher
b. Get a system image. There are two options for this:
i. Download a prebuilt image
Todo: add link
ii. Build the image yourself
Todo: add instructions
c. Select the image in Etcher and flash it to the MicroSD card.
d. Insert the MicroSD card into the Pi. To test that it works, boot up the Pi and
SSH in over the USB-C port using the default credentials.

Operation
1. Startup
1.1. Plug in the battery alarm (if using one).
1.2. Place the robot on a flat, level surface. Position the legs as shown.
1.3. Move the left thumbstick on the transmitter to its bottom position.
1.4. Turn on the transmitter by holding its power button for 5 seconds.
1.5. Turn on the robot by pressing its power button. It will immediately begin the
homing sequence.
1.6. Wait 20 seconds for the Raspberry Pi to boot up.
1.7. The robot is now ready to receive control inputs.
2. Controls
Transmitter Input
Function
Left thumbstick
Yaw rotation
Right thumbstick
Translation
Left 2-position switch
Activates and deactivates the motors (can
be used as an emergency stop)
Right 2-position switch
Switches between standing and locomoting
Left 3-position switch
N/A
Right 3-position switch
Switches between trotting and static gait
(flip the switch all the way)

3. Shutdown
3.1. Turn off the robot by pressing its power button.
3.2. Turn off the transmitter by holding its power button for 5 seconds.
3.3. Unplug the battery alarm (if using one).
4. Storage
4.1. Position the legs as shown.
4.2. Place the robot in the carrying case with its camera facing to the left.
4.3. Place the transmitter in the carrying case with its thumbsticks facing away
from the robot.
5. Charging
5.1. Remove the left side cover.
5.2. Unplug the battery’s XT-60 and JST-XH connectors.
5.3. Charge the battery with a 6S lithium-ion balance charger.
More information here:
https://github.com/stanfordroboticsclub/StanfordQuadruped/blob/dji/README.md
Troubleshooting
Check the C610 manual
Contains info about LED flash sequences etc:
https://drive.google.com/file/d/1L8oGLUJuZ96MB90XeFtk1E01sL-Uh4BW/view?usp=sharing
Or the M2006 manual:
https://drive.google.com/file/d/1L8oGLUJuZ96MB90XeFtk1E01sL-Uh4BW/view?usp=sharing

Reference
Actuator Numbering
Table of contents