Tuesday, September 10, 2013

Maker Tool - Laser Cutter Community Project

Sharktooth Laser Cutter - Community Project

Sharktooth Laser - completed milestone


First engraving (yep, unfocused)

Intro

This post describes a build of a laser cutter.  There were many people involved in this build.  My favorite part of the project was meeting new friends, working with really smart individuals, and the support from my school.  This was an extremely fun project.  I am fortunate to have been a part of this project during Summer 2013.  

This post is dedicated to learning, to students (of any type) in peaceful pursuit of knowledge, to teachers (of any type) that share their knowledge, and to makers (of every type) that tirelessly seek to make a positive impact on others.  Thank you.

Organization Contributions:
Area515 Makerspace:  This is where the tool was built and resides, it's an awesome place - https://area515.org/
Simpson College: For my part, I also had support from my schools computer science instructors to participate in the project - http://simpson.edu/2013/09/computer-controlled-laser-cutters/

Personal Contributors:
Like any group, this group project consisted of individuals.  These individuals gave something to make the project happen like time, expertise, money, and/or parts.  With their permission, links for their work are available below:
http://capcart.tumblr.com/ - (Other than a lot of time, the laser cutter's 3d printed exhaust came from this individual)


Project Definition

What is the Sharktooth Laser?

The Sharktooth Laser is the Area 515 makerspace build of the Blacktooth Laser.

The Blacktooth Laser is a laser cutter project originating from:

http://buildyourcnc.com 
http://blacktoothlaser.blogspot.com

The Sharktooth laser was acquired by an Area 515 member as mostly a kit (not all parts included).  The build is documented in some places but it’s not as easy as completing everything step by step.  This is especially true if you are doing something new because of choice or lack of available parts.  
I started with the project on day one with a few people.  I had no intentions of working on it but I was around when the laser started to get constructed.  When it was explained to me how this thing works, I could see how a community tool like this could enable others to build what they wanted.  A tool like this can be one of many tools that enable others to bring things from their imagination to the physical. 

Who is Building it?

People who were interested in the project or just happened to be around while the project was getting built. 

Got it, but what is it?

  • It’s a laser cutter designed to be low cost and easy to use 
  • 40W CO2 laser tube
  • 24” x 20” (609mm x 508mm - for the rest of the world)
  • Our implementation uses free and open source software

What’s it do?

The laser cutter cuts or engraves material.

Why pick this project?

  • It is a unique community tool – free to use (after safety training)
  • It is a community project (and a laser)
  • Not everyone knows everything but together we can learn to figure it out
  • Use what I learned at college to benefit others

What I learned:

  • Operating systems – setup and understanding the hardware abstraction layer
  • Computer hardware
  • Stepper motors/drivers
  • Programming, troubleshooting, rtos, soldering (lots), mechanical, etc.
  • Teamwork – coordinating and working together with no set schedule

The Build

Overview

Make the table
Case, stepper motors, and power supplies
Breakout board and wire-up
Computer / Operating system
Intermission – testing everything but the laser
Laser tube, air, water, nozzle, mirrors
Use an out of step process

This is a big overview.  We did this build in two phases.  First, get all of the X and Y movement worked out and get LinuxCNC up.  Second, do everything with the laser.  This is a great variation from other project builds.  We tried to solve all of our problems before mounting the laser tube.

Wiring overview:

All of these pictures came from http://blacktoothlaser.blogspot.com

 1.This is how the wiring went.  We grouped everything related to it’s power supply.


2.First, we did all wiring related to the stepper motors and their power.

3.Next, we did all of the wiring related to the computer and breakout board

4.Lastly, we wired up everything needed for the laser.


First week pictures:

This is probably after the first week.  For the most part the basic components are visible. 

Second week pictures:

It looks good but a major drawback is we had to rewire everything many times.  This is because we were following some instruction then others… etc.

Setting Up the Computer

We needed a computer to run LinuxCNC.  We used what we had around the space to put a computer together.   
  • Pentium 4, 3GB RAM, 500GB HDD, ~350W PSU, DB-25 port needed
  • Pieced together motherboard/case, psu, hdd, and wifi (wrt54g/dd-wrt)
  • Linux CNC install
  • Parallel Cable (DB25) connects LinuxCNC to laser (breakout board)

After we have the computer installed we went through a lot of debate and trials to get the stepper motors configured.  It was the funniest part of the project next to aligning the mirrors. The next slide is a video showing the first movement achieved. 

Video: First control Demo

Up and down in this video is our y-axis and left to right is the x-axis (as expected). 

Sharktooth - First Movement

Mechanically Sound - onto the Laser

Mount laser tube
With all of the moving parts and software in place, we decided to tackle everything that was going to be put on the laser power supply.  

Secure water, air, mirrors
3d printed part
This is the 3d printed part we used.  It is very solid and dense.  This contribution was made by one of the people at the space that builds 3d printers.  As noted above, some of this individuals work can be found at: http://capcart.tumblr.com/.  The part is 5% too awesome. (inside joke).
3d printed exhaust


Laser assembled
This is everything put together for the laser.  There are three mirrors.  There is air being pumped into the nozzle.  There is water being pumped into the laser tube.  There is a high voltage line (and gnd) attached to the tube.  Not visible but there is a lens inside of the nozzle.
Laser tube


Breakout board (Bob) side of lasercutter assembled.  Along the same time as the previous picture, this is what the other side looks like.

Assembled (other side)


Assembled (other side)

Putting it together:

The big goal is to take an image and burn it into wood.  We do this by taking an image, detect the edges, then convert the positional data of those pixels in the edge to G-code for the laser.  To do this, we need to do the following two things:
        
Convert an image file to usable G-code
  • Detect Edges
  • Trace Paths
  • Generate G-code, clean it up, save it
Run the laser cutter
  • Setup material
  • Load ngc file
  • Home x and y axis
  • Go! 

ImgToG - Image to G-code

We need to convert an image to G-code   We use inkscape to get the edges, then we get the path of those edges, and finally we convert the path to an ngc file (G-code).  

Inkscape is awesome but it doesn't translate an image to G-code by itself.  Someone already wrote a plugin for inkscape to do this.  Thankfully for use the tool is THLaser Plugin and it is available here: http://wiki.thinkhaus.org/index.php?title=THLaser_Plugin .  The plugin just works... what more could you ask for?
Initially, before we figured out how to use inkscape, I made an edge detection program for pictures using the opencv library.  This method is good for some pictures when inkscape wont or cant get the contours/edges but this is rare.  If inkscape can't get the edges, it usually has to do more with the image.  If you are interested in how this is done with opencv, the stuff used was from previous work with opencv: http://techvalleyprojects.blogspot.com/2013/06/opencv-canny-edge-finding-contours-and.html
  

Two ways to get the edges:
  • Inkscape – Filter -> Edge Detection 
  • OpenCV Edge Detection
  • Used for when Inkscape won’t work
  • Source

Next use inkscape
  • Get the paths (trace bitmap)
  • Convert to ngc file (thlaser plugin)

Demo TIme

We reached the best part,…  demo time.  In the next segment, there are two videos.  The first video is how we convert the image to G-code and the second video is the G-code being used by the machine.


Demo of ImgToG



Demo of operation

Post-Build

Safety always - We require the use of safety glasses, rated for the laser, while the laser is in use.  The lid to the laser cutter is always shut when the laser is plugged in.  

Documentation - We made an Operating Manual and a running human readable log file on the desktop of the computer.  

Thank you’s - This should be obvious...  After it got built, to a usable point, we reached a milestone.  At this milestone, I had to say thanks to everyone I worked with an met.    

Controlling the laser output through software - Other extremely smart individuals made contributions to control the laser output through software.  We can control the laser output by setting the spindle speed on the LinuxCNC AXIS GUI.

Future improvements: Be able to change the laser output while cutting. This would allow for the laser to burn raster images (like a dot-matrix printer).

Lessons Learned

Get more done with teamwork.

I learned a lot from everyone, that was one of the best parts.  Also, it is really really cool to come back to the project only to find that the things you were going to work on have already been done.  

Teamwork projects requires consistent forward momentum

This may sound strange but a teamwork project needs people to maintain momentum.  At times I helped maintain momentum and at other times, it was someone else.  

Communication required

Loose-knit groups need easily accessible communication channels 

Get informed to find the best solution in a group

Ask everyone for input

No replacement for action

Something is better than nothing, even if it's not perfect.  Some implementation is better than no implementation

Ending

All in all, this has to be one of my favorite projects.  While making a laser is obviously cool, the people I met was the best part.   Thanks.

Shortly after having it up and running, this is some of what people did:

Other than the first run, this is my favorite engraving

Styrofoam

Styrofoam

The magazine shows the relative size of the rectangle cut