The Micro Wheeled-Leg Robot follows a well-defined startup sequence that takes roughly 10–15 seconds from power-on to fully standing and ready for control. During that window the firmware initialises the SimpleFOC motor drivers, calibrates the IMU gyroscope offsets, moves the leg servos to their home position, and brings up the WiFi access point — all before the robot is ready to receive its first “Robot go!” command from your browser.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MuShibo/Micro-Wheeled_leg-Robot/llms.txt
Use this file to discover all available pages before exploring further.
Startup Sequence
Connect the battery
Plug the XH2.54 battery connector into the rear interface of the Controller PCB. Ensure the wires are fully seated and the locking tab clicks into place.
Turn on the power switch
Flip the power switch on the Controller PCB to the ON position. The red Power LED lights up immediately, confirming the board has power.
Watch the FOC motor initialisation
Both drive wheels will twitch briefly and the legs will begin moving to their home position. This is the SimpleFOC electrical-angle calibration routine — see the FOC Initialisation section below for details. Wait for this phase to finish before handling the robot.
Confirm sufficient battery voltage
After initialisation the firmware measures the battery voltage every 1 000 control loop cycles. If the pack is above 7.8 V, the blue Battery LED lights up. If it stays off, the battery needs charging before you continue — see the warning below.
Connect to the robot's WiFi hotspot
On your phone, tablet, or laptop open the WiFi settings and connect to the access point whose name starts with WL (default SSID:
WLROBOT, password: 12345678). Full connection details are covered in the WiFi Control page.Open the browser control page
In Chrome or Firefox navigate to http://192.168.1.11. The embedded control interface is served directly from ESP32 flash and should load within a second or two.
Stand the robot up
Hold the robot upright with the wheels lightly touching a flat surface. Click the “Robot go!” button in the browser interface. The firmware sets
wrobot.go = 1 and the balance controllers begin driving the wheels. Release the robot — it will self-balance. Use the on-screen joystick to drive it.LED Status Indicators
| LED | Colour | Meaning |
|---|---|---|
| Power LED | Red | Controller PCB is receiving power from the battery |
| Battery LED | Blue | Battery pack voltage is above 7.8 V — safe to operate |
FOC Initialisation
When the firmware starts it callsmotor1.initFOC() and motor2.initFOC() for the two BLDC drive motors. SimpleFOC steps through the motor’s electrical cycle to measure the zero-angle offset of each AS5600 magnetic encoder relative to the motor’s flux linkage. During this phase:
- Each wheel twitches or rocks slightly — this is expected and harmless.
- The leg servos execute a short movement to their home position (
Position[0] = 2148,Position[1] = 1948, approximately height = 26) while the firmware waits for the encoder calibration to finish. - The IMU gyroscope offset is calculated (
mpu6050.calcGyroOffsets(true)) — keep the robot as still as possible during this phase; resting it on a flat surface works well. - The entire boot sequence takes roughly 10–15 seconds depending on motor pole-pair alignment.
Safety: Fall Detection
The firmware continuously monitors the MPU6050 pitch angle (LQR_angle = mpu6050.getAngleY()). Two thresholds protect the robot and anything nearby:
| Condition | Threshold | Action |
|---|---|---|
| Fall detected | |pitch| > 25° | Motor outputs are immediately set to zero; uncontrolable = 1 |
| Recovery hold-off | |pitch| < 10° | Firmware counts 200 control-loop cycles before re-enabling output |