Skip to content

Hexapod Mochi Calibration(ESP32)

Calibration Guide

Proper calibration is critical for smooth walking. Take your time with this step!

Understanding Servo Positions

All servos should be at 90° (neutral position) when the legs are in the reference positions shown below.

Calibration Procedure

The hexapod now includes a web-based calibration interface that makes the calibration process much easier – no need to repeatedly edit code and re-upload firmware!

Step 1: Access the Calibration Interface

  1. Upload Firmware: Flash the code to your controller with default offset values
  2. Power On: Connect batteries and turn on the hexapod
  3. Connect to WiFi: Join the hexapod’s WiFi network (default SSID: hexapod)
  4. Open Browser: Navigate to http://192.168.4.1
Calibration Web Interface

Step 2: Enter Calibration Mode

  1. Click the “Enter Calibration Mode” button
    • The hexapod will stop motion execution
    • All current offset values will be loaded
    • A grid showing all 6 legs (18 servos) will appear
  2. Check Leg Positions: Compare each leg with the reference images below
    • Coxa (hip) joint: Should be perpendicular to body
    • Femur (thigh) joint: Should be horizontal
    • Tibia (shin) joint: Should form 90° angle with femur

Step 3: Adjust Offsets

For each misaligned servo:

  1. Locate the servo in the web interface:
    • Left column: Left Leg 1, 2, 3
    • Right column: Right Leg 1, 2, 3
    • Each leg has 3 joints: Joint 1 (coxa), Joint 2 (femur), Joint 3 (tibia)
  2. Adjust the offset value:
    • Use + and  buttons for fine adjustment (±1 tick per click)
    • Or type a value directly in the input field
    • Changes apply immediately to the servo
    • 1 tick ≈ 0.44° for most servos
  3. Observe the movement and continue adjusting until the servo reaches the correct position

Step 4: Save Your Calibration

  1. Once all servos are properly aligned, click “Save Offsets”
    • Offset values are saved to EEPROM (persistent storage)
    • Values are also printed to Serial Monitor as backup
    • The hexapod will remember these values even after power cycles
  2. Now tighten the servo horn screws – With each servo in its correct neutral position, firmly tighten the small screws on each servo horn to secure them in place
  3. Click “Exit Calibration Mode” to resume normal operation

Step 5: Test Walking

Send a walking command to verify smooth motion. If adjustments are needed, simply re-enter calibration mode and fine-tune.

Reference Images

Front View

calibration_1

Top View

calibration_2

Calibration Tips

  • Use the web interface: Much faster than editing code and re-uploading
  • Start with one leg: Calibrate completely before moving to the next
  • Make small adjustments: Use the +/- buttons for precise control (±1 tick per click)
  • Real-time feedback: Servos respond immediately as you adjust values
  • Save your work: Don’t forget to click “Save Offsets” when done!
  • Check screw tightness: Loose servo horns will affect calibration
  • Servo horn position: If offsets exceed ±25 ticks, consider repositioning the servo horn physically