Welcome to Our Community

Some features disabled for guests. Register Today.

Linux CNC

Discussion in 'Control Software' started by Mark Carew, Aug 24, 2015.

  1. Mark Carew

    Mark Carew OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jun 28, 2013
    Messages:
    2,745
    Likes Received:
    2,410
    LinuxCNC is a descendent of the original NIST Enhanced Machine Controller software, which is in the Public Domain.
    LinuxCNC has many exciting new features and brings a lot of new functionality (a flexible and powerful Hardware Abstraction Layer that allows you to adapt it to many kinds of machinery, a software PLC controller, easier-than-ever installation, a new trajectory planner, and more.)​

    Discuss all Linux CNC related topics here
     
    BDO-111 likes this.
  2. Timothy March

    Builder

    Joined:
    Feb 24, 2014
    Messages:
    12
    Likes Received:
    9
    Have a idea thought I would put it here I will be trying to use LinuxCNC using Hal2Arduino with one of these
    Pololu - A-Star 32U4 Mini LV
    got the idea thinking about Jedicut and using a dongle and that the same thing could be done with Hal2Arduino.

    My cnc will be a muti-machine with XYZA axis and remove-able gantry which then converts to XYUV axis. Which can all run with LinuxCNC, but I really like the looks of Jedicut. Making a Hal2Arduino dongle will allow me to us a Windows machine with Linuxcnc running within Virtualbox program for cnc work and 3d printing then use Windows to run Jedicut for foam cutting with a different dongle made for Jedicut.

    I would also like to try and expand the use of Hal2Arduino to send stepper signals over Can-bus. Can-bus is a network protocol that sends messages over a twisted pair of wires and is faster than USB and there would be less lag time of signals sent to stepper drivers, one pair of Cat5 twisted pairs will work. Then attach Rj11 ends and use phone splinter connections for adding connections to different nodes on the network. Ends of network require a terminating resistor on each end. terminating resistors can be made as described on this web page.

    CAN Jaguars

    If your stepper drivers use 3.3 volts such as polou stepper drivers one could use a Teensy 3.1 or 3.2 which has Can-bus and one of these

    http://www.amazon.com/gp/product/B00KM6XMXO?psc=1&redirect=true&ref_=oh_aui_detailpage_o01_s00

    and make a dongle to paraport connection. If you do not want to use paraport breakout board you could use a Arduino Due which also has Can-bus but only 3.3 volt to work with

    If your stepper drivers used 5 volts you would have to use a Arduino Mega without paraport breakout board
    with a Can Bus shield such as

    http://www.amazon.com/CAN-BUS-Shiel...qid=1446085891&sr=1-1&keywords=can+bus+shield

    and one of these for wire terminations, also the above mentioned method using Arduino Due would also use this too

    http://www.amazon.com/dp/B00UT13YXA...UTF8&colid=3CSDXWB5WKQIH&coliid=I2HRIO93IVJXC

    Hal2Arduino is wrote in such a way that I think converting USB serial communication to Can-bus communication would be do-able.
    I have ordered Can-bus shields a USB2Can-bus adapter, I have a Arduino Mega and a couple of Arduino Unos for setting up additional nodes on network, for what I want hotend and heatbed. But other nodes could preform what ever your imagination could come up with at very fast communications. We use a form of Can-bus in the communication with devices on the robots that I work with in my job. The network protocol is called Devicenet which is a form of Can-bus.

    My dale-ma even though I know how to program a robot and can write a little bit of script and I know a little about Arduino IDE and programming a Arduino. I do not know Python which is what the programming language the main script file in Hal2arduino that LinuxCNC uses to interface with the Arduino. I am trying to teach myself Python in my little spare time but it is tough. If anyone would like to get involved I think what I would like to accomplish would benefit other builders. I am not looking for someone to do the programming for me just guided assistance. I first want to get Hal2Arduino working over USB dongle, (which I should be able to do on my own) then try afterwords to get the Can-bus done. I will be posting how-to to get Virtualbox installed on windows machine and setup running LinuxCNC very soon.
    Even if there are no takers I will post what I accomplish here in this space

    Tim March
     
    #2 Timothy March, Oct 28, 2015
    Last edited: Oct 29, 2015
  3. rjd1234

    rjd1234 New
    Builder

    Joined:
    Jun 30, 2014
    Messages:
    6
    Likes Received:
    2
    Tim,

    I'm very interested to hear how this has worked. I really like LinuxCNC... It seems like the operations are smooth. I have seen people online that complain that the usb control boards that say it has more jerk. But I'm a nobody who doesn't really know anything about anything... just like to tinker.

    My current CNC router is XYZ and runs on an old Dell tower with Debian Wheezy LinuxCNC on it. I'm using a cheap TB6560 controller from ebay, which isn't great, but seems to work.

    My dad has an old drill mill that I'm thinking about converting to CNC. I would like to use a Raspberry Pi with LinuxCNC, but maybe a better option would be something more like what you are working on.

    Rick
     
  4. Timothy March

    Builder

    Joined:
    Feb 24, 2014
    Messages:
    12
    Likes Received:
    9
    Hello Rick
    Sorry about late reply, but on the subject I have been mulling about this for some time now. I am also thinking of a Rpi have a image made that you can download at
    Dropbox - login_pi_pw_lcnc_8GB_raspberryPi2_12c_spi_serial_canbus_enabled
    The name is descriptive for what you would need, you can use the following program to create Sdcard
    Win32 Disk Imager
    When choosing image inside program search for *.* because the name is so long and will not show up.
    The raspberry Pi 's Ethernet connection is not true 10/100 connection because it goes thru a USB bridge on board, so any MESA board connection over Ethernet will not work. Hal2arduion will work, but would have some lag time, was thinking of trying Can-bus which if you are familiar is like Device-net. Hal2arduino code which I am thinking of using some of it, will help allot I think. There has been some work done with Machinekit, ( a spin-off port of Linuxcnc) with Can-bus but I think they are over thinking this. At this time am unable to complete anything due to my daughter is getting married and I am starting new projects at work. You may want to look at my post in linuxcnc forum at
    LinuxCNC: latency 2.7.2 install on Raspberry Pi (2/2)

    So that is where I am at this moment
    Tim
     
    #4 Timothy March, Apr 5, 2016
    Last edited: Apr 5, 2016
  5. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,275
    Likes Received:
    1,833
    I don't think the Pi is a good platform for LinuxCNC, it is too slow. (I have 2 Pi's)
    An RPi as a front end to GRBL on Arduino is pretty good though.

    I do think the BeagleBoneBlack is a good candidate as it has onboard microcontrollers for realtime bit banging.
    I have one on my wishlist (-:
     
  6. Timothy March

    Builder

    Joined:
    Feb 24, 2014
    Messages:
    12
    Likes Received:
    9
    Hello David
    Was thinking the realtime aspect of LCNC could be off-loaded using AccelStepper Arduino library as Hal2arduino uses to Arduino Mega for 5V stepper drivers or Due for 3v stepper drivers. H2Arduino is a good example to start with of that librarys' use. My image that I posted and mentioned about earlier uses Rt-Preempt kernel you can try it, check latency from terminal with
    latency-histogram --nobase
    You will get error about memory usage which I think can be ignored
    or with
    latency-plot
    base thread is still running though
    The reason for this is the base thread would not be used with Canbus application just as it is not used with Mesa 7i92 everything I/O Ethernet card
     
  7. Kyo

    Kyo Veteran
    Staff Member Builder Resident Builder

    Joined:
    Feb 27, 2014
    Messages:
    673
    Likes Received:
    699
    I will have some feed back on this soon :) I have 3 RPi cnc projects I am trying out ( more for fun then anything )...
    First is a Pi with Protoneer 4 axis hat running bCNC and grbl on a Nano v3.. The hat is on it's way now, I already have the drivers and Pi 2..

    The other two are both linuxcnc ( machinkit ) based.. I still need place my oshpark order for the boards, However I have uploaded Kinsamanka's files and included his github link if anyone else wants to check it out.
    OSH Park ~ Profile for Kyo

    One board (v2.1) allows using the common pololu drivers similar to the protoneer hat just running linuxcnc/machinekit instead of grbl/bcnc..

    [​IMG]

    The second board (v2.0) will allow you to use G540 or similar parallel port style driver boards from ebay and such..

    [​IMG]

    The other cnc project I have in the works is a new Arduino Nano V3 board allowing you to use the Gecko G540 and similar over usb via GRBL... Just need to place my digikey order for this one but only so much money to spread between projects is putting most of these at a snails pace..

    [​IMG]

    edit note: i am building and testing the above referenced boards. i did not design them. credit for that goes to each respective designer.
     
    Mark Carew and David the swarfer like this.
  8. Timothy March

    Builder

    Joined:
    Feb 24, 2014
    Messages:
    12
    Likes Received:
    9
    Worked with Bananapi M2 to for a while decided to go back to Raspberry Pi2. May someday try some more on BananaPi. But this is what I have going on now. Have created a Raspberry Pi2 image that has 12C, SPI, Serial messaging and Canbus enabled. I will try Canbus interface. Image can be downloaded here.

    Dropbox - login_pi_pw_lcnc_8GB_raspberryPi2_12c_spi_serial_canbus_enabled

    If you decided to give it a try use this program on a windows machine to write to SDcard

    sourceforge.net/projects/win32diskimager/

    When selecting image file choose file type *.* , because the name of file is so long and will not show if you look for img file type.
    File name is descriptive
    login pi
    password lcnc
    If a bigger than 8GB SDcard is used from terminal use
    sudo raspi-config
    to expand file system
    If you give image a try, use from terminal for latency test
    latency-histogram --nobase

    I have now in my possession the following items

    www.microcenter.com/product/431995/Arduino_Mega_2560
    mikroBUS Interface Shield for Raspberry Pi (Pi cli
    microcontrollershop.com/product_info.php?products_id=4619

    A couple of these
    http://www.amazon.com/CAN-BUS-Shiel...qid=1460074301&sr=8-1&keywords=canbus+arduino

    And a couple of these
    www.microcenter.com/product/431997/Uno_R3_MainBoard

    Will use these drivers

    Bipolar Stepper Motor Driver Max 4A Current 40VDC Input 16 Subdivision ST-6600|ST-6600|Stepper Motor Drivers

    Also have all motors a combination of Nema 17 and 23

    I have allot of soldering to do, should not be to long though.
    Will most likely need some pointers in coding

    Couple of screen shots here would not let me post in this forum

    LinuxCNC: latency 2.7.2 install on Raspberry Pi (1/2)

    and here

    LinuxCNC: ubuntu 14.04.1 linuxcnc help (4/21)

    Tim

    PS some links were broken I have fixed them all
     
    #8 Timothy March, Apr 7, 2016
    Last edited: Apr 7, 2016
    Mark Carew likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice