Altera Agilex 3 FPGA Stepper Motor Control for CNC Retrofits
Key Highlights
- Utilizes an Altera Agilex 3 FPGA on a Terasic Atum A3 Nano Board for high-performance control.
- Integrates Arduino UNO R4 Wi-Fi for enhanced connectivity and microcontroller capabilities.
- Employs STMicroelectronics X-NUCLEO-IHM03A1 expansion boards for precise stepper motor control.
- Provides a cost-effective alternative to full system replacement, extending legacy machine usability.
- Offers hands-on experience with FPGA logic design, SPI communication, and CNC system integration.
By Jean-Jacques DeLisle for Mouser Electronics
Published June 12, 2026
Retrofitting legacy computer numerical control (CNC) equipment presents both a challenge and an opportunity. Older machines are often still mechanically sound but rely on proprietary or unsupported control electronics that prevent integration with modern software tools and workflows. Replacing an entire CNC system can be expensive and inflexible, while off-the-shelf retrofit solutions may limit customization or experimentation. This project explores an alternative approach: using a field-programmable gate array (FPGA)-based control architecture to create a prototype for modernizing legacy CNC hardware while preserving full control over the system design.
Project Materials & Resources
Project Bill of Materials (BOM)
- Terasic Technologies Atum A3 Nano Board
- Arduino UNO R4 Wi-Fi®
- STMicroelectronics X-NUCLEO-IHM03A1 Expansion Board (×3)
- Bidirectional logic level shifter module (4-channel or 8-channel)
- Stepper motor in a four-, six-, or eight-wire configuration (×3)
- 5V/3A direct current (DC) power supply (for the Terasic Technologies Atum A3 Nano Board)
- 5–50VDC power supply(s) appropriate for your motor(s), current-rated for total load; tie grounds common
- PC (Windows or Linux)
- Multimeter
- Soldering iron
- Jumper wires
- Small screwdriver
Software and Downloads
- Quartus Prime Pro Software (latest version) and associated licenses
- Altera Agilex 3 C-Series FPGA Software (latest license version of Agilex 3 Device Support)
- Agilex common files
- USB Blaster III Driver (latest version; part of Quartus Prime Pro Software)
- UART FTDI Driver (latest version; part of Quartus Prime Pro Software)
- Arduino IDE
- Ponoor PowerSTEP01 Library v 1.1.0 (available through the Arduino IDE)
Project Code
- Project repository on GitHub
- ard_control.ino (developed for this project)
- fpga_control.v (developed for this project)
Helpful Documents
- STMicroelectronics X-NUCLEO-IHM03A1 Expansion Board Datasheet
- STMicroelectronics X-NUCLEO-IHM03A1 User Manual
- Terasic Atum A3 Nano Board Getting Started Guide
- Terasic Atum A3 Nano Board User Manual
- Terasic Atum A3 Nano Board My First FPGA
Project Technology Overview
This project article describes how to build and test a multi-axis stepper motor control system using an Altera Agilex 3 FPGA on a Terasic Technologies Atum A3 Nano Board, working alongside an Arduino-based SPI motor-control stack (Figure 1). Three stepper motors—corresponding to the x-, y-, and z-axes of an old CNC milling machine—are reverse-engineered, rewired, and driven through FPGA-selected Serial Peripheral Interface (SPI) chip-select logic. Pushbuttons and switches on the Atum A3 Nano Board provide immediate, hardware-level control and visual feedback, illustrating how FPGAs can act as highly flexible CNC interface devices.
This advanced project provides experience with FPGA-based logic, SPI communication, and CNC system retrofits. By completing this project, readers will gain practical insight into how modern programmable logic can extend the life and capability of legacy machines while laying the groundwork for more advanced CNC interfaces, including PC control and G-code interpretation.
While not strictly required, experience with Quartus Prime, Verilog HDL, FPGAs, Arduino UNO, SPI communications, and stepper motor drivers will make the project easier to follow and implement.
Terasic Technologies Atum A3 Nano Board
The Terasic Technologies Atum A3 Nano Board is a compact FPGA development platform built around the Altera Agilex™ 3 FPGA. The FPGA, offered in its largest configuration with around 135K logic elements, leverages Altera’s HyperFlex architecture and integrates advanced features such as dual Arm® Cortex®-A55 cores and hardened peripherals, enabling significantly higher performance than earlier Cyclone® V FPGAs, along with faster transceivers and support for modern memory, such as LPDDR4.
Arduino UNO R4 Wi-Fi
The Arduino UNO R4 Wi-Fi combines a 32-bit Renesas RA4M1 microcontroller—based on a 48MHz Arm Cortex-M4 core with an integrated ESP32-S3 module to deliver built-in Wi-Fi and Bluetooth® connectivity. This dual-processor architecture provides substantially expanded memory—256kB flash, 32kB SRAM, and 8kB EEPROM—along with enhanced performance and peripherals, including a real-time clock, digital-to-analog converter (DAC), and CAN bus.
STMicroelectronics X-NUCLEO-IHM03A1 Expansion Board
The STMicroelectronics X-NUCLEO-IHM03A1 Expansion Board is a high-power stepper motor driver platform built around the advanced powerSTEP01 controller, delivering precise and efficient motor control. It enables fully digital motion control with programmable speed profiles, positioning calculations, and a comprehensive set of protection features, providing both high performance and robustness for demanding applications. The board supports a wide operating range, handling supply voltages from 10.5V to 50V and phase currents up to 10A RMS, while offering fine motor control through up to 1/128 micro-stepping and features such as sensorless stall detection and overtemperature protection. Designed for flexibility, it is compatible with Arduino UNO R3/R4 connectors and can be stacked with additional boards to drive up to three stepper motors, making it a scalable and easy-to-integrate solution for industrial, robotics, and motion-control applications.
>>Click to read the entire article at Mouser
About the Author

