WarHawk_AVG Posted February 16, 2019 Posted February 16, 2019 A bit of software that might be interesting to those that wish to use the IO's of Pi type boards https://github.com/Nikolay-Kha/PyCNC Typically there is no way to control stepper motors from Linux runtime environment due to the lack of real time GPIO control. Even kernel based modules can not guarantee precise control of pulses for steppers. However, we can use a separate hardware module, DMA (Direct Memory Access) which provides high precision for GPIO outputs. This module can copy bytes which represent GPIO states from RAM buffer directly to GPIO with some clock based on main chip internal oscillator without using CPU's cores. Using such approach this project generates impulses for moving stepper motors and that is very precise way regardless CPU load and OS time jitter. This approach also allows to use Python language for this project. Typically, Python is not good choice for real time application, but since project just needs to set up DMA buffers and hardware will do the rest, Python become the perfect choice for easy development of this project. Youtube video of PyCNC running a 3D printer
Recommended Posts