

NailPrinter PCB
An open-source nail art printer.
- Size
- 233.5 × 103 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 37
- Nets
- 79
- Pads
- 232
- Tracks, vias
- 352, 27
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 16 Sep 2026
- Updated
- 30 Jul 2026
Overview
NailPrinter PCB is an open-source printed circuit board by Novitech3D, from the Novitech3D/Open-Nail-Printer repository on GitHub. It is a 2-layer board of 233.5 × 103 mm with 37 parts on 79 nets, routed with 352 tracks and 27 vias.
It is built around the AO3400, CD4504BM and AO3401. Its parts include 10 connectors, 8 capacitors, 8 resistors, 5 ICs and 2 transistors. It belongs with the ESP32 boards of this library.
Main components
3AO3400
SOT-23-55℃~+150℃ 1 N-channel 1.05nF 1.4V 1.5W 28mΩ@10V 30V 5.8A 77pF N-Channel SOT-23 MOSFETs ROHSGOODWORKMOSFETsCD4504BM
SOIC-16-55℃~+125℃ 1 5V~15V 5V~15V 6 CMOS Level translator TTL、CMOS Unidirectional SOIC-16 Translators, Level Shifters ROHSTexas InstrumentsTranslators, Level ShiftersAO3401
SOT-231 P-Channel 1.3V 115pF 30V 350mW 4.2A 75mΩ@4.5V 77pF 954pF P-Channel SOT-23 MOSFETs ROHSGuangdong HottechMOSFETs
README
README.mdOpen-Source Inkjet Nail Printer
Overview
This repository contains the hardware schematics, firmware, and software required to build a custom, desktop-scale inkjet nail printer. The system utilizes a standard thermal inkjet (TIJ) cartridge (HP 63) to deposit water-based cosmetic/edible ink directly onto a prepared human nail.
Unlike commercial alternatives that rely on closed-source hardware and DRM-locked consumables, this project provides a fully open architecture. It uses a distributed processing model, offloading high-level computer vision and web serving to a Raspberry Pi, while delegating strict, microsecond-accurate hardware control to an ESP32 microcontroller utilizing I2S Direct Memory Access (DMA).
System Architecture
The project is divided into three distinct operational domains:
1. High-Level Processing (Raspberry Pi 3B+)
- Environment: Python 3, FastAPI, OpenCV.
- Function: Operates in a headless kiosk mode serving a React/Vue frontend to a local touchscreen UI.
- Vision Pipeline: Captures the finger via a fixed-focus, low-distortion downward-facing camera. Allows the user to define a bounding box, warps the selected 2D image using a 1D sine-wave pre-distortion algorithm to map to the nail's curvature, and converts the RGB image into a binary CMYK halftone matrix via Floyd-Steinberg error diffusion.
- Communication: Slices the halftone matrix into 42-byte chunks and transmits them via UART over USB to the ESP32 at 921,600 baud.
2. Real-Time Hardware Control (ESP32)
- Environment: ESP-IDF (C), FreeRTOS.
- Core 0: Dedicated to receiving UART payloads and buffering them into FreeRTOS queues.
- Core 1: Manages electromechanical synchronization. Triggers the I2S DMA peripheral to output perfectly timed 5µs pulses across 12 parallel GPIO pins without CPU blocking.
- Motion Control: Interfaces with TMC2209 stepper drivers for silent, vibration-free gantry movement, utilizing a linear optical encoder and hardware pulse counting (PCNT) for absolute microscopic positional accuracy.
3. Custom PCB & Power Distribution
The electrical architecture is split across two custom KiCad boards to ensure signal integrity and isolate high voltages:
- Stationary Mainboard: Houses the ESP32, TMC2209 drivers, and the central Power Distribution Network (PDN). It steps a 24V DC input down to 16V (Printhead), 9V (Logic Leveling), and 5V (Raspberry Pi/ESP32 supply).
- Smart Carriage: A lightweight, moving PCB connected via a Flexible Flat Cable (FFC). It houses CD4504B CMOS level shifters to step 3.3V data lines to 9V, and a custom P-Channel/N-Channel discrete MOSFET array to switch 16V firing pulses millimeters away from the cartridge's pogo-pin interface, eliminating inductive ringing.
Safety & Hardware Interlocks
A critical feature of this design is the hardware "guillotine" failsafe located on the Smart Carriage.
Thermal inkjet resistors will permanently burn out if held high for more than a few microseconds. To protect against software lockups, the 16V firing lines are routed through an AC-coupled gate drive (capacitive differentiator). An RC time-constant enforces a strict physical timeout of approximately 10-15µs. If the ESP32 freezes while a firing pin is pulled high, the capacitor will charge and autonomously sever the 16V supply to the cartridge, preventing thermal runaway.
Repository Structure
/cad: (In Progress) Onshape mechanical assemblies, STL files, and 3D printable carriage mounts./Nail-printer-embedded: ESP-IDF C source code and FreeRTOS task configurations./NailPrinter_PCB: KiCad 8.0 project files, library symbols, and footprints.
Project Status
Completed Features
- Backend (Raspberry Pi)
- FastAPI server architecture with REST endpoints for system control and design management.
- Computer Vision pipeline: Floyd-Steinberg halftoning (RGB to CMYK), 1D sine-wave nail warping, and manual affine transformations.
- High-speed UART serial protocol (921,600 baud) for ESP32 communication.
- MJPEG camera streaming for real-time nail alignment.
- Frontend (Touchscreen UI)
- Vue 3/Vite application optimized for 7" Raspberry Pi touchscreen.
- Interactive alignment interface with manual bounding box selection.
- Real-time design adjustment (scale, rotation, pan) via overlay.
- Design gallery and "Set" printing workflow for sequential multi-finger printing.
- Firmware (ESP32)
- Dual-core task distribution: UART ingestion on Core 0, motion/sync on Core 1.
- I2S Parallel DMA driver for microsecond-accurate HP 63 cartridge firing.
- TMC2209 stepper driver integration via UART and MCPWM pulse generation.
- Hardware pulse counting (PCNT) infrastructure for linear optical encoder feedback.
- Hardware (KiCad)
- Two-board architecture: Stationary Mainboard and Smart Carriage.
- Power distribution for 24V, 16V (firing), 9V (logic), and 5V (MCU) rails.
- Hardware guillotine failsafe using capacitive AC-coupling.
Pending / TODO
- Firmware
- Implement hardware-level trigger linking PCNT encoder thresholds to I2S DMA output for closed-loop positional accuracy.
- Complete homing sequence logic within limit switch ISR handlers.
- Implement S-curve acceleration ramps for smoother gantry motion.
- Backend
- Replace OpenCV camera capture with native
libcameraorpicamera2for Raspberry Pi hardware. - Implement automated nail segmentation to replace manual bounding box alignment.
- Replace OpenCV camera capture with native
- Hardware
Verify and resolve 9V/3.3V domain crossing alerts in schematic.(Resolved — CD4504B level shifters U3/U4 handle domain crossing on Smart Carriage.)- Add fiducial markers for automated pick-and-place assembly.
- Populate manufacturer part numbers (MPNs) across the Bill of Materials.
- Complete schematic wiring for FFC connector signals (R9-R18 gate resistors to J9).
- Complete PCB routing in KiCad GUI (39 unrouted connections: GND stitching, signal traces, power rails). Fix +9V/+3.3V clearance violation near U4.
- Mechanics
- Finalize and release Onshape CAD assemblies and 3D printable STL files for the gantry and carriage.
Development Milestones
- Software: Implementation of the FastAPI server, Vue UI, and CMYK halftoning pipeline. [DONE]
- Hardware Design: Design and layout of the Mainboard and Smart Carriage PCBs. [DONE]
- Hardware Validation: Manufacture PCBs and confirm functional operation. [TODO]
- Firmware Core: High-speed communication and raw I2S printhead driving. [DONE]
- Motion Control Integration: Synchronization of gantry movement with firmware step generation. [IN PROGRESS]
- Closed-Loop Accuracy: Linking linear optical encoder pulses to hardware-triggered ink deposition. [TODO]
- Kiosk Mode Integration: Final Raspberry Pi OS configuration for standalone touchscreen operation. [TODO]
- System Validation: Full 5-finger print test using water-based cosmetic ink. [TODO]
Prerequisites
- Raspberry Pi OS Lite (64-bit)
- Espressif ESP-IDF v5.x
- KiCad 8.0+
- 24V 3A DC Power Supply
- Modified HP 63 Tri-Color Cartridge (Flushed and refilled with water-based cosmetic/edible ink).
Software Setup
- Clone the repository to the Raspberry Pi.
- Navigate to
backend/and install dependencies:pip install -r requirements.txt. - Configure the Pi to launch the FastAPI server on boot.
- Flash the ESP32 firmware:
idf.py build flash monitor.
License
This project is licensed under the MIT License. See the LICENSE file for details. Note that any proprietary modifications to the HP 63 cartridge footprint are for educational and research purposes only.
Parts
37| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | Conn_01x04 | Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical | J3, J4, J5, J6, J8 |
| 4 | 10n | Capacitor_SMD:C_0805_2012Metric | C3, C4, C7, C8 |
| 4 | 1k | Resistor_SMD:R_0805_2012Metric | R2, R3, R6, R7 |
| 2 | 100n | Capacitor_SMD:C_0805_2012Metric | C5, C6 |
| 2 | 100uF | Capacitor_THT:CP_Radial_D6.3mm_P2.50mm | C1, C2 |
| 2 | 10k | Resistor_SMD:R_0805_2012Metric | R1, R5 |
| 2 | 2.7 | Resistor_SMD:R_0805_2012Metric | R4, R8 |
| 2 | AO3400 | Package_TO_SOT_SMD:SOT-23 | U2, U5 |
| 2 | AO3401 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2 |
| 2 | BTT_TMC2209_V1.2 | Module:Pololu_Breakout-16_15.2x20.3mm | U_TMC_X1, U_TMC_Y1 |
| 2 | CD4504BM | Package_SO:SOIC-16_3.9x9.9mm_P1.27mm | U3, U4 |
| 2 | Conn_01x24 | Connector_IDC:IDC-Header_2x12_P2.54mm_Vertical | J9, J10 |
| 1 | Barrel_Jack | Connector_BarrelJack:BarrelJack_Horizontal | J1 |
| 1 | Conn_01x03 | Connector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_Vertical | J7 |
| 1 | Conn_01x03 | Connector_JST:JST_XH_B3B-XH-AM_1x03_P2.50mm_Vertical | J2 |
| 1 | DEVKIT_V1_ESP32-WROOM-32 | NailPrinter_Parts:MODULE_DEVKIT_V1_ESP32-WROOM-32 | U1 |
| 1 | Fuse | Fuse:FuseHolder_Blade_ATO_Littelfuse_FLR_178.6165 | F1 |
| 1 | SW_SPST | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | SW1 |
Questions
How big is the NailPrinter PCB PCB?
It measures 233.5 × 103 mm and has 2 copper layers, 1.6 mm thick.
What parts does the NailPrinter PCB use?
37 parts, built around the AO3400, CD4504BM and AO3401. 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 NailPrinter PCB KiCad files?
From the Novitech3D/Open-Nail-Printer repository on GitHub, at the commit this page was made from: the board is NailPrinter_PCB/NailPrinter_PCB.kicad_pcb and its schematic NailPrinter_PCB/NailPrinter_PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the NailPrinter PCB design in my own project?
Its repository states no licence, so its author keeps all rights: ask Novitech3D before reusing the design.
Similar boards
- 2 layers91.4 × 52.1 mm

- 2 layers110.5 × 50.8 mm

- 4 layers100 × 100 mm

PerfectV2.1v0
fer-clerkx/speeduino-expo
Speeduino board using Teensy 4.1 adapted from V0.4.4c design
170 parts1 - 4 layers169.2 × 116 mm

- 2 layers82 × 72 mm

- 2 layers55 × 80 mm

Board esp32 v2
sudomesh/disaster-radio
A (paused) work-in-progress long-range, low-bandwidth wireless disaster recovery mesh network powered by the sun.
101 parts1.1k - 2 layers155.5 × 130 mm

Einkpicframe
Spritetm/picframe_colepd
A WiFi picture frame allowing for remote photo uploads, using an ESP32-C3 and a 5.6" color E-ink display
60 parts97 - 2 layers84.3 × 64.5 mm
