Going fully open source with the CNC engraver

I've been playing with the CNC engraver and discovered a few things. First up is the controller is based off an Arduino Nano running open source code (grbl) but running an older, stable version (0.9). Another is that the z-axis was miswired, even for the software it shipped with, so I had to reverse the pins on one end of the z-axis cable. It's possible to fix this in software but it irked me.

Somebody from London Hackspace pointed me at LaserWeb as a good front end to the laser engraver side of things so I've started to investigate it.

Converting these Chinese laser engraver/cutter devices away from the slightly cheesy software they ship with to open source is a common question and an Australian woodworker has produced a breezy intro to doing this. It's for a different device but the fundamentals are the same.



The LaserWeb server will happily run on a Raspberry Pi and I've several sitting in a box. After a couple of hiccups going through the howto it's up and running. This needs a newer version of grbl so I've programmed the Nano in the controller with grbl 1.1e. It's easy to put the original software back on as part of the original CNC build is to program the Nano with a file they provide.

A big gotcha I did find is that the LaserWeb GUI needs ALL the components to be working. So if you try to use the interface and it's displaying error messages, particularly relating to WebGL, in the bottom right log window it just won't work at all. It looks like there is a server error because it says you can't connect but this can be down to the graphics library as it breaks a load of things in the app, not just the graphics previews. A very helpful person from the LaserWeb3 support comunity on G+ helped me work this one out.

Now I was down the rabbit hole of playing with the laser side of things I decided I wanted to be able to work safely while testing and sticking the whole thing in a box was going to make that irritating. I've got a load of cheap ~5mW laser pointer modules kicking around so I 3D printed a 'dummy' housing the same size as the 'real' laser module and fitted one of these.

This left me free to mess around without blinding myself or starting a fire. The laser may only pack a 500mW punch but that's enough to do both these things.

Having proved to myself that the thing wasn't going to smash into the end of its travel and LaserWeb turned the laser on and off reliably in a fashion that looked like it was going to produce sane activity instead of just melting something I didn't want melted I had a go at the real thing.

I found an .svg of the Coke logo on Wikipedia, scaled it appropriately in the LaserWeb interface and started burning. At first this had zero effect and I was wondering if the laser module was defective. As I had a box over the whole thing to prevent any chance of blinding myself I couldn't really see what was going on.

I don't really trust the cheap laser safety goggles I got from Banggood. I had a webcam pointed at it but the laser simply oversatured the picture so I couldn't see much.

Using the 'test laser' button in LaserWeb, which runs it very briefly at minimal power, with the box removed I could see the beam was totally unfocused. There wasn't any obvious way to fix this, but some experimental twisting of the module showed it can be focused. This is not obvious at all and not mentioned in the minimal documentation. Once adjusted carefully to make a tiny bright spot it engraves random wood quite nicely. This Coke logo was done by running it quite quickly doing multiple passes. I need to experiment somewhat with the engraving speed and at some point try to cut some thin material.


In principle LaserWeb has a 'CNC' mode too where it will handle CNC milling/engraving which I'll investigate as it would be nice to use the same software for both jobs. The more I play with this though the more I think I want some limit switches so it can home itself automatically and definitely prevent crashing into the end of travel this is a bit of modding that shouldn't be too hard to do.

No comments: