Thursday, April 9, 2020

Converting a 2418 Desktop CNC to Laser part 2

In part 1 I talked about the mechanical and wiring portions of the conversion. In part 2 I will discuss software settings and usage along with operation. Now that the laser is mounted and wired it's time to burn some wood!

The LaserGrbl software lets you change some of the Grbl firmware settings on the controller board. I left everything as is except $3 which I had to invert so that the X and Y movements on the mill matched the output from the software.


I started out powering the laser using an old 1 amp variable voltage power supply I built many years ago. I figured 12 volts, 5.5 W, that's less then 1/2 an amp right? Wrong. My initial try with the included griffin example file (look for the sample SVG - G Code folder) went well but after that the laser output started becoming erratic and would trail off after a few seconds. A quick test with a multimeter showed the power supply voltage was dropping to just 3 or 4 volts! 



A week or so later when I got a fixed 12V 5A power supply I was able to start experimenting again. LaserGRBL lets you make custom buttons. Right click and choose Add Custom Button in the button bar at the bottom. This one turns the laser on at low power (25/255).



I do not have limit switches so Grbl uses the XY position at power on as home. I make sure the laser is positioned on the lower left area of the workspace when I power up and then use this low power laser on/off button to give me a low power dot to position the work piece. Getting the laser focused was tough because even at the low power setting the wood begins to burn after a few seconds. Focusing took some patience as I had to keep moving a scrap piece while turning the focusing ring and looking for the smallest dot. It paid off because now it draws very sharp lines. I am using scrap pieces of 1/8" mahogany construction grade plywood.



After experimenting with laser power settings and feed speeds I came up with a combination that gave good clean lines and corners. I drew the iceboat outline by tracing a photo using Aspire and then exporting it in svg format. LaserGrbl generated the CNC code from the .svg file. On import the software asks for the feed speed and laser power settings. The code did not complete the lines in a logical order, often wasting time jogging back and forth. I still need to investigate why this is happening. 

Doing something with grey scale in it like a photo is the next challenge. Wood is either burned or not. LaserGrbl creates grey scale areas by using dots, the more space between the dots, the lighter the shade. The trick seems to be feeding LaserGrbl with a photo that is comprised of a narrow scale from light to medium grey.



I imported this grey scale file to try some test strips at different feeds and power settings.



Coming up I'll experiment with photos some more and then move on to cutting paper and wood.




Thursday, March 26, 2020

Converting a 2418 Desktop CNC to Laser part 1

I had been toying with the idea of swapping the spindle motor for a laser on my 2418 desktop CNC machine. The Woodpecker 2.6 controller has a laser output which is straight ON/OFF but I wanted to use a 5.5 W PWM controlled 450 nm blue laser so that I could adjust the laser power on the fly. The Laser I found on line is made by WonVon and comes with a controller with 12V and TTL (PWM) inputs. The software I found is similar to the GRBL software I used for CNC work and is called LaserGRBL v3.1.2.  I believe what I found out will work for any PWM controller laser running any CNC/Laser type software using the GRBL controller.

I discovered that the Atmega 328 that is the brains on the Woodpecker is the same chip used on an Arduino. It had a boot loader called GRBL 0.9 but I needed to upgrade to 1.1 to be able to control a laser. There are a lot of instructions and discussions available showing how to do this on an Arduino but nothing clear for the Woodpecker. Fortunately, there is a utility built into LaserGRBL that flashes the 1.1 firmware (bootloader) with the push of a button. The USB interface to the Woodpecker uses a CH340 chip and LaserGRBL also has a utility to install the driver. Both utilities are in the menu bar under Tools.

I thought that the PWM pin that the S command (laser intensity) in G code was available on the 34 pin header. Sadly I was mistaken. The signal originates from the D11 pin on the Atmega 328. On the Woodpecker the 328 is too small to solder directly but D11 connects to the big power MOSFET that controls the spindle. You can see I soldered a short piece of blue solid 22 gauge wire directly to the MOSFET signal pin in the photo below. The brown ground wire is a female 0.1 jumper end. Both of these are spliced to the PWM input. White is PWM + and yellow is ground. The other connector in the photo with yellow and white wires connect to an external 12V DC power supply. On this connector yellow is + and white is ground.



I also thought it would be nice to easily switch between Laser and Spindle mode on the 2418. I hoped the spindle motor clamp was the right size to also hold the laser. Again, sadly I was mistaken. Fortunately I found that Brandon Piner had published some stl files on Hackaday that showed promise. His CNC Z Mount allows the easy exchange of tools. Brandon also put his files on Thingverse where a remix by wb-maker gave me a mount for my laser. Now all I needed was a mount for my spindle motor. I drew this out in Inventor and then got all three parts, the Z Mount, the laser mount and the spindle mount printed.

The next 3 photos show the Z Mount, the Z mount with the laser attached and the Z mount with the spindle mount attached.



In order to use the new Z mount I had to push the 4 bearings and lead screw adapter out of the original spindle mount and then push them back into the new Z mount. I was careful to use objects like bolts that were the same diameter as the bearing or adapter to gently tap them out/in. To push them out I supported the block on a solid surface with a hole large enough to receive the bearing or adapter. To push them in I made sure the parts had a thin coat of oil and were held square to the hole. No excessive force was needed.

In part 2 I will talk about getting the software set up and using LaserGRBL to do line art and grey scale bitmaps.