For nerds only: Raspberry Pi for EMC2 controller? - Page 8

Page 8 of 8 FirstFirst ... 5678
Results 141 to 159 of 159

Thread: For nerds only: Raspberry Pi for EMC2 controller?

  1. #141
    Member
    Join Date
    Apr 2007
    Location
    USA
    Posts
    33
    Downloads
    0
    Uploads
    0

    Default Kinsa

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



  2. #142
    Registered
    Join Date
    Sep 2012
    Location
    Posts
    19
    Downloads
    0
    Uploads
    0

    Default

    I'm documenting the steps on the LinuxCNC wiki:
    LinuxCNC Documentation Wiki: RaspbianXenomaiBuild

    42


  3. #143
    Registered
    Join Date
    Sep 2012
    Location
    Posts
    19
    Downloads
    0
    Uploads
    0

    Default

    Here is the youtube link:



    Cheers!

    42


  4. #144
    Registered
    Join Date
    May 2005
    Location
    usa
    Posts
    81
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Sep 2012
    Location
    Posts
    19
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    May 2005
    Location
    usa
    Posts
    81
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Sep 2012
    Location
    Posts
    19
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    May 2005
    Location
    usa
    Posts
    81
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Sep 2012
    Location
    Posts
    19
    Downloads
    0
    Uploads
    0

    Default

    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
    Member
    Join Date
    Jul 2010
    Location
    USA
    Posts
    567
    Downloads
    0
    Uploads
    0

    Default

    (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
    Registered
    Join Date
    May 2005
    Location
    usa
    Posts
    81
    Downloads
    0
    Uploads
    0

    Default

    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
    Member Tkamsker's Avatar
    Join Date
    Oct 2010
    Location
    Austria
    Posts
    1189
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Sep 2012
    Location
    Posts
    19
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Sep 2012
    Location
    Posts
    19
    Downloads
    0
    Uploads
    0

    Default 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
    Member Tkamsker's Avatar
    Join Date
    Oct 2010
    Location
    Austria
    Posts
    1189
    Downloads
    0
    Uploads
    0

    Default 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
    Registered
    Join Date
    Sep 2012
    Location
    Posts
    19
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Sep 2012
    Location
    Posts
    19
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Nov 2012
    Location
    United States
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default

    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
    Community Moderator
    Join Date
    Mar 2004
    Location
    Sweden
    Posts
    1661
    Downloads
    0
    Uploads
    0

    Default

    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.



Page 8 of 8 FirstFirst ... 5678

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

For nerds only: Raspberry Pi for EMC2 controller?

For nerds only: Raspberry Pi for EMC2 controller?