2026-09-28 18:14:00 +02:00
# Hexapod
2026-10-01 15:53:55 +02:00
A six-legged walking robot (Teensy 3.6) and its handheld remote
2026-11-17 22:56:06 +01:00
(Teensy 4.0 + Nextion touchscreen), linked over nRF24L01: commands from the
remote, telemetry back from the robot. A USB nRF24 stick lets the PC (the
Unity simulation) take the robot's place on the radio.
2026-09-28 18:14:00 +02:00
2026-11-14 12:14:32 +01:00

2026-11-14 18:57:49 +01:00

The remote above is the new design (`hardware/openscad/remote_v2.scad` , not
printed yet). The original printed remote is on the
[archive page ](hardware/openscad/ARCHIVE.md ).
2026-11-14 12:14:32 +01:00
2026-09-28 18:14:00 +02:00
```
2026-11-17 22:56:06 +01:00
robot/ robot firmware: IK, gait, body pose, IMU stabilization, state machine,
servo centre calibration, telemetry
remote/ remote firmware: 2 x 3-axis sticks, MPU6050 tilt, Nextion UI, RF24 link
(+ remote.HMI, the touchscreen project)
shared/ HexapodProtocol: CmdPacket + Telemetry wire formats + radio settings
2026-09-29 00:37:12 +02:00
sim/ the unchanged robot firmware compiled into a DLL for the simulation
Hexapod_Simulation_Unity/ Unity project that runs that DLL on the 3D model
2026-11-14 23:14:16 +01:00
dongle/ USB nRF24 stick firmware (STM32F030): the PC-side radio, see dongle/README.md
2026-11-14 18:57:49 +01:00
hardware/openscad/ OpenSCAD model of the robot (rebuilt from the Fusion designs) and the new remote
hardware/openscad/stl/ print-ready STL exports
2026-10-25 17:30:35 +01:00
hardware/fusion360/ Fusion 360 designs: body, legs, servo, servo horn, remote case
2026-11-17 22:56:06 +01:00
scripts/ PlatformIO helper (per-environment sketch folder), make_remote_hmi.py
tools/nextion-hmi-tools/ git submodule: .HMI reader/writer/renderer (nxhmi), used by the HMI generator
2026-09-28 18:14:00 +02:00
```
2026-10-25 17:30:35 +01:00
This is the `2026-current/` folder of the hexapod-robot repo; the earlier
generations (2009 onwards) are in the folders next to it, see
[../README.md ](../README.md ).
2026-09-28 18:14:00 +02:00
## Build (PlatformIO)
```
pio run # build both
pio run -e robot -t upload
pio run -e remote -t upload
pio device monitor -e robot
```
2026-09-29 00:37:12 +02:00
## Simulation
2026-10-25 17:30:35 +01:00
From this `2026-current` folder in PowerShell (the dev PC is Windows):
2026-09-29 00:37:12 +02:00
```
.\sim\build.ps1 # build hexapod_sim.dll + run the headless firmware checks
```
Then open `Hexapod_Simulation_Unity` and press Play. See
[sim/README.md ](sim/README.md ).
2026-11-14 18:57:49 +01:00
## Printing the remote (v2)
STLs in [hardware/openscad/stl/remote_v2/ ](hardware/openscad/stl/remote_v2/ ),
already in print orientation; everything prints in ASA without supports.
Regenerate them from `remote_v2.scad` with `-D 'PART="..."'` .
| File | Part | Notes |
|------|------|-------|
2026-11-14 22:12:02 +01:00
| `remote_v2_top_inlays.3mf` | top shell with both inlays | One object with three parts on filaments 1/2/3: case black, honeycomb red, ON/OFF white. The inlays are the first 3 layers (0.6 mm) of the face-down shell, so the colour swaps only happen there. Made by `hardware/openscad/export_3mf.py` from the three STLs below |
2026-11-14 18:57:49 +01:00
| `remote_v2_top.stl` + `_inlay.stl` + `_text.stl` | the same, as STLs | Load the three at once and keep them as one multi-part object |
2026-11-14 22:12:02 +01:00
| `remote_v2_top_multicolor.3mf` | OrcaSlicer project (owner) | all parts on two plates; after re-exporting STLs, update its parts with Orca's "Reload from disk" |
2026-11-14 18:57:49 +01:00
| `remote_v2_bottom.stl` | bottom shell | flat underside on the bed |
| `remote_v2_kickstand.stl` | table stand | |
| `remote_v2_eyelet.stl` | neck-strap eyelet | on the top face (slots to balance it) or on the front edge |
| `remote_v2_bail.stl` | body brace | swings down and back to rest against your body |
Hardware (besides the electronics of the old remote):
- 14 x M3 heat-set inserts (4.0 mm hole, ~5.7 mm long): 4 shell screws,
2 + 2 eyelet (top and front), 2 brace pivots, 4 main-board clamps
- M3 x 12 x 4 (shells), M3 x 8 button head x 2 (eyelet), M3 x 16 button
head + washer x 2 (brace), M3 x 8 button head + 7 mm washer x 4 (main
board clamps, no holes in the board), M3 x 40 + nut (kickstand pin)
2026-11-17 22:50:48 +01:00
- M2.5 x 14 x 8 (joysticks, into their own boxes), M3 x 5 machine screws x 4
(display, tap the posts M3), M3 self-tapping x 2 (UPS board), M2 self-tapping x 2 (switch)
2026-11-17 22:52:44 +01:00
- The display is mounted turned round so its connector clears the Teensy's USB
plug. `remote.HMI` is generated for that (display direction 270 in the
Editor's terms, see [remote/NEXTION.md ](remote/NEXTION.md )), nothing to set.
2026-11-14 18:57:49 +01:00
Design notes, checks and open points: [hardware/openscad/PLANNING.md ](hardware/openscad/PLANNING.md ).
2026-11-14 19:13:28 +01:00
## Planned
2026-11-17 22:52:44 +01:00
- **PC radio link:** a USB nRF24L01 stick on the PC as the PC-side radio, on
the same air settings as the robot and the remote. It's reverse-engineered
and runs our own firmware (STM32F030 + Si24R1 + AT2401C, updated wire-free
over USB), see ** [dongle/README.md ](dongle/README.md )**. Done (2026-11-17):
its **bridge mode** lets the real remote drive the Unity simulation over the
air, with the sim's telemetry going back to the remote's display as the ack
payload ([sim/README.md ](sim/README.md ), "Using it in Unity"). There's no USB
link to the remote or the robot any more; everything goes over the radio.
Still to do:
- Unity driving the **real** robot (the dongle transmitting instead of
listening) and mirroring it;
- three nodes at once: today the dongle answers the remote *instead of* the
robot. Needs an address per node (or per pipe), a packet type byte, and a
rule for who has priority. Owner's decisions: the remote wins, with a
toggle on the remote that hands the robot to Unity and lets the remote's
sticks control Unity instead; the PC is the hub while it's online, the
robot is the hub when it isn't; goals: mirror the real robot in Unity,
drive it from Unity, remote data to the PC, and PC data to the remote.
- Remote battery level: see [remote/README.md ](remote/README.md ), "Planned".
2026-11-14 19:13:28 +01:00
- Robot power: a stable 6 V supply for the 18 servos, see
[hardware/openscad/PLANNING.md ](hardware/openscad/PLANNING.md ), "Notes for
future designs".
2026-09-28 18:14:00 +02:00
## Where to go next
- **[robot/README.md ](robot/README.md )**: placeholder geometry to measure,
the bench-check checklist, and the serial test harness for driving the
robot without a remote.
- **[remote/README.md ](remote/README.md )**: wiring, control scheme, stick
calibration, and the remote's serial console.
2026-11-17 22:54:10 +01:00
- **[remote/NEXTION.md ](remote/NEXTION.md )**: the touchscreen HMI (generated
by `scripts/make_remote_hmi.py` ).
- **[sim/README.md ](sim/README.md )**: the robot firmware in simulation, headless
and in Unity, with the keyboard or the real remote over the radio.
- **[dongle/README.md ](dongle/README.md )**: the USB nRF24 stick, its firmware,
flashing and the bridge protocol.
2026-09-28 18:14:00 +02:00
- **[shared/HexapodProtocol/HexapodProtocol.h ](shared/HexapodProtocol/HexapodProtocol.h )**:
the protocol. Change it only by reflashing both boards.