kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Mon Jul 28, 2014 1:01 pm

mung wrote:
kinsa wrote:Sorry for the late update as I'm coming back from a long holiday.

I will be moving all the documentations over to github so that it would be easier to maintain and collaborate.

I do sorely need help on the documentation side :)

Cheers!
Seems everyone is using the beaglebone with machinekit now, I am wondering if it is maybe now too late to get any interest in linuxcnc on rpi when beaglebone has more a critical mass.
There was never a competition between bbb and RPi on linuxcnc. The work on the Arm port covers both platforms.

This is also the reason you cannot charge anything for your planned work as RPi's audience is purely educational :)
42

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Tue Jul 29, 2014 1:06 am

xt550 wrote:Thank you for the quick answer.
Can i use the FRDM-KL25Z + Pi with the Stepper Motor Driver Controller Board i have?
(http://www.ebay.com/itm/CNC-TB6560-4-Ax ... 3cc2693831)

Can i solder the ends of a lpt cable to the FRDM-KL25Z or can i buy your picnc v2 card someware?

/xt550
This will work but i would prefer you use picnc v2 as I find supporting different boards is a bit tough on my side.

Send me a mail at Image
42

cncwood
Posts: 24
Joined: Fri Feb 28, 2014 10:17 pm

Re: LinuxCNC

Sat Aug 02, 2014 6:55 am

hi Kinsa!

I already have a cnc with a raspberry + FRDM-KL25Z and linuxcnc -
this works wonderfully.

Now I also have a 3d printer, because I want to be controlled the same way. I've seen a video of your printer.

Do you have a heated bed?

Can you control the temperature of the extruder and the bed on linuxcnc?

thanks

mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Re: LinuxCNC

Sat Aug 02, 2014 10:17 am

cncwood wrote:hi Kinsa!

Can you control the temperature of the extruder and the bed on linuxcnc?

thanks
Should be quite simple, I am sure there are some PC based linuxcnc configuration around that handle this, all that needs to be done for rpi is write a driver that handles the ADC, the rest is just pwm and pid config.

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Mon Aug 04, 2014 12:18 am

cncwood wrote: Can you control the temperature of the extruder and the bed on linuxcnc?
Yes, definitely.

You'll need to modify the KL25Z firmware to have adc input and pwm output functionality.

I've used the RAMPS board as a base but it's a mess to wire it up. If you're making a proper shield, just let me know.

Cheers!
42

HobbyBob
Posts: 5
Joined: Wed Jul 23, 2014 11:44 pm

Re: LinuxCNC

Tue Aug 05, 2014 7:04 pm

Hi!

New to the community and interested to see someone has cracked the linux code as it were! Well done! Have there been any new additions to the project since you started out?

Wire
Posts: 78
Joined: Tue Sep 11, 2012 6:46 pm

Re: LinuxCNC

Thu Aug 07, 2014 5:30 am

I am in the process of rebuilding a 1994 ULS 25PS laser cutter (24"x18" bed). The original power supply is dead and is integrated into the stepper motor driver board. Switcher IC is long obsolete and though about just wiring in external supplies. But even if i got that going and there was no other collateral damage to the other boards I still have drivers, processors, and software from 1994...

So instead decided to just scrap all the current electronics and update to EMC (well linuxCNC is what you guys call it now :). Been watching this thread for a while but only hit and miss. So just trying to get caught up on the state of things.

What I need is:
- 4 axis (looks like it supports 4)
[email protected] Z (going with a TB6600 4.5A driver)
2x [email protected] Y,R (going with a pair of TB6560 3A drivers)
2.5V$0.6A X (again going with the TB6560 3A driver just because i can get them for cheaper than the pololu and has a MUCH easier heat sink mounting system. Also tossing the idea of adding a extruder head at some point so it can do double duty which would require a larger stepper motor as well.)
- 4 home switches (looks like it supports 4)
- spindle on/off for the laser (more on this later)

and that is about it. From the looks of things PICnc should have me covered other than some safety stuff (water, air, lids, etc can wire in series with the enable output and feed a status bit back via other GPIO) and laser power setting (Plan to control via I2C directly from the Pi. This is changed once per setup and does not need to even be in the Gcode)

Can anyone think of anything I am missing that would cause PICnc not to be a good fit for this project. More or less a normal 3 or 4 axis machine with the exception of Raster engraving. For my raster engraving planning on trying to use Graster (http://wiki.linuxcnc.org/cgi-bin/wiki.p ... th_A_Laser) Sounds like it will work with just what I have above but have not dug into all the details yet. (need to get this thing moving first.)

So anyone see any glaring issues at this point?

If not where is the best place to get the PICnc firmware and LinuxCNC files? Does anyone have a install guide for dummies for the LinuxCNC software? (on the PIC end I use a lot of the 8 and 16 bit parts at work so quite familiar with programming them with the pickit 3)

My plan is to build a small custom breakout board that takes 24V in from my main power supply and generates the 5V (3.3V?) to run the PICnc and Pi. It will also support the signal conditioning to the laser supply and interlocks.

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Thu Aug 07, 2014 5:37 am

HobbyBob wrote:Hi!

New to the community and interested to see someone has cracked the linux code as it were! Well done! Have there been any new additions to the project since you started out?
I've updated/simplified the project to a single board: picnc v2.

I'm in the process of updating everything. I will post an update once it is done.
42

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Thu Aug 07, 2014 5:44 am

Wire wrote:I am in the process of rebuilding a 1994 ULS 25PS laser cutter (24"x18" bed). The original power supply is dead and is integrated into the stepper motor driver board. Switcher IC is long obsolete and though about just wiring in external supplies. But even if i got that going and there was no other collateral damage to the other boards I still have drivers, processors, and software from 1994...

So instead decided to just scrap all the current electronics and update to EMC (well linuxCNC is what you guys call it now :). Been watching this thread for a while but only hit and miss. So just trying to get caught up on the state of things.

What I need is:
- 4 axis (looks like it supports 4)
[email protected] Z (going with a TB6600 4.5A driver)
2x [email protected] Y,R (going with a pair of TB6560 3A drivers)
2.5V$0.6A X (again going with the TB6560 3A driver just because i can get them for cheaper than the pololu and has a MUCH easier heat sink mounting system. Also tossing the idea of adding a extruder head at some point so it can do double duty which would require a larger stepper motor as well.)
- 4 home switches (looks like it supports 4)
- spindle on/off for the laser (more on this later)

and that is about it. From the looks of things PICnc should have me covered other than some safety stuff (water, air, lids, etc can wire in series with the enable output and feed a status bit back via other GPIO) and laser power setting (Plan to control via I2C directly from the Pi. This is changed once per setup and does not need to even be in the Gcode)

Can anyone think of anything I am missing that would cause PICnc not to be a good fit for this project. More or less a normal 3 or 4 axis machine with the exception of Raster engraving. For my raster engraving planning on trying to use Graster (http://wiki.linuxcnc.org/cgi-bin/wiki.p ... th_A_Laser) Sounds like it will work with just what I have above but have not dug into all the details yet. (need to get this thing moving first.)

So anyone see any glaring issues at this point?

If not where is the best place to get the PICnc firmware and LinuxCNC files? Does anyone have a install guide for dummies for the LinuxCNC software? (on the PIC end I use a lot of the 8 and 16 bit parts at work so quite familiar with programming them with the pickit 3)

My plan is to build a small custom breakout board that takes 24V in from my main power supply and generates the 5V (3.3V?) to run the PICnc and Pi. It will also support the signal conditioning to the laser supply and interlocks.
I have no experience with lasers so no comment :)

The v2 version of the board has an LPT compatible pinout. As long as you only need 4 axes and can work with the PC version of linuxcnc then picnc v2 should fit your needs.

You can also try the sim/posix version of machinekit/linuxcnc to see if the UI fit your needs.

I'll post the instructions later as I'm typing this on my phone.

Cheers
42

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Thu Aug 07, 2014 1:38 pm

Here's a brief instructions on how to install Machinekit on an existing raspbian installation:
  1. Add repository:

    Code: Select all

    sudo sh -c \
       "apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 49550439; \
       echo 'deb http://0ptr.link/raspbian wheezy main' > \
       /etc/apt/sources.list.d/rpi-machinekit.list"
    sudo apt-get update
    
  2. Install machinekit (demo/sim mode)

    Code: Select all

    sudo apt-get install machinekit-posix
Then run the following command under xterm :

Code: Select all

linuxcnc
or click the corresponding menu item.

I'll be updating the minimal raspbian image soon.
42

Wire
Posts: 78
Joined: Tue Sep 11, 2012 6:46 pm

Re: LinuxCNC

Thu Aug 07, 2014 3:35 pm

Thanks that get the Pi side of things going. How about the firmware for the PIC? Or does the Pi code load it automatically?

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Thu Aug 07, 2014 11:19 pm

Wire wrote:Thanks that get the Pi side of things going. How about the firmware for the PIC? Or does the Pi code load it automatically?
The firmware is loaded using pickit or it can be programmed thru jtag using RPi.
The hw info and firmware files will be on my github page: https://github.com/kinsamanka/PICnc-V2
I haven't uploaded the firmware yet as I'm not finished with the testing. The firmware is similar to the old picnc (https://code.google.com/p/picnc/source/browse/) if you want to have look.
42

Wire
Posts: 78
Joined: Tue Sep 11, 2012 6:46 pm

Re: LinuxCNC

Fri Aug 08, 2014 2:07 am

Ok will keep an eye out for it then. Should have the new stepper drivers next week and more than likely will not get them all hooked up till the weekend. So have some time before I need the firmware :)

Thanks again

xt550
Posts: 12
Joined: Sun Mar 23, 2014 12:44 pm

Re: LinuxCNC

Fri Aug 08, 2014 12:56 pm

Is there a "partlist" for the PicNc v2 card?

Wire
Posts: 78
Joined: Tue Sep 11, 2012 6:46 pm

Re: LinuxCNC

Fri Aug 08, 2014 1:51 pm

Did not see one in his repository but the *.cmp file gets you close. Has all the refdes and values listed for the various parts.

If your going to use external drivers (like these http://www.ebay.com/itm/221498780871?_t ... EBIDX%3AIT ) I will have some extra raw cards with screw terminals vs the integrated drivers or LPT output he has in his repository in a week or so. Just need to sit down and finish the logics and get the board out to OSHpark. Note the external drivers are only really needed for large steppers (>1.5A continuous). If it is a small machine / steppers and continuous <1.5A and peek <2.2A then his integrated version is the way to go.

HobbyBob
Posts: 5
Joined: Wed Jul 23, 2014 11:44 pm

Re: LinuxCNC

Tue Aug 12, 2014 6:01 pm

This is very cool stuff. Have you put it in any competitions? Try this one, I believe you have a good chance. http://www.chipkin.com/products/raspber ... mpetition/

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

UPDATES

Fri Aug 15, 2014 3:34 pm

Here's the link for installing Machinekit on RPi: https://github.com/kinsamanka/PICnc-V2/ ... Machinekit

The latest firmware for PICnc V2 is here.

The wiki is still work in progress. Suggestions are welcome :)

Cheers!
42

Wire
Posts: 78
Joined: Tue Sep 11, 2012 6:46 pm

Re: LinuxCNC

Fri Aug 15, 2014 3:53 pm

Well the first thing that pops in my head is G7 raster support :)

Currently waffling between using PICnc and a arduino mega / modified marlin firmware. The lansing maker network (http://wiki.lansingmakersnetwork.org/eq ... ser_cutter) has a modified marlin firmware package that runs their laser cutter. Does just about everything I want other than a nice gui / conditional Gcode support.

Not sure if this would need to be implemented in the PICnc firmware or if this would be something up at the linuxCNC level. Here is an example of a G7 command below.

G7 N0 L68 DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhaGBUQFRiZ0ZPVExARUU6RTpITD1GU05Q
-------------------------------------------------------------------------------
N: new line: increments Y axis by LASER_RASTER_MM_PER_PULSE * LASER_RASTER_ASPECT_RATIO from Configuration.h 0 = negative movement in the X axis, 1 = positive X axis movement.
L: byte length of the packed pixel set
D: data, base 64 encoded 0-255/pixel


From a pure vector operation I don't see any real advantages of one over the other. Raster on the other hand the marlin firmware is winning. There is graster but not sure how well supported it is....

Quick question what is the max step clock rate the PICnc support? and is there a derating curve if more than one axis is used at a time?

Thanks for all the work!

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Fri Aug 15, 2014 11:54 pm

Wire wrote: Not sure if this would need to be implemented in the PICnc firmware or if this would be something up at the linuxCNC level. Here is an example of a G7 command below.
All the intelligence is done by machinekit/linuxcnc, the PICnc just performs all the high speed stuff (pwm and pulse generation).

From my brief googling, rastering is possible, it all depends on how you implement the laser power control (I think ;) ):
http://buildyourtools.com/phpBB3/viewto ... =14&t=3562
http://wiki.linuxcnc.org/cgi-bin/wiki.p ... th_A_Laser

The beauty of machinekit/linuxcnc over marlin firmware is that it is very extensible. You can approach the problem in many ways depending on your skill set. Actually the power of linuxnc lies on HAL, you can create complex systems without writing C or Python code.

What program are you using to generate the g-code? You can also pre-process the g-code output to convert it to something that can be easily implemented on linuxcnc.

I would suggest you head over to linuxcnc forum for general g-code/linuxcnc queries. I'm sure someone has already encountered your issues.

If you need PWM or PPI outputs, then let me know. The PICnc firmware is easy to modify, at the moment I don't know exactly what you need (the laser interface side). If you need more I/O that is not too time critical, the RPi gpios can be used.

If you have a spare PC with LPT port, you can use it temporarily while you figure out how to wire everything and then move over to RPi once everything is working OK.
Quick question what is the max step clock rate the PICnc support? and is there a derating curve if more than one axis is used at a time?
They are capable of running at 40 kHz at the same time.

Cheers!

EDIT
I forgot to add this link: http://www.cnczone.com/forums/general-l ... d-dsp.html
42

nlc
Posts: 37
Joined: Mon Sep 15, 2014 2:40 pm

Re: LinuxCNC

Mon Sep 15, 2014 3:02 pm

Hello everybody,
I built a 3 axis + spindle CNC router some week ago, and I don't find a good computer to drive it through the parallel port. I find this topic, and thus I bought and received my Raspberry Pi, and I will get a PICNC V2 board soon directly from kinsa :D

Thus for the hardware side I am OK :
- Steppers motors
- 3 axis stepper drivers board, with parallel port input, and the power supply
- Raspberry Pi and the PICNC V2 board

But for the software, I am completely lost :?
I followed the wiki to install the prebuilt machinekit image : https://github.com/kinsamanka/PICnc-V2/ ... Machinekit
Everything is Okay, the Raspberry start successfully, the latency-test gives good result, and the UI works through my SSH/X11 redirection.

But now, I don't know what to do. I seen in the source tree "HAL" there is piccnc.c and picnc.h which are the source code for the driver of the PICNC V2 board. But do I need to compile it (and how), or maybe it is already compiled and ready to use in the machinekit image ?
What I am supposed to do know to have linuxcnc working for my CNC router ?

Best regards
Cyril

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: LinuxCNC

Tue Sep 16, 2014 6:14 am

I tried an earlier pre-built image the other day but the Password. I just downloaded the one referred to in the post above. I will have to give that a try.

I am running EMC2 (ver2.4.4) (LinuxCNC) on a Sherline Lathe and Mill their box contains the driver board and power supply for the steppers in the computer case. It is running an Atom D2550 1.86GHz with 2GB DDR3. Runs pretty good. I have been testing Ver. 2.6.3 on a netbook to see if I can upgrade my Sherline system to something newer without nuking it.

I code all of my G code by hand. I guess it is a hold over from my old DOS days. I have been looking at FreeCAD.

I like to see the part develop in the backplot. I use the Mini display for the mill and AXIS for the Lathe. Most of the time I carry out comps in the code rather than use the tool comp. I have been using the backlash compensation and am pretty impressed with it! Cutting out a circle without backlash comp the circle was .012" + out of round. With the backlash compensation on it is now .0025".

Reasonably happy with EMC2/LinuxCNC so far. I have been having issues when testing subroutines. Something does haywire when I try to change a subroutine in the editor then rerun the program. The subroutine will fail in various manners. I have to restart EMC2 then try again. I wondered if you or others have the same issue. I will probably have to contact the developers and see what they say. Just mentioning it in case you might have had the same trouble, or just had subroutines that were not working right. I am hoping this is not an issue in 2.6.3 since it is several years newer. Sherline insists on using this older version for whatever reason!

I would like to get it up on the RasPi. I think it would be a good project to build a toolbox sized system that was self contained.
tool box cnc rom cncCookbook small.JPG
tool box cnc rom cncCookbook small.JPG (29.59 KiB) Viewed 5256 times
Something about that picture just got me thinking. PCB's, light metals?

Richard: mostly just lurking here
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Tue Sep 16, 2014 8:35 am

nlc wrote:But now, I don't know what to do. I seen in the source tree "HAL" there is piccnc.c and picnc.h which are the source code for the driver of the PICNC V2 board. But do I need to compile it (and how), or maybe it is already compiled and ready to use in the machinekit image ?
What I am supposed to do know to have linuxcnc working for my CNC router ?
At the moment, the PICnc driver is not packaged with the Machinekit image as it is still under development.

Normally, you'll have to download the PICnc sources and compile it on the RPi.

But I'll be releasing a compiled version soon so that it won't be difficult to install the driver. I'll also include a sample ini file so that it will be easy to integrate to existing setups.

Cheers
42

JASM123
Posts: 54
Joined: Fri Sep 19, 2014 3:25 am

Re: LinuxCNC

Fri Sep 19, 2014 3:37 am

Hello,
Im a Newest in this board with Raspberry, I read all the steps for this post https://code.google.com/p/picnc/wiki/Cr ... anLinuxCNC and I have a questions about it , in this steps I see that I have to create a minimal Raspbian Image , But my raspberry PI has already the raspbian,Can I skip this Step and the step of "Create SD card image"?? , or the link talks about to use a blank SD card???,

Other question ,this program: rpi-lcnc.2.1.img.bz2 in the link, I have to download this program (with my laptop) and paste in the SD card of my raspberry????

Thank you so much and Regards

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Fri Sep 19, 2014 7:45 am

JASM123 wrote:Hello,
Im a Newest in this board with Raspberry, I read all the steps for this post https://code.google.com/p/picnc/wiki/Cr ... anLinuxCNC and I have a questions about it , in this steps I see that I have to create a minimal Raspbian Image , But my raspberry PI has already the raspbian,Can I skip this Step and the step of "Create SD card image"?? , or the link talks about to use a blank SD card???,

Other question ,this program: rpi-lcnc.2.1.img.bz2 in the link, I have to download this program (with my laptop) and paste in the SD card of my raspberry????

Thank you so much and Regards
Hi,

That's the outdated instructions. The latest one is here

Cheers
42

JASM123
Posts: 54
Joined: Fri Sep 19, 2014 3:25 am

Re: LinuxCNC

Mon Sep 22, 2014 1:55 am

Thank you Kinsa,
My project is about create CNC milling machine, but this link is OK for me??? I view you video about a CNC 3d Printer but I have to make a CNC milling machine, about this the link works for me??

Thank you and regards

Return to “Automation, sensing and robotics”