Skip to the content
PCBKitNew board
2 layers60.5 × 68 mmChopper Head, the printed circuit board in 3D

Chopper head firmware — servo animations, NeoPixel effects, web dashboard, encrypted ESP-NOW

Size
60.5 × 68 mm
Copper layers
2
Thickness
1.6 mm
Parts
10
Nets
30
Pads
54
Tracks, vias
86, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
13 Aug 2026
Updated
9 Sep 2026

Overview

Chopper Head is an open-source printed circuit board by andcoderes, from the andcoderes/Chopper-Head repository on GitHub. It is a 2-layer board of 60.5 × 68 mm with 10 parts on 30 nets, routed with 86 tracks and 0 vias.

Its parts include 7 connectors and 2 resistors.

README

README.md

Chopper Head V2

Acknowledgments

This firmware was strongly influenced by the Amidala firmware by thePunderWoman.

Firmware for Chopper (C1-1OP) head built on the ESP32-WROOM-32. Controls servo animations, RGB LED lighting effects, and communicates wirelessly with a main controller via ESP-NOW.

Features

  • Servo animations — Arms, periscope, and greeting motions driven by a Pololu Maestro controller over UART
  • RGB LED effects — Jewel eyes (7-pixel each), ladder (11-pixel), center eye, and periscope lights with pulsing, bouncing, and color-change animations
  • ESP-NOW communication — Encrypted peer-to-peer wireless protocol for low-latency remote control
  • Web interface — Device dashboard, real-time serial monitor, and command sender
  • OTA firmware updates — Upload new firmware over WiFi through the web interface
  • Unit tests — Native-platform tests with mock hardware abstractions

Hardware

ComponentDetails
MicrocontrollerESP32-WROOM-32
Servo controllerPololu Maestro (UART2, GPIO 16 TX / GPIO 17 RX)
Left jewel eyeNeoPixel, 7 pixels, GPIO 4
Right jewel eyeNeoPixel, 7 pixels, GPIO 18
Center eyeNeoPixel, 1 pixel, GPIO 5
LadderNeoPixel, 11 pixels, GPIO 19
PeriscopeNeoPixel, 1 pixel, GPIO 2

PCB design files are in the PCB/ directory.

Project Structure

text
src/
  main.cpp                    Entry point and main loop
  config.h                    Pin definitions, MAC addresses (keys come from secrets.h)
  lights/                     LED control (JewelEye, Ladder, PixelLight, LightController)
  servo/                      Pololu Maestro servo scripts
  communication/              ESP-NOW receiver and message types
  web/                        Embedded web server, logging, serial buffer
include/
  web_pages.h                 Auto-generated embedded HTML (built by scripts/embed_web.py)
  secrets.h                   Auto-generated ESP-NOW keys (built by scripts/load_secrets.py), gitignored
web/                          Web UI source files (HTML, CSS)
test/                         Unit tests and hardware mocks
scripts/
  embed_web.py                Pre-build script that inlines web assets into firmware
  load_secrets.py             Pre-build script: .env -> include/secrets.h
partitions/
  ota_4MB.csv                 OTA partition table
PCB/                          PCB design and CNC routing files
.env.example                  Template for ESP-NOW keys — copy to .env

Prerequisites

Setup

  1. Clone the repository and open it in VS Code.

  2. Set up .env — see Generating ESP-NOW keys below. This covers PMK_KEY/LMK_KEY, CONTROLLER_MAC, and WIFI_AP_PASSWORD. The build fails with a clear error if .env is missing.

  3. Optionally edit src/config.h:

    • Change WIFI_AP_SSID if desired.
  4. Build the firmware:

    bash
    pio run -e esp32dev
  5. Upload to the ESP32:

    bash
    pio run -e esp32dev -t upload
  6. Open the serial monitor:

    bash
    pio device monitor -b 115200

Web Interface

Connect to the ChopperHead WiFi access point, then open one of:

  • http://chopper.head
  • http://chopper.local
  • http://192.168.5.2

Pages

PageDescription
HomeDevice info — firmware version, MAC address, uptime, heap memory, ESP-NOW status
Serial MonitorReal-time log viewer with command buttons and macro sender
Firmware UpdateOTA upload with progress tracking

API

EndpointMethodDescription
/api/infoGETDevice telemetry (JSON)
/api/monitorGETLive log stream (JSON)
/api/commandPOSTSend button or macro commands

Controls

Button Commands (via controller or web)

ButtonAction
YToggle arms in/out
XSay hi (both arms)
BSay hi (left arm)
D-pad UpPeriscope up
D-pad DownPeriscope down
D-pad Left/RightPeriscope animation

Macros

Macro IDEffect
101Red eye animation
103Periscope up sequence
107Custom animation

Communication Protocol

The head communicates with the controller using packed structs over ESP-NOW:

HeadCommand (controller → head): button presses, macro sequences, volume, idle mode, and connection status.

HeadTelemetry (head → controller): connection state, animation status, and uptime. Sent every 1 second.

Connection is considered lost after 5 seconds without data.

Running Tests

Unit tests run on the native platform (no hardware required):

bash
pio test -e native

Tests cover: LightController, ServoController, ESP-NOW controller, JewelEye, PixelLight, MessageTypes, and startup animation.

Generating ESP-NOW keys

This board talks to the other Chopper boards over encrypted ESP-NOW. Before your first build, generate two 16-byte (128-bit) keys — a Primary Master Key (PMK) and a Local Master Key (LMK) — and put them in a .env file (gitignored, never commit it) at the project root:

bash
cp .env.example .env

Generate two random 16-byte keys, each as 32 hex characters:

bash
# Option 1: openssl
openssl rand -hex 16   # run twice — once for PMK_KEY, once for LMK_KEY

# Option 2: python
python3 -c "import secrets; print(secrets.token_hex(16))"

Edit .env and paste the values in:

text
PMK_KEY=<first random hex string>
LMK_KEY=<second random hex string>

These two keys must be byte-for-byte identical across chopper body, chopper head, and chopper receiver — generate them once and copy the same .env values into all three projects. Mismatched keys mean the boards can't decrypt each other's ESP-NOW packets and the mesh will never connect.

.env also holds CONTROLLER_MAC — the controller's WiFi MAC address (as hex, e.g. C0CDD6CA29E0), which must likewise be identical across all three firmware projects — and WIFI_AP_PASSWORD, the password for this board's local OTA-update access point (pick your own, at least 8 characters; unlike the other values, this one doesn't need to match the other boards).

scripts/load_secrets.py runs automatically before every build (see platformio.ini) and turns .env into include/secrets.h, which config.h includes. Neither .env nor the generated secrets.h are committed to git.

License

All rights reserved.

Parts

10
QtyValueFootprintReferences
11KResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1
12KResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR2
1Power InConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ6
1RX/TX/GNDConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ8
1center_eyeConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ3
1ladderConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ4
1left_eyeConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ1
1periscope pixelConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ5
1right_eyeConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2
1~custom:ESP32_30pinchopper_head1

Questions

How big is the Chopper Head PCB?

It measures 60.5 × 68 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Chopper Head use?

10 parts. 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 Chopper Head KiCad files?

From the andcoderes/Chopper-Head repository on GitHub, at the commit this page was made from: the board is PCB/Chopper_head/Chopper_head.kicad_pcb and its schematic PCB/Chopper_head/Chopper_head.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Chopper Head design in my own project?

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

Similar boards

  • 2 layers57 × 55.2 mmLogicAnalyzer, the printed circuit board in 3D

    LogicAnalyzer

    gusmanb/logicanalyzer

    24 channel, 100Msps logic analyzer hardware and software

    10 parts5.1kGPL-3.0
  • 2 layers32.2 × 15.4 mmProtector, the printed circuit board in 3D

    Protector

    byrantech/laptop

    anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

    10 parts4.3kMIT
  • 2 layers26 × 18 mmConn, the printed circuit board in 3D

    Conn

    yaqwsx/KiKit

    Automation tools for KiCAD

    10 parts2.1kMIT
  • 2 layers44.3 × 30.5 mmLime2-SATA RevA, the printed circuit board in 3D

    Lime2-SATA RevA

    OLIMEX/OLINUXINO

    OLINUXINO is Open Source / Open Hardware, low cost from EUR 24 Linux Industrial grade Single Board Computer capable to operate -25+85C

    10 parts1.5k
  • 2 layers17.8 × 43.2 mmNano Adapter, the printed circuit board in 3D

    Nano Adapter

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    10 parts1.1kGPL-3.0
  • 2 layers53.9 × 23.2 mmBuffer, the printed circuit board in 3D

    Buffer

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    10 parts1kGPL-3.0