CNC machine controller
Project description
PyCNC is a free open-source high-performance G-code interpreter and CNC/3D-printer controller. It can run on a variety of Linux-powered ARM-based boards, such as Raspberry Pi, Odroid, Beaglebone and others. This gives you a flexibility to pick a board you are most familiar with, and use everything Linux has to offer, while keeping all your G-code runtime on the same board without a need to have a separate microcontroller for real-time operation. Our choice of Python as main programming language significantly reduces code base compared to C/C++ projects, reduces boilerplate and microcontroller-specific code, and makes the project accessible to a broader audience to tinker with.
Realtime Motor Control in Linux?
Video demo - YouTube video
Current gcode support
Config
Hardware
Currently, this project supports Raspberry Pi 1-3. Developed and tested with RPI3. And there is a way to add new boards. See hal.py file. Note: Current Raspberry Pi implementation uses the same resources as on board 3.5 mm jack(PWM module), so do not use it. HDMI audio works.
Usage
sudo pip install .
in repo root directory to install it. After than, pycnc command will be added to system path. To remove installation, just run:
sudo pip remove pycnc
Performance notice
wget wget https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.7.1-linux-armhf-raspbian.tar.bz2
sudo mkdir /opt/pypy
sudo tar xvf pypy2-v5.7.1-linux-armhf-raspbian.tar.bz2 --directory /opt/pypy/ --strip-components=1
sudo ln -s /opt/pypy/bin/pypy /usr/local/bin/pypy
Project architecture
Dependencies
Nothing for runtime. Just pure Python code. For uploading to PyPi there is a need in pandoc:
sudo dnf install pandoc
sudo pip install pypandoc
GCode simulation
Just a link, mostly for myself :), to a nice web software for gcode files emulation (very helpful for manual creating of gcode files): https://nraynaud.github.io/webgcode/
License
see LICENSE file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.