Skip to the content
4 layers140.7 × 77.4 mmHexControllerV3 larger, the printed circuit board in 3D

HexControllerV3 larger

TH4R4V3N1324/hexapod-controller

Embedded firmware and hardware-support code for a hexapod robot controller. The repository contains firmware for the handheld/controller interface, an ESP32 wireless receiver, ATtiny1616 left and right boards, and a…

Size
140.7 × 77.4 mm
Copper layers
4
Thickness
1.6 mm
Parts
48
Nets
70
Pads
244
Tracks, vias
400, 60
Pours
4
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
22 Sep 2026
Updated
1 Oct 2026

Overview

HexControllerV3 larger is an open-source printed circuit board by TH4R4V3N1324, from the TH4R4V3N1324/hexapod-controller repository on GitHub. It is a 4-layer board of 140.7 × 77.4 mm with 48 parts on 70 nets, routed with 400 tracks and 60 vias.

It is built around the ESP32-S2-MINI-1-N4R2, AMS1117-3.3 and IP5306, with the COM-16273 and TS-1088-AR02016 among its other parts. Its parts include 13 capacitors, 8 resistors, 8 switches, 7 connectors and 5 diodes. It belongs with the ESP32 boards of this library.

Main components

5

README

README.md

Hexapod Controller

Embedded firmware and hardware-support code for a hexapod robot controller. The repository contains firmware for the handheld/controller interface, an ESP32 wireless receiver, ATtiny1616 left and right boards, and a newer ESP32-S3/LVGL controller implementation.

The system is primarily written in C/C++ and uses PlatformIO, Arduino, and ESP-IDF. Communication is built around ESP-NOW for wireless control packets and I²C for exchanging controller and robot-state data.

Features

  • ESP-NOW wireless control communication
  • I²C communication between the receiver and a controller/master device
  • Packed control and robot-state packet formats
  • Legacy ESP32-S2 Arduino controller firmware
  • ESP32 receiver firmware
  • ATtiny1616 left and right board firmware
  • ESP32-S3 controller V2 architecture
  • LVGL-based display/UI support
  • LCD, touchscreen, IMU, RTC, battery, buzzer, SD-card, and wireless subsystems in V2
  • Hardware schematics and UI design assets

Repository layout

text
controller/
  controller/
    include/              Legacy controller headers
      ControllerLogic.h   High-level controller behavior
      DataPacket.h        Packet definitions
      Display.h           Display abstraction
      I2CManager.h        I²C communication
      Input.h             Joystick and button input
      Pages.h             UI page definitions
      sensors/            Sensor interfaces
    src/                  Legacy controller implementation
      main.cpp            Application entry point
      ControllerLogic.cpp Controller state and behavior
      DataPacket.cpp      Packet handling
      Display.cpp         Display implementation
      I2CManager.cpp      I²C implementation
      Input.cpp           Input handling
      Pages.cpp           Page rendering
      sensors/            Sensor implementations
  schematic/              Hardware schematics
  photoshopPages/         UI design assets
  screenImages/           Display graphics

controllerV2/

System architecture

The controller sends a packed ControlPacket containing joystick values, robot height, a command, and command arguments. The receiver validates the packet size, updates its control state, and sends the latest HexPacket back to the configured controller using ESP-NOW.

The receiver also exposes the current ControlPacket over I²C and accepts updated HexPacket data from the I²C master. I²C is configured as slave address 0x08.

text
Controller UI
     │
     │ ESP-NOW: ControlPacket
     ▼
ESP32 receiver
     │
     ├── ESP-NOW: HexPacket response
     │
     └── I²C slave 0x08
             │
             ▼
       Controller/master

Packet formats

Both packets use packed structures so their byte layouts remain consistent across devices.

ControlPacket

cpp
struct ControlPacket {
    int16_t joystick1X;
    int16_t joystick1Y;
    int16_t joystick2X;
    int16_t joystick2Y;
    int16_t currentHeight;
    Command command;
    int16_t commandArgs[3];
};

Available commands:

text
CMD_NONE
CMD_SET_GAIT
CMD_SET_MODE
CMD_SET_CONFIG
CMD_HOME_STANCE
CMD_REQUEST_CONFIG

HexPacket

cpp
struct HexPacket {
    int16_t legConfigs[3];
    int16_t currentHeight;
    int16_t currentPhase;
    int16_t currentGait;
    int16_t currentMode;
};

The receiver rejects packets whose size does not exactly match the expected structure. Keep field order and types synchronized across all firmware projects.

Requirements

  • Git
  • PlatformIO CLI or PlatformIO for VS Code
  • ESP-IDF for controllerV2/controllerV2
  • A compatible programmer and USB/serial connection for the target board
  • Hardware matching the selected firmware target

Building and uploading

Legacy ESP32-S2 controller

bash
cd controller/controller
pio run
pio run --target upload
pio device monitor --baud 115200

Target configuration:

  • Board: esp32-s2-saola-1
  • Framework: Arduino
  • Display library: olikraus/U8g2
  • Serial monitor: 115200 baud

The PlatformIO configuration currently uses COM4 as the upload port. Change upload_port in controller/controller/platformio.ini for your machine.

ESP32 receiver

bash
cd receiver
pio run
pio run --target upload
pio device monitor --baud 115200

The receiver targets an esp32dev board with the Arduino framework.

Before using the receiver, verify the peer MAC address in receiver/include/CommEspNow.h:

cpp
uint8_t controllerMAC[] = {
    0xFC, 0x01, 0x2C, 0xD9, 0x41, 0xE4
};

The current implementation uses unencrypted ESP-NOW and a hard-coded peer address.

ATtiny1616 left board

bash
cd controllerV2/Left_Board
pio run
pio run --target upload

The project is configured for:

  • Board: ATtiny1616
  • Framework: Arduino
  • CPU frequency: 20 MHz
  • Upload protocol: SerialUPDI
  • Default upload port: COM3

Update upload_port in platformio.ini when necessary.

ATtiny1616 right board

bash
cd controllerV2/Right_Board
pio run
pio run --target upload

The right board uses the same ATtiny1616, Arduino, 20 MHz, and SerialUPDI configuration as the left board.

ESP32-S3 controller V2

bash
cd controllerV2/controllerV2
idf.py set-target esp32s3
idf.py build
idf.py -p PORT flash
idf.py -p PORT monitor

Or run the complete workflow with:

bash
idf.py -p PORT build flash monitor

The V2 project is organized as an ESP-IDF application with LVGL, RGB LCD, touch input, wireless communication, battery monitoring, RTC, IMU, SD-card, buzzer, and I²C subsystems.

Development notes

  • Do not change packet field order or types without updating every sender and receiver.
  • ControlPacket and HexPacket use #pragma pack(push, 1) to prevent compiler padding.
  • ESP-NOW packets are validated by exact byte length.
  • The receiver uses I²C address 0x08.
  • Serial communication is configured for 115200 baud.
  • The PlatformIO projects contain Windows-specific ports such as COM3 and COM4; replace them on other platforms.
  • The ESP-NOW peer is currently configured without encryption.
  • The V2 controller includes an inherited ESP-IDF RGB LCD example README; the V2 source tree contains the project-specific drivers and UI components described above.

Troubleshooting

ESP-NOW packets are rejected

Check that the sender and receiver use the same packed structure definition, field order, and integer widths. The receiver logs the expected and received packet sizes over serial.

The receiver cannot send a response

Verify that:

  1. The controller MAC address in receiver/include/CommEspNow.h is correct.
  2. ESP-NOW initializes successfully.
  3. The controller is configured on the same Wi-Fi channel.
  4. The peer has been added successfully.

I²C data is not exchanged

Verify the wiring, ground connection, master/slave roles, and that the master addresses the receiver at 0x08. Also confirm that the transmitted data size equals sizeof(ControlPacket) or sizeof(HexPacket) as appropriate.

Upload fails

Check the selected serial port, programmer wiring, board power, and upload protocol. The ATtiny1616 projects use SerialUPDI, while the ESP32 projects use their PlatformIO or ESP-IDF upload workflows.

License

No license file is currently included in the repository. Unless a license is added, the code should be treated as all rights reserved.

Contributing

  1. Create a feature branch.
  2. Make changes within the relevant firmware project.
  3. Build the affected PlatformIO or ESP-IDF target.
  4. Test packet compatibility and hardware communication.
  5. Open a pull request with the target board and test setup described.

Parts

48
QtyValueFootprintReferences
622uFSamacSys_Parts:CAPC2012X140NC3, C10, C11, C12, C13, C14
5SW_DIP_x01SamacSys_Parts:DTS62NVSW2, SW3, SW4, SW5, SW6
5~SamacSys_Parts:KP1608SURCKLED1, LED2, LED3, LED4, LED5
2100nFSamacSys_Parts:CAPC2012X95NC4, C6
210kResistor_SMD:R_0805_2012MetricR1, R8
210uFCapacitor_SMD:C_0805_2012MetricC8, C9
25.1kResistor_SMD:R_0805_2012MetricR3, R4
2BatteryBatteryHolder:14500 battery holderJ2, J7
2COM-16273SamacSys_Parts:COM16273VR1, VR2
2TS-1088-AR02016SamacSys_Parts:TS1088AR02016S1, S2
10.5RResistor_SMD:R_0805_2012MetricR6
1100RResistor_SMD:R_0805_2012MetricR2
110uFSamacSys_Parts:CAPPM3216X180NC2
11uFSamacSys_Parts:CAPC2012X135NC5
11uHSamacSys_Parts:XAL40XXL1
120RResistor_SMD:R_0805_2012MetricR7
122uFSamacSys_Parts:CAPPM3528X210NC1
12RResistor_SMD:R_0805_2012MetricR5
1AMS1117-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U2
1ESP32-S2-MINI-1-N4R2SamacSys_Parts:ESP32S2MINI1N4R2IC1
1IP5306SamacSys_Parts:SOIC127P600X165-9NIC2
1RotaryEncoder_SwitchSamacSys_Parts:PEC11L4120FS0020SW1
1Switch1Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3
1Switch2Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ4
1Switch3Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ5
1Switch4Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ6
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_HorizontalJ1
1~Hexapod:WaveShare_2.42inch_SSD1309_OLEDU1

Similar boards

  • 4 layers128.7 × 63.9 mmHexControllerV3, the printed circuit board in 3D

    HexControllerV3

    TH4R4V3N1324/Hexapod

    This repository contains the complete design, control software and documentation for a six-legged walking robot (hexapod).

    49 parts
  • 2 layers80 × 129.1 mmSmart Plant, the printed circuit board in 3D

    Smart Plant

    JGAguado/Smart_Plant

    The Smart Plant is a board that can be plugged directly on the soil, close to the plant, that allows the measurement of the environment (soil moisture, environment temperature & illuminance), and presents the…

    75 parts303
  • 2 layers50.8 × 22.9 mmMinimain esp32-s2, the printed circuit board in 3D

    Minimain esp32-s2

    DepartmentOfAlchemy/minimain-esp32-s2

    PCB files for the MiniMain ESP32-S2 in an Adafruit Feather compatible format.

    39 parts4
  • 2 layers54.7 × 74.3 mmEcn, the printed circuit board in 3D

    Ecn

    leon-uhs/ESP32-RF-Development-Board

    esp32-pico-d4、cc1101、nrf24、sd、ip5306

    67 parts8
  • 4 layers75.5 × 82.7 mmIoT Edge Device V1, the printed circuit board in 3D

    IoT Edge Device V1

    AfriOrbit/SDR-IOT-project

    This project includes all work materials for the SDR and IOT communication systems.

    99 parts
  • 2 layers97.7 × 29.9 mmLine tracer v2, the printed circuit board in 3D

    Line tracer v2

    Anda2012/Open-line-tracer

    ESP32-C3 Mini-1 + Massmore JET QTR-11D A fast and accurate MicroPython line follower using the ESP32-C3 Mini-1 and an 11-channel JET QTR-11D sensor.

    38 partsMIT
  • 2 layers77.9 × 21.1 mmFinal project, the printed circuit board in 3D

    Final project

    Andy-Cheng1017/BlanceCarProject

    大二平衡車專題

    56 parts
  • 2 layers70 × 70 mmTannenbasisV4, the printed circuit board in 3D

    TannenbasisV4

    broedschroed/NeoChristmasTreeV2

    ESP32-powered Christmas tree ornament: 66x WS2812 LEDs on a 4-wing dual-PCB tree, IR remote with learnable sleep timer, browser-based pattern editor, LDR auto-brightness

    69 partsMIT

Questions

How big is the HexControllerV3 larger PCB?

It measures 140.7 × 77.4 mm and has 4 copper layers, 1.6 mm thick.

What parts does the HexControllerV3 larger use?

48 parts, built around the ESP32-S2-MINI-1-N4R2, AMS1117-3.3, IP5306 and COM-16273. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the HexControllerV3 larger KiCad files?

From the TH4R4V3N1324/hexapod-controller repository on GitHub, at the commit this page was made from: the board is controller/schematic/hexControllerV3/hexControllerV3_larger.kicad_pcb and its schematic controller/schematic/hexControllerV3/hexControllerV3.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the HexControllerV3 larger design in my own project?

Its repository states no licence, so its author keeps all rights: ask TH4R4V3N1324 before reusing the design.