Tuesday, November 16, 2010

Seed studio PCBs arrived

Well that took a while. But the PCBs made by Seeed studios arrived today. I didn't get a chance to populate them yet. Maybe I'll get a chance to work on that tomorrow.

Sunday, November 7, 2010

Plastic Engraving

I've done some work on the CNC machine yesterday and I was able to engrave some really fine text onto plastic. This is the first application for the machine that I have in mind. At work we make some hardware. I'd like to engrave the serial numbers in those cases. As you can see the engraving can easily be done at a lower laser power. Which leads me to the realization I need control over the laser power from EMC2. Maybe Drive4Die or Flexmod.

Also it looks like I'm going to need control over the Z axis to focus the laser on different height materials without having to refocus every time.

I've also noticed the machine isn't quite orthogonal, which is not too much of a surprise :). I'll have to work on that a bit as well. All in all it's looking very good.

Thursday, November 4, 2010

LPC-815 Diodes

The LPC-815 sleds and goggles arrived today. This guy made a great video showing you how to extract the diodes without harming them. Note that these are LOC (long open can) style diodes. That means the internals are not protected! Yikes. To prevent filings from getting into the diode I put some tape over the hole at the top. Then before I snap the thing open I carefully cleaned the filings away.

I was a little shocked when I finally got the diode out. It looked as if I had broken it. They really mean "long open can"! I Carefully placed the diode in the new holder and attached the wires. Negative on the top lead and positive on the left lead for this particular diode (YMMV).

The datasheet for this diode can be found here. Note that it says that 400mW is it's maximum and should only be driven this high if it's pulsed... Clearly the guys on the forums disagree. LaserPointerForums has this nice graph up. Also this thread has a good collection of the various diodes out there. This list says this diode should handle 350-420mA...

The goggles came today, both from Wicked and LaserGlow. Wicked runs a terrible operation they didn't even know the glasses had shipped and I ended up asking them to cancel the order. Now I have two safety goggles. I took the Laser Glow goggles home with me to test.

When I hooked up the new LPC-815 diode I thought I had killed it as I saw no laser light while wearing the goggles. I was expecting to see at least some dot of light. To my suprise I noticed that the laser WAS on the goggles simply blocked it fully. Tomorrow I'll try the Wicked goggles they are a lower OD rating. I would like to see the laser a little if possible.

Sadly I had forgotten my multimeter so I am not sure how much current I was putting through the diode but it's burning just fine! It went straight through the thin balsa wood! Maybe I can use the CNC cutter to make some airplanes :)

Things are looking good!

Tuesday, November 2, 2010

Parallel Port Interface PCB rev 2

With what I learned from revision 1 of the parallel port interface PCB I designed the new version. The goals I wanted to achieve compared to revision 1 are:
  • Better protection of parallel port.
  • Input / Ouput selection for bidirectional ports.
  • Actual working relay up to 2 amps at 12v.
  • Smaller (3.2 x 1.6").
  • More GND outputs.
  • Always on 5V output (VCC).
Features from Rev 1
  • Efficient Power supply (using switching power supply).
  • Easy connectors.
  • Reasonable priced components.
  • ESTOP relay shuts down 12 and 5v lines.
  • Integrated pull ups for input lines.

So the new revision does that I believe. I've ordered 10 PCBs from Seeedstudios. This means I'll have a few left over. If anyone is interested in them let me know. I'll have all the components as well.

The new schematic includes a 74hc245, a bidirectional buffer. The inputs have built in pull ups and protection resistors. And the relay switches both the 5v and 12v lines on and off.

Looking around on LaserPointerForums today I found this guys' build he has a very nice looking Laser CNC made out of metal.

Monday, November 1, 2010

Monday update

I didn't get to work on the laser530 yesterday due to Halloween. Hope everyone had fun, we sure did.

I canceled the order with WickedLaser for goggles today as they have still not shipped nor given me an order number. They really suck. Buyer beware.

I ordered these more expensive glasses from Laserglow. Don't forget to check laserpointerforums for discount coupons. I also ordered 2 open can red laser diodes from 20x speed DVD drives from Modwerx. They should put a bit more power out.

Saturday, October 30, 2010

First engraving!

I was able to spend another hour and a half tonight on the project and I've made my first engraving! Yes you read that right. After 8 days of working on the project, with a full time job and kids (basically only time I could work on this was after 7pm). I've gotten the CNC to the work! Does it still need work? Yes of course, there is a lot of tuning to do. But it sure is satisfying to see the darn thing work!

Here is a photo of the scrap piece of balsa I engraved with the text "Laser 530". Some of the letters didn't quite come out but mostly this is looking very promising. The laser was running at 160mA. There still is some room to go up. I believe I've seen figures of 200mA to be possible and not burn the laser out. Also I need to work on the focusing, which will be a lot easier once I have the goggles.

I generated the G-Code for this sample using a tool I found on this page. It basically does the work for you. Not bad! Below is a short clip of the laser burning the text.

  • Up Laser power
  • Focus Laser
  • Turn off laser in between letters (use Z height instead of Spindle maybe?)
  • Clean up cables

Good Night!

ESTOP relays fried

I found out this morning what was wrong with the ESTOP relays, they were fried :) I could have sworn they were good for up to 500mA, with the steppers taking about 100mA... Lesson learned get a good relay!

Friday, October 29, 2010

Success!!! Both the X and Y axis are moving

Good news guys. The with the new PCB and the correct IO address for the parallel port I now have the table and the X axis responding!! I put together a very simple G-code file and recorded the result!

N100 G0 X0.00 Y0.00
N100 G0 X8.00 Y8.00
N100 G0 X8.00 Y4.00
N100 G0 X4.00 Y4.00
N100 G0 X0.00 Y0.00

For some reason I am having trouble with the home switches on the first port of the card. I hope I didn't burn them out somehow :) Though I wouldn't be surprised.

It was quite confusing configuring the motor parameters but trial and error did the trick. The interface board works mostly. One tiny thing is not working though, the relays do not respond to the ESTOP signal. I thought that they did work at the office. Gotta figure out what is going on there tomorrow.

I've also received the shipment from Aixiz, I had ordered a laser holder (12x30), glass lens and a driver with TTL input. First off this thing is impossible to open by hand, secondly taking out the 5mW laser that is inside is even more impossible. Looks like they put some kind of glue on the threads, why? Oh well, nothing a little brute force can't fix. The DVD laser has been installed and has burned it's first victim. A random leaf. WickedLasers is incredibly slow, they have not yet shipped my goggles! Beware.

The Axis, revisited.

Remember my post a few days ago,.. I have the axis labeled incorrectly. EMC2 uses the axis rotated CCW by 90 degrees, switching the names. The bridge is the X-axis, the table is the Y-axis.

Laser530 Interface PCB

Alright, after trying to bread board the interface between the parallel port and the various bits on the CNC machine I decided to put a board together real quick. I've used the well known method of toner transfer PCB etching.

The features:
  • Pulls up on line 10 and 11 for home switches
  • Break out all input and output lines
  • The emergency stop line is on pin 1 and controls two relays controlling power to the machine.
  • Power indicator LED
  • Efficient switching power supply so hopefully we can use a small 12V 500mA wall wart to power the machine.
  • Screw terminals
  • DB25 connector
Let's look at the diagram.

This diagram has one modification compared to what you'll see in my photos. I forgot to add the pull up resistors in the actual PCB, so I dead-bugged them on top. There really isn't much going on, pretty straight forward stuff.

The layout looks as follows with a mix of SMD and regular components.

This is what the resulting PCB before drilling the holes looks like. Yes it's not perfect but hey, it works and it definitely beats paying and waiting for a PCB.

Now another hour later the PCB looks like this and is working:



Now tonight, hopefully I'll get some movement in the machine!

Thursday, October 28, 2010

The steppers are alive!

Alright, the stepper drivers came in. As you can see in the videos below I am able to drive both steppers successfully. They use about 150mA when running at about 500Hz.

As you can see I'm using an Arduino Pro (the blue PCB) to generate the step pulses and the step direction, alternating between a high frequency and low frequency and changing direction. The motors both respond nicely. The red PCBs are the EasySteppers.

Tonight I attached all the wiring and tried to get EMC to control the motors, sadly I was unsuccessful. I think I am having issues with the parallel port card. Maybe I've got the wrong address or something. I'll have to sit down tomorrow and troubleshoot this one. I'd also like to make a small PCB that holds a 12V-5V convertor, some LEDs, DB25 and a relay for the emergency stop. Gotta sleep on that one.

Wednesday, October 27, 2010

Computer Setup

So I had this old Gateway machine sitting here. It's a hand-me-down from my wife. It has it's issues but appears to be working okay with a new Ubuntu 10.04 install. EMC2 installed surprisingly easy. I was settling in for the long haul, expecting tweaks and hacks but no need at all. linuxcnc.org wiki provides an install script and that literally did everything!

So far so good. I had brought an old video card as I had read that integrated video cards can increase latency. The documentation states that anything below 15-20ms will be great. Anything in the 30ms will be ok, but might be slow. 100ms will not be any good.

I ran the HAL Latency test and the worst case jitter is 23189. Not brilliant but not bad.


Since I don't have stuff connected yet (stepper drivers boards coming tomorrow) I decided to get the datasheets for the steppers.

The X-axis stepper is a Mitsumi M35SP-11NK (the sheet says 25Ohms, the unit says 8 Ohms)
The Y-axis stepper is a Mitsumi MS35SP-9T (11 Ohm), for which I cannot find a data sheet.

The 11NK - 25Ohm appears to run on 12V or 24V. So I'll be better off starting considerably lower. Maybe even 6V... LM317 to the rescue.

Oh and of course I'll have to figure out how to hook up the stepper motors.

One thing I noticed is that the gears have a bit of slop. Meaning that when the stepper starts to turn, the belt doesn't move for about 2 or 3 steps. Since I'm new to all this, I asked ol' google about compensating for gear slop in EMC. Which quickly led me to the official term for this problem: "Backlash" and the remedy Backlash Compensation. Documented in the manual under axis configuration BACKLASH.

Putting it together

Alright, the bridge mount glue has dried overnight and it's time to put it all together! My daughter was quite curious as to what those gears do. She was delighted to find she could move the table and the laser head by spinnging the 'baby' gears. Not only that but the baby gear spins the daddy gear. For those not in the know, that is the smaller gear spins the larger gear,.. not unlike reality :)

The Axis

After skim-reading some of the EMC2 documentation I think I figured out how to name the axis. EMC2 uses right-handed coordinate system. ( See section 9.2.1 of the User Manual. ). So making a quick drawing of this I can see that the table will be the X-axis, and the bridge is the Y-axis.

Once I get the stepper drivers I will most likely be looking at this page very carefully. It talks about how to setup EMC2 in a very understandable way (famous last words)

Tuesday, October 26, 2010

Bridge mounts and table guides

Good news! The base turned out nice and straight so the 1x1" pieces of wood glued to the bottom did the trick.

Tonight I worked on the guides for the table, ensuring it moves along only one axis. In the picture you can see the guides are multiple pieces of wood. If I had to do that again, I'd make them out of one piece. The table can get hung up on them if they are not flush, nothing the sander can't fix.
You can also see the clamps holding down the newly cut bridge mounts. The bridge slides into the slots that I have cut, allowing for easy adjustments if necessary.

PC - CNC controller

I placed the parallel port and an old video card in the old PC I have set aside for this project. The PC came on and started booting the EMC linux live CD. I've added the video card because some of the posts on the EMC forum indicated that integrated video card sometimes induce latency. Latency is not good as EMC needs this to be as low as possible to guarantee good motor control.

Sadly I ran out of time to work on the project for tonight. So I won't know what the latency for this machine will be. The stepper motor controller cards should arrive on Thursday. I can't wait to see this thing move :)

Laser Safety - Labels

Of course it's always good to label stuff you make especially if it could potentially hurt someone.

So surf on over to safelasers.org and make yourself a proper label.

NewEgg is FAST

Well how about that. Ordered yesterday, arrived today. This was shipped from within CA so that helps :)

The connection with the CNC laser cutter will be made through a parallel port. (Wow that takes me back a few years) The interface cards I ordered all take TTL level (0-5v) signals as input. A quick check on the parallel port specifications shows me that it also uses TTL (0-5v) which makes my life extremely easy!

Each port has 8 outputs and 5 inputs (don't ask me why only 5 inputs, seems odd to me).

2 output pins for x-axis (step + direction)
2 output pins for y-axis (step + direction)
1 output for laser
1 input for home-stop sensor on x-axis
1 input for home-stop sensor on y-axis

Which means, my current design will fit on one port.

Monday, October 25, 2010

Table progress

Alright, made some good progress tonight. I routed a hole for the table stepper and gears with the little dremel. This was a bit of an exercise in patience as the dremel appears to be designed for smaller tasks, but it worked as long as I routed thin layers at a time.

The tensioner has been put together much like it was in the Scanner tray.

All in all this looks like it will work well. The only concern I had is the base, it being wood means its not in the slightest flat. Looking at that for a minute I realized I should glue 2 wooden 1x1" across the bottom to take out the warp. It's drying now, tomorrow we'll see if they hold.

Shop time and safety talk

I tried to do this without buying hardware but I came to the conclusion that my time is worth something too :), not to mention my eyes. When working with lasers like this (which I believe should be classified Class 3B) please wear goggles, it's simply not worth loosing your eyesight over.

So I set of to get the following items.

Stepper motor drivers
Sparkfun (Colorado) sells what seems to be a great unit the EasyDriver. $15 (need 2)

Laser holder and lens
AixiZ (Texas) sells laser holders. I got the 12x30mm one with a glass lens. ($20)

Laser Driver with TTL
I could go an modify the constant current laser driver from my previous post, or I could simply spend $6 on these and be done.

Laser goggles
Of course I should really not skimp on the laser goggles for 650nm laser light, and you should not do so either especially for only $30 at WickedLasers.

Printer Port
Last but not least the printer port. A quick search of the Linux EMC forums tells me that this card will do great, and it has two ports to boot! ($12)

Hopefully that is all that I will need for this little project. ( $78 )

The diode laser

The laser

I used to own a large (and overly noisy) dell tower pc, it was clunky heavy and didn't actually perform as good as the price tag suggested. So I wasn't to sad the day it died on me. Luckily for me I ended up keeping the DVD RW drive. Looking at the label it's a NEC ND-3450A, which happens to be a 16x speed drive. For some reason every time you read about a DVD laser hack the 16 speed is mentioned. Not sure why. Anyway, after taking the thing apart I found two lasers. I hooked the bigger one up to a constant current source and voila! It works :)

Constant current source at 164mA

Laser diode running at 100mA and 2.23V.

As you can see I bread-boarded this one, the circuit was taken from this excellent thread on how to create your own laser driver.

and a closeup of the breadboard.

Sunday, October 24, 2010

No luck on keeping the metal bridge

Well after looking and trying to fit the Lexmark stepper motor to the metal bridge I've decided to ditch it and use some wood I had sitting around the garage from previous projects. So I used the metal rod, the print head, the pulley(?) and tensioner from the print head bridge and reconstructed it from some solid wood. Doesn't look half-way bad :)

I do do apologize for the odd red huge in the picture above, the wood is actually a nice yellow shade. Anyway as you can see the tensioner is recessed and the guiding rod is holding the printhead. The print head will hold the laser later on.

Underneath the printhead you can see the movable table. It's a piece of wood, not heavy but not very bendy at all, it's 9 by 14" which is the area this CNC laser will be able to reach. The table will be attached using the Lexmark's scanner pulley, tensioner and stepper motor. I had originally planned to use the rods that held the scanner optics to hold the table but I decided against that for now because there was only one attachment spot, which meant the table would tip and seesaw, not exactly desirable behavior. The table is mounted on 4 wheels, that previously served as paper guides inside the MP530.

So after about 5 hours of work I have the basic construction almost ready. I still need to connect the belt for the table and route a hole for the stepper motor so it's gears are flush with the base. Oh and of course finish the legs for the bridge, it's sitting on my daughters wood blocks, she's sure to want them back if she finds out I'm borrowing them.

The garage pre cleanup tonight. You can see lots of printer innards, my daughters work in the back :)

Cost so far - 0$ all materials were already in the garage, wood, printers, tools and glue. I will need to figure something out for the drivers though. I'm considering the EasyDriver by Sparkfun.

Once I have two of those, I'll still need the laser, it's driver and a parallel port!

DC Motors are out.

So as it turns out, controlling a DC motor plus position encoder might be more then I want to take on right now. This means I need to find two steppers. Luckily the Lexmark printer is a multi-function model as well, which means it has a scanner. And for some reason they (always?) use steppers in those.

As a side why is that? I'm sure if they can control the print head so accurately using a DC motor with an encoder why not on the scanner?

Anyway, with the Lexmark's scanner step motor I now have two both with 4 wires. They're pretty small but through their gearing stepping down quite a lot they should have enough torque to move the print head and the table,.. or so is the plan :)

I like the metal bridge so I'm going to see if I can modify it to take the stepper motor with it's gears... stay tuned.

Saturday, October 23, 2010

Saturday, overview of source materials and goals

So I've been reading all these fun posts on people making CNC laser cutters with nothing but some old printers, scanners and a CDROM drive. Being somewhat of a tinkerer myself, I decided to give it a go.

We've had a Canon MP530 break on us and had an old Lexmark and HP sitting in storage as well. So I dragged them into the garage where eager tools were waiting to take them apart! The printers looked a bit weary of it all,.. and for good reason. :)

So first order of business is to assess what those puppies contain.

Both the Lexmark and the Canon are multi function printers as such they contain a scanner. From looking into the printers I figure I can take out the metal print head bridge and use it without too much modifications. This will be my X-axis holding the laser. The Y-axis will be the scanner maybe even in it's tray. Like in the picture below.

The bridge uses a DC motor with position encoder and the scanner uses a stepper with 4 wires. Now lets go find out how hard it is to control these.