Archive for the 'CAM' Category

Getting More Power and Cutting Accuracy Out of Your Home Built Laser System

I have developed an inexpensive control system (less than $70) that can be used to both get more cutting power out of a DC discharge laser and significantly improve cutting accuracy for home built laser systems.  The control system implements a control technique known as Pulse-Per-Inch (PPI) control.  PPI control involves pulsing the laser every time the head travels a certain distance.  PPI control allows a CNC laser to produce consistent cuts at the same power level setting over over a wide range of speeds.  In effect, pulsing the laser as a function of distance along a cut decouples the power input to cut from the speed that the head travels.  Therefore, the speed and acceleration of the CNC system have minimal bearing on the cut characteristics.  Furthermore, the unique transient rise response of a DC discharge laser allow PPI to deliver more power to a cut in comparison to the same laser system with just on/off control.

Background and Motivation

A while back, I was active on a forum in which we were discussing the time it takes to turn a laser on and off and how that relates to engraving control.  One of the forum members from Full Spectrum Engineering posted a high-speed intensity spectra for the cheap DC discharge lasers that we use for DIY laser cutters.  I was quite surprised by the spectra.  I expected to see a nice exponential rise to set power level, but what we saw was a rapid rise to a very high power level (nearly double the set value) followed by an exponential decay to a set value.  The Spectrum in question is shown below (credit for the spectrum rests with Full Spectrum Engineering).  The yellow square wave is a 5ms pulse sent to the laser power supply.  The green spectra is the intensity spectra of the laser.  For whatever reason, the magnitude of the spectra is upside down (I think the ground and signal leads were reversed), so on for the digital signal and higher intensity for the laser power spectra are down rather than up.  Anyhow, the spike in intensity is caused by the necessity voltage to start a plasma in a DC Laser.  The laser power supply generates a very high voltage to start the plasma which is stored in a capacitor.  When the signal comes to turn on the power, the power supply dumps this charge into the system and then supplies a nominal (still very high) voltage to sustain the plasma once it is on.

DC Discharge Pulse

Continue reading ‘Getting More Power and Cutting Accuracy Out of Your Home Built Laser System’

MakerSlide Camera Slider Control Program

There has been a ton of interest in camera slider applications for MakerSlide.  A while ago I decided to make a very simple reference design for a motorized slider.  This design only required fabrication of one part.  The rest of the parts are existing components.  The part can be made on a laser cutter, router or even by hand.  There are no tight tolerances and you can use the MakerSlide carriage as a template for drilling some of the holes.  I can sell a complete slider system including motor for less than $120 for a 1 meter setup.  It would only be $10 for each addition meter.  The longest I can ship is 2.5 meters, but I stock the material in 4.5 meter lengths if you can figure out how t0 get it.

I don’t know much at all about this type of camera work so I did not see all this interest coming.  Several people approached me about buying my prototypes and I have sold several of them.  Most of them asked me how to control the motor.  I come from a CNC background so most of my demonstrations were done using CNC software like Mach3, EMC2 or even GRBL.  This has few issues.  The first is many photographers have no knowledge of CNC or G-Code.   The second is the solution is way overkill in cost and complexity for a single axis machine.  The third issue is portability.  This will probably be used in the field where a PC is impractical and power may be unavailable.

I decided to make an Arduino based controller.  Arduinos are good because they are cheap, small and easy to program.  They also use very little power.  I wrote a similar controller for the PIC processor a long time ago and borrowed the basic algorithm from that.  The method used could work for multi-axis machines if you want to steal the code.  The Arduino is. using my Stepper Shield.  I have just one driver installed and in another “slot” I have a bread boarded switch.  The stepper shield is nice because it can act as a mother board for many future features.

MakerSlide: Camera Slider Control Program 2011 CC-A-SA

0 = Set Current Location as 0
S = Stop now!
D = Disable Motor
E = Enable Motor
H = Home (Move to 0)
M = Move to ..(M Dest Speed Accel)
J = Jog until stopped ('J 1' for forward, 'J -1' for reverse, 'J' to stop )
I = Info (show current parameters)
G = Go (start program)
P = Show Program
C = Clear Program
L = Edit Line.  Format: L Line# Dest Speed Accel)  Ex: L 0 2000 3000 1500
      Use 0 for destination and speed to indicate end of program
      Use 0 for speed to indicate a pause.  Dest is pause in milliseconds
R = Set Max Speed
A = Set Max Accel
V = SaVe to EEPROM
? = Redisplay this menu

The controller uses a menu driven interface via the USB connection.  The easiest way to talk to it is though the Arduino IDE serial monitor.  That allows a free, common interface between PC, Apple and Linux,  but most serial terminals would work.  The commands currently work in the unit of stepper motors steps.  It could be easily converted to a real world unit, but at this time it is just easier to use the same unit that the motors use.  My system has 4000 steps per inch.  That makes for a very smooth system.  Extremely slow rates are possible.  It can go 1 step per second at 4000 steps per inch, so it could take well over and hour to go an inch.  You could hack the code to easily drop this by many orders of magnitude.  Each move can have its own speed and acceleration to fine turn the affect you want.

It has several commands to interactively move the carriage around.  This would probably be done to setup the system before the actual “shot”.  These include Move, Home (go to zero), Jog and Zero (define current location as zero).  You can also create a move program.  This allows you to define a couple dozen moves that run sequentially.    These can either be moves or dwells (pauses).  Once the program is entered it can be saved.  This allows you to pre-program the device before you take it in the field.

At power up the motor disables.  This allows you to slide the carriage by hand.  This is handy if you don’t have a PC to do it in the field.  As soon as you make any move or run a program the motors enable.

How it works (programmers only)

The controller uses a timer to run an interrupt function at a regular interval.  The default is 40,000 times per second, but that be be tweaked by changing one program line.  The interrupt function determines if a step should be taken.  If you want to move at 20 steps per second, you allow the interrupt to run (40000/20) or 2000 times before the step is taken.  A counter in the interrupt counts up until it is time to step.  By varying the count on the fly you can create smooth acceleration.  All the math required to smoothly accelerate could limit the interrupt rate, so  the calculation are done once, before the move occurs.  Inside the interrupt is all simple integer counting and a few tests.

 

Source code (Arduino 1.0)

 

 

 

Wiki Page on Slider

Wiki Page on Software

 

Buy one here at the MakerSlider Store

Future Plans

I have several features I want to add.

Drawbacks

Stepper motors draw a lot of power.  I was running my NEMA 17 at 11V and 0.1 amps.  You need a decent battery of 2000-3000 mAH to do a multi-hour run.  Steppers are also notoriously loud.  The camera will  pick up the noise if the mic is close the the motor like on the camera itself.   The motors I have are way over kill and running at less than 10% of their rated current.  I have some NEMA 14 motors on order.  Servo (not hobby servo) motors would be a lot quieter but and lower power, but are more complicated and might require gearing down.

Comments: feel free to comment below or on this forum thread.

Videos



Mach3 Via VNC?

A guy I met at WorkShop 88 is putting together a Maker Faire like event through the local ASME group. It is called the “AMSE Open Source Microcontroller Workshop“. He wants to get a bunch of local open source people to show off their machines and electronics. If you are interested in a meet up, stop by. I can probably get a few free tickets.

I agreed to go, but I don’t like hauling my laser around because I might break something. I have a second laser build going to test the MakerSlide changes. This will be fully functional except for the tube and tube power supply. It will also be run via Mach3 rather than an expensive controller.

The only problem with Mach3 is that you need to haul around a complete computer, with keyboard mouse and monitor. I am already bringing my laptop, so I was trying to figure out a passable way of using that. I know there are options like SmoothStepper and PCMCIA (rarely works) parallel ports, but I did not want to spend any money just for this event.

I have a very small desktop computer with a parallel port. I decided to try putting a VNC server on that computer to see if the laptop could be the display, keyboard and mouse for Mach3. I have used several flavors of VNC, but have found UltraVNC to be my favorite. VNC stands for Virtual Network Computing, but a better description is remote control software.  You basically get to control the desktop of a remote computer.

I installed it as a service so that it would be available as soon as possible. I already had the computer setup to boot right into XP without a login. The server computer did not complain at all about not having a keyboard attached.  I gave that computer and my laptop different static address on the same subnet.  I connected the two computers with an Ethernet crossover cable.  Once the VNC server (the Mach3 computer) booted, I connected with the viewer software from the laptop.

It connected fine and I was able to start Mach3 and run the laser.  It worked quite well and the display update rate was acceptable, even on the DROs.  The only issue I found was arrow key control of the axes was rough.  It took me a little time too figure out the problem.   The axis would start up fine then start to stutter a bit.  I think it worked fine until the key went into auto repeat mode.  If you hit the tab key to bring up the pendant looking thing, you can use the mouse to move the axes quite well.

 

I also hook up my Shuttle Pro and that works so much better than arrow keys any way.

Running G-Code worked perfectly.  It is not a permanent solution, but it met my goal of not spending any money.  It could also work as a simple remote monitor on a running job.

 

Pololu Compatible Relay Driver


I just got my production boards for my Pololu compatible relay driver. This is a little plug in module that can be used to drive off board relays. It uses the signals that are normally used for step and direction to control two relays with the voltage that is normally used to power motors.

Pololu stepper drivers are great little items.  They are inexpensive and very easy to use.  You only need a step and direction signal to control them.  If you use them in sockets, as I show here, they are portable between projects and experiments.  If you accidentally smoke one, you only need to replace the single driver.

There are a lot of carrier boards for these.  There are Arduino shields and many other applications.  Often, it would be nice to be able to drive a larger external load like a spindle or blower.  You can then use the existing step and direction signals to drive the relays.  It uses the voltage normally used to drive the motors for the coil voltage.  The only wiring required is two wires to the relay.

I chose to put the relays off board because the real estate was pretty limited and I wanted to provide the voltage isolation for AC powered devices. I am also a big fan of DIN rail mounted relays. They are very reliable and inexpensive. They are easy to swap around and have some nice features. The relays shown have a LED indicator and also a manually test button that moves the contacts. The relays shown are about $10 each, including the DIN rail sockets.

I got the boards from Gold Phoenix in 2 sheets of 50. They were not cut out, only V scored. Fortunately I have access to a depanelizer at work and was able to easily separate them. I probably could have snapped them apart too. The depanelizer looks similar to this one. Two slowly spinning sharp disks chop them apart.

The boards have all the components required to drive the relay including a supression diode. I am using a pretty hefty transistor here, but you could substitute a smaller one.

Schematic (PDF)

Gerber Files

MakerSlider – Fun With Bin Packing

I did not give a lot of in depth thought when choosing the MakerSlide extrusion length to purchase.  I did not want a lot of waste, so I just bought the largest piece I could handle.  I figured 6″-12″ average waste on each piece could be expected.  The longer the piece, the less percentage that would be.

The manufacturing size limit was set by the anodizer who could only handle about 20 foot lengths.  The limit on my end was about 15 feet.  This was due to what I could realistically cut.  My space is about 27 feet long, so if I put the saw in the middle I could cut most reasonable sizes with a 15 foot length.

When it came time to cut the material, the reward requests came in all over the map on length.  On past projects I had used some simple logic to fit the pieces into the stock, but that was yielding some serious waste now.  I dreaded the thought of 10-15% waste and little chunks lying all over the shop.  I had heard about cut optimization software and decided to look into it.

It turns out that there is pretty well established math behind this.  There is a good article on Wikipedia about it.  It is generally called the Bin Packing problem.  There are 1D (length, like my problem), 2D (area, like out of a sheet) and 3D (volume, like boxes in a container) problems that can be solved.

I tried a bunch of freeware, shareware and demo software.  I was really impressed with the results.  They did not always yield the same results, but generally agreed within about a percent.  The choice came down to a flexibility and a few key features.  I did not have the time to roll my own solution from free software libraries, but I knew I wanted to do some customizing.  I decided to go with an Excel add on from Optimalon.  The Excel format allowed a lot of quick macros and imports to be easily added.

The software allows you add in a number of stock lengths.  This allows me to put in the standard raw lengths, but also some scraps that might be able to be used.  You enter the cuts by length, quantity and ID.   The ID can be used to determine what customer the part belongs to.

One feature I wanted was a way to label all the parts.

 

I have several Dymo label printers that I use extensively.  I wanted to automatically print labels from the software.  I found that Dymo had an SDK.  The optimization software prints a cut table for each piece.  I feed this table to an macro that uses the label printer.

This string of labels is now my cut list for each piece of stock.  I print one string per piece of stock.  A single persons parts are usually scattered among several pieces of stock, so this helps sort it out later.

So far the software works great.  The more varied the lengths, the better it does.  My target is in the upper 90′s for yield.  So far I have found it does really well including some 100% utilizations where the last saw cut is less than the kerf of the blade.  Here is a typical final cut piece.

The only drawback is that the cuts are optimized for material usage and not cutting efficiency, so you are often moving the saw stop on every cut.  If I CNC the cutter, this will not be a problem and Excel can drive the cutter.

 

 

New Brushless DC Router Spindle

I have had a project going in the background to create a small, but strong and quiet spindle for small CNC routers. This is my second iteration of the design and I think it is close to what I want.

Frame

I started with an UHMW frame. This frame presses together then uses some hi-lo plastic screws to keep it together. UHMW is very stiff, but cuts well on a simple CNC router. I used a 1/8″ single flute end mill for all cuts. I try to ramp plunges wherever possible to limit the meterial that tries to climb the tool. It can all be cut from a sheet from one side with the exception of the pocket for the motor. This is needed to get enough shaft to come through. This pocket does not need close registration with the other so it is easy to flip it and run that side. The frame is rock solid. It feels like you could drive a car over it.

 

Spindle

The spindle shank was a key find off eBay. It has a ER11 collet which can handle a little larger then 1/4″ bits and there are plenty of cheap metric and inch collets available. The shank steps down to 8mm. This is great because the step can ride right on the lower bearing and cheap normal and angular contact 8mm bearings are available. I used an angular contact bearing on the bottom, and a normal bearing on the top. The top pulley installs with a spring washer to keep a 8-10 lb pre-load on the bearings to eliminate axial play. The bearings press fit into the end plates. The lower angular contact bearing takes the axial load from hard plunges. The axial bearing I found does not have a good seal on it, so I am a little worried about that. I am looking for a better bearing, but I might make my own seal that would seal to the spandle shaft. I might add a cover for the front and top.

 

 

Pulleys

I am currently using MXL belting which is rated for about 20k RPM, but at this diameter and length I think it can go a lot higher. I was planning to use multiple rubber o-rings, but that requires custom pulleys.

 

Size & Weight

The overall size is rather small at 90mm x 84mm x 82mm and total weight is 0.72 kgs. You mount it by tapping holes into back side. I will have a standard set of holes, but leave room for custom mounts.

Motors

It accepts a variety of motors. You can use univeral motors for small power tools. These will work on AC or DC and are good if you want to run it off 120/220VAC. You can also use RC hobby motors. These are available in brushed and brushless DC. A brushed 12VDC motor is cheap and the you can use a cheap PC power supply. I also test a water cooled brushless DC motor. This is the quietest option, but has the added cost of a speed controller. The motor shown will do over 30k RPM. I need to modify the top to give clearance for the water fittings. It can run for a few minutes before it gets hot, if you don’t load the motor too much. This motor can pull over 550 watts continuously. That is more than 2/3HP. I am hoping a simple PC cooling system will do the cooling.

 

 

Speed Control

The speed controller is controlled like a hobby servo. It uses pulses in the range of 1ms to 2ms to set the speed. You can program the controller though the servo interface to determine if you want reverse, etc. I decided to use an Arduino to control the speed. There is a servo library that makes it easy. I have the Arduino reading a pot them setting the speed accordingly. You program the controller by powering it up with the pulse input set to max speed. You then can set a few options like range and direction.

Next Steps

The next step is to find a way to do real world testing with it.  I need a water cooling system and something to mount it to.  The design will be released as open source.

DIY Solder Stencil on a DIY Laser

We use a lot of solder stencils where I work (during the day).  We usually buy stainless steel framed stencils for about $300 each.  For prototyping we usually hand paste each pad.  We have an semi-automated dispenser, but it is still tedious work.  I see several places like Pololu selling low cost mylar solder stencils.  I wondered if my Buildlog.net 2.x home made laser cutter could do it.

I researched a few blogs and pulled some information from Pololu.  Pololu sells 3mil and 4mil mylar stencils and recommended 3mil for fine pitch work.  I decided to buy the 3 mil mylar.  I picked it up on my way home from McMaster Carr.  It was a life time supply for about $15.

I found a bunch of old small SMT PCBs that I could play with.  I got the top side paste mask  gerber file for it.  I imported the file into a Gerber tool called ViewMate from Pentalogix.  This is a great program that I have be using for years.  A partially disabled version is free.  I have found that it has plenty of useful features.

 

Most PCB layout software has layers for the solder stencil.  There are industry standards (IPC) for the size of these pads, but they are generally a little smaller than the pad.  Often large pads, like thermal pads under big power ICs are divided into smaller windows or dots.  This prevents excess solder from causing problems.   With this in mind you probably need to shrink the pads even further to deal with the kerf of the laser.

ViewMate has a nice feature that allows you to shrink the apertures.   Apertures are a somewhat archaic term from when artworks were done optically on film.  They basically mean the shapes.  To use this feature select the Setup…D Codes menus.

 

Select all the shapes in the list and select the Operations…Swell menus.

Enter a negative value to shrink the shapes.

I then printed 1:1 to a PDF.

ViewMate has a lot of export options, but most of them are not available in the free version.  PDF is fine for what I needed to do.  I then imported the PDF into Corel.  I cleaned up a few extra lines and text in Corel and moved it over near the origin.

If you were always going to make your own stencils,  you could probably skip a few of these steps by defining your stencils layers with the right values.  Pololu actually shrinks it differently in X than Y for even better performance.  Many CAD programs could print straight to PDF or other formats then.

Corel is a front end for my DSP laser software, so I was ready to try making the stencil.  The PDF has vector information so you could cut it or engrave it.  Everyone seems to recommend engraving, so I gave that a try.

I was not sure what to put the mylar on.   I decided to hang it in the air.  I taped inside a wooden frame.  I tried different power levels and speeds and looked for my best result.  I onlt tried about 3 settings combinations before I ran out room.  I looked closely and they all looked pretty good.  I think I got the best at 200mm/s and about 60% power.  The power was not too much of an issue.  It seemed better to cut it with more power than it need.  It tended not to heat the surrounding area.  The step over was 0.15mm.  That probably could have been smaller for more accuracy.   There was a slight smoky haze after cutting that I rinsed off with water.

It matched up perfectly with the PCB.

 

 

 

 

H-Bot…Just for fun

I saw an artical in EDN Magazine today called “So you want to build an H-bot?”. It describes a cool little light duty method to get XY motion. It is used in pick and place type machines. It uses two motors and one open belt. The belt is fixed at both ends to one end of an axis. The rest is run over idlers. By controlling the directions of the motors, you can move in 2D space.  The article does a great job of explaining it.  If you both motors in the same direction one axis moves.  If they move in opposite directions, the other axis moves.

I thought it would be fun to try it in MakerSlide. This is a just a conceptual drawing with most of the parts free floating where they would be attached with brackets or plates. The two plates in the middle would be firmly bolted together.

 

 

Open Source 4 Axis Stepper Driver

This is a new 4 axis stepper driver board for use in laser cutter/engravers and general CNC.  Below are the basic features

  • Socket mounted stepper drivers
  • Integral cooling fan with power connection.
  • On board 5V Power supply.
  • Rotary switch selectable microstep resolution (Full,2x,4x,8x,16x).
  • Control connection via terminal blocks or 25 pin ‘D’ connector.
  • Filtering on all step and direction signals.
  • Motor disable/enable feature through ‘D’ connector or external switch connected to terminal block.
Socket Mounted Stepper Drivers
The board uses low cost socket mounted stepper drivers.  These can be Pololu A4983/A4988 drivers or open source Step Stick drivers.  These are easily replaced if ever damaged without any rework to the PCB.  A compatible relay driver is planned that also fits this socket.  This will allow up to (2) relays to be controlled per board.  These are controlled via the set and direction pins associated with that axis and uses the existing terminal blocks for that axis.  This is perfect for a spindle on a CNC router or assist air on a laser cutter.
Cooling Fan
There is an integral cooling fan for the stepper drivers.  It mounts directly to the board and has a dedicated power connection.  It is mounted high enough to allow heatsinks to be mounted to the drivers.  This will allow the drivers to run at their full potential of 2 amps per coil.
5V Power Supply
There is a 1 amp 5V switching power supply on board.  This will not get hot like a linear regulator due to the voltage drop from the motor supply.  This can optionally be 3.3V if your controller requires that.  All other items on the board are 5V – 3.3V compatible.
Rotary Switch Resolution Selection.
The resolution of the drivers can be independently set via rotary switches.  The resolution is selectable between full step, 2x, 4x, 8x and 16x microstepping.  These and the control connector are flush mounted to one side for easy bulkhead mounting.
Control Connector.
The board has a dual pattern for the control connector.  There is a pattern for standard 5mm pitch terminal blocks and a pattern for a ‘D’ 25 pin male connector.  The ‘D’ connector has a standard pinout for direct PC connection for Mach3 or EMC.  The terminal block is perfect for direct connection to laser controllers like the Thunderlaser DSP controller or an Arduino microcontroller.
Filtering.
All step and direction signals are filtered with a RC filter and a schmitt trigger.  This is ideal for a noisy environment like a laser cutter or CNC machine.  The RC filter frequency is high enough to allow 1uS pulse control of the drivers.
Motor Enable/Disable
You can enable or disable the motors via the ‘D’ connector or via an external switch connected to a terminal block.  This can allow hot motors to cool off or allow you to manually rotate them.
Documentation
Schematic
Interface Drawing (coming soon)
3D Model (coming soon)
User Guide
There are a limited quantity available for immediate purchase
$40 assembled and tested with fan and mating connectors.
$90 with (4) drivers and heatsinks.

If you would like to comment, please use the forum topic for this post.

Using a ShuttlePro as a Laser Pendant

I have been using a ShuttlePro as a pendant for years on my router.  A pendant is basically a hand held remote control for your CNC.  It allows you to control a set of functions right at the machine.  I typically use it to zero the machine on the part, tweak the feedrate, start/pause/restart the job and do an e-stop.

The router’s pendant is starting to die.  It has been through hell.  I have dropped it about 10 times on the concrete floor.  It has also seen a lot of oil and fine dust.  A couple buttons are getting intermittent.  I have the functions to working buttons, but I was getting worried it would stop working completely.  I could not live without it, so wanted to get a replacement on order.  I found a good deal on eBay ($54) and since they had several, I decided to get one for the laser as well.

The ShuttlePro was designed for video editing.  One thing you do a lot in video editing is jogging the video forward and backward.  Typically you want to race forward until you get close then slow down and even go frame by frame until you get to the desired spot.  Sounds like CNC doesn’t it?  It has three dedicated functions for this.  Full speed forward and back via buttons, variable speed via a spring loaded jog dial and a frame by frame little detented rotator wheel.  It also has a lot of redefinable buttons.  These buttons have clear snap on caps, so you can add labels to them.  I have a Corel and PDF template at the end of the post.  Someone at the Mach3 forum dicovered this product and within days there was a plugin for it.

Setting it up is easy.

Download the ShuttlePro plugin from the Mach3 downloads page.  Place the ShuttlePro.m3p file you download in a convenient place like your desktop.  Double click on it.  That will launch a program that registers it with Mach3.  Plug in the ShuttlePro into your computer.  It uses the built in Human Interface Driverss (HID) so you do not need to install a driver.  It comes with some software to test it, but you must uninstall it before using Mach3.  Start Mach3.

Use the config Plugins menu pick to open the

Make sure the plugin is enabled with a green check.  Now click on the word config to the right of the plugin name.

That will bring up the screen above.  Each button can be associated with any of many functions.  My config is shown above.  You probably want some keys across the top to select the current axis.  I like to have the two buttons to the outside of the central wheels be rapid movement buttons.  It is also handy to be able to lock the pendant so accidental button pushes do not screw up a run.   I used the second button from the lower right.  The rest are up to you and how you use your laser.

Below is a video demonstration on my laser.