Skip to content

22 KB

Machine-translated by Robotheca from the original in Chinese (opens in a new tab). License: MIT (opens in a new tab).

๐ŸŽฏ What is this

MindPaw is a desktop quadruped robot project based on the ESP8266 microcontroller. Its features include:

  • More than just a remote control car โ€” You can talk to it, make gestures at it, and it will respond with emotional reactions
  • Real AI conversations โ€” Integrated with the Doubao large model for intelligent dialogue
  • Truly affordable โ€” Total materials cost less than ยฅ50 (basic version only ยฅ35)
  • Truly open source โ€” All code, circuit diagrams, and 3D printing files are provided

This project was built from scratch, not using any ready-made development board kits. So if you want to learn how to integrate ESP8266, servos, cameras, voice modules, and AI together, the code and documentation here should help you.

๐Ÿšฆ Where to Start

This repository is divided into two non-blocking paths:

PathTarget AudienceEntry Point
MindPaw DemoBeginners, hardware enthusiasts who want to replicate and play with the robot dogMindPaw_main/README.md
MindPaw AI InfraAI infrastructure, edge computing, and Agent researchersai-infra/README.md
๐Ÿ›ฐ๏ธ MindPaw 2.0 Streaming 3D ReconstructionAdding "seeing ahead" capabilities to the robot dog (obstacle avoidance + browser-based point cloud)Docs/09_Streaming_Recon.md
SCH & PCBThose who want to design their own boards, prototype, or troubleshoot power/wiring issuesSCH&PCB/README.md

Beginners do not need to install Python, Docker, or AI Gateway; after completing the basic demo, they can follow their interests into the research path. Both paths share the same firmware and hardware; leaving the Gateway address blank will revert to the original direct connection mode. The 2.0 perception layer is disabled by default; enabling it requires filling in a Recon Gateway URL in aiconfig.html.

โœจ Feature Overview

FeatureTriggerRobot Action
Voice ControlSay "forward", "happy", "hello"Execute actions, switch expressions, play sound effects
Gesture ControlWave/fist/point in front of the cameraRecognize gestures and execute corresponding actions
Web ControlOpen 192.168.4.1 in a mobile browserComplete remote control interface with touch controls
AI ConversationWeb chat / Say "hello" via voiceCall Doubao API, reply with actions + expressions
AI Infra GatewayOptional configuration of Gateway addressAI infrastructure tutorial for researchers; beginners can skip entirely
๐Ÿ›ฐ๏ธ Streaming 3D Reconstruction Perception Layer (v2.0)Automatic camera streamingStream each frame to Edge Gateway; robot dog can sense obstacle distance and auto-avoid; browser visualizes sparse point cloud. See Docs/09_Streaming_Recon.md
Emotional ResponseRuns continuously and changes automaticallyDisplays emotions like happy/bored/sad based on interaction frequency and content
Expression DisplayOLED screen display7 expressions + weather + time
Audio FeedbackSpeaker plays melodies10 sound effects for startup/command confirmation/emotional expression

๐Ÿ›’ What You Need

Bill of Materials

The following prices are based on actual listings from Taobao/Pinduoduo (July 2026). Bulk purchases may be cheaper.

๐Ÿ† Option 1: Full version (โ‰ˆยฅ50, with camera gesture recognition)
ModuleReference PricePurchase Suggestion
ESP12F moduleยฅ5Buy bare module and solder it yourself; avoid NodeMCU development board (ยฅ15, 3 times more expensive)
SG90 servos ร—4ยฅ12ยฅ12 for 4 on Pinduoduo; ยฅ3.5 each if bought separately on Taobao
SSD1306 OLED 128ร—64 I2Cยฅ6White is cheapest; blue ยฅ7, dual-color ยฅ9
OV2640 cameraยฅ15Buy bare board without FIFO; avoid ArduCAM Mini (ยฅ25)
HLK-V20 voice moduleยฅ9Search "SU-03T"; cheaper than "HLK-V20", same thing
8ฮฉ speaker + S8050 + resistors & capacitorsยฅ3A set of components; shipping often costs more than the goods; recommended to buy together with others
PCB prototypeยฅ0JLCPCB offers 2 free coupons per month
3D printingยฅ0JLCPCB new users get free coupons
USB power supplyยฅ0Phone charger + MicroUSB cable; everyone has one
Totalโ‰ˆ ยฅ50
๐Ÿฅ‰ Option 2: Basic Version (โ‰ˆยฅ35)

Remove the camera, keep voice control + AI conversation + emotional interaction. Suitable for beginners before upgrading.

ModulePrice
ESP12F ยฅ5 + SG90ร—4 ยฅ12 + OLED ยฅ6 + SU-03T ยฅ9 + Speaker Kit ยฅ3โ‰ˆ ยฅ35

๐Ÿ’ก Note: ยฅ35-ยฅ50 is the bare material price, excluding postage (โ‰ˆ ยฅ8). It is recommended to buy all components at once for the first purchase, as postage is only paid once.

Software Preparation

SoftwarePurposeDownload Link
VSCodeCode editorcode.visualstudio.com (opens in a new tab)
PlatformIO extensionCompilation and flashingSearch and install in VSCode extension store
Python 3Image conversion toolpython.org (opens in a new tab)
JLCPCB EDA Professional EditionView/modify PCBpro.lceda.cn (opens in a new tab)
SU-03T Configuration ToolConfigure voice moduleSearch "SU-03T configuration tool" on Baidu

Free Accounts to Apply For

ServicePurposeApplication LinkOptional?
Seniverse WeatherFetch weather informationseniverse.com (opens in a new tab)Optional
Volcano Engine ArkAI conversation (Doubao)console.volcengine.com (opens in a new tab)Optional
JLCPCBFree PCB prototyping, 3D printingjlc.com (opens in a new tab)Optional

Both APIs above are optional features. Without configuration, the robot dog's basic movement, expressions, and voice control will still work normally.

๐Ÿš€ How to Replicate

To build a MindPaw from scratch, follow this order.

โญ Before you start, please support this open-source project:

  1. Star โญ โ€” Click the โญ Star button in the top-right corner of the repository to bookmark this project for easy access later.
  2. Fork ๐Ÿด โ€” Click Fork to copy the project to your own GitHub, where you can freely modify it and submit a PR.
  3. Download ๐Ÿ“ฅ โ€” Click the green Code button โ†’ Download ZIP, or clone directly:

๐Ÿ“ธ Operation Diagram:

Star-Fork-Download

git clone https://github.com/ace-trump-tech/MindPaw.git

Step 1: Flashing Firmware (Get the Code Running)

Start by purchasing only the NodeMCU + USB-TTL and spend 30 minutes to verify the environment:

# 1. Install VSCode + PlatformIO extension
# 2. Clone the project and open it
git clone https://github.com/ไฝ ็š„็”จๆˆทๅ/MindPaw.git
cd MindPaw/MindPaw_main

# 3. Compile
pio run

# 4. Connect NodeMCU (GPIO0 to GND โ†’ power on)
# 5. Flash firmware
pio run -t upload

# 6. Upload web pages
pio run -t uploadfs

# 7. Disconnect GPIO0 from GND โ†’ press RST
# 8. Connect to WiFi "MindPaw" โ†’ open 192.168.4.1

Detailed steps โ†’ Docs/04_Firmware_Flashing.md

Step 2: PCB Prototyping and 3D Printing (Hardware Production)

If you have a free prototyping coupon from JLCPCB, this step won't cost you anything:

StepDescriptionReference Document
Export PCB Gerber FilesOpen SCH&PCB/MindPaw_SCH&PCB.epro2 โ†’ File โ†’ Manufacture โ†’ Gerber01_Hardware_Guide.md
Place Order for Free PrototypingJLCPCB order assistant โ†’ Upload Gerber โ†’ Use coupon02_PCB_Fabrication.md
3D Print the EnclosureUpload 3Dmodel/*.stl โ†’ Select PLA โ†’ Use coupon02_PCB_Fabrication.md

Step 3: Soldering and Assembly

After receiving the PCB and 3D-printed parts:

  1. Solder the power section first โ€” test 3.3V and 5V outputs for normal operation
  2. Solder the ESP12F core โ€” flash firmware and verify
  3. Add modules one by one โ€” OLED โ†’ servo โ†’ voice โ†’ camera โ†’ speaker
  4. Assemble the 3D-printed parts โ€” install servos in the chassis โ†’ close the body โ†’ attach the feet

Wiring diagram โ†’ 05_Assembly_Guide.md

Step 4: Configure API (Optional)

If you want AI conversation and weather query functions:

ServiceApplication StepsConfiguration Location
Seniverse Weather APIRegister โ†’ Create Free Version โ†’ Copy KeyWeb Console โ†’ Settings Page
Volcano Engine APIRegister โ†’ Create Inference Access Point โ†’ Copy Keyhttp://192.168.4.1/aiconfig.html

Step-by-step guide โ†’ Docs/07_API_Guide.md

Step 4 (Optional): Start the AI Infra Gateway

ai-infra is an optional independent AI infrastructure layer. It handles upstream model adaptation, authentication, timeout, and structured output validation, making it suitable for developers who wish to explore Agents, model access, and edge-device collaboration. Beginners can skip this section and use the existing ESP8266 direct connection to Doubao mode without affecting the robot dogโ€™s basic functions or AI conversation.

cd ai-infra
cp .env.example .env
# ็ผ–่พ‘ .env๏ผŒ้…็ฝฎ GATEWAY_TOKENใ€AI_PROVIDER ๅ’ŒไธŠๆธธ API Key
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn gateway.app:app --host 0.0.0.0 --port 8000

When no cloud Key is available, set AI_PROVIDER in .env to mock to verify the device link first. Then open http://192.168.4.1/aiconfig.html:

  • API Key: Enter GATEWAY_TOKEN
  • Inference Endpoint ID: Enter mindpaw
  • AI Gateway Address: Enter http://็ฝ‘ๅ…ณIP:8000/v1/chat/completions

Docker users can run cd ai-infra && docker compose up --build -d. For full instructions, see ai-infra/README.md.

Two Usage Paths

GoalRecommended Path
First-time reproduction of the robot dog and learning ESP8266 and ArduinoSkip ai-infra and configure the Doubao API directly
Research AI Agent, model routing, structured output, and edge gatewaysLaunch ai-infra and connect devices via Gateway

Why is it placed in the same repository?

The current benefits of maintaining a monorepo are: beginners only need to download one repository to reproduce the project, and researchers can read the firmware, protocol, and Gateway all within the same repository. Once the interfaces stabilize and the Gateway needs to serve other robots, we can then split ai-infra into a pluggable repository or Python package while retaining versioned configuration examples in this repository.

Step Five: Configuring the Voice Module

The HLK-V20 requires configuration via a computer before use:

  1. Download the SU-03T configuration tool
  2. Connect the module via USB-TTL
  3. Add 22 voice commands according to the table
  4. Burn โ†’ Power off โ†’ Connect to MindPaw

Detailed command table โ†’ Docs/07_API_Guide.md#3-hlk-v20-่ฏญ้Ÿณๆจกๅ—้…็ฝฎ

๐Ÿ“ Project Structure

MindPaw/
โ”‚
โ”œโ”€โ”€ 3Dmodel/                    โ† 3D Printed Parts (body.stl / bottom.stl / foot.stl)
โ”‚
โ”œโ”€โ”€ SCH&PCB/                    โ† Circuit Design Files (LCSC EDA Professional)
โ”‚   โ”œโ”€โ”€ MindPaw_SCH&PCB.epro2
โ”‚   โ””โ”€โ”€ README.md                โ† Hardware Reproduction, Prototyping, and Troubleshooting Guide
โ”‚
โ”œโ”€โ”€ MindPaw_main/               โ† Firmware Source Code (Beginner Demo Entry)
โ”‚   โ”œโ”€โ”€ README.md                โ† Compilation, Flashing, Acceptance, and Troubleshooting
โ”‚   โ”œโ”€โ”€ src/                    โ† C++ Source Code
โ”‚   โ”‚   โ”œโ”€โ”€ main.cpp            โ† Main Program (Entry, Web Server, Servo Actions)
โ”‚   โ”‚   โ”œโ”€โ”€ image.cpp           โ† Bitmap Data for OLED Display
โ”‚   โ”‚   โ”œโ”€โ”€ hlkv20.*            โ† HLK-V20 Voice Recognition Module Driver
โ”‚   โ”‚   โ”œโ”€โ”€ ov2640.*            โ† OV2640 Camera Driver
โ”‚   โ”‚   โ”œโ”€โ”€ speaker.*           โ† Melody Playback for Speaker
โ”‚   โ”‚   โ”œโ”€โ”€ motion_emotion.*    โ† Emotional Actions for the Robodog (Dancing, Nodding, etc.)
โ”‚   โ”‚   โ”œโ”€โ”€ emotion_engine.*    โ† Emotional State Machine (PAD Model)
โ”‚   โ”‚   โ”œโ”€โ”€ gesture_nn.*        โ† Gesture Recognition (Lightweight MLP)
โ”‚   โ”‚   โ”œโ”€โ”€ multimodal_fusion.* โ† Multimodal Input Fusion
โ”‚   โ”‚   โ”œโ”€โ”€ doubao_agent.*      โ† Doubao AI API Client
โ”‚   โ”‚   โ””โ”€โ”€ doubao_config.h     โ† AI Prompt Words and Configuration
โ”‚   โ”œโ”€โ”€ data/                   โ† Web Control Interface (11 HTML Files)
โ”‚   โ”œโ”€โ”€ tools/                  โ† Python Utility Scripts
โ”‚   โ”‚   โ””โ”€โ”€ distill_gesture.py  โ† Gesture Model Training Script
โ”‚   โ”œโ”€โ”€ platformio.ini          โ† Compilation Configuration File
โ”‚   โ””โ”€โ”€ PIN_WIRING.md           โ† Pin Wiring Diagram
โ”‚
โ”œโ”€โ”€ ai-infra/                   โ† Standalone AI Gateway (Optional, Researcher Tutorial)
โ”‚   โ”œโ”€โ”€ gateway/app.py          โ† OpenAI-Compatible Entry, Authentication, and Upstream Adaptation
โ”‚   โ”œโ”€โ”€ tests/                  โ† Gateway Contract Unit Tests
โ”‚   โ”œโ”€โ”€ .env.example            โ† Gateway Configuration Template
โ”‚   โ”œโ”€โ”€ Dockerfile              โ† Container Deployment
โ”‚   โ””โ”€โ”€ README.md               โ† Research Topics, Experimental Path, and Gateway Startup Guide
โ”‚
โ”œโ”€โ”€ Picture/                    โ† Image Resources
โ”‚   โ”œโ”€โ”€ MindPaw_oled/           โ† Expression Source Files (BMP)
โ”‚   โ””โ”€โ”€ PCtoLCD2002/            โ† Image to Pixel Art Tool
โ”‚
โ”œโ”€โ”€ Docs/                       โ† Documentation
โ”‚   โ”œโ”€โ”€ 01_Hardware_Guide.md    โ† Hardware Design Import Guide
โ”‚   โ”œโ”€โ”€ 02_PCB_Fabrication.md   โ† PCB Free Prototyping Guide
โ”‚   โ”œโ”€โ”€ 03_Image_Conversion.md  โ† OLED Expression Creation Guide
โ”‚   โ”œโ”€โ”€ 04_Firmware_Flashing.md โ† Firmware Flashing Guide
โ”‚   โ”œโ”€โ”€ 05_Assembly_Guide.md    โ† Structure Assembly and Wiring Guide
โ”‚   โ”œโ”€โ”€ 06_Quick_Start.md       โ† 5-Minute Quick Start Guide
โ”‚   โ””โ”€โ”€ 07_API_Guide.md         โ† API Key Acquisition Guide
โ”‚
โ”œโ”€โ”€ hardware-manifest.json      โ† Hardware, Firmware, and Reproduction Path Inventory
โ”œโ”€โ”€ scripts/validate_project.py โ† Automated Inventory and Sensitive Configuration Validation
โ”‚
โ””โ”€โ”€ README.md                   โ† This File

๐Ÿ”Œ Hardware Wiring Diagram

Quick Wiring Table

ESP12F PinConnected ToNotes
GPIO0 (D3)HLK-V20 TXVoice module's transmit pin
GPIO2 (D4)Button โ†’ GNDMust be HIGH at startup
GPIO4 (D2)OLED SDAI2C data, requires 4.7Kฮฉ pull-up
GPIO5 (D1)OLED SCLI2C clock, requires 4.7Kฮฉ pull-up
GPIO14 (D5)Servo 1 + OV2640 SCKโš  Series 1Kฮฉ, shared with servo
GPIO12 (D6)Servo 3 + OV2640 MISOโš  Series 1Kฮฉ, shared with servo
GPIO13 (D7)Servo 4 + OV2640 MOSIโš  Series 1Kฮฉ, shared with servo
GPIO15 (D8)OV2640 CSโš  Must have 10Kฮฉ pull-down to GND
GPIO16 (D0)Speaker (transistor driven)Or connect to Servo 2 (choose one)
A0Battery voltage dividerโ€”
TX/RXUSB-TTL debug portFor flashing and serial debugging

โš  Two most important rules:

  1. GPIO15 must be connected to a 10Kฮฉ pull-down resistor to GND โ€” otherwise the ESP8266 will fail to start
  2. When sharing SCK/MISO/MOSI with servos, add a 1Kฮฉ series resistor โ€” prevents signal conflicts

Full wiring diagram โ†’ Docs/05_Assembly_Guide.md

๐Ÿ“š Documentation Index

If you want to...See this
The robot dog has arrived, teach it how to playUser Manual (for non-technical users)
Get it running in 5 minutesQuick Start Guide
Compile and flash the codeFirmware Flashing Guide
Understand/modify the PCBHardware Design Import Guide
Order free PCB prototypesPCB Fabrication Guide
Assemble and wire it upStructure Assembly and Wiring Guide
Change OLED expressionsImage Conversion Guide
Apply for an API keyAPI Key Acquisition Guide
All pin definitionsPIN_WIRING.md
Reproduce the firmware demo from scratchMindPaw_main/README.md
Explore AI Infra and Edge-Cloud Agentai-infra/README.md
Import/modify/order PCBsSCH&PCB/README.md

๐ŸŒฟ Branches and Versions

The repository currently has two remote branches, each serving different roles:

BranchStatusDescription
mainโœ… Protected candidate (recommended to set rules in GitHub Settings โ†’ Branches)Stable release line. Currently MindPaw 2.0 (opens in a new tab).
feature/2.0-streaming-reconโœ… Merged into main (merge commit 4900898)Development branch for the 2.0 perception layer. Code is already in main and can be safely deleted.

Recommended main branch protection rules

GitHub web interface will prompt "Your main branch isn't protected". It is recommended to add the following in Settings โ†’ Branches โ†’ Add rule:

  • โœ… Require a pull request before merging
  • โœ… Require status checks to pass before merging (at least check the three jobs: docs-and-manifest, gateway-tests, and recon-tests)
  • โœ… Do not allow force pushes
  • โœ… Do not allow deletions
  • โœ… Require linear history (optional; do not check this if you want to keep --no-ff merge commits)

Clean up merged feature branches

git push origin --delete feature/2.0-streaming-recon
git branch -d feature/2.0-streaming-recon       # Local

Release History

TagCommitNotes
v2.0.0ac65e8cMindPaw 2.0 โ€” Streaming 3D reconstruction perception layer
(older)โ€”MindPaw 1.x โ€” Desktop Dog + Doubao conversation + Emotional response

For detailed changelog, see RELEASE_NOTES.md.

โ“ FAQ

Can I build this if I don't know how to program?

If you have no experience with embedded development, it is recommended that you at least learn the basic usage of Arduino (e.g., lighting up an LED, serial output). Then follow the documentation step by step. If you encounter any issues, you can open an issue on GitHub.

Do I have to use JLCPCB for PCB prototyping?

No. You can also hand-solder using a perforated board (breadboard). The PCB files are just more convenient and reliable. It is recommended to use hand-soldering for the first attempt, and then order a PCB prototype once successful.

Do I have to 3D print the shell?

No. You can also use cardboard, acrylic, or building blocks to assemble a body. The 3D model is just a reference shape I designed.

Can ESP32 be used instead?

Of course, and it's recommended. ESP32 has more pins, larger memory, and Bluetooth. Migration steps:

  1. Change board = nodemcu-32s in platformio.ini
  2. Re-adjust the pin assignments for ESP32
  3. Most of the code does not need to be modified

Does the voice module have to use HLK-V20?

If you already have an LD3320, you can also connect it (requires 5 SPI pins). However, the HLK-V20 only needs 1 pin and has a higher recognition rate, so it is recommended.

Why is GPIO15 pulled down to GND?

This is a hardware requirement of the ESP8266: if GPIO15 is HIGH during startup, the chip will enter test mode and fail to operate normally. A 10Kฮฉ resistor pull-down ensures it remains LOW at startup.

๐Ÿงฐ Maintenance and Contributions

MindPaw includes firmware, real hardware, 3D models, and the optional AI Gateway. To ensure contributions are reproducible, please read the following before submitting:

Issues cannot consist solely of unverifiable AI-generated text; authors must personally reproduce the issue, provide logs or measurement results, and be able to respond to maintainer inquiries. AI can assist with retrieval, translation, and formatting, but cannot replace hardware safety reviews and experimental validation.

The repositoryโ€™s Quality, Firmware build, and Link check workflows automatically verify the project inventory, Gateway contracts, firmware compilation, and documentation links. Any changes involving servos, power supply, pins, or motion protocols must include power-off measures and compatibility notes.

๐Ÿ“œ License

  • Software Code (MindPaw_main/src/): MIT License
  • Hardware Design (SCH&PCB/): CC BY-NC 4.0
  • 3D Models (3Dmodel/): CC BY-NC 4.0
  • Documentation (Docs/ and README.md): CC BY 4.0

In short: Feel free to use the code, hardware and 3D models can be used and modified for personal purposes, but not for commercial use.


Files by @ace-trump-tech, at commit 21c5492, read from GitHub in your browser. Hardware license: MIT; software license: MIT. Robotheca doesn't review code: read it before running it.