Introduction: Shapeoko 2, Arduino UNO R3, Grbl 9g, 8bit Laser Diode Photo Engraving
Me and my son invented/developed a new concept of "On-The Fly" 8bit Laser Diode engraving photos over two years ago. With this concept, the Laser Diode never turns off through the whole photo engraving process. It just varies the power up and down to produce the image and shading on the engraved material. We have came a long way since those days at the beginning of our experimentation and here is the instructions of our latest build on a Shapeoko 2.
Photos can now be engraved on different materials using a variable intensity controlled Laser Diode to get 8bit shading. The materials we have tested successfully so far is, wood, white stained wood, white painted aluminum, mirrors, white leather and white Artist Canvas. White materials gives us the best 8bit shades of gray and on mirrors we actually get shades between white and silver or the reflection. The mirror also gives us a lithophane effect with some back lighting, but looks very good without back lighting as well.
The standard laser photo engraving process prior to our development was to TTL modulate (Pulse) the material with burnt spots/dots using a dithered black & white image to get the allusion of gray shades.
Commercial CO2 laser engraving machines are still are using this old school method today to engrave photos. Higher end CO2 engraving machines do use 256 (8bit) separate power levels to 3D engrave. With the excessive laser power of these machines, it's like a bull in a china shop to be able to implement our 8bit photo engraving process successfully like when using a considerably lower wattage Laser Diode.
Since our development of this concept, many hobbyist, makers and businesses has followed our progression and applied this very unique process on there own CNC machines to engrave 8bit grayscale images/photos using a Laser Diode. Two of them are presented here and here on Instructables, one very successful campaign on KickStarter, and manyhobbyist throughout the world that are using our very unique 8bit engraving process. More examples of our Laser Diode engravings can be seen here using this concept.
This method of varied intensity of a laser diode requires a proper "Image to Gcode" program, a Computer Numerical Controlled (CNC) machine, motor controller, MA3 Absolute Magnetic Shaft Encoder or a DAC, varied modulation laser diode driver and a Laser Diode in the 1W-5W range to do the 8bit shading on the materials. We prefer a 445nm wavelength Laser Diode and the one we used in this project has a max output power of 2.5W.
With the years of experimenting on different CNC machines with ball screws, linear ways, stepper & servo motors and controller software, we decided to experiment with a stepper belt drive Shapeoko 2 run by an Arduino UNO R3 this time.
We are the second owners of this Shapeoko 2 and our very good friend John Champlain purchased it new from inventables. This is the actual machine that he used for the development of our grbl related engraving software programs. John uses an electronic 8bit DAC circuit he designed and built for varying the modulation voltage to the laser diode driver for varied intensity Laser Diode control. His DAC takes the output of the step & direction ports from a breakout board or the pins on an Arduino UNO and converts it to a 0-5 DC voltage from axis movements in the Gcode and outputs it to the variable modulation input on the Laser driver.
John is the first to be successful using our varied Intensity controlled Laser Diode concept with grbl and an Arduino UNO. The Arduino UNO R3 that we are using on this build was purchased by John from Radio Shack and shipped to us for our testing and experimentation.
We used the stock 3 axis v5 grbl shield that came with the Shapeoko 2, the UNO is flashed with grbl 9g, our Image to Gcode raster engraving program PicLaser Lite, our PicEdit Lite image editing program and our PicSender program to handle streaming the large raster gcode files to the Arduino & grbl. We also use our PicSet program to quickly change to different grbl settings depending on what type of Laser Diode photo engraving we are performing.
These four outstanding software programs were written by our very good friend, John Champlain for the Arduino grbl controlled CNC engraving machines and PicLaser Lite has the option to generate Gcode for other CNC controllers as well. John is also the author of our full featured "Image to Gcode" program PicEngrave Pro 5 + Laser.
We are really surprised of the performance and excellent results we are able to achieved with our Laser Diode photo engraving experimentation using the Shapeoko 2 controlled by an Arduino UNO.
Some modifications to the Shapeoko 2 and allot of experimenting with the settings was needed to get everything tuned in just right and here is our instructions how we were able to achieved success. We prefer to use the "Standard grbl 9g" as there are so many variations/branches of grbl out there that may not work as successfully for this application.
A special thank you goes out to Sonny Jeon (chamnit) also for his dedication and excellent work on grbl to make this all possible controlling our Shapeoko 2 CNC machine smoothly. We use the X-Loader for flashing his grbl 9g to the Arduino UNO.
After we finished this project, we have changed our Shapeoko 2 over to a J-Tech Photonics Laser System and started using Andy's PWM LaserMode grbl to control it and we are getting excellent results. Details of it can be seen here..
- Step 1: Changes to the Shapeoko's Table
- Step 2: Adding a MA3 Magnetic Shaft Encoder to the Z axis
- Step 3: Changing Belts and Pulleys on the X & Y Axis
- Step 4: Adding a Laser Diode to the Shapeoko
- Step 5: Wiring the Components and Laser Diode Amp Settings
- Step 6: Setting up grbl 9g, grbl Shield & Focusing the Lens
- Step 7: Our Software Settings for 8bit Laser Diode Photo Engraving
- Step 8: Setting up the Shapeoko for Laser Diode Photo Engraving
- Step 9: 8bit Laser Diode Photo Engraving
- Step 10: 1bit TTL (pulsing) Laser Diode Photo Engraving
- Step 11: 8bit Laser Diode Photo Engraving on White Artist Canvas
- Step 12: 3D Laser Diode Photo Engraving with Shading
- Step 13: Credits
Step 1: Changes to the Shapeoko's Table
As a machinist for 40 years now, clamping materials in machines comes natural for me. The MDF board table that comes stock was just not to my liking, so a new table was needed with a way to clamp my engraving materials in place precisely.
We found McMaster Carr sells aluminum T-slot track for a .250" (6.35mm) bolt, so I calculated how many we would need to cover the travel of the Shapeoko with 1" spacers in-between them. Nine was what we needed with the 12" (305mm) travel of the X axis. The lengths are 24" (609.6mm) long and sticking out the front and back, but this was not a problem.
The 20mm (.7874") square aluminum extrusion framing on the Shapeoko 2 for the original MDF bed had slots on all four sides. I needed only 2 slots 180 degrees from each other and the other two sides without slots to screw the T-Slot track down to. McMaster Carr also sells this 20mm (.7874") framing just as I needed. So we could attach these on the end plates for the Y axis MakerSlide supports and to tie the center of the table together. We ordered 3 of them 24" (609.6mm) long. Again, these being longer then the original ones, sticking out the sides further did not effect anything. No cutting to a shorter length was necessary. The McMaster Carr part number for the T-Slot track is 1850A14 and the 20mm (609.6mm) square framing is 5537T117.
The spacers we used in-between the T-Slot track is .500" (12.7mm) square aluminum tubing and we used two between each T-Slot track. We had that in stock here at our shop leftover from a previous job and just cut them to the same 24" (609.6mm) length.
To tie all these table parts together, it took some calculating and drilling holes in the T-Slot track & 20mm (.7874") framing for #8 Pan head sheet metal screws. I included a drawing with these general dimensions. The Shapeoko's dimensions between end plates may vary slightly, so some dimensional adjustments may be required.
We ran all the screws in loosely, then used a bar clamp to tighten all the T-Slot track and spacers up tight and made sure everything was square and flush then tightened up all the #8 screws.
As shown in the picture, two pieces of aluminum stock was added for the material starting reference place and to insure the material would be square in the Shapeoko. We added a Shop Fox Cam Clamp to hold the material in place and it's placement is adjustable in the T-Slot Tracks.
Safety is number one priority for everyone here including our pets, so we added a Laser light shield to the Shapeoko 2 and mounted them with L brackets from our local hardware store.
Step 2: Adding a MA3 Magnetic Shaft Encoder to the Z Axis
When John was doing his experimenting with this Shapeoko, he used an electronic DAC to control the modulation from the Z axis step and direction pins on the Arduino. We prefer a more mechanical/electrical option and used this successfully throughout all our builds since the beginning of our "Proof of Concept". The MA3 shaft encoder has 10bit (1024) resolution for the 0-5 varied output voltage.
The MA3 outputs a 0-5v varied voltage based on the degree of rotation, so to be able to vary this output voltage from Z axis depths in the code, we needed to drive the MA3 with a timing belt to the Z axis stepper motor. This gives us a way to move the Z axis and Laser Diode up and down to adjust for material height to maintain proper focal distance.
We found that since the Stepper motor on the Shapeoko is direct drive to the Z axis screw, a 1-4 ratio worked the best. We found a 40 tooth MXL timing belt pulley on eBay with the required 5mm (.1968") bore to fit the nema 17 stepper motor.
The stepper motor sticks up to far in our opinion, so we lowered it by 13mm (.5118") by replacing the three 50mm (1.9685") standoffs with 37mm (1.4566") standoffs instead. The flex coupling was not modified in any way to lower the stepper motor down. It just took some readjusting on the stepper and Z axis drive screw shaft. The McMaster Carr part number for these standoffs is 92080A445.
The MA3-A10-125-B part number we used has a .125" (3.17mm) diameter shaft and McMaster Carr part number 1375K11 MXL timing belt pulley has 10 teeth that will fit the encoder's shaft. It's also to be used with a .125" (3.17mm) wide timing belt which is plenty strong enough for this use. The McMaster Carr .125" (3.17mm) wide timing belt is Kevlar reinforced and the part number is 1679K87 which is a trade size 100MXL.
An aluminum bracket had to be made to mount the encoder and stepper cooling fan. We just used a piece of .125" (3.17mm) thick aluminum angle 2.500" (63.5mm) wide and cut one side 1.625" (41.27mm) long and the other side 4.00" (101.6mm) long. Since the MA3 is a magnetic type encoder, we needed to maintain a center to center shaft distance of 3.00" (76.2mm) to avoid any magnetic interference from the stepper motor. If a nema 23 stepper motor was used, this center to center distance would need to be increased.
The fan we mounted to cool the stepper is also lower to avoid this magnetic interference also, but we bent the aluminum slightly where the fan mounts to aim the blowing air at the stepper motor. Since we are pushing this stepper motor pretty hard with increased amps, higher accelerations and considering it's changing directions so quickly, we had to add heat sinks to all four sides. We found some heat sinks on Amazon that fit perfectly to the nema 17 stepper. With some thermal paste applied to the stepper motors and some stainless safety wire, we were able to tighten all of them up around all four sides. A cutout on one heat sink was needed to clear the stepper motor's wires.
Step 3: Changing Belts and Pulleys on the X & Y Axis
The resolution of the X&Y axis movement and stretching of the timing belts on the stock Shapeoko gave some image reproduction quality issues, so we did some changes.
Since the stock pulley on the stepper motors are 20 teeth, we wanted to change them to the least tooth count as possible, so we could increase the steps in the grbl settings for finer incremental moves. We found a 15 tooth MXL pulley at McMaster Carr so we could increase the steps and be able to travel an accurate distance in the X&Y axis. McMaster Carr also sells .250" (6.35) wide MXL Kevlar reinforced timing belts to minimize the stretching. These belts can be found on page 1076 in there online catalog. Three pulleys and three belts are required to be changed on the Shapeoko 2.
The McMaster Carr part number 1375K34 15T timing belt pulley has a .1875" (4.76mm) bore, so we had to use a 5mm reamer to open up the bore to fit the nema 17 stepper motor shafts.
Since the pulley ratios & belts were changed on the X&Y axis, we used a dial indicator to set up the steps/mm for those axis's. Belt tension plays a big part in this setting, so this was the best way instead of calculating what it should be. The travel was tested at 1.00" (25.4mm) movement back and forth and it worked out to a 52.850 step/mm for both the X&Y axis with the jumper set at 8X on the grbl shield. This has been confirmed by the finished engraving size matching the PicLaser Lite settings we used.
Step 4: Adding a Laser Diode to the Shapeoko
The Shapeoko 2 already comes with a spindle mount, so adding a Laser Diode is fairly easy by bolting it the spindle clamp tapped screw holes. The pictures are self explanatory, but others may want to do this different based on the diode they are going to use, or materials that they have access to. We had a piece of .500" (12.7mm) thick aluminum plate and a CPU heat sink that we bored the Laser Diode's 12mm (.4724") module's diameter size in-between them at a depth of the module's length. This way it's sandwiched between the two parts to hold it in place. A through hole was needed for the Laser Diode's wires to exit also. Some thermal paste between the Laser Diode's module and heat sink/aluminum plate is recommended.
A fan to blow smoke away, cool the heat sink and diode and to keep contaminates away from the lens is needed. We also screwed the Flexmod P3 laser driver's power MosFET down to the .500" (12.7mm) aluminum plate with thermal paste between them to act as a heat sink instead of the one that was supplied with it. The upper spindle clamp screw holes made a nice place to attach our junction wiring board. We also used these tapped holes for mounting the analog volt meter also.
The key dimensions here are to have the Laser Diodes lens approximately 2.75" (69.85mm) to 3.00" (76.2mm) from the table when the Z axis is all they way down and bottomed out. We made a .250" (6.35mm) aluminum plate that screws to the bottom of the Z axis MakerSlide that bottoms out on the Spindle Mounting Plate. This is for a reference when setting placement of the Laser Diode from the table surface, focusing the lens based on the table surface and moving the Laser Diode up from there to maintain the proper focal point on the material to be engraved.
If your Shapeoko has a homing switch for the Z axis, then this can be used for your referencing off from the table distance instead of the stop plate.
Step 5: Wiring the Components and Laser Diode Amp Settings
Since we are using a Flexmod P3 to control the laser's intensity, here is the manual that explains how to set it up properly. Flexmod P3 Manual The interlock needs to be jumped to V+ and the 7 second start up delay needs to be disabled by soldering two pads together on the Flexmod P3 board.
It's rating of input voltage is between 5vdc-24vdc so we use a 12vdc power supply with 12.5a max output on this build. Since we are powering the heat sink cooling fan and grbl shield/Arduino cooling fan also with this power supply, we like to have extra amps so the fans do not slow down when the Laser Diode's power goes up and draws more amps.
The settings we used on the Flexmod P3 is 150ma threshold and 1.4a at full 5v modulation voltage. This was for the NDB7875 9mm Nichia diode that we used. This diode is capable of higher wattage output, but we lowered the max amps to make it more dependable and for the power range we needed for this particular build.
On this setup we are getting approximately 2W output max using a AR coated 3 element glass lens. The 150ma threshold gives us a nice laser pointer to line up on the material for our starting engraving point.
We also recommend using a Lasorb for ESD protection. These diodes are expensive and we learned our lesson not using a Lasorb in our years of experience using Laser Diodes. When they get static shocked, they turn into very expensive LED's
Step 6: Setting Up Grbl 9g, Grbl Shield & Focusing the Lens
As explained in Step 4, the laser Diode's lens needs to be properly positioned off the table. I will explain how to focus the lens further on, but will jump to the grbl settings first because this effects this process. In the PicSet screenshot shows all of our settings on our Shapeoko 2 for Varied Intensity controlled laser engraving.
The Z axis jumper is set for 4X on the grbl shield and with the 1.25mm pitch (20.32TPI) screw, the steps should be 640 steps/mm, but with that step/mm setting, the Z axis stepper will loose steps and position with the higher accelerations and very fast movement changes. We divided that number by three and set it at 213.333 steps/mm.
With the 1-4 ratio to the MA3 encoder, it gives us .037" (.94mm) gcode movement through the whole range of the MA3 encoder's 0-360 degree rotation and 0-5v output to the modulation for the Laser Diode driver. Since we use a minimum depth of Z.0000 in/mm and maximum depth of Z-.0255 (Z-.647mm) in the PicLaser Lite settings for 8bit shading, the extra distance allows us to start at higher starting burning power for different materials where we zero the Z axis. It also gives us a safety distance at the higher end, so the MA3 encoder does rotate too far and jump back to 0v again.
With the steps/mm set at 1/3, the Z axis only moves .0085" (.22mm) total with the full .0255" (.65mm) movement in the gcode and will not effect the focal point and distance on the material.
We have the direction reversed in our grbl setting because of how the encoder's rotation is from the stepper. Up jog moves down and down jog moves up. I know this part may be confusing, but it would have been more difficult to mount the MA3 flipped over 180 degrees to work for a 0-5v output based on minimum and maximum Z axis depths in the Gcode.
To focus the laser diode the Z axis needs to move all the way down until the Z axis bottoms out on the .250" (6.35mm) aluminum plate and the stepper slips. We zeroed the Z axis in PicSender there. We use a .375" (9.52mm) thick piece of black anodized aluminum to shoot the laser beam down on for focusing. Since the steps are at 1/3 of what it should be, we jog up a total of 1.125". (28.57mm) The voltage to the modulation will be between 0-5v, but we jog slightly up or down, what ever direction is closes to get 1v on the voltmeter. A little power coming from the Laser Diode is needed to see the focal spot for adjustment.
Before turning on the laser with the On(M03) in PicSender, the proper laser safety glasses are absolutely necessary. Make sure no one else or any pets are anywhere near by when this or any other lasering operation is performed.
When your sure you and everyone else is safe, turn on the Laser and make sure the beam projects onto the black anodized aluminum. Without burning your fingers by blocking the beam coming out of the lens, carefully rotate the lens one way or the other until it is the focal point is the smallest size possible. We are getting a .005" (.127mm) diameter on our setup and that is the optimum size for achieving detailed engraved photos. We use a little hot melt glue on four sides of the lens thread to the laser diode module to insure it will not move and change the focus.
The best AR coated 3 element glass lens we found to use is very inexpensive and can be purchased here. Attached is two Gcodes for testing the burn line width and one is for Varied Intensity Laser Diode control and the other is for TTL control.
The Gcode burns 6 line pairs and steps over .001" (.0254mm) each time. The first pair steps over .01" (.254mm) and the last .005" (.127mm). Looking real close at them with an eye loop or magnifying glass, when you see what two of burn lines meet (step over), that is the burn line width. If all of the pairs of lines meet each other, then the focusing process needs to be performed again until you get the burn lines smaller. The burn line width needs to be known for calculating your images Pixel Size in PicEdit Lite to get the correct Laser engraving size and to set the correct Pixel Resolution in PicLaser Lite before generating the Gcode. It should be the last pair of lines that meet with the .005" (.127mm) step over to achieve the best results for Laser Diode photo engraving.
Step 7: Our Software Settings for 8bit Laser Diode Photo Engraving
This will walk through the settings we use in our programs to Laser engrave photos successfully. These instruction will explain how to engrave with "Varied Intensity" We will explain "TTL" (pulsing) in a later step. Our programs will generate Gcode for both processes.
First finding or taking a photo worth taking the time to laser engrave, is a challenge sometimes. We looked around here in our shop and seen our little friend and helper Wagner laying in his LazyBoy Captain's chair just wagging his little tail a mile a minute trying to tell us something. It just had to be, he wanted us to Laser engrave a photo of him for this instructables. Since he was a pup, he has always been a happy little guy, wagging his tail and that's why we called him Wagner.
With our 16mp Sony Cyber-Shot, I proceeded to take pictures of Wagner. We selected the best one and brought it into PicEdit Lite for re-sizing. If you notice in the picture, Wagner's wagging tail is blurred, but that's alright, it will engrave the image just like it is. We recommend high quality and high resolution photos to use in this Laser engraving process.
First is to adjust Pixel size based on the size of material we are engraving on. The .250" (6.35mm) thick Poplar we are using is 5.500" (139.7mm) wide, so we cut it 7.500" (190.5mm) long. We found sanding the Poplar with 180g sandpaper, or any other type of wood we are laser engraving, helps bring out a little more detail when engraving. We try to use wood that does not have allot of grains that effects the image reproduction. We found select boards of Poplar can be used for our use.
The second picture shows the default PicEdit Lite settings and pixel size just as the photo was taken. With our focal spot and burn line size from the 9mm Nichia LD being a .005" (.127mm) size, we will calculate the pixel size for .006" (.152mm) Pixel Resolution for that setting in PicLaser Lite for engraving at a 45 degree angle.
Pixel resolution is how the gcode will be generated for the step over and step ahead incremental moves in our program. If we use a Horizontal or Vertical engraving angle with a .006" (.152mm) Pixel Resolution and a .005" (.127mm) laser burn line, this will cause lines showing up in our Laser engravings. By using 45 degree angle in the settings, the .005" (.127mm) laser burn line will overlap slightly and no lines will show up in the Laser engraving.
To calculate the engraving size based on our material size, a simple multiplication is required. Our Poplar is 5.500" wide and we want the image to be 5.250" (133.35mm) tall, so we just multiplied 5.25 X 1.666=8.7465. Since PicLaser Lite calculates at 100 pixels per inch (3.93 pixels/mm), we multiplied 8.7465 X 100 = 874.65. Close enough to 875, so that is what we will use in the 'Height" Pixel setting. Typed in 875 and then clicked in the "Width" box and it changes the width pixel size by automatically maintaining the Aspect Ratio. The width pixel size is 1167, so if we divide that by 100=11.67 then divide that by 1.666= 7.000". The engraving size will be 7"X5.25" (177.8mmX133.35mm). This will be confirmed in PicLaser Lite for correct engraving size.
Adjusting the image's Sharpness, Contrast, Brightness and Gamma takes some trial and error, These settings will be based on the original image and burning power range of your laser diode.
The third picture shows the image adjustments we used based on Wagner's picture and for our Laser Diode's power range on the Shapeoko 2. In PicEdit Lite there is a "Preview Gray Scale" selection to get a general idea how the engraving will look like after it's engraved.
In the forth picture shows the settings we used in PicLaser Lite to 8bit Laser Engrave Wagner. Notice in picture five, with the Pixel Resolution set at .006" (.152mm), the image will engrave at 7.000"X5.25" (177.8mmX133.35mm). This confirms our calculations for the pixel sizes we set in PicEdit Lite.
Step 8: Setting Up the Shapeoko for Laser Diode Photo Engraving
First we need to clamp our 7.500"X5.500"X.250" (190.5mmX139.7mmX6.35mm) piece of Poplar and set all axis's starting point. PicLaser Lite generates the gcode based on the lower left corner of the image to be engraved as the X&Y starting Zero point. Our stops are setup for this as shown in the first picture.
Next is jogging the Z axis down to start the setting for the correct focal point for the material. The Z axis is reversed in motion, so we use the Z+ jog button in PicSender to jog down. Set the Z axis to incremental moves and jog until it bottoms out on the 1/4" aluminum plate and you hear the stepper motor slip, then we Zero the Z axis there. Since the $102=213.333 (z, steps/mm) in grbl 9g is 1/3 of what it should be for the Z axis, we need to jog up .750" (19.05mm) instead of .250" (6.35mm) for the material thickness so the focal point is correct.
When we do this, the voltage from the MA3 shaft will fall in-between 0-5v. We then jog the Z axis in the direction closest to 0v. If it's above 3v, jogging past 5v will cause it to jump back to 0v again. Our starting point for the Poplar is Z-.002 (Z-.05mm) from 0v which is 300mv on the meter. This is the power level where the laser beam just starts to burn the lightest shades in the image onto the wood. We jog the Z axis there and then zero it.
Since our machine is not near the computers keyboard, we use a USB mini number keypad to do the jogging. Num Lock needs to be OFF for jogging. We need to positioning the laser beam on the lower left corner of the material. Since or Z starting burning point is 300mv, we jog back close to 0v on the meter to use the laser beam as an alignment pointer. We jog at large increments to get close to the corner of our piece of Poplar, then set the X&Y jog increment to .0100 (.254mm).
Time to put the Laser safety glasses on again. Turn On(M03) and start jogging to the corner. When the laser beam projects on the corner, zero the X&Y axis there and Off(M03) the laser. Now the Z axis can be jogged back to zero with 300mv on the meter again.
Since our Wagner engraving size is 7.000"X5.250" (177.80mmX139.7mm), we need to jog X&Y to the starting zero point. For centering on our piece of Poplar, X needs to be jogged .250" (6.25mm) positive and Y needs to be .125" (3.17mm) positive. Zero the X&Y axis again there.
Step 9: 8bit Laser Diode Photo Engraving
We generated the Wagner Laser engraving Gcode in PicLaser Lite, but we are going to add some enhancements to this engraving that our full featured software program PicEngrave Pro 4 + Laser has as an option when generating the Gcode. This option is called "Feed Rate Change".
Our best friend, John Champlain developed/invented this very unique Gcode process for engraving photos with Laser Intensity control and it has really made our "On-The-Fly" Laser Diode engravings stand out! A BIGThank you goes out to John!!
We wrote the stand alone software program PicFRC that does the same "Feed Rate Change" by taking a gcode that has already been generated in PicLaser Lite and adds a variable feedrate to the end of each line of Gcode based on the Z axis minimum & maximum depths. Our program allows you to set a percentage of a full feedrate and varies it based on the depth range in the Gcode. It slows the feedrate down in darker areas when the laser power increases and speeds it up in lighter areas when the laser power decreases which allows us to expand the lighter and darker shade range. It really helps us fine tune our "Varied Intensity" Laser Diode photo engraving process even more.
On the Wagner Gcode we used a 60IPM feedrate with a 30% reduction at maximum depth. White shades [Z.0000] (inch or mm) will run at 60IPM (1524mm/m) and black shades [Z-.0255"] (Z-.65mm) will run at 42IPM (1066.8mm/m). All shades in-between will vary in the 60-42IPM (1524mm/m-1066.8mm/m) range based on the Z axis depths in the Gcode that controls the Intensity of the Laser Diode.
Step 10: 1bit TTL (pulsing) Laser Diode Photo Engraving
Here I will explain how to Laser Diode engrave using a Dithered Black & White image using the standard TTL (pulsing) method. We will use the same Wagner image, but we will dither it first. PicEdit Lite has 11 different Algorithms to choose from, but we will use the "Atkinson" option and leave the default setting at .125 for this engraving.
Editing for size, sharpening, contrast, brightness and gamma must be all done first and then saved. Then reopen the image file again, select Atkinson and then select the "Dither" button. You will notice after it's dithered, the image will consist of allot of dot patterns to give the allusion of shades. More dots are condensed in darker areas an less condensed in lighter areas. This is the type of images commercial CO2 Laser engraving machines require and use to engrave photos.
We brought this image into PicLaser Lite to generate the code, but this requires a little different minimum and maximum depth setting for the Z axis. We only want the laser to come ON in the black spot areas and OFF in the white areas, so a Z-.0015" (.0381mm) max is used this time. The MA3 magnetic shaft encoder goes from 0v to 5v and then back to 0v. Reversing rotation direction changes this, so a different grbl settings is needed for TTL so it will go from 0v at the Z.0000 in the Gcode for white and then the Z-.0015 (.0381mm) will go full power with 5v for black. As the code is running it pulses the laser ON and OFF to engrave the image this way.
PicSet allows us to to save different profile grbl settings, so we need to load the ones for TTL engraving this time. I went through the same routine of setting the focal point based on material height, except jogging direction is reversed this time and we needed to set the Z zero starting point a little different.
We jogged Z until the volt meter jumped to 5v, then jogged back in the other direction .0001" (.0025mm) incremental moves until the volt meter jumped back to 0v again. From there, we jogged .0005" (.0127mm) more in the same direction and then zeroed the Z axis.
For TTL modulation (not varied) laser diode drivers, the Z axis direction Pin #7 can be used to pulse the Laser Diode with Z-up and Z-down moves in the the Gcode, that's If $3= in grbl 9g is set properly. The Z negative direction in the Gcode will make Pin 7 go high (5v) turn Laser Diode ON and Z positive direction will make Pin 7 go low (0v) and turn the Laser Diode OFF. This will pulse the laser ON and OFF creating the Black and White allusion of shades with the Gcode generated from the Dithered image.
Step 11: 8bit Laser Diode Photo Engraving on White Artist Canvas
You need to have very good ventilation for Laser Diode engraving on Artist Canvas.We needed to have the door wide open in our shop with a fan to blow fresh air in.
Wagner had to stay at the home today and he looked so sad, but he could not be here when this Laser Diode engraving was going on. We did take another picture of him first to use for this Step. This engraving will be done with Gcode generated with PicEngrave Pro 5 Beta version. We wanted to use it this time because it has an Engrave Ellipse option. Feed Rate Change was set to 30%
We purchased some white 8"X10" (203.2mmX254mm) Artist Canvas from Wally World (WM) and did some editing in PicEngrave's image editor first. Re-sized it, sharpened and adjusted the gamma. When opened in in PicEngrave, we selected Ellipse and saved settings. Down below we used the sliders to adjust the height, width and positioning.
We had to load the grbl settings for Varied Intensity Laser control again with PicSet. The white Artist Canvas is .150" (3.81mm) thick, so we jogged up from bottoming out .450" (11.43mm), then jogged to 0v on the voltmeter. The Z zero starting point we used was Z-.003 (Z-.076mm) from the 0v which is 400mv. Our Shapeoko 2 was already set for X&Y Zero in the lower left corner. The X&Y zero starting point in the Gcode for this engraving is the lower left projected intersecting point of the Ellipse, so we have to jog and change our zero starting point.
Since the engraving Ellipse size is 7.00" (177.8mm) wide and 8.01" (203.45mm) tall, and we want the engraving centered on the Artist Canvas, some calculating was involved. 8.00" width minus 7.00" = 1.00" divided by 2 = .500" (12.7mm). We jogged the X axis positive .500" (12.7mm) and re-zeroed that axis there. 10.00" height minus 8.01" = 1.99" divided by 2 = .995' (25.27mm). We then jogged the Y axis positive .995" (25.27mm) and re-zeroed that axis there.
The Gcode file is 1,226,621 lines long and PicSender streamed it flawlessly to the Arduino.
Step 12: 3D Laser Diode Photo Engraving With Shading
In our introduction we talked about higher end Commercial CO2 laser engraving machines are able to 3D engrave by using 256 different power levels using a Depth Map image. This got us brainstorming and thinking if we could engrave 3D using our “On The Fly” Laser Diode control method on our Shapeoko 2 also.
We have made 2.5D & 3D spindle engravings in the past on our other CNC machines and even Laser Diode engraved 8bit shades on 3D wood spindle relief engravings. We were able to achieve this by synchronizing & combining the two Gcodes files from each process using our newly released program called PicLaser 3D. This allowed us to have the Laser Diode's focal point follow the material's contoured surface by moving the Z axis up and down, but still have the A axis controlling the Varied Intensity of the Laser Diode for the shading. A video of our 4 axis servo controlled Spindle/Laser Diode engraving CNC machine using this very unique process can be seen here. This CNC machine uses two of the same 9mm Nichia 445nm Laser Diodes with a maximum output power of 4.5W.
We tried something new today that we have never seen anyone do before, a 3D Varied Intensity Laser Diode photo engraving with shading. A description that defines between 2.5D and 3D machining/engraving can be found here.
Our 9mm Nichia 445nm Laser Diode does not have enough power to cut the wood without going very slow. In Step 9 & 11 we used "Feed Rate Change" to expanded the shade range to enhance our 8bit photo engravings and in this Step we are going to expand them considerably more. The lighter shaded areas will feed faster and give us shaded areas still, but by changing the lowering feedrate percentage even more, we are able to expand the darker shade range to the point where the Laser Diode will cut into the Poplar wood instead.
We did not use a Depth Map image in this test, but we found something close enough on Wikimedia Commons that worked for this experiment because we wanted shading also. We did some editing to the image first with PicEdit Lite and then used Photo-Paint afterwards before generating the Gcode.
We used Gaussian Blur in Photo-Paint to smooth out the sharper edges slightly from the prior sharpening we did on the original image. I know this sounds confusing to sharpen then blur afterwards, but the original sharpening we did in PicEdit Lite brought out more detail to the original image which had very little to begin with. The Gaussian blur we did afterwards smoothed out this detail and sharp edges which made the varied power of the Laser Diode ramp in and out of the shade transition areas more smoothly.
In Step 9 we used PicLaser Lite with a Feed Rate of 60IPM (1524mm/m), minimum depth of Z.000 and a maximum depth of Z-.0255 (.65mm) with a 30% “Feed Rate Change“. In this test we want the absolute maximum power that is available out of our Laser Diode, so we used a maximum depth of Z-.031 (.787mm) instead this time.
A very good heat sink for the Laser Diode is needed for this process because running it at full power for long periods of time, could overheat the Laser Diode and damage it to the point it will fail. Our .500" (12.7mm) aluminum plate and CPU heat sink with fan combination effectively dissipated the heat away from the Laser Diode Module. We checked this with an infrared temp meter as it was engraving and it never exceeded 80 degrees Fahrenheit (26.66 Celsius).
The lower power zeroing point of the Z axis was at 500mv on the voltmeter. That was Z-.004 (Z-.101mm) jogged down from 0v on the voltmeter. These settings brought us up closer to the edge of the 5v to the modulation before the MA3 shaft encoder jumps back to 0v again which intern gives us the maximum power output at our full Z-.031 (Z-.787mm) depth setting. To expand the shades to the point blacks become depths of cut instead of 8bit shading, we used a 75% reduction of the Feed Rate in PicFRC.
The finished engraving came out with black charring on the wood where the black areas were in the image. To remove the charring we used our air compressor with 150PSI to blow out the loose burnt material. After we removed the charred wood, the full depth of cut was .05” (1.27mm) deep. The charring was caused by us not using an air assist nozzle like the Commercial CO2 engraving machines use. An air assist nozzle will blow the burnt material away as the Laser’s focused beam is cutting into the wood.
Our 3D Laser Diode engraving did not come out perfect, but with some more image editing, fine tuning of our software settings and dedicated trial an error time, we firmly believe it will improve considerably.
Step 13: Credits
Remember, you seen it here first on instructables. :-) Be Careful, Be Safe and Have Fun Making!!
Runner Up in the
2 People Made This Project!
We have a be nice policy.
Please be positive and constructive.