
LevelShifter
gusmanb/logicanalyzer
24 channel, 100Msps logic analyzer hardware and software

FPGA-driven CNC / pen-plotter control system built around the AMD/Xilinx Zynq-7000 ZedBoard. The machine uses a ballpoint pen as its toolhead and draws 2D paths on paper by coordinating X/Y motion and pen lift on the Z axis.
CNC FPGA Driver PCB is an open-source printed circuit board by AmZu1212, from the AmZu1212/CNC-FPGA repository on GitHub. It is a 2-layer board of 77.5 × 57.5 mm with 21 parts on 19 nets, routed with 144 tracks and 0 vias.
It belongs with the fPGA and programmable logic and robots and motor control boards and the FPGA and CPLD boards of this library.
Authors: Amir Zuabi, Alexey Vassiliev Project Instructor: Oz Shmueli
Tech Stack: Verilog HDL, Embedded C, AMD Vitis + Vivado 2024.2
FPGA-driven CNC / pen-plotter control system built around the AMD/Xilinx Zynq-7000 ZedBoard. The machine uses a ballpoint pen as its toolhead and draws 2D paths on paper by coordinating X/Y motion and pen lift on the Z axis.
The project combines:
This project implements a complete CNC-style execution pipeline:
RUN.G file is placed on an SD cardThis is done using:
This project required work across several domains:
Digital design Custom Verilog modules for command handling, motion coordination, handshaking, and driver control.
Embedded systems C firmware for SD card access, G-code parsing, register writes, modal state handling, and PS/PL synchronization.
System integration Vivado block design, AXI GPIO mapping, platform export, Vitis application flow, FPGA programming, and serial debugging.
Motion control Coordinated X/Y/Z movement, homing, safe Z raises, speed handling, cancellation, and return-to-home logic.
Debugging and validation Timing-sensitive PS/PL handshakes, startup behavior, stale register hazards, parsing corner cases, and hardware execution issues.
The programmable logic is responsible for deterministic motion execution:
Key RTL modules include:
GCODE_ParserXYZ_Axis_CoordinatorDriverControllerThe processing system is responsible for file-driven command preparation:
RUN.GThe current software parser focuses on the motion subset needed for the machine workflow.
Supported behavior:
G0 and G1X, Y, Z, and FX/Y/Z: mm -> micronsF: mm/min -> mm/sExpected input file:
RUN.GZedboard-CNC/
Vivado hardware project, RTL, block design, and generated hardware artifacts.
Vitis-Classic/
Vitis Classic workspace and platform/application projects.
Vitis3/
Vitis Classic workspace and platform/application projects. (the project is programmed to the board from here)
Documentation/
Sample G-code files, hex files, reference material, project assets, etc.
Use Vivado when you need to:
For normal use, the project should be launched directly from the existing Vitis Classic setup.
For the normal checked-in working flow, no rebuild is required just to run the design if the workspace is already in a valid state.
When using runtime prints:
1152008-N-1The diagram above shows one complete motor assembly using the PMOD top A
cluster, an A4988 driver, a Nema 17 stepper motor, a limit switch, and a
12V-to-3.3V step-down supply. The same wiring pattern is reused for each axis.
Additional connections from the driver assembly:
2B, 2A, 1A, 1B connect to the Nema 17 motor phases.VM is powered from the 12V supply.VDD is powered from the step-down 3.3V output.100 uF capacitor is placed across the motor supply near the A4988 driver.12V, 3A DC input supply.12V at 3A.The remaining PMOD clusters use the same signal order:
A: X axisB: Z axisC: Y axisThe table below shows the shared signal order for all three PMOD motor clusters.
| Pin # | PMOD Pin Name | Signal Definition | A4988 / External Connection |
|---|---|---|---|
1 | JA1 / JB1 / JC2_P | DIR | A4988 DIR |
2 | JA2 / JB2 / JC1_N | STEP | A4988 STEP |
3 | JA3 / JB3 / JC1_P | RST | A4988 RST |
4 | JA4 / JB4 / JC2_N | LSS | Limit switch signal |
5 | GND / GND / GND | LS- | Limit switch return |
6 | VCC / VCC / VCC | LS+ | Limit switch V+ |
7 | JA7 / JB7 / JC3_P | EN | A4988 EN |
8 | JA8 / JB8 / JC3_N | MS1 | A4988 MS1 |
9 | JA9 / JB9 / JC4_P | MS2 | A4988 MS2 |
10 | JA10 / JB10 / JC4_N | MS3 | A4988 MS3 |
11 | GND / GND / GND | GND | A4988 GND / common ground |
12 | VCC / VCC / VCC | SLP | A4988 SLP / 3.3V logic rail |
The software and hardware communicate through AXI GPIO-backed registers.
The interface uses a small request/acknowledge handshake between the Processing
System (PS) and Programmable Logic (PL). The PL raises MOUNT_REQ when it wants
the PS to open and prepare a job. The PS answers with MOUNT_OK or MOUNT_FAIL.
After that, the PL requests the next motion entry by changing REQ. The PS writes
X, Y, Z, SPEED, and LAST_LINE, then updates ACK to the same phase only
after the data is ready. Matching REQ and ACK tells the PL that the next
motion command is valid and can be executed.
| Direction | Register Name | Purpose |
|---|---|---|
| PS → PL | X | Next command X position written by the C application. |
| PS → PL | Y | Next command Y position written by the C application. |
| PS → PL | Z | Next command Z position written by the C application. |
| PS → PL | SPEED | Speed value associated with the current motion command. |
| PS → PL | ACK | Phase acknowledge register. Updated only after the new command data is valid. |
| PS → PL | MOUNT_OK | Indicates that the PS mounted the SD card and opened the job successfully. |
| PS → PL | MOUNT_FAIL | Indicates that the PS could not mount or open the requested job. |
| PS → PL | LAST_LINE | Marks that the currently served motion command is the final valid line in the file. |
| PL → PS | REQ | Phase request register used by the PL to ask for the next motion command. |
| PL → PS | MOUNT_REQ | Session request bit used by the PL to tell the PS to mount and prepare a file. |
RUN.GThe system demonstrates a working end-to-end CNC control path:
This repository represents substantial work in:
RUN.G is the expected job filename on the SD cardA Project by Amir Zuabi & Alex Vassiliev
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | DuPont 1x4 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | StepperX, StepperY_1, StepperY_2, StepperZ |
| 3 | 2x6 DuPont PMOD | Connector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_Vertical | JA, JB, JC |
| 3 | Axis | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | LimitSwitchX, LimitSwitchY, LimitSwitchZ |
| 2 | A4988 Stepper Driver | Module:Pololu_Breakout-16_15.2x20.3mm | A4988 Y Axis Driver, A4988 Z Axis Driver |
| 1 | +100[µF]- | Capacitor_THT:C_Disc_D8.0mm_W2.5mm_P5.00mm | C1 |
| 1 | 12V_Screw_Terminal | TerminalBlock:TerminalBlock_MaiXu_MX126-5.0-02P_1x02_P5.00mm | + 12V - |
| 1 | A4988 N Axis Driver | Module:Pololu_Breakout-16_15.2x20.3mm | A4988 X Axis Driver |
| 1 | C2 | Capacitor_THT:C_Disc_D8.0mm_W2.5mm_P5.00mm | +100[µF]- |
| 1 | C3 | Capacitor_THT:C_Disc_D8.0mm_W2.5mm_P5.00mm | +100[µF]- |
The 17 most common of 21 parts.

gusmanb/logicanalyzer
24 channel, 100Msps logic analyzer hardware and software

mntmn/amiga2000-gfxcard
MNT VA2000, an Open Source Amiga 2/3/4000 Graphics Card (Zorro II/III), written in Verilog


hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

drandyhaas/KiCadRoutingTools
A set of Python/Rust tools to aid routing in KiCad

Arrow-air/project-quiver
Project Quiver documentation, designs, and project artifacts.


It measures 77.5 × 57.5 mm and has 2 copper layers, 1.6 mm thick.
21 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.
From the AmZu1212/CNC-FPGA repository on GitHub, at the commit this page was made from: the board is CNC-FPGA Driver PCB/CNC-FPGA Driver PCB.kicad_pcb and its schematic CNC-FPGA Driver PCB/CNC-FPGA Driver PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask AmZu1212 before reusing the design.