Skip to the content
2 layers79.4 × 72.9 mmMain v2, the printed circuit board in 3D

This project was designed with simplicity and practicality in mind, focusing on essential functions like jogging and basic machine control (start/stop/pause) rather than attempting to replicate all CNC controller…

Size
79.4 × 72.9 mm
Copper layers
2
Thickness
1.08 mm
Parts
27
Nets
29
Pads
145
Tracks, vias
252, 40
Pours
8
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
3 May 2024
Updated
21 Mar 2026

Overview

Main v2 is an open-source printed circuit board by etet100, from the etet100/cnc_pendant repository on GitHub. It is a 2-layer board of 79.4 × 72.9 mm with 27 parts on 29 nets, routed with 252 tracks and 40 vias.

It is built around the PCA9536D, SS14 and SI2306. Its parts include 7 resistors, 6 capacitors, 3 ICs, 3 connectors and 3 switches.

Main components

3

README

README.md

CNC Pendant - Wireless Controller for Genmitsu 4040 CNC Mill

Note: This is a work in progress. The project is under active development and contributions are welcome! If you're interested in helping with the firmware, hardware design, or adding support in CNC control software, please feel free to reach out or submit pull requests.

Project Description

CNC Pendant is a peripheral device based on ESP8266 that serves as a wireless controller for the Genmitsu 4040 CNC mill. The device allows for controlling the machine axes, monitoring the machine state, and executing basic control operations through a touch interface and rotary knob.

This project was designed with simplicity and practicality in mind, focusing on essential functions like jogging and basic machine control (start/stop/pause) rather than attempting to replicate all CNC controller features.

The entire project, including electronics design, firmware development, and 3D-printed enclosure, is original work (excluding the ESP8266 module and display components).

Hardware Specifications

  • Main Processor: ESP8266EX
  • Display: 3.2" Capacitive Touch Screen (240x320 pixels) - Product Link
  • Control Knob: AS5600 magnetic encoder
  • Communication: WiFi (wireless) and USB options
  • Power: Currently USB-powered with plans for battery operation in future versions
  • Configuration Storage: External I2C EEPROM
  • Other Components: PCA9536 controller (pin management), physical buttons
  • Enclosure: Custom 3D-printed case

Hardware & Screenshots

Physical Hardware

Device Front View Device Angle View Device Side View

Interface Screenshots

Screenshot 1 Screenshot 2

Functionality & Controls

The pendant focuses on delivering essential CNC control functions in a user-friendly package:

Primary Features

  • Axis Jogging: Control machine movement using the physical rotary knob after selecting an axis
  • Basic Machine Control: Start, stop, and pause operations directly from the pendant
  • Status Monitoring: View machine status and position information on the display

Control Interface

  • Touch Screen: Most functions are accessible through the touch interface
  • Rotary Knob: Provides precise control for axis jogging
  • Physical Buttons:
    • Three dedicated buttons for quick feed/step value selection (added based on user testing for speed of operation)
    • Additional button beneath the knob intended for emergency stop functionality

Main Software Modules

1. Communication Module (WirelessCommunicator)

  • Handles WiFi communication between the pendant and the CNC controller
  • Implements TCP protocol for data exchange
  • Handles buffering and error checking (CRC)
  • Maintains connection and detects connection loss

2. State Module (State)

  • Tracks current axis positions (X, Y, Z)
  • Monitors CNC machine state (idle, alarm, running, etc.)
  • Provides data to the user interface

3. User Interface (Screen, MainPage, Drawable)

  • Displays the interface with current machine status
  • Handles touch interactions
  • Shows status indicators (WiFi, machine state, etc.)
  • Implements axis control widget

4. Knob Control (Wheel)

  • Reads rotations from the AS5600 magnetic encoder
  • Provides direction and speed data
  • Works in conjunction with active axis selection for control

5. Configuration Management (ConfigManager)

  • Saves and loads configuration from EEPROM memory
  • Stores WiFi settings, server address, and other parameters
  • Handles default configuration when no saved settings are found

6. Event Handling (EventManager)

  • Central event handling system
  • Allows communication between modules through event system
  • Handles button events, state updates, WiFi connection changes

7. Button and Touch Screen Handling (Touch, Buttons)

  • Reads touch from the FT6206 controller
  • Handles physical buttons
  • Maps touch events to appropriate actions

Communication Options

The device offers two connectivity options:

  • WiFi communication: Primary wireless connection method
  • USB communication: Alternative connection option

Currently, the pendant requires USB power regardless of the selected communication method. Future plans include adding battery power support, although power consumption of the LCD display is a concern that needs to be addressed.

Communication Protocol

The device communicates with the CNC controller using a custom TCP/IP-based protocol that includes:

  • Packets with an identification header (0xAA55)
  • Various message types (state, configuration, ping)
  • CRC verification to ensure data integrity

Development Environment

The project was created using:

  • Arduino Framework
  • PlatformIO as the development environment
  • Libraries: Adafruit ILI9341, Adafruit GFX, ESPAsyncTCP, and others

Technical Implementation Details

Performance Optimization

The firmware was heavily optimized to work efficiently on the relatively modest ESP8266 platform, which was an intentional choice for this project. Key optimization strategies include:

  • Hardware-Accelerated Graphics: Code leverages the hardware capabilities of both the processor and display wherever possible
  • Efficient UI Rendering: Custom drawing procedures to avoid full-screen redraws
  • Partial Screen Updates: When popup windows appear, the underlying interface remains active
  • Clipping Algorithms: Text and elements that would be covered by overlays are efficiently clipped rather than redrawn
  • Memory-Conscious Design: Due to RAM limitations, buffer-based rendering techniques were avoided in favor of direct drawing

The UI design makes specific technical compromises (such as full-width popup windows) to enable these optimizations, prioritizing performance and responsiveness over visual complexity.

Compatibility & Support

This pendant is a custom device and currently does not have standard support in any commercial CNC control software or hardware. Development is underway to add support in the Candle CNC control program.

Testing Tools

  • Windows simulator/debugger for development without hardware
  • Hercules (TCP testing software)
  • TcpTerminal

Windows Simulator

A Windows simulator is included for development and testing without hardware. The simulator is based on Qt (tested with Qt 6.9.1 on Windows). To run the simulator, simply open the Pendant.pro file in QtCreator and build the project—no special configuration should be required.

Contributing

Contributions to this project are welcome! Whether you're interested in:

  • Adding new features to the firmware
  • Improving the hardware design
  • Creating support in additional CNC control software
  • Optimizing performance
  • Improving documentation

Feel free to fork the repository, make your changes, and submit a pull request. For major changes or new feature ideas, please open an issue first to discuss what you would like to change.

Parts

27
QtyValueFootprintReferences
4100uFCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC1, C2, C5, C6
31kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR5, R6, R7
2100nCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC3, C4
210kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1, R2
2BtnConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2, J3
2SS14Diode_SMD:D_SMAD1, D2
2SW_Pushpendant:SW_Tactile_SPST_Angled_PTS645Vx39-2LFSSW1, SW2
1180Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR4
1220Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR3
124AA02-OTPackage_TO_SOT_SMD:SOT-23-5U2
1AS5600Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ1
1MountingHole_PadMountingHole:MountingHole_6.4mm_M6_DIN965_Pad_TopOnlyH1
1PCA9536DPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU3
1SI2306Package_TO_SOT_SMD:SOT-23Q1
1SW_PushButton_Switch_THT:SW_PUSH_6mm_H7.3mmSW3
1~pendant:NodeMCU_D1_MiniU1
1~pendant:LCDLCD1

More from etet100/cnc_pendant

2
  • 2 layers78.8 × 53.3 mmCnc pendant, the printed circuit board in 3D

    Cnc pendant

    etet100/cnc_pendant

    This project was designed with simplicity and practicality in mind, focusing on essential functions like jogging and basic machine control (start/stop/pause) rather than attempting to replicate all CNC controller…

    17 parts
  • 2 layers51.4 × 66.7 mmMain nodemcu, the printed circuit board in 3D

    Main nodemcu

    etet100/cnc_pendant

    This project was designed with simplicity and practicality in mind, focusing on essential functions like jogging and basic machine control (start/stop/pause) rather than attempting to replicate all CNC controller…

    16 parts

Similar boards

  • 2 layers139.7 × 88.9 mmCharge Controller, the printed circuit board in 3D

    Charge Controller

    jharvey/Charge_Controller

    MPPT hardware which uses FUGU firmware

    163 parts24
  • 2 layers30 × 30 mmBlewatch, the printed circuit board in 3D

    Blewatch

    jim-kirisame/LotWatch

    A BLE Watch using nrf51822

    27 parts22
  • 2 layers80.5 × 40.8 mmSaucey - Copy, the printed circuit board in 3D

    Saucey - Copy

    Vulcan758/Saucey-Flight-Controller-PCB

    This is a design repository for an ESP32 based flight controller I made

    58 parts
  • 2 layers80 × 36.6 mmSerial number, the printed circuit board in 3D

    Serial number

    PurkkaKoodari/ktane-hw

    Fully playable hardware implementation of Keep Talking and Nobody Explodes. Mirror of https://gitlab.com/PurkkaKoodari/ktane-hw

    28 parts2MIT
  • 4 layers93 × 53.4 mmHL2IOBoard, the printed circuit board in 3D

    HL2IOBoard

    jimahlstrom/HL2IOBoard

    A PCB added to the HL2 with IO resources to control filters and antennas

    117 parts56
  • 2 layers155.9 × 91.9 mmPavu Mixer Prototype, the printed circuit board in 3D

    Pavu Mixer Prototype

    Rahix/pavu-mixer

    "Hardware Mixer" for PulseAudio

    81 parts25

Questions

How big is the Main v2 PCB?

It measures 79.4 × 72.9 mm and has 2 copper layers, 1.08 mm thick.

What parts does the Main v2 use?

27 parts, built around the PCA9536D, SS14 and SI2306. 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 Main v2 KiCad files?

From the etet100/cnc_pendant repository on GitHub, at the commit this page was made from: the board is pcb/main_v2/main_v2.kicad_pcb and its schematic pcb/main/export/main_fin.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Main v2 design in my own project?

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