585,974 active members*
4,245 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > OpenSource Software > For nerds only: Raspberry Pi for EMC2 controller?
Page 1 of 7 123
Results 1 to 20 of 160

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    363

    For nerds only: Raspberry Pi for EMC2 controller?

    Raspberry Pi | An ARM GNU/Linux box for $25. Take a byte!

    Might be interesting for a cheap EMC2 video controller... 700mhz, 256mb ram, runs on an SD card. Not sure about USB support, but a port for smoothstepper would be awesome. Using an LPT port is probably out of the question.

    Interesting idea, anyways. At $25 bucks it seems promising.

  2. #2
    Join Date
    Jul 2008
    Posts
    390
    Writing drivers for the USB end might be interesting. I'd be worried about performance too considering the small ram size. Personally, I think implementing something on an android tablet would be a bit more feasible especially as far as product lifetime/lifecycle is concerned. Food for thought.

  3. #3
    Join Date
    Oct 2010
    Posts
    4

    EMC2 and Rasberry Pi.

    I would have thought it was better to control the CNC controller with the GPIO pins rather than any USB driver.

    There is supposed to be a Gert-Board for expansion facilities on the Raspberry Pi. Not sure how many bits of the GPIO port is being made available in the first incarnation or how many EMC2 needs

    The GPIO voltage levels are 3.3v so may need a chip like TXB0108 bi-directional level converter
    Keith

  4. #4
    Join Date
    Jul 2008
    Posts
    390
    That's interesting. I just posted about using this chip for a 3.3V to 5V fix for parallel ports and I did think to apply it to this situation. You can find the mention to it in my comment history somewhere.

    As for the reason behind Android, it is a very widely used system and complete open source, so there are plenty of options for development. You would likely have to have the Droid talking to a secondary buffer board that holds lists of time-stamped future 'actions' and executes them according to realtime-clock ticks or a precision oscillator. This buffer-board could just implement a wireless protocall (say bluetooth) to talk to the Droid. Furthermore, the droid OS would allow for graphical control of the machine.

  5. #5
    Join Date
    Oct 2010
    Posts
    4
    Sorry to disagree but I just don't see this happening for Andriod tablet. Because too difficult to interface hardware.

    Also CNC needs real time operating system. There is one for Linux and not such a large step for Rasberry Pi which already is supported by various flavours of linux. EMC2 being the Linux implementaion on x86.

  6. #6
    Join Date
    Jul 2008
    Posts
    390
    You are perfectly fine to disagree. You have a very good point.

    Do you think Raspberry Pi and a SmoothStepper is the answer though? I can see it happening on the Pi, maybe with some extra hardware, but not with the SmoothStepper. It seems too... excessive.

  7. #7
    Join Date
    Mar 2004
    Posts
    413
    Quote Originally Posted by KeithSloan View Post
    Sorry to disagree but I just don't see this happening for Andriod tablet. Because too difficult to interface hardware.

    Also CNC needs real time operating system. There is one for Linux and not such a large step for Rasberry Pi which already is supported by various flavours of linux. EMC2 being the Linux implementaion on x86.
    I would think an Android problem is simply that they have failed to fully adopt a single standard hardware port of any kind. Looks like many have "hacked" their way to all sorts of things with it.

    Regarding "real time", there are dozens of CNC control programs that do not run "real time".... And, the many thousands of people using those controls don't let the terminology stop them from doing what they do, and do successfully. I suppose there is a "real time" argument to be had (and we have heard it plenty over the years), but it depends on exactly what a person happens to be controlling... exactly how "real time" any specific application >really< needs.

    This raspberry looks not much unlike the small embedded PC's that have already been placed in OEM machines for years, pumping additional motion hardware... but clearly cheaper to purchase.

    I say bring on the "black box". I've been using and heralding a black box product for years! It is a proven reliable and successful method. Its exactly where motion control started and exactly where it seems to be headed back to as PC component manufacturers slowly pull the plug on the parallel port.
    Chris L

  8. #8
    Join Date
    Aug 2012
    Posts
    0

    RasPiComm

    Quote Originally Posted by KeithSloan View Post
    I would have thought it was better to control the CNC controller with the GPIO pins rather than any USB driver.

    There is supposed to be a Gert-Board for expansion facilities on the Raspberry Pi. Not sure how many bits of the GPIO port is being made available in the first incarnation or how many EMC2 needs

    The GPIO voltage levels are 3.3v so may need a chip like TXB0108 bi-directional level converter
    Keith
    I made an extension board with focus on stepper control, should go to production soon. It exposes an RS485 port, where I connected a Steprocker board (3-axis stepper controller with 256-microstep resolution).
    RasPiComm – a Raspberry Pi piggyback board « Daniel Amesberger

    I made the schematics open-source.

    Daniel

  9. #9
    Join Date
    Dec 2006
    Posts
    406
    Dynomotions k-flop works through USB. It also uses emc2 for g-code. It is a very powerful controller that takes the real time needs off the pc. It might make a good fit for what you are working on. I also don't see why you couldn't get it to work with an android tablet. Just my 2cents.
    Judleroy

  10. #10
    Join Date
    May 2005
    Posts
    1662
    Mini ITX isn't small enough ?

    Linuxcnc adapted to this board sounds possible. Someone pointed out there is suitable I/O on board ? That would allow the pc (or whatever you call these things) to remain as a real time control and avoid USB. Linuxcnc is not restricted to parallel port afaik.
    Anyone who says "It only goes together one way" has no imagination.

  11. #11
    Join Date
    Dec 2005
    Posts
    594
    LinuxCNC does not support motion control through the USB port. It does support motion control through the parallel port, and through various other motion control cards like Mesa, Pico, I believe Galil, and some others. But not USB. There has been some talk of implementing it through real-time ethernet, but not as of yet.

    Mark

  12. #12
    Join Date
    Jun 2007
    Posts
    3891
    Quote Originally Posted by wendtmk View Post
    LinuxCNC does not support motion control through the USB port. It does support motion control through the parallel port, and through various other motion control cards like Mesa, Pico, I believe Galil, and some others. But not USB. There has been some talk of implementing it through real-time ethernet, but not as of yet.

    Mark
    is there a fundamental reason it doesnt support usb? or is it just cause noones done drivers yet?

    something to note about the raspberry pi is that it has no real time clock. i do not know myself if this is important to cnc control, but im guessing yes. you can add a clock on the gpio, but then you loose io which you really want to keep for control.

    in any case, i really want to implement this little pc for cnc control, whether its linux or android or maybe even windows in the future.

  13. #13
    Join Date
    Dec 2005
    Posts
    594
    Quote Originally Posted by ihavenofish View Post
    is there a fundamental reason it doesnt support usb? or is it just cause noones done drivers yet?

    something to note about the raspberry pi is that it has no real time clock. i do not know myself if this is important to cnc control, but im guessing yes. you can add a clock on the gpio, but then you loose io which you really want to keep for control.

    in any case, i really want to implement this little pc for cnc control, whether its linux or android or maybe even windows in the future.
    They've decided that the timing unreliability of USB in a real time situation was not worth the time and effort to create a path for a CNC control signal.

    Mark

  14. #14
    Join Date
    Jun 2007
    Posts
    3891
    Quote Originally Posted by wendtmk View Post
    They've decided that the timing unreliability of USB in a real time situation was not worth the time and effort to create a path for a CNC control signal.

    Mark
    the reason im asking is because we have a new 3 axis usb board from taiwan. they wrote mach 3 drivers for it and thus far, reliability seems a non issue (parallel port are NOT reliable in any way in my experience). so it may not be out of the question to ask them to write emc2 drivers that work with the raspberry (and other emc setups) if there isnt a fundamental road block. someone opinion that usb sucks for cnc isnt a roadblock to me.

    its a tiny board, not much bigger than the raspberry, and the 2 combined would make a seriously awesome all in one mini controller for well under $500.


  15. #15
    Join Date
    Dec 2007
    Posts
    362
    256Mb memory may be the limitation,
    Mine's on backorder
    Regards
    Geoff

  16. #16
    Join Date
    Apr 2010
    Posts
    363
    Realtime Ethernet might be the answer. I think there could be potential for the Tablet option, but that warrants it's own topic. This is about the possibility for R. Pi as a low cost controller.

  17. #17
    Join Date
    Feb 2006
    Posts
    101
    Quote Originally Posted by crane550 View Post
    Realtime Ethernet might be the answer. I think there could be potential for the Tablet option, but that warrants it's own topic. This is about the possibility for R. Pi as a low cost controller.
    The RPi uses a peripheral chip to do the Ethernet. This talks back to the main CPU via USB. So it will suffer the same problems as a USB device.

  18. #18
    Join Date
    Apr 2010
    Posts
    363
    Quote Originally Posted by ftkalcevic View Post
    The RPi uses a peripheral chip to do the Ethernet. This talks back to the main CPU via USB. So it will suffer the same problems as a USB device.
    Ah, ok good to know.

  19. #19
    Join Date
    Feb 2006
    Posts
    101
    Quote Originally Posted by crane550 View Post
    Ah, ok good to know.
    That doesn't mean it can't be done.

    Most of the discussion from real time purists is that events must happen precisely at the scheduled clock time (latency is typically 5us or so).

    For driving a servo, where you only send updates every 1ms, you can be pretty lax in your updates (not too slow though, or the machine will wander).

    As for real time ethernet, I've been playing around with microcontrollers to act as the client side (LinuxCNC still on a PC, talking RTNET to the client, which does simple GPIOs, encoder counting and PWM generation). When I get time, I'm going to try this with a Beagle Bone.

  20. #20
    Join Date
    Feb 2006
    Posts
    101
    Keep in mind, as has already been mentioned, LinuxCNC requires a Real time Linux kernel. This is a modified kernel that allows real time events to interrupt the low level kernel operations. A real time kernel is built for each CPU. It is a non-trivial task to port the kernel to a new CPU. A while back (2 years?), a Beagle Board was given to one of the RTAPI developers to port to, and I don't think it has been completed yet.

Page 1 of 7 123

Similar Threads

  1. Raspberry Pi
    By gladiopolis in forum OpenSource Software
    Replies: 11
    Last Post: 12-02-2019, 04:21 PM
  2. RC Brushless motor controller for Mach3 / EMC2
    By LOGICNC.COM in forum News Announcements
    Replies: 1
    Last Post: 05-09-2014, 02:47 PM
  3. Will a Microkinetics controller communicate with EMC2?
    By OneAndy in forum LinuxCNC (formerly EMC2)
    Replies: 3
    Last Post: 11-26-2012, 04:26 AM
  4. Not for Nerds only: MK802 II
    By BAMCNC.COM in forum LinuxCNC (formerly EMC2)
    Replies: 2
    Last Post: 11-09-2012, 02:00 PM
  5. EMC2 and Stepperworld FET3 Controller
    By kbeard in forum LinuxCNC (formerly EMC2)
    Replies: 17
    Last Post: 02-13-2012, 01:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •