How to build MABEL: the whole process
31 steps to build MABEL, from buying parts, printing and assembly to software, calibration and training, with the bill of materials, shop links and the official sources.
MABEL is an open-source self-balancing legged robot inspired by the Boston Dynamics Handle, controlled by an Arduino and Raspberry Pi. The repository provides printable CAD parts, electronic and mechanical bills of materials, mechanical assembly guidance, and inverse-kinematics and control software.
Buy parts
- Purchase or Source MABEL's Non-Printed Materials
Purchase or source all listed electronics, mechanical hardware, and fixings; use the Amazon list as a rough purchasing guide. Overbuy nuts and bolts because the required quantity can change between builds.
Print and make
- Print the optional BatteryPack
Print BatteryPack.stl. It is optional and holds the LiPo battery on the back of the robot with M5 Bolts.
- Print two BodyPanels
Print two BodyPanel.stl files. They mount the Hip servos and form the side panels of the body.
- Print the BodyTop
Download and print BodyTop.stl from the 3D model directory.
- Print four DriverGears
Print four DriverGear.stl files.
- Print the Housing
Print Housing.stl. It is the LOWER body housing for MABEL.
- Print two LowerLegs
Print two LowerLeg.stl files.
- Print two UpperLegs
Print two UpperLeg.stl files.
- Print the optional PanBracketHead
Print PanBracketHead.stl. It is an optional Pan servo bracket for the head assembly.
- Print the optional TiltBracketHead
Print TiltBracketHead.stl. It is an optional Tilt servo bracket for the head assembly.
- Print the UpperBody
Print UpperBody.stl. It is the UPPER body housing for MABEL.
- Print or buy two wheels
Print two Wheel.stl files for an optional set of wheels, or buy wheels.
Assemble
- Attach the four servos
Secure the four MG996R servos to the two BodyPanels and two UpperLegs using 16 M4 (15mm) bolts. The servos must sit flat against the parts with their shafts facing outward; file or sand off any small rib so they can sit in this orientation.
- Fit the servo gear assemblies
Push four Aluminium Servo horns into the recesses on the bottoms of the four DriverGear parts, then secure them with the screws supplied with the horns. Screw each completed gear assembly onto its servo shaft using one M3 (10 mm) bolt per servo.
- Mount the NEMA17 motors and wheels
Secure one NEMA17 stepper motor to each of the two LowerLeg parts with four M3 (10 mm) bolts per motor, eight bolts in total. Push the wheels onto the motor shafts and secure them with an M4 bolt if necessary; if using the included Wheel, wrap its outside with elastic bands or rubber O-rings to create traction.
- Assemble the Legs and Body
Insert the UpperLeg into the BodyPanel and secure it on the back servo side with an M5 locknut; secure the LowerLeg to the UpperLeg with another M5 locknut, then repeat for the other side.
- Choose the Leg Bending Direction
Pay attention to the servo rotor positions and decide which way the legs should bend; manually turn the servo gear to allow greater motion in that direction. With standard 180-degree servos, the range of motion in the opposite direction will differ because of the gear drive.
Software
- Install the Adafruit ServoKit library
Install the Adafruit ServoKit library for the PCA9685 servo controller by following its installation guide.
- Install the optional Cwiid library
If you want to use a Wiimote controller, install python3 Cwiid by following the installation guide.
- Install the optional approxeng.input library
Install approxeng.input if you want to use a different controller; the document recommends it for developing controller code.
- Clone MABEL onto the Raspberry Pi
After following the ServoKit and chosen controller-library installation instructions, clone the MABEL repository onto the Raspberry Pi.
- Write controller code in raspi_code
Write all controller code and other scripts in the MABEL/raspi_code/ directory so they can reference the code already included.
- Initialize IKSolve
Import the IKSolve class and pass the four servo home values to its constructor.
- Set leg lengths when needed
The defaults are upper_leg=92 and lower_leg=75; use different leg-length segments only if the lengths of the leg components have changed.
- Find the Arduino serial port
Disconnect the Arduino and run ls /dev/tty*, then reconnect the Arduino and run it again. Note the newly listed port.
- Initialize the serial connection
Initialize serial.Serial with the discovered port, such as /dev/ttyACM0, baudrate 9600, PARITY_NONE, one stop bit, eight data bits, and timeout 1.
Calibrate and test
- Set servo home values
Set the home value for each of the right upper, right lower, left upper, and left lower servos; the example values belong to the author and your values may differ.
- Confirm YABR driving commands
The YABR firmware accepts bytes [0, 1, 2, 4, 8] as driving input commands, with 0b00000000 meaning no movement or remaining stationary.
Use it
- Calculate servo angles
Enter x and y as integer millimetres and call translate_xy(x, y, flip=False); flip should remain False by default. x is the vertical distance from the upper-leg pivot to the wheel centre, and y is the horizontal distance.
- Follow the movement ranges
For MABEL, the acceptable x range is 160-98mm and the acceptable y range is -50 to 50mm.
- Send angles to controller
The four servo angles calculated by translate_xy are stored in the servo_angle tuple and can be passed to the servo controller code.