I spent a little time last night looking over the wiring and found that I had reversed 2  wires on each stepper motor........which is why my motors were traveling in the "opposite" direction that I expected. Gotta say, I felt pretty dumb but pretty happy to catch that one.

Tonight I loaded up a gcode file I had created a while back of the sparkfun logo (they have a pretty comprehensive logo page in their about section with a ton of different logos, shapes, etc, etc, in high quality vector (PDF & EPS) files. I used cambam to generate the code (flawless I must say) and have just been waiting to use it.

Turns out that my mill actually works. I shouldn't bee too surprised, I mean after 3 years of tinkering around you'd figure I'd get lucky sooner or later. My next task is to design a dremel mount. At my rate that will probalby take a year, but at least I can draw with a pen until then :-)
 
 
After a few hours of work tonight, I managed to mate the NES controller with my mill. Seems to be a match made in heaven. The video is below for proof and the code is below that if you want to try this out for yourself (it's very easy).

I'm planning to make this a permanent feature of my mill. In order to give it a cleaner appearance (instead of just shoving wires into the controller), I've ordered a set of NES controller sockets from parallax which I will be mounting in my case.

A couple of notes:
1.) The code is terrible, I will try to clean it up and re-post sometime soon.
2.) This is a very easy project, If you're trying to interface your easydrivers with a 3 axis mill, a homemade bot, or anything else and want to add NES controller pad capabilities, give this a look. You'll be surprised.
3.)The X axis on my machine is terribly loud. I need to fix that it....
nes_stepper.pde
File Size: 5 kb
File Type: pde
Download File

02/24/2010 - EDIT: An updated version of the code used to drive 3 Easy Drivers via and Arduino and a classic NES controller. Not a whole lot of changes to the original, just a little bit cleaner, more concise, and thoroughly commented.
nes_stepper_cleanedup.pde
File Size: 4 kb
File Type: pde
Download File

 
 
Picture
After frying my old Arduino Duemilanove I knew that I'd need to get a new one, and fast. Sparkfun to the rescue. I sat down, ordered a new one (the standard chip is now an atmega328!), ordered some jumper wires and a new breadboard while I was at it. The three tiny breadboards were ordered before I fried my easyDrivers. FYI: they are the perfect size to hold and tie in to a single EasyDriver (v4.2) with headers soldered on!

I also took the liberty of ordering an atmega328 chip with Arduino bootloader. Because of the semi low cost (~$5), i figured it was worth trying to revive my old arduino. First thing I did when the new gear came was pop the old chip out of the fried arduino and popped in the chip in. Yahtzee! My old Arduino is not only alive, it's also upgraded to a better chip. Needless to say, that was good news.

While I decide what path to take for the rest of this project I also ordered more easy drivers. Although there's a good chance I will be using a different solution by the time I complete this project, but I feel comfortable with the easy drivers and know they will work for the time being.

Also, I have been thinking very much about cutting the PC out of the loop entirely. As is, the PC (currently my Dell Mini 9) is simply streaming a gcode file to the arduino. From there, grbl does the rest. Seems like overkill to use a PC for such a simple task.....Enter a second arduino.

The second Arduino will have some FAT library loaded as firmware (have yet to decide which one) and be connected to an SD card shield! The arduino will then read one line of gcode at a time, send it to the primary arduino and wait for the "OK" before sending the next line.

Also, I ran across this instructable, which gave me a pretty rad idea: Why not use one of my old N64 controllers to control the mill? I'm thinking about going to a two Arduino setup as is, with one Arduino not doing much work there should be plenty of ports and programming space available to implement a program which will allow me to jog the machine around, along with possibly homing the Z axis.

In fact, although the feature has a certain amount of "coolness", its quite practical. After all, one does need a way to gracefully move the machine to a "home" position. Right?

 
 
While doing any long term project you are bound to run across three things: Good things, bad things, and downright ugly things. It's part of the territory. In fact, for a hobbiest, these are the things that make a project a project!

The Good:
A short blip about the project was mentioned in a recent article on Tom's Guide. Grant it, after seeing the posting on Sparkfun, I was actively pursuing being featured in the article, but none the less we made it in! That pretty much made my week.

The Bad:
Last Saturday I drove to a "local" (2 hours away) hackerspace meeting to meet up with fellow geeks and check out what other people have been up to. A couple of bad things happened: Only 2 people showed up (not including the host and hostess). This ended up being OK as the the host and hostess did a fantastic job of making us feel welcome. Even with the limited number, we managed to bottle some beer and have a generally good time BSing with each other.

Worse: I tried showing off my mill project (yes, I brought it with me!) but for some reason, I couldn't get it to work. I thought that during the trip something on my protoboard became disconnected.

After all it was the first time I had moved the machine and with extensive use of a breadboard, it wasn't exactly in mobile form to begin with. After troubleshooting for about 15 minutes, I couldn't figure it out and just packed it up. Not a big deal. I figured I'd get it running once I got back home.

The Ugly:
After making the 2 hours trip back to my house, I unpacked the mill and took it back into the Lab, hooked everything back up, put the meter to a few key connections, and tried to give it a test run. Nothing. OK. It had been a long day, I unplugged everything and let it sit.

After a few busy days of domestic duties and work, I had some time Tuesday evening to work on it. After messing around disconnecting the easy drivers from the protoboard (not an easy task!) and simplifying my circuit to only one axis and a simple (known working) sketch. I couldn't get anything to work.

I emailed the creator of the Easy Driver and asked him on a couple of things. Being the generous person he seems to be, he replied with a few tests (procedures) to check if the drivers were fried. Long story short: They were.... All three of them were fried! Here's a couple of pictures of my metering.....
To make matters worse: I fried my Arduino too! It seems that when I tried to demo my machine at the hackerspace meeting I crossed the +24v from my Power Supply and the GND, which essentially meant that I sent 24V into the arduino and then into the Easy Drivers. Both of which were only expecting 5V....

Right now I have a new Arduino on its way from Sparkfun. I will order the easy drivers tonight. In the meantime I'm hoping to learn how one may protect against accidents like this....

But I'll stay positive because, to steal a quote from Dostoyevsky, "A just cause is not ruined by a few mistakes" :)
 
 
Here's a video of shapeoko + grbl parsing gcode being streamed from my Dell Mini9. (You can download the gcode below.)

Clearly something is not right. However, the job will run identically, which makes me think that it's a simple software tweak as opposed to something more devistating like a hardware problem.

Another positive sign is the fact that the z-axis height seems to be working just fine. This particular g-code calls for a clearance height of 6.25mm and a target depth of -1mm. Both of which seemed to be consistent throughout the job.
helloworld.gcode
File Size: 11 kb
File Type: gcode
Download File

 
 
Here is a short video of ShapeOko drawing a box via grbl and hyperterminal. There is still a lot of work to do before this project is "production" ready. But it's really nice to make some progress every once in a while.

The current setup includes:
CNC Controller: Arduino running grbl
Stepper Controllers: Easy Drivers
Stepper Motors: 65oz/in bipolar
Linear Rails: Salvaged from previous builds
Power Supply: 24v 150W
Frame: Custom Designed Laser Cut 1/4" MDF (from ponoko.com)
Z Axis Mount/Slide: 3D Printed Custom Design (from shapeways.com)

If anyone has an idea as to what is causing the wobble in the y-axis, please let me know. I'm open for suggestions :)
 
 
There's something wrong with the X axis. Unlike the Y, it's very difficult to move. Well, not very difficult but more difficult than the Y. I think there may be a bit of a design flaw... stupid designer.

From what I can tell, there is some friction between the X-axis-rail-mount-plates (the ones slotted end to end) and the X-axis-cross-plate (the one that the X-axis acme nut mounts to). I'll try taking some sandpaper to it and if that doesn't work, perhaps the dremel? Someone also suggested I use wax.. i don't even know where I'd find wax though. Also, I should have boxed in the X-axis cross plates because there is flex when the nut is being driven.

I'm going to move forward and continue with the current iteration. After the new power supply is delivered and the EasyDrivers are installed, I'll see where we're at. But, I'm afraid I'll have to make some changes to the design and re-order all of the parts from ponoko. It's not the end of the world but I hate the fact that I didn't get it perfect the first time...

Though, I should be used to that by now.

On a different note: When I started this project I was certain that a computer would be running the machine. However, I've been using the arduino to test the motors and when I get the 2 additional EasyDrivers I'm planning to run them through their paces with the arduino as well. I keep thinking how awesome it would be to use the arduino permanently as the controller. Yes, replace a full PC with a tiny arduino! My machine has a very small footprint to begin with, and I keep thinking how cool it would be house *all* of the controls in a tiny matching box! I don't even know if that's possible, but wouldn't it be sweet!

I'm imagining something like this: Obviously, do the CAD/CAM on a workstation but save the G-code to an SD card. Then, insert the SD card into the arduino, turn the arduino on, it would then look for a specific text file. Parse the file and run the machine! I know it's a lot harder than that and I'm doubting there would be enough room on the arduino to store the code to both control the reading of the SD card and parse the file and run the machine.  Either way, a guy can dream right?
 
 
Just one short day after figuring out the Y-axis, the X and Z are both moving!

I decided to stop by Radio Shack and pickup some DB9 connectors (1 male, 3 females) to make switching between motors easier. Although soldering all those pins on (24 total) wasn't much fun, it was totally worth it. In addition to making it easier switching between X,Y,andZ, the connectors also cleaned up a lot of the wiring.

I also soldered headers onto the easy driver so I could actually mount it on the breadboard instead of just setting it there! Worked like a charm.

As for the power supply, i switched from the ATX PS which was pushing 12v, to an old Dell Inspiron 20V 90W power supply. I'm not certain on this, but I'm pretty sure the extra power has really added to how smooth the motors run. I'm not even sure if that's possible, but it seems like it to me.

Here are some video of the other two axis' running. The Z looks especially smooth, which i'll say is from the fact that the acme rod is short which pretty much eliminates the chance of it being bent (as I suspect is the case on the Y axis). The X axis is coming along but there seems to be some friction somewhere along the path which is causing it to hang up and stall the motor (even with the ramp up / ramp down code)

I ordered two more Easy Drivers from Sparkfun yesterday, they should be here early next week. At which time I'll try hacking together something that runs all 3 axis in an indefinite "test" pattern.

Pretty exciting stuff here!
 
 
The Sparkfun forum guys really helped me out. After getting the Y-axis stepper up and running with the Arduino, there were some issues. Mostly it was loosing steps in a bad way. Plus, the vibration threatened to tear my machine apart! OK, that last bit was an exaggeration, but the vibration was pretty bad.

The guys on the forum pointed out that you cant just start a stepper at full speed, you have to "ramp up". Which after thinking about it, makes perfect sense. At this point in time, i've learned enough to know that in most cases, "it's already been done". Meaning, there was no need for me to write new code to "ramp up" the arduino. I mean, there are tons and tons and tons of stepper based arduino projects on the web, surely someone must have written some good code.....

The short answer: Yes, it's out there . But, the really surprising part is, that link is the only one i found where the steppers were "ramped up". Now, don't get me wrong, it WORKED! Check the video for proof of that. The difference with a smooth start is night and day compared to just the standard method. BTW: the standard method is: Start a loop, Pull step pin HIGH, put step pin back to LOW, delay for a set amount of time, loop. Most people just set the delay to something that won't stall their motor. This varies greatly depending on the specs, but for the most part people are between 200 and 400ms. I guess I'm wondering why more people don't start smooth? maybe it's just easier to set the delay and forget it... who knows. Either way, I'm really happy with the progress so far. Things are starting to come along.
 
 
The guys in the Sparkfun forum are really helping me get this thing going! Right now I'm working one axis at a time. Here is my attempt to move the Y-Axis with a 60oz/in stepper and the EasyDriver from Sparkfun.

If you have a listen, it starts out pretty well and then makes this terrible grinding/vibrating noise. I found out that is the motor stalling and/or loosing steps, It's could be from a variety of things, all of which sound pretty managable. I'll try to get it smoother and more consistent.

Although it's not perfect, I'm fully confident this solution is going to work.