Making a 10x10cm CNC XY plotter from scrap parts....and then adding a laser to it!

Recently I had a few weeks off and during that time I finished one of my longest lasting projects - the 30€ 3D printer. During that time I got interested in CNC stuff and since I'm so budget minded (courtesy of my empty wallet) I started thinking of ways to make CNC cheaper, better and more available. This might seem like a far stretch but to me it was actually pretty doable.
First I started out with what I want my build area to be, 10x10cm seemed pretty good and should work well for what I'll be doing with it. So I took a piece of paper and started drawing what I want my little plotter to be, the 10x10cm build area being the first thing I drew.

You might notice that there's a 2x2cm square, that's the bit that will be moving around the whole build area with whatever is mounted to it. When designing most of my projects I just wing it and make whatever looks nice, I can then refine the design into something more sensible.
The 2x2cm square was extended to 2x3cm to leave more space for a 10mm hole and for my 3mm shafts that I made out of welding rods, these will be what the the piece will slide along.
The 10mm hole is completely optional as it's for the special little thingy that I will put in this plotter to make it both special and totally pointless at the same time.

Since the center of the 2x3cm "gantry", let's call it, has to cover the whole build area all I had to do was to extend the 10x10cm square and the design was almost finished. I used 12mm plywood but drew it as 10mm because that's more convenient.
With this scribble I now knew how wide the plotter had to be and to finish the design I could now draw a more detailed side profile.

Drawing the side profile allowed me to complete the design, this might not seem like much but you'll see how it all comes together. Since the plotter is quite small I was able to draw it on a regular notebook in 1:1 scale, the squares on the paper are 5mm each.
Armed with this scribble I took my jigsaw and started hacking at the piece of plywood I had laying around. All of the parts are easy to cut since they're all rectangles and there's no complicated cuts. No precise angles or cuts are needed if you have the factory cut edge on the plywood. The industrial machines that cut out these plywood pieces are much more precise than my worn out black&decker jigsaw so I tend to base most of my measurements on them.
The three 2x3cm pieces that form the gantry and the two bearing/bushing blocks were cut out.

You can see how these align up with the drawing.
Next came the two 14x5cm side pieces, after I cut these out I clamped them making sure they align with each other as well as possible. This is because I had to drill two holes in each to hold the 3mm shaft but both of the holes had to be spaced apart equally to prevent the bushings from binding. Since the clamp did not fit in my drill stand I screwed in two wood screws to hold the two parts together while I drill the holes, this also made it easy to re-align the two parts for any future drilling.


After I drilled the holes I stuck a pair of 3mm shafts from DVD drives to check that everything is allright and you can see just how short the shafts from DVD drives are, that's why I'm glad that I can now make my own.
The two bearing blocks that also held the two 3mm shafts for the other axis were also drilled with a wood screw holding them together, in this case they were so small that a clamp wouldn't have been able hold onto the part.

Getting the holes accurately spaced on this part was even more important because they're so close together, any tolerance issues would lead to binding.
And just like that all of the parts to make the frame were nearly done, only one left and that was a base to hold all of the parts together. At first I thought about going fancy and making this all neat and compact but knowing myself I knew that this would turn into a big mess regardless. Then I decided that I'd just make a single 14x15.5cm plywood rectangle and screw all the parts to It and since 12mm plywood would have been a total overkill I used some 4mm plywood.
It's important to note that, because of the wood grain, plywood likes bending in certain orientations more than others and that's very noticeable in the 4mm plywood I used.


It may not look like it but I'm applying a lot more force in the second picture but, as you can see, despite that the plywood is bending much less. I took this into consideration when making the base piece to make the frame of the plotter as rigid as possible. The piece of plywood also had a bit of a bend in it already, I swear it's not from me bending it. The way it screwed to the 12mm thick side pieces meant that it got straightened out.

And just like that the whole assembly was starting to take shape.
Next I had to drill the holes for the 3mm shafts to go through, which was done at the drill stand, but since my drill stand is a little worn out the holes did not turn out perfectly square. The 3mm holes my drill makes are a tight fit for the shaft and thus I had to somehow make them bigger to make the bearing blocks slide more easily and yes, I used the plywood as my bearing surface but that changed later on in the build.
Making a reamer to enlarge the holes just enough for a precise and smooth fit for the shaft is quite easy, actually. All you need to do is to take a piece of the shaft you're using and to scuff the end with a metal or a diamond file, this way it raises a burr which cuts a little bit of the wood away and makes the hole just a little bit larger.

Now I could assemble one of the axis and test how well it goes and it was pretty all right but it would bind a little bit in some spots and I didn't like that. Because of that I wanted to improve the situation and my first thought was to add rollers. I had these pulleys that I pulled off the motors from CD/DVD drives and they have a nice V shape in them to run along the shaft and I could ream the hole out with a scuffed motor shaft to make them turn on a 2 mm shaft.

This sounded like a good plan but the pulleys each needed to be modified to run along the 3mm shaft well, there would be adjustment and mounting problems also, so I scrapped the idea.
My next idea was to pull out the bronze bushings from DVD laser assemblies. Some DVD laser assemblies happen to be die-cast and they have bronze bushings pressed into them. With a 4mm drill mounted backwards in my drill stand I could use it as a makeshift press to press out the bronze bushings without damaging them.

Going this route meant that inserting the bushings would be as easy as drilling out the 3mm holes with a 4mm drill and pressing the bushing in.
For the other axis I thought that plywood on metal would be good enough since the assembly is so narrow and wood bushings are pretty good as long as you don't apply any side load to them.

The gantry turned out pretty well, I reamed the holes with my makeshift reamer and the gantry could then easily slide along the axis.
To move the axis I had decided to use the stepper motors from DVD/CD drives. These were modified to be a bit more convenient to use, I'll make a separate post about that.
Since the steppers from CD/DVD drives are so small they are also very weak, or so one would think. They have very low torque, which rules out the possibility of a belt drive but, for a stepper, they can reach stupidly high RPM, which makes them perfect for lead screws.
So all I had to do was to find a suitable lead screw. What could I use as a lead screw? Hmm, lead screw......screw........wood screw! Yes, a wood screw would work if only I could find one long enough but there lied the problem. There were plenty wood screws long enough but none of them had a long enough thread.

Well I'd be lying if I said "none" as there were a few that had a long enough thread but those screws were very thick and had a notch in the threads to make them cut into wood, those notches would have caused too much wear and friction and the screw itself would have been a bit too heavy for the stepper to move.
Making a nut for a wood screw would have been as easy as winding a bit of steel wire onto one. Once the steel wire is released it springs back just enough to make it move freely on the screw without too much clearance to cause backlash.

My second option was to buy some M4 threaded rod, which I was a bit against because of the fine thread but as it turned out the fine threads were not a problem at all. The high speed of the steppers meant that even with the M4 thread, which had a pitch of 0.7mm, a single stepper was capable of moving one of the axis at about 15-20mm/s and with enough force to push the whole plotter across my table top, which is quite impressive. They also become super hot very quick, good thing that the magnet inside is not neodymium or else it would rapidly overheat.
I thought I'd hit two birds with one stone if I made an aluminum mounting bracket for the steppers, this way I could both mount and cool the steppers and that's exactly what I did.
For material I took some aluminum molding I had and cut a bit out to be able to roll it over to make a sort of clamp for the stepper. The aluminum sprung back just a little bit and that allowed me to slip a thermal pad in between it and the stepper to aid thermal transfer. The stepper was held in with a zip tie and the bracket was screwed onto the wooden side, which had some fresh holes drilled in it to allow the threaded rod to pass through.

You can see that I have a total of three steppers, that's because one of the axis is too wide to be driven by a single stepper. the axis is also heavier, so dividing the load helps the already badly over-driven and overloaded steppers.

The breadboard in the back is used for testing steppers, it has a digispark running some code I wrote that reads an encoder signal and adjusts the speed of a stepper or reverses the rotation at 0 speed.
You can also see that the nuts for the lead screws are hot glued on. This turned out to be a quick and easy solution to mounting the nuts. There are also other ways to mount the nuts, one could make the wooden piece bigger to have a hole drilled through and the nut pressed in, the zinc plated nuts can also be soldered to, so a copper bracket could be soldered, for example.
The lead screws were attached to the shaft of the steppers with a piece of small rubber tube from an old inkjet printer. This serves as a great flex joint and also as a dampener.

With the plotter ready to move I wanted to make both of the axis move but the stepper driver I was using did not like driving two steppers in parallel, good thing I found a third driver in my parts box. So after plugging the driver in I could enjoy some smooth combined movement of the two axis.
The movement was smooth but the sound was rough, mainly because the ends of the two parallel lead screws were running inside brass tubes that I had glued into the wooden holes, these were to support the loose end of the lead screws. At high speeds these would start making noise.
So the XY plotter thingy was almost complete, now it was time to make it do something. To be a plotter it has to plot but I hadn't made my special attachment for it yet.
This is where the laser stuff begins, DVD lasers can burn stuff pretty well, especially eyes so avoid looking at the beam.
I really wanted to make it do something so I pulled out my container of DVD laser assemblies and picked one apart for the red laser. I wanted the red laser because It's visible and much easier to know when It's on, also I couldn't get the IR laser to burn, I mean if it doesn't burn then what's the point.
I found a really interesting one, this laser didn't have the usual can with a window on it, rather it was completely open.

I took the focusing lens and glued it right onto the diode module with some epoxy. Super glue would have been quicker but it tends to fog up clear surfaces so I didn't want to risk ruining the laser.

With this lens the laser had a wide focus range, around 15-20mm from the lens, which made it easy to adjust.
To drive the laser I found a LM317 laser driver circuit online and I happened to have a few of those.

At first when I tested the LM317 circuit it worked really well but I wanted more power. With the two 10Ω resistors the current was about 200mA, so I put two more in parallel and that got about 350mA. Of course powerful lasers can be hazardous to health, this particular one happens to be a class 3b laser. I mean if it burns wood it will do the same to your eyes, you have been warned.
That being said I zip tied the laser to the gantry and began burning stuff.


The burn is only a single line because I was turning the lead screw by hand since I hadn't yet assembled the control circuitry, which is what I did next.
I looked around for a quick and simple piece of software to turn this into a laser engraver and found the BenBox lazer engraver software. It's compatible with arduino nano and also happens to be able to flash the firmware to the nano as well, port selection and settings are easy as well. It does have some limitations but it was super easy to set up.
I used an arduino nano as the controller and assembled it with the drivers on a breadboard.


The stepper drivers were running hot so I stuck a fan in to keep things cool.

With everything complete I was ready to burn, for the first tests the laser was run at full power, I later modified the driver to modulate the laser.


The laser was going way too slow and this piece of cardboard was being absolutely toasted.
I then selected the outline option and made another run.

Since the laser was running at full power without modulation I relied on the speed of the movement from outline to outline to keep the paper from being burned but even despite that some black lines are still visible.
The reflection from the red laser was quite dazzling so I put a few pieces of paper on the plotter to shield me from the light.

Diffuse reflections should not be hazardous but I'm driving mine pretty hard so it's better to be safe than sorry.
Refer to this link for class 3B laser safety: http://www.lasersafetyfacts.com/3B/
To improve the quality of the engraving I had to adjust some settings but more importantly I had to add modulation to the laser beam. I wasn't too familiar with this driver circuit and at first couldn't think of a way to modulate the laser power. The problem was that I wanted the laser to be always on at low power to be as an indicator that it's on and then to go to high power whenever engraving had to be done. Simple on/off control would have been easy but I didn't like the idea of having a high intensity laser beam flashing on and off.
I did come up with a way to modulate the laser power with a transistor and two resistors, it's not an elegant solution considering the constant current driver but it works well enough and the engraver now produces some pretty good results.


My biggest issue now is backlash in the lead screw, the threaded rod and the nuts are pretty low quality and have tons of slop as can be seen in the picture above. Scanning from one side to the other does help against backlash. I also tried scanning from side to side, which made backlash very visible. The paper also changes to a brighter color before it starts burning.

I wanted to do some quick tests for adjustments so I wrote some small text to engrave.

The letters happen to be almost exactly 1mm tall.

I also engraved some more apt images:
On this one stepper started skipping steps and made the font of the text look pretty funky. I also played around with the pulse settings a bit, the hole at the top was caused by a 80ms pulse time, then right below it was 20ms pulse time, which was quickly changed to 40ms for the rest of the burn.

Did the same image but with the outline setting and this time it was the backlash that made the font pretty funky.

I also burned a warning on the base itself, it's a class 4 warning but you can't be too careful.

I noticed that the loose end of the top lead screw would start flopping around when the gantry got close to the stepper and would cause step loss, to help against that I made a cardboard support and superglued it on.

It works surprisingly well considering it's just a piece of cardboard. As a last mod this axis was also upgraded with bronze bushings and after it had run in I no longer had any step loss. So I consider this project a success, pretty good for a weekend project.
Also I'll add that when I first made the 3mm shafts I thought that they'd be too flimsy for anything serious but now that I made an XY assembly out of them I found out that they're surprisingly rigid, you could easily make a 3D printer with a 10x10x10cm build area with these.

Well that's it for now, thanks for reading.

Komentarai

Populiarūs šio tinklaraščio įrašai

Playing with junk: the SN29764 (LM1017) 4-bit binary 7-segment display driver.

Infrared RGB LED controller using Digispark (Attiny85).

Modding a laptop power brick into a lithium pack charger and some Manhattan style prototyping.