Hi there, YES I always take time to research before asking any question on a forum: I respect people time and I'm not lazy. But this is driving me crazy, and every attempt ends up not working as expected in the middle of the night. I know something is wrong but can't quite figure it out. Built my own CNC using a Protoneer shield version 3.00 over Arduino Uno. The wiring is ok and I can send simple Gcode to the machine (actually a laser engraver). I'm using GRBL 7, 8 and 9 on my tests. But the results are not as expected and managed to frame the gcode as the possible problem, not the machine exactly. 1. First, generating the Gcode from Inkscape produces a file with commands (gcode) that turns on the laser from start while the machine take position, this means the first thing I get it's a straight line to whatever. I can solve this manually editing the gcode file or keeping off the laser until ready (but that's not the normal operation right?) will appreciate any help with this. 2. At times the gcode ends up producing the expected results (despite the straight line from 0,0), but other times generating the gcode from the same file ends up on wrong shapes. So I try again and I get errors, then again and sometimes "it works", then try again and the machine engraves but suddenly stops without any error. What I know from this is, Inkscape doesn't produce reliable gcode files 10 out of 10 times. Sounds familiar to you? 3. I've searched, downloaded and tried several gcode senders to no avail. Also tried lots of programs to generate Gcode, but some are a pain (I'm not lazy). I'm willing to buy a software solution if it works (proven, or if it has enough good references). I can export my artwork to pdf, dxf etc, what I need is reliable gcode. 4. Tried makercam and the gcode produced works, clean, but the laser won't turn off between shapes producing more straight lines. The simulator and sender (jcnc) shows green and red lines (knowing the difference between what's suppose to engrave and what not, but at real time it just keeps on the laser. On a sidenote, I'm a software developer (see?not lazy at all) and was writing my own software to control another version of the CNC using h-bridges with good results on straight lines, but now I have way too much work and I can't take this journey of multiple nights without sleep for several weeks. Any advice, will be grateful, I've tried lots and lots of stuff, yes, it does seems clear to me it's the gcode quality. I'm using Inkscape 0.91 (honestly I don't quite like it) followed tutorials on the web and did exactly the same, but tutorials won't show the machine, only the process and simulation so I don't know if what I see on my end is the normal behavior. Thanks in advance, been investing hours and hours for several weeks and months. Perhaps someone experienced this and has some light to share.
I have a router not a laser, but I've been using Autodesk Fusion 360, They just recently have added water jet, laser and plasma cutting to it's cam section, It looks like it only does contour cutting at the moment not image engraving, but it's worth keeping an eye on.
Can you tell us what Gcode it is that turns the laser on and off? Can you give us a simple example, say Gcode that correctly cuts 2 small squares? Many CAD/CAM programs use a 'postprocessor' to output the Gcode. The CAD lines are translated to generic cut commands, and then the postprocessor (usually looks like a script language) will do the actual cut command to Gcode translation. This means that the gcode you get depends greatly on the 'post' you are using. Now, I don't know Inkscapes method of doing it, but maybe you can edit the post? I believe that testing older versions of GRBL are a waste of time, if the latest version does not work then GRBL is not the problem. It is also a big hassle to support old versions of software, as you know (-: Now, I am the current maintainer for SketchUcam, the Gcode generator for Sketchup. If I know what your Gcode needs to be, maybe I can add it for you. I am going to release a new version soon, so now is the time...
Hi Joshua thanks, just downloaded the software (free evaluation), kinda big, will try it, I have very few hours of sleep right now.
It's not enabled by default, you have to enable the option first. In the top right click your username, then preferences, in the window that pops up at the bottom of the menu on the left click preview for the option to enable water jet, plasma, and laser cam. It is very big software, it's a full CAD/CAM and simulation suite. I only use it for it's CAM because I prefer OnShape for CAD, but it is very full featured in all aspects, unfortunately it can be daunting to get started because of all of the options, much like photoshop's large learning curve.
Hi David, yes, the code to turn on the laser is M03 and works well, the problem is where Inkscape puts the first call. I will explain: Inkscape is producing a gcode where each shape has a commands to turn on and off the laser, and well located, the problem is the first shape. The gcode tells the machine to turn on the laser and ten move o the fist corner, thus creating a straight line (unneeded). So I must edit the file manually. After lots of readings found that the shild Protoneer was designed for GRBL 8 in mind, so I uploaded it again, again because I already tried this version with same results. I tried changing the preferences on postprocessor but nothing worked, in fact got worse, but I do understand what you mean. About posting gcode here I honestly don't know what to do, the same routine is producing diff results so I don't think it would be useful, just by that I already think I should stay away from Inkscape. Additionally because tonight just tried CNC Control (as the sender) and it rejects the gcode files generated by Inkscape. Tried JCNC and Universal Gcode Sender, both were not consistent. What's the Inkscape method? I followed tutorials (all matching the same way), its about converting all shapes to paths, CTRL + SHIFT + C, then CTRL + J, then using the extension, apply a tool from the library, then generate toolpaths and then exporting the gcode. I also tried tweaking the preferences and the text on the green box. I will stay away from this, just invested enough time, days, weeks and months with confusing results. Note: it's been quite a journey, I've seen a lot of videos, read a lot of tutorials, etc, but something comes quite surprising: many of the videos showing inkscape and arduino etc, are about small examples, and most posters don't post anything besides one or two, so I have no idea of consistent results on the whole thing being too reliable (the hardware and the software). Back to the point, just tried CAMBAM and after several tries got the gcode avoiding multiple passes (depends on depth), it worked well with CNC Control, it didn't work with Universal GCode Sender or JCNC, it didn't stop, didn't got stuck, etc. But it also created the straight line, still this is quite some results for now. I have very little hours of sleep so I will try in about two days. Thanks, will post again.
You posted almost at the same time as me, now I read it. Thanks, yes it needs registering, activating/enabling it and it's quite big... I do try to test all the options in situations like these, but at the moment with so little sleep due to several reasons I'm holding my horses for a while, it's on my list. Thanks for the advice.
so M3 is laser on and M5 is laser off...... so if you run this Gcode you should get two 25mm squares that are not connected and have no diagonal anywhere.... you may want to adjust the 'F2000' feedrate settings (-: Code: % (Generated by SketchUcam V1.4a-78373) (File: laser.skp) (Bit diameter: 3.0mm) (Feed rate: 2000.0mm/min) (Plunge Feed rate: 1000.0mm/min) (Material Thickness: 6.0mm) (Material length: 2500.0mm X width: 1200.0mm) (Overhead Gantry: true) (Plunge Diam First) (Optimization is ON) (LASER is ON) (www.PhlatBoyz.com) G90 G21 G49 G61 G17 M05 G00 X10.000 Y10.000 M03 G01 Y35.000 F2000 G01 X35.000 G01 Y10.000 G01 X10.000 M05 G00 X40.000 M03 G01 X65.000 F2000 G01 Y35.000 G01 X40.000 G01 Y10.000 M05 G00 X0 Y0 (home) M05 M30 % @Mark Carew (-: read the header carefully
SketchUcam can control lasers now? How cool is that! @David the swarfer you rock bro. Well done my friend
Thank you for your time and help David. I copied and pasted the code into a simple text editor. It worked as expected, the results are: JCNC: ok CNC Control: ok Universal GCode Sender: Failed. No lines connecting nothing, not the shapes or the initial point (0,0). Just in case someone new reading the thread confused about this, the unnedded line was being engraved from the initial point (0,0) to the first coordinates of the first shape. And then, most times it stopped at random points, this happened with both JCNC and UGCS. SketchUcam! yes the plugin, will have to try it again, the nights I did couldn't get it to work but pretty sure I messed up. Couldn't get G Sketchup to run, I gave me errors on compatibility, will check again. Thanks
Update, for anyone on the same boat: after some hours of sleep and a-lot of tests, here are my findings (will avoid unneeded details on many things that didn't work and post only a bit of some that are not even worth the time for readers to test). I'm using Protoneer Shield V3. Found details on being designed for GRBL 8, so I'm using the only v8 I could find (8.c). My previous Arduino attached to it "works" but after weeks behaved weirdly, confirmed "dead" as to work with Protoneer. Replaced using an old one, is working better. Still found erratic Gcode behavior later, but it's fixed (details as follows). JCNC. Worked "sometimes" with previous shield. It's better now. Universal Code Sender. Fail. The "last" version is not available, saw screenshots, searched links, it's down, it seems for good, no updates. The versions I tried didn't work, they behaved erratically. CNC Control. It works way better. Setting the hardware. So after replacing the old Arduino flashed the v8 of GRBL. Things worked better, but still failed sometimes. I decided to drop Inkscape. Sometimes it generated diff Gcode for the same artwork (no kidding). I don't have details, not interested for now on that, just on getting things to work. Tried several programs with no luck, my best choice was CAMBAM. Generating Gcode. I'm exporting as DXF. I tried re-importing and looks ok, but sometimes importing to CAMBAM some new lines appear (closed polygons), easy to fix. I'm using ENGRAVE with 0.1 and -0.1 on depth, it creates the Gcode. Problems with CAMBAM GCODE. You must apply engrave to each polygon/line. If you have multiple elements try CTRL+J to join them and reduce the number of items. If you select all the elements and apply engraving, A SINGLE ENGRAVING PASS WILL BE CREATED, this means the GCODE will not provide any OFF commands for the laser during movements. G1 are commands for movement during engraving, G0 are just to move to X,Y coordinates. Well you will have the laser on during all movements ruining your project. You can fix this using individual elements and applying engrave to each one, this can mean a lot of work, specially if you want to engrave text. Why so much hassle? I don't know, but in my case it proves more reliable than other tests. Another problem, first engrave. One thing sucks, CAMBAM puts one LASER ON command on the Gcode previous the first G0, this means you will get a straight line from 0,0 to your first engraving point. This is something Inkscape was doing too. Tried lots of settings with no luck. There is a setting when you apply engrave that says "starting point", I suspect this could solve it, but it asks for coordinates... so, it sucks for every operation, I refused to try and looked for another solution (seriously, that would be tremendously boring). Fixed. Just created a PERL script, it removes EVEYRY SINGLE laser on command and every single laser off command. I switched OFF the Z motor so I won't be needing to move the laser with gcode, it's fixed, so the script removes every Z command. Then, the scripts looks for every G0, and inserts a laser off before it, then looks for the first G1 for each block and inserts a laser on command. Now it delivers blocks of groups of commands with their respective off and on and off command. And it does the same for G2 and G3 commands. It works. I watched lots of tutorials, even found complains and questions on people with the same problem as me but found no solutions or replies, this method above works. The script is very simple and cheap, ugly yes, I could make it better over time and perhaps on a diff language. Tried diff approaches (I'm saving explanation time and space here) and my best configuration is: - GRBL 8c - Arduino Uno - JCNC or CNC control (ditch UGCS) - CAMBAM plus - My script IF I had enough time I could work a SVG to GCODE interface, I'm seeing a lot of people stuck on this, maybe in the future, first I have to recover sleep hours. Thanks for the help, I finally had to dig more and more on the Gcode. Hope this helps.
Still testing, won't give up until I find what's wrong with this. I've found after several days of searching, a lot of threads with the same exact problem.
as I said before, you need to separate the problems with hardware from the problems with Gcode. GRBL 0.8c was replaced by 0.9 because 0.9 contains bug fixes and improvements, esp speed and queue processing. maybe @Sonny Jeon can chime in with some insights? if the default 0.9j does not match the pinouts on your shield, then you can change the pin assignments and recompile it. quite easy in the Arduino environment, just remember that the step and direction pins needs to be within the same 'port', but it is unlikely that the shield will require much change, probably just the spindle on pin since 0.9j defaults to using PWM control which is on a different pin. AFTER you have got the hardware sorted to where it will reliably run a simple cut file like the one I sent you that cuts 2 squares, THEN we can look deeper into G-code issues, if any actually exist.
Please use Grbl v0.9 over v0.8. It has numerous fixes, especially with performance and stability. The pin configuration changed slightly, where pins 11 and 12 swapped to access the hardware PWM for variable spindle output. So pin 11 is now spindle enable/PWM and pin 12 is z-limit. You can return to the original pin config by commenting out VARIABLE_SPINDLE in config.h. As for g-code problems, I think the main thing is that CAM programs are mostly designed for CNC mills or routers, where the machine behavior is different. You don't necessarily care if you have the spindle on between cuts. Also, with open-source CAM programs, they are not always the most stable and consistent as you may know. The community is basically just getting started with laser cutting and the CAM software will catch up eventually. I think it would be best to notify the developers of these various CAM tool and senders of your problems to see if they can patch them. Otherwise, they may never get fixed. I've said this before, I'll say it again, Grbl will have an official laser mode soon. Working on it now.
I am working on generating laser code from SketchUcam. at the moment just replacing Z moves with M3/M5 and also setting the S word for PWM power setting. Anything I am missing? I can see a need for allowing other codes for the laser, as in the case where you have a router spindle AND a laser engraver on the same head. Then one could use 'coolant on/off' for control I suppose.
So, things are working now, perfectly? still in testing but at least I can work and produce results, consistently with a few minor problems from time to time, in what I consider acceptable on any machine. I separated ideas and tested isolating everything I can think of. The problem was: EMI, electromagnetic interference, but there were some other issues involved. Experienced some random problems with the shield that changed the behavior of the machine when I changed the motor ic driver on the shield (a4988), so, or the one ending up back on the box was damaged or at least not worth of trust. Yes I used heat sinks there. Tested diff GRBL versions, V7 gave the best results (less problems). Read some and found since V8, more Gcode is accepted on the shield where the code in there tries to decide some stuff by itself. I was looking more and more on step by step stuff/code. Things started to look better when I switched off, completely, the laser driver. I was using DIY (made by me) relay driver. So I removed it, used an Arduino relay module, it worked!!! then it stopped working. Finally after remembering some readings about power sources and separate outlets, decided to try something different, using an "always on" power driver, and just cutting the power to the diode. It worked. So, it seems the EMI or some kind of interference wasn't coming from the relay itself, but from the power supply, from the power lines. I confirmed this when I built another machine, and this time used a relay module made by me from scratch. The same setup was successful, and better when a ferrite toroid was included. So the machine works now, as expected. Decided to kill the 3rd motor and keep the Z axis on manual mode for adjustments. I hope this helps other people, don't underestimate the interference produced by the motors (use twisted pairs, capacitors and ferrite wen possible). Don't underestimate EMI or other kinds of interference, on the machine, on the electronics and even on the power lines. Exagerated? Nope. Found an interesting topic on a forum, where the guy finally got the machine working without problems when the lights were off (fluorescent illumination), a couple of forum members confirmed similar problems. After days of testing the machine the problems appeared again. Guess what, this time it was about the headphones, I was hearing music and finally decided to unplug and just get the music from the computer only, without the headphones.
Thanks, I tried 8 and 9, but in my case V7 worked better, can't tell why. Found some documentation buried on the web on the shield being designed for that version, without believing it just decided to try, I liked it so I keep it. I understand about the pin changes, it's on on my end given the setup I used and the relay. As for Gcode, well most options suck, even CAM programs (free and non free). Tried several, many, it was boring. Some are just... FUGLY, ugly ugly, terrible, a time waster. Some have forums filled with questions because they give some problems. Found lots and terrible tutorials on generating Gcode. I could write a lot about this. Finally have my workflow now, I'm using CAMBAM to import DXF files. All the "solutions" found won't work on a group to individual basis, it's manual, one by one. Searched but found no answers to this and got tired. So I just import, engrave, generate toolpaths and gcode. The result is some Gcode that won't ever turn the laser off, so it produces unneeded cuts, but I created a script on Perl that analyzes the Gcode files and separate the shapes, so the final gcode set has on and off commands between the shapes, I'm lazy enough to produce solutions that save me work sometimes.
I tried SKUC but had some issues. As said before, this was getting ugly, it was the machine, then the software, OS issues, etc. I'm using Cambam, I was using the Z axis motor but decided to remove it, now I adjust the laser manually, and no PWM on my end. Yes, I agree on using diff codes for lasers, I'm not sure if "changing tool commands" could do the job. I was thinking on using a diff set of lasers on the same machine, that's why. But so far one laser seems enough on my end. Coolant on/off didn't work for me on any version, only when I used JCNC. CNC control didn't work, as any other cnc gcode senders that I tried. well that's it, it works. Now I'm planning on replacing the 1W laser with something more powerful.
not surprised you had 'some issues', the version of SketchUcam that is currently released does not support laser control (-: but the next version will.....
So we need a program that: a) generates G-Code from raster and vector files, and b) allows M3/M5 control of "spindle" on/off for rapids, and c) generates S-address "spindle speed" TTL for raster greyscale images, and d) allows z-axis motion for depth passes ? And there's no one piece of software out there that does this, free or otherwise? But SketchUcam will do all this at some point in the (relatively) near future...? I'd better start hunting down a copy of Sketchup soon, eh?
Not sure about c) spindle speeds, but it appears that GCodeTools in Inkscape does the others, as long as you use the "prepare for plasma" function? I'll experiment with it further soon.
no, SketchUcam will not do raster images as there are already a lot of programs that do it quite well. SketchUcam WILL do the more prosaic outlines (cut or engrave) or text writing type stuff, from a line drawing. will do Z motion if you need it, by your manually joining files together with a suitable Z command between them (-: This is a lot easier than you think. Just use a text editor to create ,say, 3 files with your Z commands in them, then join lasergcode zcommand 1 lasergcode zcommand2 lasergcode zcommand3 lasergcode for a 4 pass cut to depth. (SketchUcam includes a Gcode joiner tool)
Ah, gotcha. Yeah, that's pretty much what I've been intending to do. I've had to do some editing in N++ and it's really not that bad.
The latest version of SketchUcam that includes laser control is now available http://www.phlatforum.com/xenforo/threads/sketchucam-download.3128/ and now (Jan 2017) further updated to worjk with GRBL 1.1's new laser mode.
hay guys i'm using aspire 8 to do the cad and cam stuff but the gcode generated by it isn't work with universal gcode sender or grbl control or any grbl gcode sender i've tried mach3/2 arc mm ,gbl 0.8c gcode post processor and doesn't ork the one work for me is generated from sketch ucam any ideas to generate compatible gcode from aspire i've also tried to download shapeoko post processor for aspire and didn't work thank you
Postprcessor for Aspire and VcarvePro The Shapeoko Forum • View topic - Using Vectric Aspire to generate Shapeoko g-code From the above, it looks like the 'Generic PP' works with GRBL. GRBL only supports the most basic G-codes.
Hey Guys, Just stumbled across this post and wanted to share what I have been using for my shapeoko 2 converted laser cutter. for raster engraving of black and white logos I have been creating the image in inkscape, and outputting the gcode with a program called laser etch by jtech photonics Laser Etch B/W Image Engraving SW License | J Tech Photonics, Inc. you need to flash jtech GRBL 9g (they have the hex file already compiled) to your Arduino. it is set up to remove the slight pause when the spindle on command is sent or laser on and off. if you use the latest version it will pause slightly when the laser turns on and off. also, when doing vector cutting with my laser I use fusion 360 and use the smoothie post. in order for this to work you need to flash the latest version of grbl. as fusion outputs G0 for rapid moves and GRBL 9g from jtech doesn't support G0 commands. Jay at jtech is always super helpful and it is well worth the $30 if you do a lot of raster engraving. I am also using the Gcode sender called picsender from picengrave. also worth the $19 they charge for it. I have ran huge files with no issues.