How to build MindPaw: the whole process
91 steps to build MindPaw, from buying parts, printing and assembly to software, calibration and training, with the bill of materials, shop links and the official source…
MindPaw is a desktop quadruped robot dog based on the ESP8266, with voice control, gesture recognition, web control, and AI conversation. The repository provides a hardware list, PCB and schematic files, 3D-printable parts, firmware, wiring, and assembly documentation for building the robot from scratch.
Print and make
- Open project for fabrication
Open the project in LCSC EDA.
- Export Gerber files
Select “File → Manufacturing → Gerber Files.”
- Inspect exported files
Export the ZIP, extract it, and check the number of layer files and the board outline.
- Order fabricated PCB
Upload the files to a PCB manufacturer and confirm the board thickness, copper thickness, solder mask, and quantity.
- Print foot test piece
Upload the STL files from `../3Dmodel/` to a printing service and first print one `foot.stl` to verify the servo mounting dimensions.
- Modify circuitry or make a prototype
To modify the circuitry or make a prototype, read `SCH&PCB/README.md`.
Assemble
- Add servos one by one
Connect the servos one by one and confirm that the power supply does not experience a voltage drop.
- Add remaining modules
Finally, add the HLK-V20, speaker, and OV2640.
- Observe 3.3V logic
ESP8266, OLED, and OV2640 use 3.3V logic.
- Power servos independently
Servos use an independent 5V supply and must not draw power from an ESP8266 3.3V pin; all modules must share a common ground.
- Fit GPIO15 pull-down
GPIO15/D8 must use a 10KΩ pull-down, or the ESP8266 may fail to start.
- Respect shared bus limits
When the OV2640 and servos share SPI signals, connect 1KΩ in series with SCK, MISO, and MOSI according to the wiring document. GPIO16/D0 is shared by servo 2 and the speaker, so the firmware pin definitions must be changed together before modifying the board.
- Plan for startup current
Servo startup current may cause a reset, so use a sufficiently capable 5V supply and a capacitor.
- Connect the HLK-V20 module
Connect the HLK-V20 module using USB-TTL.
- Connect the GPIO15 pull-down
Connect a 10KΩ pull-down resistor between GPIO15 and GND; otherwise the ESP8266 cannot start.
- Series-resist shared signals
When the OV2640 SCK, MISO, and MOSI signals are shared with the servo, connect a 1KΩ resistor in series to prevent signal conflicts.
- Choose a hand-soldered perfboard
Use a hand-soldered perfboard instead of a PCB; hand soldering is recommended for the first build, followed by PCB fabrication after success.
- Make the body from alternatives
A 3D-printed shell is not required; the robot body can be built from cardboard, acrylic, or blocks.
- Select and connect a voice module
An LD3320 can also be connected, but it requires 5 SPI pins; the HLK-V20 needs only 1 pin and has better recognition, so the document recommends it.
Software
- Add an asynchronous task queue
Add an asynchronous task queue and use `request_id`.
- Add device and session isolation
Add isolation for devices or sessions.
- Add state-aware routing
Add routing based on network status and battery level.
- Add local fallback and degradation
Add local fallback and degraded behavior when the network is unavailable.
- Limit actions and set expiry
Add an action allowlist and an expiry time for actions.
- Add semantic caching and deduplication
Add semantic caching and deduplication of repeated requests.
- Record request runtime statistics
Track request duration, cost, token usage, and failure rate.
- Create the local environment configuration
Enter the `ai-infra` directory and copy `.env.example` to `.env`.
- Configure environment variables
Edit `.env` and set at least `GATEWAY_TOKEN`, `AI_PROVIDER`, and the upstream configuration.
- Install dependencies and start gateway
Create and activate a Python virtual environment, install the dependencies from `requirements.txt`, and start the Uvicorn gateway on `0.0.0.0:8000`.
- Start the gateway with Docker
Alternatively, use Docker Compose to build and start the service in detached mode.
- Download the SU-03T configuration tool
Download the SU-03T configuration tool on the computer.
- Flash and connect MindPaw
After flashing the configuration, disconnect power and then connect the HLK-V20 module to MindPaw.
- Learn basic Arduino usage
First learn the basic use of Arduino, including lighting an LED and serial output, then follow the documentation step by step.
- Change the board to ESP32
In `platformio.ini`, change `board` to `nodemcu-32s`.
- Adjust the ESP32 pin assignments
Reassign the pins according to the ESP32 pin layout.
- Keep the remaining code
After migrating to the ESP32, most of the existing code does not need modification.
- Install dependencies and start service
Enter ai-infra, install requirements.txt, then start the uvicorn service on 0.0.0.0:8001.
- Obtain student ONNX checkpoint
Train or download the distilled ONNX checkpoint to enable the real student model.
- Place student model weights
Place student.onnx at ai-infra/recon/weights/student.onnx, or at another location allowed by the document.
- Configure weights environment variables
In ai-infra/.env, set RECON_WEIGHTS to the absolute path of student.onnx and set RECON_USE_GPU=true.
- Install LCSC EDA Pro
Install LCSC EDA Professional Edition.
- Open hardware project
Open `MindPaw_SCH&PCB.epro2` in LCSC EDA.
- Save version and record pins
Save another version before making changes and record the pin changes.
- Modify actions, expressions, or webpage
Start modifying actions, expressions, or the webpage from `src/main.cpp` and `data/`.
- Study edge-cloud AI scheduling
To study edge-cloud AI scheduling, read `ai-infra/README.md`.
Calibrate and test
- Verify NodeMCU firmware
Use NodeMCU/ESP12F and USB-TTL to verify the existing firmware.
- Test both power rails
Test the 3.3V and 5V power supplies separately.
- Connect and check OLED
Connect the OLED and confirm that the webpage and expressions work normally.
- Inspect schematic connections
Inspect the power, ESP12F, servo, camera, and interface labels in the schematic.
- Inspect PCB preview
Open the PCB preview and confirm the interface orientation and mounting-hole positions.
- Check schematic-PCB sync
Confirm that the schematic and PCB have been updated together.
- Check rail isolation
Check that 3.3V and 5V are not accidentally shorted together.
- Check servo power routing
Confirm that the servo supply does not pass through the ESP8266 regulated output.
- Check boot pin conditions
Confirm that the startup conditions for GPIO0 and GPIO15 are satisfied.
- Match interfaces to firmware
Confirm that SPI, I2C, and UART match `PIN_WIRING.md` and the firmware.
- Run firmware build
After the changes, confirm that `pio run` can still be executed.
- Test bare PCB power
After receiving the PCB, do not install the servos yet; use a multimeter to confirm that there is no short between power and ground.
- Gather troubleshooting evidence
When the problem cannot be diagnosed, attach the PCB version, supply voltage, serial logs, faulty module, and clear wiring photos when submitting an Issue.
- Enable the mock AI provider
When there is no cloud API key, set `AI_PROVIDER=mock` in `.env`.
- Check gateway health
Request the local gateway's `/healthz` endpoint to check whether the gateway responds correctly.
- Test the chat completions endpoint
- Connect a real MindPaw device
Ensure that the gateway host can communicate with MindPaw's STA network; the `MindPaw` hotspot is only for the control page.
- Open the device AI configuration page
Open `http://192.168.4.1/aiconfig.html` on the gateway host.
- Enter API and gateway settings
- Select ESP8266 direct mode
Leave the Gateway address blank to restore the mode in which the ESP8266 connects directly to Doubao.
- Set the serial monitor
Set the serial monitor baud rate to 115200, then send the directional diagnostic commands.
- Test AI serial commands
- Identify serial log modules
Identify modules by serial log prefix: `DOUBAO` for AI, `EMOTION` for emotion, and `GESTURE_NN` for gestures.
- Check service health
In another shell, run the health request to check that the service responds.
- Restart and confirm real model
Restart the service, then request GET /healthz; the health status should report using_mock as false.
- Add voice commands
Add 22 voice commands using the command table in Docs/07_API_Guide.md.
- Confirm the GPIO15 boot level
Confirm that GPIO15 is pulled down to GND through a 10KΩ resistor so it remains LOW during startup, preventing the ESP8266 from entering test mode.
Data and training
- Test the direct-cloud baseline
Compare the strategy where the ESP8266 accesses the cloud directly.
- Test the Gateway baseline
Compare the strategy where every task passes through the Gateway.
- Test the fixed switching strategy
Compare a strategy that switches between local and cloud execution using fixed rules.
- Test the latency-based strategy
Compare a strategy that selects the execution location using network latency alone.
- Test the adaptive strategy
Include the adaptive strategy in the baseline comparison.
- Record real robot tasks
Record real voice, gesture, web-chat, and action tasks rather than using only synthetic requests.
- Report end-to-end latency
Report P50, P95, and P99 end-to-end latency.
- Report action and schema failures
Report action success rate and JSON Schema failure rate.
- Measure network recovery time
Report recovery time after a network outage.
- Report energy use at each layer
Report energy use for the ESP8266, Gateway, and cloud.
- Report token use and task cost
Report token consumption and the cost of one task.
- Test varied network and concurrency conditions
Report performance under different packet-loss rates, RTT values, and concurrency levels.
- Preserve complete experiment materials
Preserve configurations, network traces, raw logs, plotting scripts, and result summaries in `experiments/`.
- Ensure reproducible results
Ensure that the paper results can be regenerated with Docker and fixed random seeds.
- Feed one test frame
Use any JPG image to feed one frame into the recognition service with the test tool.
- Stream at five FPS
Use the --loop option to continuously feed any JPG image; the document states 5 FPS, and press Ctrl-C to stop.
- Fill dataset loaders and loss
Fill in the ScanNet, 7-Scenes, and TUM sequence dataset loaders in train_distill.py, and configure the loss composed of depth_L1, pose_geodesic, and feature_cosine.
- Run distillation training scaffold
Run the train_distill.py scaffold with PyTorch and a GPU, outputting ai-infra/recon/weights/student.onnx.
Use it
- Open browser viewer
Open recon_view.html in a browser to view the recognition service output.