[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-108639":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":23,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},108639,"1.5-joint-module","yzytz17\u002F1.5-joint-module","yzytz17","Ultra-low-cost robotic joint: a $1.5 FOC board inside a 1503 gimbal motor, plus a 3D-printed high-ratio precision gearbox. Cheap power, exact motion.",null,"C++",211,6,107,0,3,83,52.34,"CERN Open Hardware Licence Version 2 - Weakly Reciprocal",false,"main",true,[],"2026-11-02 16:28:34","2026-11-23 03:27:27","# $1.5 Joint Module\n\n**English** | [中文](README.zh-CN.md)\n\n> **Language policy.** English is the public face of this repository. Chinese\n> is the author's working language and is kept in full at\n> [`README.zh-CN.md`](README.zh-CN.md) and in\n> [`firmware\u002Fopenloop-zh\u002F`](firmware\u002Fopenloop-zh\u002F).\n>\n> Where a load-bearing statement exists in both languages, **the Chinese\n> original is authoritative** — English is a translation and can lose emphasis\n> or nuance. Part numbers, pin numbers and measured dimensions are\n> language-neutral and identical in both.\n\n> An ultra-low-cost robotic joint module: a ~$1.5 four-layer FOC driver board\n> that fits inside a 1503 brushless gimbal motor, driving a fully 3D-printed\n> high-ratio precision gearbox. **Cheap actuation, precise motion.**\n\nA tiny robotic joint built from three cheap things: a **1503 brushless gimbal\nmotor**, a **~$1.5 four-layer FOC driver board** that fits inside the motor\nbell, and a **fully 3D-printed reduction gearbox**.\n\nThe point is the cost floor. A four-layer driver board at prototype pricing is\nabout **$1.5**, and the entire gear train prints on a machine that already\nsits on your desk. That combination is what makes inexpensive actuation\npractical at scale — a six-degree-of-freedom arm, a quadruped, a pan-tilt\nhead — without giving up reduction ratio or positioning resolution.\n\nEverything here is open: PCB Gerbers, drive firmware, SolidWorks CAD and\nprint-ready STL.\n\n> **Status: work in progress.** This repository was assembled from the\n> author's original material set and reorganised into English. Several\n> items are still missing — every gap is marked `TODO(author)` and also\n> listed in [MISSING.md](docs\u002FMISSING.md). Please don't treat placeholder\n> values as verified.\n\n---\n\n## See it work\n\nThree short videos recorded by the author. The frames below are poster\nimages kept in the repo; **the videos themselves live on Baidu NetDisk**\n(~100 MB total is too heavy to force on everyone who clones):\n\n> **Videos \u002F 介绍视频:**\n> \u003Chttps:\u002F\u002Fpan.baidu.com\u002Fs\u002F1f1OeAkVNAqZQWN0Y5FbujQ?pwd=ge5x>\n> Extraction code \u002F 提取码: **ge5x**\n\n| | | |\n|:---:|:---:|:---:|\n| ![Bench demo](assets\u002Fvideo\u002F01-bench-demo-poster.jpg) | ![CAD walkthrough](assets\u002Fvideo\u002F02-cad-walkthrough-10x-reduction-poster.jpg) | ![Assembled joint](assets\u002Fvideo\u002F03-assembled-joint-in-hand-poster.jpg) |\n| **Bench demo** — the board driving the motor on the bench. *\"Open source. 10-yuan FOC. Brushless closed loop. Affordable for anyone.\"* | **CAD walkthrough** — the gearbox in SolidWorks. *\"Single-stage 10× reduction. 3D-printable. Fits the 1503 FOC.\"* | **Assembled joint** — the finished unit in hand. *\"Cheapest on the internet: 10-yuan FOC joint with a 2-yuan reducer.\"* |\n\nThe middle video is where the reduction ratio comes from: **single stage,\n10:1**. The third is where the gearbox cost comes from: **about ¥2 (~$0.28)\nof printed plastic**, on top of the ¥10 (~$1.40) board.\n\n> Baidu NetDisk needs an account and is slowest outside China. If you cannot\n> reach it, open an issue and the author can send the files another way.\n\n---\n\n## What is in the box\n\n| Layer | Contents | Path |\n|---|---|---|\n| Electrical | 4-layer driver PCB Gerbers + manufacturing zip | [`hardware\u002Fpcb\u002F`](hardware\u002Fpcb\u002F) |\n| Firmware | ESP32-C3 + SimpleFOC open-loop drive (English + original Chinese) | [`firmware\u002F`](firmware\u002F) |\n| Mechanical | SolidWorks parts and assembly | [`mechanical\u002Fcad-solidworks\u002F`](mechanical\u002Fcad-solidworks\u002F) |\n| Mechanical | Print-ready STL, de-duplicated and measured | [`mechanical\u002Fstl\u002F`](mechanical\u002Fstl\u002F) |\n| Docs | Firmware guide, hardware guide, BOM, assembly | [`docs\u002F`](docs\u002F) |\n\n---\n\n## How it works\n\n### Electronics\n\nThe driver is a **circular-cornered 4-layer board, ≈17.6 × 16.4 mm**, small\nenough to sit inside the 1503 motor's bell. Its three motor-phase pads are\nplaced **120° apart on a 6.0 mm radius circle**, so the phase wires fan out\nradially to the stator instead of routing off the side of the board.\n\nBoard facts read directly out of the released Gerbers:\n\n- Designed in **EasyEDA Pro v4.1.60**, Gerbers generated **2026-10-21**\n- **4 copper layers** (top, bottom, 2 inner)\n- Outline ≈ **17.59 × 16.38 mm**\n- Drills: **14 × 0.305 mm** plated through-holes + **3 × 2.0 mm**, plus a\n  separate 0.305 mm via drill file\n- **28 placements** from the flying-probe data: `U1` (26-pin, top), `U2`\n  (8-pin, bottom), `U3` (3-pin, top), `U4` (3-pin, bottom), `H1`\u002F`H2`\n  (3-pin connectors), two 6-pin headers, `LED1`, `R1`–`R4`, `C1`–`C9`,\n  `PAD1`–`PAD3` (motor phases)\n\n> ## ⚠️ The driver chip must be **MP6540GU** — *not* MP6540**H**GU\n>\n> This is the single most important purchasing instruction in the whole\n> project, and it is easy to get wrong, because **the two parts share the same\n> QFN-26 (5 × 5 mm) footprint**. A wrongly-bought MP6540HGU will still solder\n> down perfectly and still not be what this board was designed around.\n>\n> | | **MP6540GU** (this board) | MP6540HGU (wrong for this board) |\n> |---|---|---|\n> | Family | MP6540 \u002F MP6540A | MP6540H \u002F MP6540HA |\n> | Supply voltage | 5.5 – **35 V** | 5.5 – **50 V** |\n> | Continuous current | **3 A** | **5 A** |\n> | Peak current | **10 A** (1 s) | **6 A** |\n> | Package | QFN-26 (5 × 5) | QFN-26 (5 × 5) — identical |\n>\n> **Why the non-H part, in the author's own reasoning:**\n>\n> 1. **It is cheaper**, and cost is the entire point of this project.\n> 2. The H version's extra current headroom **earns nothing in a FOC drive\n>    like this one** — the firmware is voltage-limited, so the extra amperes\n>    are never used.\n> 3. **This motor's KV is high.** With a high-KV winding, excess available\n>    current does not produce more useful torque; it produces heat and\n>    destabilises the whole motor. The lower-current part is the *correct*\n>    part, not a compromise.\n>\n> Full detail: [`docs\u002FHARDWARE.md`](docs\u002FHARDWARE.md#the-driver-chip-mp6540gu-not-mp6540hgu).\n\nThe full editable project lives on the LCEDA\u002FOSHWHub platform:\n[10元 1503 最小 FOC — OSHWHub](https:\u002F\u002Foshwhub.com\u002Fteam_dvojhors\u002Fproject_ceehsgzu)\n\n### Firmware\n\n**ESP32-C3 + SimpleFOC**, running **pure open loop**. This is deliberate\nand it is the most important thing to understand before you flash it:\n\n- The electrical angle is advanced by **internal integration only**. There\n  is no sensor in the control loop, no `initFOC()`, no alignment routine,\n  and no PID.\n- **The motor stays still at power-up.** It does not spin, and it does not\n  hunt for a zero position. Nothing moves until you send a serial command.\n- The analog encoder is **display-only**. Unplug it and the motor still\n  follows commands. It is only read so you can see a number on the serial\n  monitor.\n- Because position is an internal counter, **a stall or lost step makes the\n  angle wrong**. Reboot to zero it, then re-send your target.\n\nPin map (ESP32-C3):\n\n| Signal | GPIO | Note |\n|---|---|---|\n| Phase A (`INHA`) | 10 | |\n| Phase B (`INHB`) | **3** | originally GPIO7 — that pin is faulty on this board, so it moved |\n| Phase C (`INHC`) | 2 | |\n| Enable (`EN`) | 8 | |\n| Encoder (ADC) | 0 | **PWM angle output**, read on the ADC — see below |\n\n> ## ⚠ The angle sensor speaks PWM, not I2C\n>\n> The magnetic angle sensor reports the closed-loop angle as a **PWM signal**\n> (duty cycle proportional to angle). It is read with the MCU's **ADC** on\n> GPIO0. **There is no I2C anywhere in this firmware** — do not wire SDA\u002FSCL,\n> and do not go looking for an I2C address.\n>\n> This is the most common wiring mistake with magnetic angle sensors, because\n> I2C is the interface their datasheets lead with. Here it is the wrong one.\n>\n> The firmware's 8-sample ADC average is what turns PWM duty into a stable\n> angle: sampling a PWM signal asynchronously and averaging converges toward\n> its duty cycle. That average *is* the low-pass filter — there is no separate\n> filtering stage. After averaging, the signal behaves as 0–3.3 V ↔ 0–360°.\n\nOutput is capped at `POWER_SUPPLY_VOLTAGE × VOLTAGE_LIMIT_RATIO` =\n**5 V × 15 % = 0.75 V**, which also protects the motor now that current\nsensing has been removed.\n\nThree serial modes at **115200 baud**:\n\n| Command | Mode | Prefix | Behaviour |\n|---|---|---|---|\n| `90` or `a 90` | Position | `[POS]` | move internal angle to 90°, drop voltage on arrival |\n| `R2` | Velocity | `[VEL]` | spin at 2 rev\u002Fs |\n| `D` | Encoder | `[ENC]` | motor de-energised, read encoder only (default at boot) |\n| `o` \u002F `q` | — | current mode | status \u002F parameter query |\n\nFull details in [`docs\u002FFIRMWARE.md`](docs\u002FFIRMWARE.md).\n\n### Gearbox\n\nThe reduction is printed. Gears are **module 0.6**: a **27-tooth internal\nring** and a **30-tooth external ring**, plus a flipped variant of the\nexternal ring and a **metal-3D-print** version of it for durability.\n\nMeasured straight from the released STL (bounding boxes, mm):\n\n| Part | Size | Triangles | Notes |\n|---|---|---|---|\n| `motor_1503_reference` | 18.1 Ø × 11.2 | 3 102 | reference model of the motor, **do not print** |\n| `motor_mount` | 25.26 Ø × 8.0 | 2 750 | |\n| `external_ring_gear_m0.6_30T` | 24.65 Ø × 5.75 | 4 218 | |\n| `external_ring_gear_flipped_m0.6_30T` | 24.66 Ø × 8.5 | 28 128 | much denser mesh |\n| `internal_ring_gear_m0.6_27T` | 17.39 Ø × 4.0 | 2 664 | |\n| `mystery_intermediate_driver` | 16.0 Ø × 10.5 | 1 470 | author's own name for this part |\n| `shaft_rocker_arm` | 15.0 Ø × 9.5 | 2 078 | |\n\nTwo parts in the print folder are **not printed parts at all** — they are\nsteel rod:\n\n| Part | Measured | Qty | Reality |\n|---|---|---|---|\n| `crank_output` | 6.0 × 1.4 × 1.4 mm | 4 | **1.5 mm steel rod**, cut to 6 mm |\n| `part1_rod` | 31.8 × 1.4 × 1.4 mm | 4 | **1.5 mm steel rod**, cut to length |\n\nEvidence: each appears exactly 4× in the assembly, spaced 90° apart, and\neach measures 1.4 mm across. A 1.5 mm cylinder modelled with 8 facets has a\nbounding box of 1.386 mm — that matches. This also lines up with the\nauthor's consumables list, which specifies **1.5 mm rod**.\n\n> **TODO(author):** confirm the kinematic scheme and the reduction ratio.\n> The 27T internal ring and 30T external ring differ by 3 teeth and cannot\n> mesh with each other directly, so there is an intermediate stage involved\n> (`mystery_intermediate_driver` + the 4 crank pins), but the ratio is not\n> stated anywhere in the released material.\n\n---\n\n## Getting started\n\n```\n1. Order the PCB      hardware\u002Fpcb\u002Fgerber_gen1_adc_closedloop_2026-10-21.zip\n                      -> upload straight to JLCPCB \u002F PCBWAY. Buy MP6540GU.\n2. Print the gearbox  mechanical\u002Fstl\u002Fprint\u002F  (see docs\u002FBOM.md for hardware)\n3. Flash firmware     firmware\u002Fopenloop\u002F  -- copy config.h.example to\n                      config.h, fix every [GUESS] value, then flash.\n4. Drive it           serial monitor @ 115200, send `D`, `a 90`, or `R2`.\n```\n\nDetailed steps: [`docs\u002FASSEMBLY.md`](docs\u002FASSEMBLY.md).\n\n### Firmware dependency versions\n\n| Dependency | Version | Status |\n|---|---|---|\n| Arduino core for ESP32 | 2.x or 3.x | **TODO(author)** — confirm which was used |\n| SimpleFOC | 2.3.x | **TODO(author)** — inferred from the API used (`MotionControlType`, `Sensor::init`, `analogReadMilliVolts`) |\n| Board target | ESP32-C3 | exact module variant **TODO(author)** |\n\n---\n\n## ⚠️ The firmware ships without its config header\n\n`openloop.ino` does `#include \"config.h\"`, but **`config.h` was not part of\nthe released material set**. It will not compile as-is.\n\n[`firmware\u002Fopenloop\u002Fconfig.h.example`](firmware\u002Fopenloop\u002Fconfig.h.example)\nis a reconstruction: all 17 macros the firmware references, with every\nvalue recovered from comments inside the `.ino`. Each line is tagged\n`[DERIVED]` (recovered verbatim) or `[GUESS]` (placeholder you must fix).\n\nSix values are unknown and need the author's real numbers:\n`MOTOR_POLE_PAIRS`, `OPENLOOP_DIRECTION`, `VELOCITY_LIMIT`,\n`VOLTAGE_RAMP_MS`, `ARRIVE_TOL_RAD`, `HOLD_VOLTAGE_RATIO`.\n\nThere is also a **contradiction inside the original source** about the\nvoltage ceiling — three different values appear in its comments (15 %, 10 %,\nand 0.5 V). See\n[`docs\u002FFIRMWARE.md` § Known inconsistencies](docs\u002FFIRMWARE.md#known-inconsistencies-in-the-original-source).\n\n---\n\n## Cost\n\nThe project is named after the driver board. The author's own LCEDA project\nis titled **\"10元 1503 最小 FOC\"** — 10 CNY ≈ **$1.40** for a bare 4-layer\nboard at JLCPCB prototype pricing.\n\n> **TODO(author):** the cost table below is a skeleton. Please confirm what\n> \"$1.5\" is meant to cover (the bare PCB, or the PCB populated), and fill in\n> the rest.\n\n| Item | Est. cost | Source | Status |\n|---|---|---|---|\n| Driver PCB, bare, 4-layer | ~$1.40 | JLCPCB | author-stated (10 CNY) |\n| MP6540GU gate driver | ? | | **TODO** |\n| ESP32-C3 module | ? | | **TODO** |\n| Passives, connectors, LED | ? | | **TODO** |\n| 1503 brushless gimbal motor | ? | | **TODO** |\n| Analog angle sensor | ? | | **TODO** |\n| Bearings (MR117 + MR85) | ? | | **TODO** |\n| 1.5 mm steel rod | ? | | **TODO** |\n| Printed gearbox filament | ? | | **TODO** |\n| **Total per joint** | **?** | | **TODO** |\n\n---\n\n## Repository layout\n\n```\n.\n├── firmware\u002F\n│   ├── openloop\u002F            English firmware + reconstructed config.h.example\n│   └── openloop-zh\u002F         original Chinese source, unmodified\n├── hardware\u002Fpcb\u002F\n│   ├── gerber\u002F              16 extracted layer files\n│   └── *.zip                manufacturing zip, ready to upload\n├── mechanical\u002F\n│   ├── cad-solidworks\u002F      13 SolidWorks parts + the assembly\n│   └── stl\u002F\n│       ├── print\u002F           9 unique geometries, print from here\n│       └── as-exported\u002F     all 15 original assembly-instance exports\n├── docs\u002F\n│   ├── FIRMWARE.md  HARDWARE.md  BOM.md  ASSEMBLY.md  MISSING.md\n└── assets\u002F                  photos & video — currently empty\n```\n\n### About the STL folders\n\nThe original exports came out of the SolidWorks assembly, so **each file\ncarries its placement transform** and does not sit at the origin. Most\nslicers auto-centre, so this is usually harmless, but it is worth knowing.\n\n`stl\u002Fprint\u002F` de-duplicates the repeated instances: `crank_output` and\n`part1_rod` each appeared 4× with identical triangle counts and identical\ndimensions — same part, four placements. Print one and make four.\n`stl\u002Fas-exported\u002F` keeps all 15 originals for fidelity.\n\n> **TODO(author):** three CAD parts have **no STL export** — `universal_adapter`,\n> `universal_adapter_extended`, and `external_ring_gear_metal_print_m0.6_30T`.\n> Please export them if they are meant to be built.\n\n---\n\n## Missing material\n\nSee [`docs\u002FMISSING.md`](docs\u002FMISSING.md) for the full, itemised list of what\nstill needs to be supplied before this project is reproducible by a stranger.\nThe headline gaps:\n\n1. **`config.h`** — firmware will not compile without it\n2. **Closed-loop firmware** — the Gerbers are named *\"gen 1 ADC closed\n   loop\"*, but only open-loop code was released\n3. **Schematic \u002F editable PCB source** in-repo — currently only Gerbers plus\n   an external OSHWHub link\n4. **Real BOM with part numbers** — the board's `U1`–`U4` and all passive\n   values are unknown\n5. **Still photos** — three intro videos are linked via the author's NetDisk\n   share, but there is no still image of the bare PCB or the gear train\n6. **Print settings** — material, layer height, infill, supports, and\n   whether the ring gear is printed in metal or resin\n7. **Kinematic description** — the ratio is known (**10:1, single stage**,\n   from the author's own video), but how the stages connect is not\n\n---\n\n## Full archive mirror\n\nGitHub can be slow or unreachable from mainland China, so the author also\nhosts the complete material set on Baidu NetDisk:\n\n> **百度网盘 \u002F Baidu NetDisk:**\n> \u003Chttps:\u002F\u002Fpan.baidu.com\u002Fs\u002F11fmlISdtuOBgRAKb2E5Nxg?pwd=RRRR>\n> Extraction code \u002F 提取码: **RRRR**\n\nThis is the same material as this repository, as one zip. Use whichever is\nfaster for you. If the two ever disagree, **this repository is the source of\ntruth** — the mirror is a convenience copy and may lag behind.\n\n## Tipping\n\nThere is no donation button, no QR code and no sponsorship account, and there\nwon't be. This project is free and stays free.\n\nIf it saved you time or money and you would like to say thanks with money\nanyway, the author's preference is simple:\n\n> **Send the author a private message, or leave a comment.**\n\nThat is the whole mechanism. A message telling you what you built with it is\nworth more than the money would be.\n\n**Ways to help that cost nothing, and matter more:** build one and report what\nbroke · send the files listed in [`docs\u002FMISSING.md`](docs\u002FMISSING.md) · star\nthe repo · open an issue · send a PR.\n\n---\n\n## License\n\n**CERN Open Hardware Licence Version 2 – Weakly Reciprocal\n(CERN-OHL-W-2.0)** — full text in [`LICENSE`](LICENSE). SPDX: `CERN-OHL-W-2.0`.\n\nIn plain terms:\n\n- **You may** study, copy, modify, make and sell products from this design.\n- **If you convey the joint design itself** (or a modified version of it), you\n  must make the source for *that design* available under the same licence.\n- **If you build the joint into a larger product** — a robot arm, a quadruped,\n  a pan-tilt head — the rest of your product is *External Material* and may\n  stay closed and be sold under your own terms, provided it only interfaces\n  with this design through the documented interface (the output adapter is\n  exactly that interface).\n- Notices, including the copyright line, must be retained.\n\nWeakly reciprocal was chosen over strongly reciprocal (CERN-OHL-S) on purpose:\nthe goal of this project is that cheap actuation gets *used*, and S would force\nanyone embedding the joint to open-source their whole machine. W keeps the\njoint itself open and improving while leaving everything around it free.\n\n### Third-party components\n\n- **SimpleFOC** ([arduino-FOC](https:\u002F\u002Fgithub.com\u002Fsimplefoc\u002FArduino-FOC)) is\n  **MIT**-licensed. The firmware builds on it; its copyright notice is\n  retained in [`firmware\u002FREADME.md`](firmware\u002FREADME.md) as MIT requires.\n  MIT is permissive, so this causes no licence conflict.\n- **ESP32-C3 SDK \u002F Arduino core** components remain under their own licences.\n\n---\n\n## Credits\n\nOriginal design, PCB, CAD and firmware by the author of the 1503 minimal\nFOC project. English documentation, repository organisation and firmware\ntranslation added for this release.\n\n> **TODO(author):** what name or handle should be credited here, and what\n> email\u002Fusername goes in the LICENSE copyright line? The repo is currently\n> staged under the git identity `yzytz17 \u003Clsb6699@qq.com>`.\n\nUpstream board project:\n[10元 1503 最小 FOC — OSHWHub](https:\u002F\u002Foshwhub.com\u002Fteam_dvojhors\u002Fproject_ceehsgzu)\n","这是一个超低成本的开源机器人关节模块，将约1.5美元的四层FOC驱动板集成于1503无刷云台电机内部，并搭配全3D打印的高减速比（10:1）精密齿轮箱。核心功能包括基于FOC算法的闭环电机控制、紧凑一体化机械结构设计，以及全部硬件图纸（Gerber）、固件（C++）和三维模型（SolidWorks\u002FSTL）开源。技术特点是极致成本优化（整机关节约1.78美元）、免专用电机外壳、支持桌面级3D打印制造。适用于教育机器人、低成本多自由度机械臂、四足机器人关节、云台俯仰机构等对成本敏感且需中等精度定位的嵌入式机电项目。",2,"2026-11-24 04:34:50","CREATED_QUERY"]