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.
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.
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 🙂
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)
Good news! The base turned out nice and straight so the 1×1″ 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 🙂
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.
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.
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 1×1″ across the bottom to take out the warp. It’s drying now, tomorrow we’ll see if they hold.
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.
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 )
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.
and a closeup of the breadboard.