Thread: Raspberry Pi
Hybrid View
-
10-07-2012 #1
-
10-07-2012 #2
Maybe the Pi isn't the way to go, but my thought process was to create a g-code interpreter to drive the stepper drivers etc. and provide a real-time display of the process. Sort of MACH3 in a matchbox... (or should that be EMC2 in a matchbox)... anyway, a cut down version. No frills, no bells n whistles, just motion control and some graphics. I don't think the other boards suggested can do this (well of course with a multitude of added perpherals maybe). Big ask? maybe.
I/O isnt an issue, already sketched some ideas for a 16 port TTL compatible I/O module that uses a minimal # of GPIO and will be fast enough for this purpose (a few uS switching time and some bit-banging software) with an RTC as well. Also looking at using the I2C interface for the same, albeit slower...
So far just knocked up a simple I/O connector to get to the breadboard easily.
-
10-07-2012 #3
It is entirely possible, it is what all the Reprap printer controllers do, they take GCode sent from a PC over RS232, plan the motion and control the steppers, and on the 8 bit Arduino platform. There is also software for CNC, have a look for GRBL.
It is the sort of project you can do from scratch, you may not achieve reliable motion control on the first go, but steppers are quite easy to work with. If you have got a Pi, you may as well use it. The nice thing about the Pi is you can use a nice sized display with it.
My Pi should arrive any day now!
-
10-07-2012 #4
I'll have a look...
The nice thing about the Pi is the fact that, while you could plug a display in, if you were to use Linux you could equally remotely view/control it with VNC. I want to add this to a new PCB mill I am planning that can sit inside a sound-proof box on the next bench but I can watch it on the main PC... without tying up the main PC and without taking up the space of another PC...
For what I have in mind, I think it could be done without a real-time kernel with a 'device driver' hooked into a higher priority interrupt and a shared memory queue of simple motion commands. Sort of like a smoothstepper in software... I did something like this more than a few years back in Windows 95 for a real-time data transponder so I know the concept works, but I need to learn more about the Linux low level stuff.... and thats proving hard to find an easy way in...
-
10-07-2012 #5
That sounds like a good job for a Pi...
For what I have in mind, I think it could be done without a real-time kernel with a 'device driver' hooked into a higher priority interrupt and a shared memory queue of simple motion commands. Sort of like a smoothstepper in software... I did something like this more than a few years back in Windows 95 for a real-time data transponder so I know the concept works, but I need to learn more about the Linux low level stuff.... and thats proving hard to find an easy way in...
If you don't mind that the device driver is specific to the R.Pi, that should work. For stepper control, it basically needs a high-res timer and access to GPIO pins. The latter is straightforward. By high-res I mean < 10ms ;) I think there is a spare hardware timer on the Pi that a driver could hook into. The user-space app could parse the GCode, and sends "blocks" of motion commands (move N steps on X, M on Y etc) to the device driver with write() (to keep it simple). The driver just needs to generate a stream of step pulses with the required timing.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
cnc print a raspberry
By george uk in forum General DiscussionReplies: 7Last Post: 13-06-2014, 01:13 PM -
Raspberry Pi as a PC + Mach3 .. very possible
By Fivetide in forum General ElectronicsReplies: 2Last Post: 05-09-2012, 11:18 PM
Bookmarks