Lab 6 - Pupper Assembly

Lab instructions

Step 1. Leg Assembly

  1. Assemble 2 left legs

  2. Assemble 2 right legs

TODO add assembly videos

Step 2. Bulkhead assembly

  1. Insert end stop pins into motor bulkhead

  2. Attach 2 motors, one into each side of motor bulkhead

  3. Attach left and right legs to the shafts of the motors you just installed

TODO add assembly videos

Step 3. Electronic assembly

  1. Connect motor controllers to motors

  2. Calibrate motor controllers TODO Add video

  3. Set IDs on motor controllers. TODO Add video

  4. Label the motor controllers and motor connector cables with the IDs in case you unplug them later.

  5. Connect motor controller power cables and CAN connectors to bottom PCB

  6. Insert motor controllers into slots

  7. Put wire wrap around motor controller cables

  8. Zip-tie wire wraps and cables to the motor bulkheads

../_images/esc-ids.png

Motor controller ids.

Step 4. IMU prep

  1. Break off two 1x6 male header rows.

  2. Place them on the top side of the IMU board (side with black connectors and the middle chip)

  3. Insert the IMU with headers into a breadboard to help you solder the headers to the IMU

  4. Solder the headers to the IMU

[insert picture here]

Step 5. Unmounted Raspberry Pi assembly

  1. Plug in IMU into bottom PCB with Sparkfun text facing towards the Teensy USB

  2. Screw RPi into electronics bulkhead with M2.5x5 socket head screws such that the Pi is about centered on the electronics bulkhead

  3. Connect USB C extension cable to Rpi

  4. Connect RPi camera flex cable into RPi. There’s a little grey flap that flips up on the connector that lets you slide the cable in. Flip the flap down to lock the cable in.

Step 6. Mounted Raspberry Pi assembly

  1. Mount electronics bulkhead into the bottom PCB with two M3x6 button head screws.

  2. Connect RPi to power by using 2-pin cable. Connect one end into 5V, GND pins near the Teensy and other side into RPi. Quadruple-check that the 5V and GND pins are going the right places. See diagram below.

  3. Mount RPi camera with 4x M2x3 screws to front cowling such that flex cable goes up. The screws thread into the plastic and may be tough to thread.

  4. Connect RPi to Teensy using USB A to USB micro cable

  5. Connect RC receiver to RPi with ribbon cable usb extension cable. The connectors have gray flaps that slide in/out to lock/unlock the cable.

Step 6.5. Bind RC receiver

  1. Bind the receiver [TODO: add instructions]

Step 7. Top panel assembly

  1. Screw the USB-C connector to the top PCB with M3x6 button head screws

  2. Insert the XT60 female side (conductor is a circular slot) of XT60 splitter cable into 3D printed power hub.

  3. Connect other female XT60 into the bottom PCB

  4. Insert JST-XH extender balance cable into 3D printed power hub.

  5. Take the large nut off the power switch and then mount the power switch to the top PCB panel. Then secure the switch by threading on the nut from the bottom of the top panel.

  6. Compare your build to the finished robot to see if you missed anything.

  7. Verify your build so far with the class instructors and the photos below.

../_images/rpi-pinout.png

RPi pinout.

../_images/IMG_0880.jpg

Bulkhead wiring.

../_images/IMG_0881.jpg

Zip-tie close up.

../_images/IMG_0882.jpg

Leg assembly.

../_images/IMG_0883.jpg

Electronics assembly.

../_images/IMG_0884.jpg

Bottom view of top PCB.

../_images/IMG_0885.jpg

Top view of top PCB.

Step 8. Finish hardware assembly

  1. Put velcro or dual-lock onto the bottom PCB where it says “battery”. For now we’ll use the power supply to run the robot so you don’t have to install the actual battery.

  2. Attach the top PCB panel with M3x6 button head screws.

  3. Check again with instructors.

  4. Marvel at your work!

Step 9. Flash code onto the Teensy

  1. git clone https://github.com/Nate711/DJIPupperTests.git

  2. Use VSCode PlatformIO to open the DJIPupperTests folder as a project and then upload the code to the Teensy. (Same thing as in labs 1-4).

Step 10. Flash software image onto Raspberry Pi

  1. Download our image

  2. Install Balena etcher

  3. Flash the image onto the micro SD card using Balena etcher.

  4. Insert the micro sd card into the Pi’s micro sd card slot (on bottom side of board)

Step 11. Enable the heuristic controller

  1. Connect the robot to your computer via the top USB-C port on the robot.

  2. SSH into the robot with ssh pi@raspberrypi.local. The password is raspberry. Ask for help if this doesn’t work.

  3. Run sudo systemctl enable --now robot to turn on the heuristic controller.

  4. Run sudo systemctl status robot to check that the service is running ok (should be green).

  5. Reboot with sudo reboot 0

Step 12. Take your robot on a walk

  1. Unplug the Pi from USB C.

  2. Place your robot on a flat, level surface. Position the legs as shown in the picture below.

  3. Power on the robot by hooking up the power supply to the bottom PCB (like you’ve done in labs).

  4. Connect the Pi with USB C to your computer.

  5. Wait for the robot to complete the calibration sequence. TODO Add calibration video

  6. Flip all switches on the back RC transmitter down so they’re away from you.

  7. Turn on the RC transmitter by pressing the middle power button and moving the left joystick up and down until the light turns blue.

  8. Wait ~30s for the RPi to boot (the green light should stop blinking).

  9. Flip the lower left switch on the controller up to enable the robot. It’ll move!

  10. Flip the lower right switch on the controller up to start the robot trotting.

  11. Enjoy your hard work and play with Pupper!

  • The top right switch flips between trotting and walking.

  • Left/right on the left joystick controls turning.

  • Up/down on the right joystick controls forward/back.

  • Left/right on the right joystick controls strafing left/right.

../_images/startup-position.png

Startup position.

Resources

Wiring diagram

../_images/wiring-diagram.png

Wiring diagram.

Work in progress manual.