RepRap-Rays: turning a RepRap into a Laser Cutter

January 6, 2012

For a long time I’ve been meaning to couple the laser beam to the reprap. Recently the PC driving the laser died giving a perfect excuse to turn my Prusa Mendel into a laser printer…ahem cutter!


First up is to divert the beam towards the reprap using a laser mirror and through a hole cut into the laser enclosure. Guiding the beam around the reprap is a little trickier. I opted to rotate the printer 45 degrees wrt the beam and put a mirror (M1) under and to the left of the x-end-idler to direct the beam vertically upwards to the x-axis. Then another mirror (M2) steers the beam to the left along the x-axis towards the x-axis-carriage where I’ve placed the last mirror (M3) which steers the beam vertically down through the focusing lens and onto the workpiece. Unfortunately this setup did not leave enough z-axis travel to get the beam well focused onto the print bed even with the extruder removed from the x-carriage.

Failed setup below, laser beam comes in from the lower right hand side:

A change was required so I removed the hotend and placed the M3/lens combination on top of the carriage. I then broke and rejoined the M2 carriage to bring the mirror up above the x-axis. I also cut a hole through the centre of this to allow the beam reach mirror M2. One or two other judiciously placed breaks and theres just about enough room for the ~180 mm focal length lens to focus sharply. Modified setup:


The laser can be set to gate on with a 5 V TTL signal and pulse at its own internal rate. This means that M106/7 (fan on/off) can be used to gate the laser. Since the output from the RAMPS board driving the fan is 12 V I used a 10k pot as a voltage divider to feed 5 V to the laser.


I had a quick look at SFACT for generating g-code but I didn’t have any success. I found that bdring previously had some of the same electronics and software issues. He modified a python script called to generate gcode for a reprap-controlled laser so I used that. It struggles with anything beyond simple shapes but is sufficient to get started. I use Qcad for drawing dxf or openSCAD can be used to dump a section of an stl to dxf.

Video Action

Cutting through 4 mm plywood:

Apologies for having to turn your head 90 degrees, I’ll do a better video in a day or two, darn smartphone camera! The faint spot visible before things kick off is a low power CW (not pulsed) guide beam. The shiny upturned biscuit tin lid is there to stop the beam from punching through my dibond print bed! Black anodised aluminium would be better for eye safety but there was nothing suitable to hand. Theres a lot of fluorescence visible wherever the UV beam leaks through/off the  mirrors but I was wearing suitably rated laser goggles of course!


The setup cuts well enough but there is backlash on the x-axis due to slightly loose fitting printable lm8uu bushings which allows the carriage to lift ever so slightly at direction changes (like a see-saw). It has the same effect as backlash even though the belts are nice and taut. I need to print new ones.

Below is a photo of a square cut, a square mark/engraving and a circular mark/engraving on 4 mm plywood:

The effect of backlash can be seen but the cut is clean.

Below is are two engraved squares and an almost-fully-through cut into a scrap blue PLA piece (broken off M3/lens holder earlier!):

Next up

New bushings should improve the geometry but the biggest obstacle for me is generating g-code. works with dxf but only generates useful code for the simplest of shapes. I’ll have another look at SFACT and see if it can’t be used somehow. Triggering the laser off the fan is not ideal but there are plenty of available Arduino pins with RAMPS to tinker with. One thing to think about is how to shut off the laser if the pause button is pressed or if something goes wrong etc…

I’m planning to get a laser diode, either infrared @ 808/975 nm or Blue @ 405/445 nm or both, probably fibre-coupled. This would do away with the need for all those mirrors taking up space and reducing the ‘print volume’ available. The laser could be neatly off to the side with all the electronics and the optical fibre would connect it to a small lens assembly (which I plan raytracing) on the x-carriage,  essentially another ‘tool’. I’ve been looking at suitable driver circuits (laser diodes need constant current and are sensitive to spikes) but I’ll post more on that when I’ve settled on a decent circuit / laser diode / optics. If it all works maybe I should sell a few RepRap laser kits to cover my costs!


I’m an Arduino-head

November 10, 2011

For Hallowe’en just gone I printed out an Elvis Skull with blue PLA from Ultimachine. I had some trouble with missed steps early on due to my SFACT not being well calibrated and causing the printer to push out more filament than needed… but I tried to correct the position a few times… with mixed results. Nevertheless it was usable so I drilled out some holes in the eyes/nose and popped in some blue LED’s that were lying around. I had modified the arduino fade sketch to control some laser diodes so I put it to use to make the LEDs glow in a slightly spooky fashion. The kids loved it!

The LEDs pulse 6 times with slightly longer on-times for each successive pulse and at the end they rapidly flash a few times individually. Lather, rinse, repeat.  Here’s the modified code:

This is a variation of Fade from
The no of pulses, their ramping up/down and 'full-on' times can be set.

// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin

// variables will change:

int brightness = 0; // how bright the LED is

/***** main pulse parameters here: pulse ramping, on-time and no of pulses *****/
int pulses = 6; //no of pulses per burst
int maxtime = 100; // time pulse is at max value: 'full-on'
int upduration = 1020; //pulse ramp-up duration in ms
int dnduration = 255; //pulse ramp-down duration in ms

// parameters for ramping output up to max from zero
int upfadeStep = 5; // how many points to fade by
int upfadeAmount = upfadeStep;
int upsteps = (255/upfadeAmount);
int updelaytime = upduration / upsteps;// delay to give above pulse duration

// parameters for ramping output from max back down to zero
int dnfadeStep = 5; // how many points to fade by
int dnfadeAmount = dnfadeStep;
int dnsteps = (255/dnfadeAmount);
int dndelaytime = dnduration / dnsteps;// delay to give above pulse duration

void setup() {
// initialize the LED pin as an output:
// pinMode(ledPin, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);


void loop(){
brightness = 5;
// turn LED on:
digitalWrite(ledPin, HIGH);
maxtime = 500;

for(int p=0;p< pulses; p++){

brightness = 5;
upfadeAmount = upfadeStep;
for (int i=0; i< upsteps; i++){
analogWrite(9, brightness);
analogWrite(10, brightness);
analogWrite(11, brightness);

// change the brightness for next time through the loop:
brightness = brightness + upfadeAmount;

// reverse the direction of the fading at the ends of the fade:
// if (brightness == 0 || brightness == 255) {
// fadeAmount = -fadeAmount ;
// wait for 30 milliseconds to see the dimming effect
brightness = 255;
analogWrite(9, brightness);
analogWrite(10, brightness);
analogWrite(11, brightness);
dnfadeAmount = dnfadeStep;
for (int j=0; j< dnsteps; j++){

// reverse the direction of the fading at the ends of the fade:
if (brightness == 5 || brightness == 255) {
dnfadeAmount = -dnfadeAmount ;
// change the brightness for this time through the loop:
brightness = brightness + dnfadeAmount;

analogWrite(9, brightness);
analogWrite(10, brightness);
analogWrite(11, brightness);
// wait for 30 milliseconds to see the dimming effect

brightness = 5;
analogWrite(9, brightness);
analogWrite(10, brightness);
analogWrite(11, brightness);
maxtime = maxtime * 1.5;
// code to flash LEDs individually at end of fading cycle
for (int k=0; k< 5; k++){
analogWrite(9, 255);
analogWrite(9, 0);
analogWrite(9, 5);

for (int l=0; l< 5; l++){
analogWrite(10, 255);
analogWrite(10, 0);
analogWrite(10, 5);

for (int m=0; m< 5; m++){
analogWrite(11, 255);
analogWrite(11, 0);
analogWrite(9, 0);
analogWrite(10, 0);
analogWrite(11, 0);

I imagine there are neater ways to code it but it does the job. I’ve been messing with controlling it from an Android smartphone using Python (SL4A) and a bluesmirf bluetooth module. More on that in a future post.

Filament Fusion

November 10, 2011

Over the summer Richrap came up with a nice way to do multicoloured printing by joining filament. At the time I figured that automating it would be pretty cool so I did a few quick welding experiments but between one thing and another I haven’t looked at it since. Anyway I decided to take some photos/video and pop it up here in case anyone finds it useful. The two main approaches I tried were with lasers and resistors.

Filament Fuser – resistance welding:

The first thing to do is to heat the PLA in order to weld it. For this I soldered a bunch of SMD resistors in parallel onto some stripboard (18 x 120 Ohms giving 6.6 Ohms and almost 22W @ 12 V). I covered the lot with kapton tape and then taped some thin aluminium strip on to conduct the heat out of the resistors. This was then in contact with an aluminium tube which had a PTFE liner (same as Adrian’s recent RepRap hotend designs) within which the PLA sections to be joined meet. This is the heater and I connected it to my RAMPS setup and set the temperature to 160C for welding as per Richrap’s blog.

The second part of the problem is to cool down the weld so as to move the filament thru …. and continue printing if this was in some sort of automatic setup. For this I attached a heatsink to another Al strip (both strips shaped a little concave to give greater contact with Al tube). Since I want the heatsink in contact most of the time and the heater only during heating I attached both to a relay which is wired in parallel with the heater. This means that the heatsink is not in contact during heating. (Note I also tried nichrome wire wrapped around the Al tube but it took much longer to cool because the wire was always in contact with the Al and so you are waiting for filament, Al and the wire to cool… also the contact with the heatsink was poor due to the wire.)

It works pretty well and is repeatable with decent quality but at the moment takes over a minute to get to 160 C and then back down to 60C (glass transition for PLA…. maybe I could move things at a higher temp?). Also, I have to push the filaments together a little by hand – a feeder system could do that easily and more reliably! Photos below. Note: the ‘housing’ is a bit of a messy hack job and leaves lots of room for improvement!

SMD heater, heatsink and relay

SMD heater on left with heatsink on right. You can see the aluminium strips with the concave shapes (ignore aluminium shims behind stripboard!!!)

Al tube on PTFE liner. Theres a small section of larger PTFE under the Al to stop it slipping down and separate it from more Al which is inserted into the wood. Another idea is to have a longer Al piece but drill holes in it to prevent heat conducting away from the melt zone, both work.

The crude spring loading is for returning the solenoid/heatsink to the cooling position.

Theres room for improvement but results aren’t bad. The join is a little ‘fatter’ than the rest of the filament because the PTFE tube has a 2 mm id and the filament is normally 1.75 mm od. So as I push the filaments together to apply pressure to aid the weld…. the join expands to fill the PTFE tube id. Since the liner is PTFE it usually slips out easily. Usually the 1.75 mm hotends have 2 mm id going down to the hotend (to allow variation on filament od I guess) so it should go through the extruder ok… but I’ve not tested that yet.  One thing to note is that the PTFE can expand but if its snugly fitting in the Al tube that probably shouldn’t happen.

Filament Fuser – laser joining:

I figured this would be a little quicker as you are directly heating the filament so theres no extra thermal mass to heat/cool like SMDs and Aluminium. I’m using 3x 200 mW laser diodes at 808 nm running at ~ 100 mW outputs to (over)ensure I avoid pushing them beyond 200 mW and frying them. I used this circuit from (recommended by the folks at but with a high value resistor instead of the zener.

I borrowed the PTFE liner idea from the resistance version above as this keeps the filaments aligned! Results have varied greatly and this is mostly due to the fact that not having laser goggles for 808 nm I put everything into a box and can’t really get in there to push the filaments together, though more power would likely help too. So its a bit random and as such I haven’t been able to get reliable weld time info. I’ve tried spring loading the filaments but not very neatly. Maybe I’ll have another look at this in the coming weeks….

hotend postmortem

August 17, 2011

Following the last post I’ve sliced open the old ptfe thermal barrier in order to get an idea as to why it leaked/jammed. In the first image, below, it can be seen that the pla made quite a bit of room for itself increasing the ptfe inner diameter! If you look closely in the lower section close to the transition from threaded to smooth section there is a little blob of orange pla.

I have a cheap’n’cheerful usb microscope which is useful for this type of situation…

Above is a slightly closer view of the orange blob.

Above is a closer image of the pla blob. Sorry about the lack of a scale, if it helps the threaded section in zoomed-out images is M6.

Above is a microscope image of the od, in particular the threaded section. The dark region just above the (admittedly dark!) threads is possibly of interest….

Above is a closer view of the dark region in question. There does appear to be some orange pla exiting this hole. It is in the same position as the blob on the id… so this is likely the leak.  I suspect you then get into a vicious cycle of jamming-leaking-jamming which eventually leads to a plug which is too much for the extruder to overcome.

On a brighter note here are some images of the makergear hotend:

The hotend has whats called a groovemount, this is visible in the first image. This slides onto a plywood plate which can be purchased from makergear. In my case, having a laser and some ply lying around, I cut one out myself (sorry for the lack of photo!). Its basically a rectangular piece with a U-shaped slot/cutout for the groovemount to slide onto. The plate’s thickness was about 0.5 mm too much so I shaved that off with a sharp chisel. The plate mounted on the Prusa x-carriage without fuss, over the existing ply plate. This raises the extruder a shade but the hotend is shorter than the old one so no z-axis height is lost.

New hotend

August 12, 2011

Since the last post, a while back, the hotend gave up. Initially it started leaking…. gently oozing pla out somewhere between the teflon and the brass. I took it apart and used sink/drain unblocker fluid to clean the pla out (most came out with gentle heating first). I added an extra turn on the teflon barrier threads with a die so I could better tighten the teflon into the brass nozzle in an effort to seal any gaps that may have formed and put it all back together. Unfortunately it leaked again quite soon afterwards so I repeated the process a second time.

Pretty soon it was leaking again. This had the effect of putting down ever so slightly less plastic than skeinforge anticipated and so the top layers were a shade sparse. In any case I rightly or wrongly I continued printing… but not for very long…. a couple of days at most. Then the hotend just packed it in altogether.

I opened it up again and the teflon was clogged so I drilled it out (forgetting I could just heat it in hot water!). Anyway with a 2mm channel drilled in the teflon I could still see some pla in the walls of the teflon (at the time I was printing with some nice orange from Vik!). I reckon the pla had forced itself into the teflon and was actually leaking from there and not at the brass interface though I should really split the teflon down the middle to verify that.

So I’d been hearing good things about Makergear’s hotend for quite some time and now being hotendless it seemed like a good time to get one. So I ordered a 0.35 mm nozzle superpack for 1.75mm filament, Makergear shipped the same evening and the kit arrived here (Ireland) a few days later. The first pressing task was to eat the free chocolate sample! Then down to the business of assembling the kit. This turned out to be pretty straightforward and all the instructions are on their website.

I’ve been printing with this for a few weeks now and so far its been printing really well. I’m getting 60 mm/s out of it easily and I plan to push it a bit further and see how far it’ll go (the old hotend struggled beyond 30 mm/s).

Something else thats been happening in the past few weeks is Action 68’s fork of skeinforge called SFACT. Check out Action 68 has deleted out unused plugins and the default values in SFACT are pretty good out of the box. In my opinion its a nice step forward and I’ve been getting nicer prints as a result. Its integrated into Kliment’s pronterface host which is pretty cool. Hard to keep up with all the development…. 😉

belt tensioner

June 9, 2011

Generally most things print pretty well… with the exception of the small RepRap pulleys which need a lot of ‘cleaning’. I could feel some backlash in both pulleys when the motors weren’t powered up. So, like other folks, I put a pencil on the nozzle and plotted an 80 mm diameter circle with fill.

I used the lash option in SF 40 to compensate but pulleys looked a bit odd.  So I designed up some crude adjustable belt tensioners in openSCAD which I could fit to both y-axis and x-axis without dismantling anything (except loosening the x-axis belt to fit the tensioner!).  The x-axis one fits under the prusa x-carriage onto existing bolts and the y-axis one fits under the bottom plate using the belt clamp bolts.

X-belt tensioner:

Y-belt tensioner (the bolt is too short so there are some other bits jammed in to raise the belt a bit more!):

Printed pulleys (left to right, original, SF40 lash, tensioner, tensioner with more tension):

It mightn’t be that obvious from the photo but there is a decent improvement, although there is a bit more tuning to do!

laser cut gears and pulleys

May 25, 2011

The repstrap I put together a few months back used laser cut gears to couple the steppers to the leadscrews. I printed some pulleys on it for the Prusa build but they weren’t precise enough. So I laser cut some instead!

Someone asked my about them so I thought I’d write it up and take some photos. I used openscad to generate dxfs of each of the three different profiles in the pulleys (3 different heights) and the gears (see GilesBathgate’s blog). The first ones weren’t strong enough so I increased the base size and used drilled holes for nails to take the strain. Here’s some photos of putting them together…

gear parts:

gluing the parts:

Gear glued and using screws to take the turning forces:

Pulley parts:

Gluing teeth together and using nails to take force:

Gluing and ‘nailing’ base parts:

Clamping pulleys for glue to set:

Finished pulleys with nails cut to size:

On a side note I’ve listed some printed parts for sale on eMAKERshop. Also eMAKERshop are rasinig funds to sell Huxley kits here: