Machsupport Forum
Mach Discussion => Mach SDK plugin questions and answers. => Topic started by: SafCNC on November 18, 2026, 11:35:07 AM
-
[RELEASE] SafCNC – open-source Mach3 USB motion plugin for Arduino Uno / Nano
Hi all,
I'm the developer of SafCNC, an open-source Mach3 motion plugin. I wrote most of the code myself, both the Mach3 plugin and the Arduino firmware. It turns a cheap Arduino Uno or Nano (or an STM32 board) into a USB step/direction motion controller for Mach3, so you can run a small machine without a parallel port. The firmware is published in the official Arduino IDE Library Manager, so it can be installed in a few clicks.
As far as I know it is one of the very few Mach3 motion plugins for plain Arduino boards, and it is written in Pascal (Lazarus / Free Pascal) rather than C++. I have deliberately kept the source code clear and easy to follow, so anyone who wants to learn how a Mach3 motion plugin works can read it, study it and build on it.
What it does
* 3-axis step/direction output, GRBL 1.1 / CNC Shield V3 pinout, so existing shields work as-is
* Step rate: up to 32 kHz on Arduino, up to 100 kHz on STM32
* The card reports its speed limit to the plugin; if the Motor Tuning velocities exceed it, the plugin warns you and does not link the card until they are lowered
* Sequence counter and checksum on every packet, 200 ms link watchdog (motion stops if the PC/USB link is lost)
* Limits, probe and E-Stop are handled on the card itself, independently of the PC
Installation
1. Flash the firmware: in the Arduino IDE open the Library Manager, search for "SafCNC", install it and upload the example sketch (File > Examples > SafCNC).
2. Copy SafCNC.dll into Mach3\PlugIns.
3. Start Mach3 and select SafCNC under Config > Control the Motion Device.
4. Connect the board over USB; the plugin finds it automatically.
Links
* Plugin (English source): https://github.com/fikretpalas/SafCNC_Mach3Plugin_en
* Firmware: https://github.com/fikretpalas/SafCNC_Arduino
* Arduino Library Manager: search for "SafCNC" in the Arduino IDE
Please note
This is a new project. Test it with the motors disconnected or the machine in a safe state first, and always have a working hardware E-Stop.
Feedback, bug reports and test results on different machines are very welcome, either here or on GitHub.
Fikret Palas
Developer of SafCNC
https://github.com/fikretpalas
safcnc@tutamail.com
-
My congratulations, you have certainly done a lot of time consuming and excellent work on this project.
I no longer use Mach3 so cannot test this but I hope your motion controller it is a great success.
Although Mach3 is now obsolescent and no longer supported by its developers I am sure Mach3 will continue to be used by many well into the future.
Good fortune with your project.
Tweakie.