584,841 active members*
4,264 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > OpenSource Software > For nerds only: Raspberry Pi for EMC2 controller?
Page 8 of 8 678
Results 141 to 160 of 160
  1. #141
    Join Date
    Apr 2007
    Posts
    33

    Kinsa

    Could you post a set of instructions for seperating the parts of LinuxCNC program.
    thanks
    Doc

  2. #142
    Join Date
    Sep 2012
    Posts
    0
    I'm documenting the steps on the LinuxCNC wiki:
    LinuxCNC Documentation Wiki: RaspbianXenomaiBuild
    42

  3. #143
    Join Date
    Sep 2012
    Posts
    0
    Here is the youtube link:

    LinuxCNC on Raspberry Pi - YouTube

    Cheers!
    42

  4. #144
    Join Date
    May 2005
    Posts
    81
    Hi

    If I understand correctly you offloaded the pulse generation from the linux kernel, do you plan on posting the source changes to linuxcnc on Github?

    My reason for asking is general interest and investigating the feasibility of using a FPGA for pulse generation in place of a microcontroller

    Thanks

  5. #145
    Join Date
    Sep 2012
    Posts
    0
    I haven't really made any changes to the core of linuxcnc to make it work. Regarding the miniemc2 interface, I'm not sure if I can publish it since I haven't talked to the original developer yet.

    For the PIC32 board, I will post the details and the HAL driver source soon once I have cleaned it up.
    42

  6. #146
    Join Date
    May 2005
    Posts
    81
    Please excuse my ignorance about LinuxCNC, but if I understand your post,the step/pulse generation information is available via a spi interface?

    If I have that correct,could you point me to the docs that describe that interface?

    Thanks

  7. #147
    Join Date
    Sep 2012
    Posts
    0
    Hi,

    The SPI interface serves as a high speed communication bus between RPi and the external microcontroller. This is just basically a high speed serial port. The programming interface for the SPI is documented here (chapter 10): http://www.raspberrypi.org/wp-conten...eripherals.pdf

    The step/pulse generation is performed by the PIC32 microcontroller, actually any microcontroller with an SPI interface will do. An Arduino can do the job as well, although I haven't tested it.

    The GPIO of the RPi is too slow for bit-banging the step/direction pulse, that is why an external board is needed.

    Regards
    42

  8. #148
    Join Date
    May 2005
    Posts
    81
    Hi

    That I understand, but what I don't understand is how the RPi SPI libraries are tied into LinuxCNC at the level of pulse generate commands.

    When I think about how LinuxCNC it works with the Mesa cards,there has to be a clean interface between the Mesa cards and the trajectory planner, is that interface SPI enabled which is what your using?

  9. #149
    Join Date
    Sep 2012
    Posts
    0
    There is a HAL driver that uses the SPI as link between the trajectory planner and the pulse generator.

    I haven't released the source to the HAL driver because it is not yet finished.
    42

  10. #150
    Join Date
    Jul 2010
    Posts
    567
    (From the perspective of one who knows just enough to be dangerous)
    If this system it works well, and is cost efficient might be worth polishing; then releasing to the masses with Kickstarter or such. Perhaps just the PIC MCU coded, along with detailed information on how to get started.
    Or simply more documentation to spark interest if things get stabilized per say.

  11. #151
    Join Date
    May 2005
    Posts
    81
    Thanks for clearing that up, it now makes sense.

    Once you release that HAL code, I may take a crack at a FPGA pulse generator.

    In any case, GREAT work, thanks for tackling the problem


    Quote Originally Posted by kinsa View Post
    There is a HAL driver that uses the SPI as link between the trajectory planner and the pulse generator.

    I haven't released the source to the HAL driver because it is not yet finished.

  12. #152
    Join Date
    Oct 2010
    Posts
    1189
    Hi,
    Verry interesting
    I am about to teach Reprap Marlin the missing Gcodes so that i can mill PCB´s (its including Toolchange and so )
    for now i use linuxcnc and i am quite happy

    So my question You use Linuxcnc basically as an frontend and push down the
    info as "pulse" generator" the hardware is then doing the fancy stuff with the drivers and so ,..
    I am correct ?

    Would it be possible to send Gcodes Line wise and wait down to the "hardware" ? wouldnt so the picture on the "host" might be a little behind ,..

    do you think that is feasible ?

    i would like to hear your opinion
    cu
    thomas

    Quote Originally Posted by kinsa View Post
    There is a HAL driver that uses the SPI as link between the trajectory planner and the pulse generator.

    I haven't released the source to the HAL driver because it is not yet finished.

  13. #153
    Join Date
    Sep 2012
    Posts
    0
    Think of the SPI interface as a parallel port and the PIC32 board as a Mesa 7I43 FPGA board.

    Linuxcnc sends the motion commands thru the SPI interface and the PIC32 converts those commands to its corresponding pulse and direction signals. What I did is basically a hardware implementation of the software stepgen HAL component.

    Quote Originally Posted by Tkamsker View Post
    Would it be possible to send Gcodes Line wise and wait down to the "hardware" ? wouldnt so the picture on the "host" might be a little behind ,..

    do you think that is feasible ?
    Sorry, I don't think I understand your question. I'm not qualified to answer it really as I haven't fully grasped the inner workings of linuxcnc.

    Regards
    42

  14. #154
    Join Date
    Sep 2012
    Posts
    0

    Project page

    I have opened a google code page for the PIC32 board here: picnc - Raspberry Pi PIC32 expansion board - Google Project Hosting

    Cheers!
    42

  15. #155
    Join Date
    Oct 2010
    Posts
    1189

    Question II

    Hi,
    yes sorry my bad.
    you use the spi interface in pulse and direction
    on the hardware you have to deal with the translation

    Look what i use for the 3d Printer http://reprap.org/wiki/RAMPS_1.4
    and they have Stepper drivers
    Look at http://reprap.org/wiki/Stepper#Stepp...er_controllers

    So basically your toolchain is (compared to reprap) is you use the Rasperry and Linixcnc as they use Arduino 2560 and ramps 1.4
    the result is Steps and directions
    Then they have an driver for the steppers (i use http://reprap.org/wiki/Pololu_stepper_driver_board for instance)
    And here your board comes in place it translates the stream of commands via spi in something you would send to an leadshine ,..
    i am correct ?

    does the board also handle endstops indexer (like for a lathe) or tool length stuff ?

    so i am verry interested i can also offer some testing

    so sorry for my misleading question

  16. #156
    Join Date
    Sep 2012
    Posts
    0
    Raspberry running LinuxCNC is similar to Arduino running Reprap's firmware.

    The PIC32 board extends the IO capabilities of the Raspberry Pi so that it can generate step/direction signals in realtime. The board also has extra IO pins that are configurable so that it can handle external inputs as well as external outputs (limit switches, spindle control, etc.).

    I started the development using a chipkit max32 board, so any PIC32 development boards can be used. An example of such board is the UBW32.

    An Arduino can also be used but you will be limited by the maximum SPI speed it can handle.
    42

  17. #157
    Join Date
    Sep 2012
    Posts
    0
    Just a quick update, a breadboard/stripboard version is available using a DIP PIC32 chip.

    If you don't have a PIC32 programmer, no worries, RPi can be used to program the blank chip.

    All the details are in my google code page

    Cheers!
    42

  18. #158
    Join Date
    Nov 2012
    Posts
    1
    Well this thread has been cold for a while, but I thought it'd be worth pointing out that stepper driver boards based on the L6470 are now readily available. This chip takes motion commands over an SPI interface and directly drives motors, so it fulfills the roll of both the PIC32 board in Kinsa's solution as well as the standard step/dir stepper driver. It deals with timing internally and can even do fancy things like custom BEMF compensation and accel/decel curves. If it's possible to get LinuxCNC communicating properly with the L6470 then this might be an entirely COTS solution to CNC with a raspberry pi.

  19. #159
    Join Date
    Mar 2004
    Posts
    1661
    Quote Originally Posted by ceejer View Post
    Well this thread has been cold for a while, but I thought it'd be worth pointing out that stepper driver boards based on the L6470 are now readily available. This chip takes motion commands over an SPI interface and directly drives motors, so it fulfills the roll of both the PIC32 board in Kinsa's solution as well as the standard step/dir stepper driver. It deals with timing internally and can even do fancy things like custom BEMF compensation and accel/decel curves. If it's possible to get LinuxCNC communicating properly with the L6470 then this might be an entirely COTS solution to CNC with a raspberry pi.
    The LinuxCNC community is moving on with Beaglebone and there's already a running version.

  20. #160
    Join Date
    Sep 2013
    Posts
    8
    That I understand, but what I don't understand is how the RPi SPI libraries are tied into LinuxCNC at the level of pulse generate commands.

Page 8 of 8 678

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
  •