Post for MPCNC with Marlin firmware

Here's the place for discussion related to CAM/CNC and the development of the Path module.
emills2
Posts: 577
Joined: Tue Apr 28, 2015 11:23 pm

Post for MPCNC with Marlin firmware

Postby emills2 » Fri Feb 01, 2019 8:28 pm

Hello, i recently built a MPCNC, and i would like to use the path workbench to control it. I started reading up on post processing, but i wanted to ask on the forum too in case someone happens to have a post just laying around. grbl post looks awfully close to being appropriate, but i'm just not sure. the MPCNC is not a big expensive machine...but it's what i have, so i don't want to break it :)


This machine, https://shop.v1engineering.com/collecti ... 5852019739, runs the marlin firmware on ramps. since this is used in a lot of 3D printers, perhaps there might be wider interest in the future to having Path+Marlin in FreeCAD?

a text based post processor is available for fusion 360, and i'm confident it has all the relevant data (too much actually, it has laser and jet stuff in it). https://github.com/guffy1234/mpcnc_posts_processor

In FreeCAD, i tried centroid post and both grbl versions from the Path workbench, and then i looked at the output in Repetier Host (gcode sender).
Path_WB_Test_00_00.PNG
Path_WB_Test_00_00.PNG (297.64 KiB) Viewed 1548 times
Path_WB_Test_00_02_grbl.PNG
Path_WB_Test_00_02_grbl.PNG (522.12 KiB) Viewed 1548 times
looking a the preview in Repetier, Centroid is way off scale, but both grbl posts produced reasonable looking output.

i did air-cuts for both grbl versions, and the machine behavior was reasonable. there were some warnings about unknown G and M codes, logs attached (these are not full runs. i just ran a minute and then cancelled the job from repetier).

here are the codes from Path my machine didn't recognize:

Code: Select all

11:56:05.496 : echo:Unknown command: "G17 G90"
11:56:05.500 : echo:Unknown command: "G21"
11:56:05.500 : echo:Unknown command: "M3 S0"
i'm tempted to ignore these. what really concerns me is my travel speeds and feeds.
Attachments
Path_WB_Test_00_03_grblG81_repetier_log.txt
(5.53 KiB) Downloaded 26 times
Path_WB_Test_00_03_grbl_repetier_log.txt
(5.8 KiB) Downloaded 24 times
emills2
Posts: 577
Joined: Tue Apr 28, 2015 11:23 pm

Re: Post for MPCNC with Marlin firmware

Postby emills2 » Fri Feb 01, 2019 8:31 pm

freecad and g code files just in case
Attachments
Path_WB_Test_00_02.gcodeNOTZIP.zip
(100.26 KiB) Downloaded 24 times
Path_WB_Test_00.FCStd
(947.02 KiB) Downloaded 23 times
emills2
Posts: 577
Joined: Tue Apr 28, 2015 11:23 pm

Re: Post for MPCNC with Marlin firmware

Postby emills2 » Sat Feb 02, 2019 12:38 am

After staring at the feeds in the gcode output for a while, i figured it was a low risk situation, so i ran a simple test model with a single contour operation.

It's pretty good for just a rough cut and a light sanding. For a machine made of 3D prints, skate bearings and electrical tubing, i'm satisfied.
IMG_20190201_162439658.jpg
IMG_20190201_162439658.jpg (882.57 KiB) Viewed 1524 times
so if someone google searches MPCNC and FreeCAD like i did earlier today and finds this post: use GRBL post processor, and check the output gcode. the speeds need to match your needs in mm per minute. you don't need to set mm/min in FreeCAD unless you want to. the post processor will convert to mm/min for you.

set your feeds in the tool controller, and set your travel speeds in the SetupSheet object.
mlampert
Posts: 1306
Joined: Fri Sep 16, 2016 9:28 pm

Re: Post for MPCNC with Marlin firmware

Postby mlampert » Sat Feb 02, 2019 3:24 am

This is great news - didn't know ppl use Marlin for CNC machines.
emills2
Posts: 577
Joined: Tue Apr 28, 2015 11:23 pm

Re: Post for MPCNC with Marlin firmware

Postby emills2 » Sat Feb 02, 2019 4:24 am

mlampert wrote:
Sat Feb 02, 2019 3:24 am
This is great news - didn't know ppl use Marlin for CNC machines.
it's pretty slick
https://www.v1engineering.com/specifications/

the mind blowing part is you can cut aluminum and steel with this thing. slowly.

it's a 'freeware' design, i suppose, not really open source or free. you can't sell prints of the machine part stls (they are available for personal use at no cost). i had no problem giving him my money for a hardware kit :)

i was learning fusion 360 CAM since they have a post processor, but now i don't have to! back to FreeCAD.
Path_WB_Test_03_00.jpg
Path_WB_Test_03_00.jpg (873.41 KiB) Viewed 1509 times
m0n5t3r
Posts: 51
Joined: Fri Feb 03, 2017 2:55 pm

Re: Post for MPCNC with Marlin firmware

Postby m0n5t3r » Sat Feb 02, 2019 1:38 pm

For my MPCNC I am using GRBL with cncjs; the only notable differences from a CAM point of view might be G0 / G1 (I don't know how Ryan's hacked version handles things, but in stock Marlin G0 is an alias for G1, so you'd need to add an F parameter to get any movement for rapids)
emills2
Posts: 577
Joined: Tue Apr 28, 2015 11:23 pm

Re: Post for MPCNC with Marlin firmware

Postby emills2 » Sat Feb 02, 2019 8:16 pm

m0n5t3r wrote:
Sat Feb 02, 2019 1:38 pm
For my MPCNC I am using GRBL with cncjs; the only notable differences from a CAM point of view might be G0 / G1 (I don't know how Ryan's hacked version handles things, but in stock Marlin G0 is an alias for G1, so you'd need to add an F parameter to get any movement for rapids)
thanks, i was wondering about that from watching the machine, but couldn't tell for sure. i think the ESTLCAM output for MPCNC is all G1, so we need to set the feed every line
alex::freecad
Posts: 115
Joined: Fri Aug 29, 2014 1:25 pm

Re: Post for MPCNC with Marlin firmware

Postby alex::freecad » Thu May 09, 2019 2:05 pm

Hey guys,
any update on this topic?
In the mpcnc related forum, there was this comment from guffy (I guess he's the author of the processor for fusion 360 https://github.com/guffy1234/mpcnc_posts_processor :
Freecad produce g17 command. It is selection of XY pane. (G18 xz, g19 yz. I don’t remember exactly). Afaik panes used to properly handle arc commands g2/g3.

Marlin (and i guess all 3d-printer-like firmware) doesn’t support these gcodes because just doesn’t need to make arcs in panes other then xy.

So just drop g17 (or may be marlin ignores it).

Ensure that freecad doesn’t issue g18 and g19 with g2/g3. Such arcs will not work properly. If you will found you will have to write linearization code to replace such g2 with set of g1

Check smoothie pp. Smoothie is mostly 3d printer firmware so maybe gcode will be better for marlin
bennn
Posts: 14
Joined: Thu Jul 21, 2016 7:15 am

Re: Post for MPCNC with Marlin firmware

Postby bennn » Fri May 17, 2019 5:00 pm

Hi all, just tried grbl post with freecad, machining perfectly for contours and pockets.

Now on to 3d surfaces !

Damn Freecad can do it all.... stoked !
alex::freecad
Posts: 115
Joined: Fri Aug 29, 2014 1:25 pm

Re: Post for MPCNC with Marlin firmware

Postby alex::freecad » Wed May 22, 2019 3:58 pm

Hi
bennn I'm currently setting up a series of easy to follow tutorials for the mpcnc community
https://alexpgh.github.io/foss-toolchain-mpcnc/
Would you like to contribute your findings there?