CNC Update 4: Taking Shape

March 6th, 2010

Today was spent cutting, drilling, tapping, de-burring, re-drilling, filing, filing some more, re-cutting, bleeding etc…

At the end of the day a few things are starting to take shape.

The X Axis with the Z Axis Front View

Look closely at the shinny Z axis plate, see that red swish? That is a little blood sacrifice I made to the project gods. My wife (the hand model because she wouldn’t let me get her in the picture) is holding the X Axis up I don’t have it secured to the table yet. Everything is aluminum except the fasteners and rails, they are stainless. The table is a whopping 1/2″ thick plate. the smaller plate for the Z and Y axis is 1/4″ plate. Yes, the Y axis table is too narrow I will address that later.

Rear view

Here is the view from behind. If this stepper works out it will be a slick install, notice you can’t even see it in this picture. The next one will show it tucked away.

I can bearly get a peek at it.

One of the biggest pains today was making the screws for mounting this. In case anyone wants to mount some of these steppers from SparkFun, the mounting holes on the front are M 3.5. I couldn’t find any screws long enough for what I needed so I used some threaded rod. Cutting them and grinding the ends so they would accept the nuts was a real joy!

Not too bad in the end though.

 I made all of my own fasteners and I will show some close ups later on how they worked. Overall I am happy with them but they are a lot of work compared to just buying some from 80/20. The drilling must be precise and there are some tricking things to do. Such as counter bore the rail face so the socket head screws can set in flush.

CNC Update 3: Assembling the 80/20 Linear Bearing

February 28th, 2010

This has been a very busy week and weekend. I had a couple of PLC boards to refurbish so I didn’t get as much done this weekend as I had hoped. I did manage to get quite a bit done tonight on the X and Z axis but my camera battery is dead so I will create a new post in a few days with that progress.

So, back to the topic. I had decided to use a linear bearing from 80/20 for my X axis. I could have bought one ready to go for about $70., but I decided to buy the bare pieces and build it myself for about $20. I bought the bare bearing in an unfiled and deburred state for about $5. Then instead of buying the bearing pads individually, I bought an 18″ length of the bearing material UHMW-PE (Ultra High Molecular Weight Polyethylene) for $9.54. I then bought a bag of the screws to attach it to the bearing for $3.70.  I bought 1 extra piece that I new I wouldn’t use but I wanted to use it as a reference, that was a completed UHMW-PE bearing pad.

Here is a picture of the components:

Linear Bearing parts

Rough bearing lower right, UHMW-PE left, reference pad upper, Screws upper right

I originally was going to cut the  bearing material into pads just like 80/20 does, that’s why I bought the finished pad. However I decided that it would be better to make longer pads that covered the entire length of the bearing in one piece. This not only will make the bearing stronger and have less slop, it turns out it is much easier to make them this way. Now someone may jump in and say that you will create too much friction if you have that much contact area. I was worried about that myself but the finished product slides smooth as silk.

The first step was to deburr the bearing housing. I did this with a hand drill and a bit about twice the size of the holes. Since the housing is aluminum, you need to be careful. I ran the drill in reverse using the bit to deburr the holes with very little force. Then I finished deburring the edges with a file. Finally I used emery cloth to smooth all the surfaces. There is no need to spend time sanding or polishing further because the housing doesn’t come in contact with the rails.

Next I cut four lengths of the UHMW-PE bearing material, exactly the length of the bearing. I used a coping saw for this and it worked really well. One tip, I laid the bearing material in the slot of a piece of 80/20 rail then laid the bearing on top. I then scored it with the saw. Then I moved the bearing and slid the bearing material down to the end of the rail, leaving it in the groove but hanging over the end so I could saw it but it was supported and wouldn’t move around. I then used a razor knife to clean up any rough edges from the saw cut.

bearing material

Cut piece of bearing material in slot of 80/20 extruded aluminum

Then I put the 4 pieces of bearing material into the slots of a 10 series 2″ wide extruded aluminum. Next I slid the bearing housing onto the bearing pads. After lining everything up I took a marker and marked all of the holes that the screws were going in with a fine tip permanent marker. This left a perfect center showing for lining up the bit on the drill. Then I took a small bit, I believe about 11/64″ and drilled out the holes where each screw was to be placed.

Here is what it looks like after drilling.

Here is what it looks like after drilling.

On the first couple I used a bit stop so as not to drill completely through the bearing, then I realized it didn’t matter if I went all the way through because that surface of the bearing doesn’t touch anything, so I just drilled the rest all the way through. Then used the screws to attach the bearings, making sure not to over tighten them and strip out the hole. Here is a picture after I installed the first pad then pulled it off to inspect it.

1 pad installed

First bearing pad installed.

I continued on with the other three pads in the same manner. That was pretty much it! It was really simple and I saved myself $50.

Sorry I don’t have a picture of the competed bearing but this is where my camera battery died. After this I actually went on to drill out my Z axis mechanism to accept a 3/8 ” rod for movement then attached the it to the bearing. It is starting to come together. I will get some pictures up hopefully this week if I am not too swamped at work, it is month end so work will be a bear!

More next time…

Oh yeah forgot to mention, my optically isolated parallel breakout board came in from CNC4PC. If I get time this week I may do a quick write up on it.

CNC Update 2: 3 Functioning stepper drivers on 1 Proto Board!

February 21st, 2010

Yesterday was spent picking up supplies and installing and learning Autodesk 2010. I have never really worked with any CAD program before so this was a challenge. However I was able to learn enough to draft my first item. It will be the spindle holder for my machine. I then used the trial version of CAMBAM+ to generate the Gcode. So I then loaded that into Mach3 and simulated the cut. All of that worked well. I thought that was enough software learning for one weekend and moved on to more of the electronics. Although I will be returning to cover these software packages in much more detail later.

I have decided to put aside the plans to run this from the Arduino for now and instead I will use a parallel port on a spare PC. I am still using the Arduino for testing for now. The reason for this decision was simply that the use of the Arduino was going to severely limit my integration of some very good off the shelf software. I suspect I will be revisiting the integration of the Arduino later.

Today’s goal was to construct a proto board with the 3 EasyDriver’s on them and the breakout terminals to simplify hookup. I purchased a proto board from Radio Shack and intended to purchase the terminals as well, but much to my disappointment they didn’t have them. So I had to sacrifice a breakout board I built for my OOPIC several years ago. I had  to amputate the terminals I needed! Oh, the carnage! Well at least it had signed the organ donor card so this project my live.

Here are some pictures of the construction:

This is the layout of the stepper drivers on the Proto Board

I had to first solder pins to the other 2 driver boards that I hadn’t used yet. Then I started with the wiring on the under side of the board. Here is a picture shortly after starting the wiring.

Let the finger burning begin!

Man, I will be glad when I have my own CNC router that I can just put a copper clad board in and zap out my custom PCB.

A few minutes later I have this:

Aint it Purdy?!

OK, well maybe it took more than a few minutes and several puncture wounds and a few burns as well. You will notice every like trace is color coded.

Here is the Key:

Light Red-> Coil A

Dark Blue-> Coil B

Yellow-> MS1

Dark Green-> MS2

Purple-> Dir

Brown-> Step

Light Green-> Sleep

Light Blue-> Enable

Black-> Ground (There are two gnd sources)

Red-> V+ (12v)

If you are asking yourself, why is he giving so much information here about the color codes and such, remember this blog is as much for me as it is for anyone else. I can use this as a reference should I need it.

Here is the top view again with the wiring completed and the standoffs installed.

Board with Z axis wired up to Arduino

 Here it is labeled:

Hillbilly Skimatic!

Here is a video of it working:

 

 

 That is where I finished today. I ordered some 80/20 extruded aluminum Friday. I hope to get to work assembling the frame and axises next week.

Crank up the Volts on that Stepper!

February 17th, 2010

I found some larger stepper motors that I had salvaged from a large dot matrix printer years ago. They are rated at 4.4V 1.15 A. However I have discovered that the EasyDriver chops and current limits the output so you can run these motors at much higher voltage then they were intended to run at. This can come in very handy in CNC operations because under low load you can drive them very fast and have great response. I plan on redesigning my linear actuators to take advantage of these larger steppers. Someone on Chiphacker coincidently asked this question the other day as well so I thought it was a good time to test my theory.

 

CNC Update 1 “We Have Motion!”

February 13th, 2010

NOTICE: I CORRECTED ERRORS IN THE CODE AND DESCRIPTION ABOUT MICROSTEPPING AN PULSE DELAY!

Videos at the bottom.

Ok, a lot has happen this week. I started out with a general ideal of how I wanted to accomplish the X and Y axis movements. I was going to go with the sliding table design rather than the Gantry. No real good reason why I have this method in mind it just seems simpler to me. Anyway I go scrounging around through some surplus junk I have picked up from an industrial auction and I came across a couple of pneumatic cylinders with a linear motion mount. This caught my eye right away. The design is quite nice but it only gives me about 10.5″ of travel. This should be fine for my first build and it should be plenty for routing printed circuit boards. Here is a picture of what one of these mounts looks like.

Linear Motion assembly

Today the Stepper motors and EasyDriver boards came in from SparkFun. This is the new version 4.2 driver boards. There isn’t much out there in the ways of tutorials for using this board yet so I hope I can help someone. 

The first order of business was to get some mounting pins soldered onto the driver board so I could plug it into a breadboard for testing. Here is a picture of the module with the pins soldered. 

EasyDriver v4.2 with Pins soldered on

Hint: it’s easier to solder the pins in if you lay the circuit board on the breadboard and stick the pins through the holes into the breadboard then when you have all the pins inserted solder them while its still on the breadboard to hold them straight)

Next I started laying out the jumpers and terminals on the breadboard. I know I could just stick the wires in the breadboard, but I find using these screw terminals work much better. The terminals I have are something like 5 mm pitch so they only pickup every other rail on the breadboard. So it takes a little thought on how to lay the jumpers out.

Jumpers

Terminals

Here is what it looks like when I finished placing all jumpers and terminals.

Completed test board

Wired up

Wired test board

In case you are trying to follow my wiring here, notice the color coding on the stepper motors. On the circuit board there are 4 terminals to hook to the stepper motor. Coil A and Coil B. Coil A terminals are next to each other and Coil B terminals are as well. However due to my use of the 5mm blocks I had to stagger the connections so what you see here  is ABAB, so Blue and Yellow are A coil and Red and Green are B coil.

The wiring of these units is pretty much straight forward. You have a direction Pin, that is held high for one direction and low for the other. A step pin that is pulsed high then low for 1 step. You have 2 other pins that enable micro stepping, ms1 and ms2. Tie them both low if you don’t want to micro step. ( I recommend tying them HIGH until you have tested for successful operation). You have two sources of power, one for the motor and one for the logic. If you are using an external power supply for your motor, which is almost always required, then the board will supply power back to the Arduino through the 5v logic connection. (However I had some issues getting my sketch to upload properly without my normal external supply hooked to the arduino). You have an enable pin that must be held low for the board to operate. The last connection that I used is the Sleep pin. If you tie it low then your motor will not be powered even though the arduino and the easydriver boards are still supplied. This also allows the motor to free wheel. I haven’t used the RST and PFD pins so I can’t speak to them just yet.

Here is the code to get the test running

NOTICE SEVERAL ERRORS WERE CORRECTED SINCE MY ORIGINAL POST!

// Some of this code was scavenged from different places on the Internet but I have changed a few things to get it working.

int dirpin = 8;
int steppin = 9;
int ms2pin = 10;
int enablepin = 11;
int ms1pin = 12;
int sleeppin = 13;
void setup() {
Serial.begin(9600);

pinMode(dirpin, OUTPUT);
pinMode(steppin, OUTPUT);
pinMode(ms2pin, OUTPUT);
pinMode(enablepin, OUTPUT);
pinMode(ms1pin, OUTPUT);
pinMode(sleeppin, OUTPUT);

digitalWrite(enablepin, LOW);    // enable easy driver
digitalWrite(sleeppin, HIGH);    // easy driver operating
digitalWrite(ms1pin, HIGH);    // microstepping disabled
digitalWrite(ms2pin, HIGH);    // microstepping disabled
}
void loop()
{

int i;

digitalWrite(dirpin, LOW);    // Set the direction pin to move forward

delay(1000);                  //Give it some time

Serial.println(“Forward”);    // Print Forward to the terminal window
for (i = 0; i<31000; i++)    // Step Forward 31000 steps
{
digitalWrite(steppin, LOW);   // Start out with step pin low
delayMicroseconds(500);    // Delay controls speed and Torque I originally had these at 100 that was too short
digitalWrite(steppin, HIGH);    // Now switch it high
delayMicroseconds(500);    // Delay controls speed and Torque you need at least a 500 delay
}             //

digitalWrite(dirpin, HIGH);    // Change direction to reverse
delay(100);                     // Give it some time

Serial.println(“Reverse”);     // Print Reverse to terminal window
for (i = 0; i<31000; i++)    // Step in Reverse 31000 steps
{
digitalWrite(steppin, LOW);   //  Start out with step pin low
delayMicroseconds(500);    // Delay controls speed and Torque you need at least a 500 delay  
digitalWrite(steppin, HIGH);    // Now switch it high
delayMicroseconds(500);    // Delay controls speed and Torque you need at least a 500 delay
}            

}

OK, now time for a couple of videos. Note the wire ties holding the stepper motor on, I couldn’t find any m3.5 screws today so I just used the wire ties for now.

CNC 040 6.5 Meg

CNC 044 5.5 Meg

I am not impressed with the torque of these small steppers I will most likely need to size up but more testing is required. This was because I had my pulse width too narrow. After increasing the delays to 500, I have plenty of torque!

I was the happy recipient of some really cool parts today (Thanks Brian). I now have some 20mm rails and 2 20mm ball screws. These will be the DADDY project after I flush all of the software and driver issues out with this junior unit. (insert smile).

I guess that’s enough for today. More to come…