The main issue will be the real-time element, for which the Pi is not designed.Clanzer wrote:Yep with you on this one Cliff.
Hopefully I should have my Raspberry Pi by August and should be easy enough to knock up a opto isolated circuit for the I/O lines and run some stepper drivers.
Easy enough to do with Pic Chips and Atmels's to run CNC machines and 3D printers.
Of course these are still being ran by having a PC sending the commands via USB.
Now with the Raspberry Pi we can do away with the PC and have a small all in one dedicated controller.
Writing the Gcode interpreter software for the Raspberry Pi will be the challenge, but looks like access to the I/O ports is easy enough, so should not be too bad.
Code: Select all
#! /bin/bash cd echo # newline echo "28BYJ-48 Servo test" # set up SOC GPIO 25, 24, 23, 22 to output echo "25" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio25/direction echo "24" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio24/direction echo "23" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio23/direction echo "22" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio22/direction # set timing and no. cycles delay=0.001 cycles=512 # ripple across pins in 3s for (( i=1; i<=$cycles; i++ )) do echo "0" > /sys/class/gpio/gpio24/value echo "1" > /sys/class/gpio/gpio25/value sleep $delay echo "0" > /sys/class/gpio/gpio23/value echo "1" > /sys/class/gpio/gpio24/value sleep $delay echo "0" > /sys/class/gpio/gpio22/value echo "1" > /sys/class/gpio/gpio23/value sleep $delay echo "0" > /sys/class/gpio/gpio25/value echo "1" > /sys/class/gpio/gpio22/value sleep $delay done # clean up echo "0" > /sys/class/gpio/gpio25/value echo "0" > /sys/class/gpio/gpio24/value echo "0" > /sys/class/gpio/gpio23/value echo "0" > /sys/class/gpio/gpio22/value echo "25" > /sys/class/gpio/unexport echo "24" > /sys/class/gpio/unexport echo "23" > /sys/class/gpio/unexport echo "22" > /sys/class/gpio/unexport
Stepper motors have 2 Coils working together, hence only one stepper per dual H-bridge driver.TommyboyNL wrote:The BitWizard board has PWM implemented, so you can control the drive intensity. It can drive one stepper, or two regular motors, but not two steppers (unless they both need to do the same, then they can be connected in parallel). Anyway, for some uses it's an ideal board, and for some, just to fancy Good luck with your project!
Users browsing this forum: Hove and 13 guests