Sunday, 28 February 2010

Trapezoidally $crewed

Revisiting the threaded rod, I had a look at Roton and eBay to get an idea of options and prices.
  • A trapezoidal screw with nut and flange from Roton gives 3mm effective pitch and comes to around US$90 plus shipping for 1000mm.
  • A ballscrew with ball nut and flange from Roton gives 12.7mm effective pitch and comes to around US$252+shipping.
  • eBay has varying offers, but it looks like AUD $80 up for trapezoidal or ballscrews with nuts is about what you need to expect to pay. They're are shipped from overseas, so damage & claims risk are higher.
Way too much money for me at this stage.

That leaves the cheap solution of Bunnings threaded rods (iso metric screw threads), which come in at around $9 for an M12, 1000mm, pitch 1.75mm; or Whitworth 1/2" (12.7mm), length 36" (914mm), 1/12" (2.12mm) pitch.

Given the pitch, Whitworth moves 21% faster but metric may offer better choices for ball bearing. And it's metric and so am I!

The cheap solution might mean that the nuts will start smoking oil due to low efficiency and high friction, and that the stepper motor will have to run at quite high speed because of the small pitch. That, in turn, might give the screw some whiplash.

Let's check on ball bearings and go for 1/2" or 12mm threaded rods...

Gaining too much weight ?

How heavy is that gantry going to be ? It's an important question leading up to the selection of stepper motor(s). My y-axis shafts are 600mm. Before reading on, take a guess now....

Using my digital kitchen scale, I scientifically determined the weight of 16mm MDF wood to be 11.2kg per square metre.


Small parts add up...

For mdf, the estimated total area will be (without an actual design plan):
  1. Gantry sides: 300mm x 600mm x 2
  2. Gantry bridge: 600mm x 300mm
  3. Gantry bridge rigidity support: 600mm x 150mm
  4. z-axis base mounted to y-axis bearings: 500mm x 250mm
  5. z-axis base rigidity support: 500mm x 150mm
  6. z-axis sledge: 400mm x 250mm
  7. z-axis sledge rigidity support: 400mm x 100mm
Total area: 1.045m2 = 11.7kg of 16mm mdf

So...
  1. MDF: 11.7kg
  2. Bearings & shaft mounts (measured): 2.3kg
  3. y-axis motor (est): 1.5kg
  4. y-shafts x 2 (measured): 3kg
  5. y-thread (est): 1.2kg
  6. z-axis motor (est): 1.5kg
  7. z-shafts x 2 (measured): 0.7kg
  8. z-thread (est): 0.6kg
  9. Other Stuff (est): 1kg
  10. drill mount: 0.2kg
  11. drill (est max): 3kg
Total for gantry: 26.7kg

This might come down a bit, for example, with smaller motors, a lighter mdf design, or a smaller drill. My Bosch Power Drill weighs over 2kg, but the Dremel is much lighter. But even with conservative figures, it won't go below 21kg. On the other hand, I might decide to go with 18mm mdf, so it would up the weight.

So, to be on the safe side, I'll be taking 30kg as the moving gantry mass when selecting steppers. Quite a surprise.

Just to round it off, the static weight for base and x-axis would add:
  1. Base board (mdf, 1200mm x 700mm): 9.4kg
  2. Base board rigidity (mdf, 700mm x 150mm x 4): 4.7kg
  3. Base board rigidity (mdf, 1200mm x 150mm x 2): 4kg
  4. x-axis shafts x 2: 5kg
  5. x-axis thread (est): 1.5kg
  6. x-axis motor: 1.5kg
Static total: 26.2kg.

All total: 52.5kg.

Gulp! Well, looks like this is not going to be a small gadget that I can take to weekend cnc-parties:
  1. This needs a proper permanent place in the garage.
  2. Instead of making it portable, I might as well build it on a solid table and possibly mount that to the brick wall for added support.
  3. I might have to give some thought to "easy assembly and disassembly".

Saturday, 27 February 2010

Serving the Servo

Today, I spent some time playing around with some old stepper motors and Arduino. The programming was the easy part. The challenge is to make it work without actually knowing the specs of the stepper and having to "make do" with available power supplies.

I completely ignored the Arduino built-in examples and modules to get where I wanted to be. Unfortunately, the stepper (85 Ohm, built in the last millenium) with the power supply at hand (12V plug-pack) didn't yield a lot of power nor dynamics to make it interesting with micro-stepping etc. Well, it rotates as you'd expect, and at some speed it locks up, as you'd expect.

All I had at hand was a ULN2003A (pdf) to drive the stepper, so there was no going with some of my bipolar types. Anyway, looks like micro-stepping, changing from micro-stepping to full-stepping at higher rpm are no problem. Interrupt-driven routines are fine as well, though it takes a bit of digging to find the right programming references.

Step by step.

I also have 3 old battery-power-drills, and decided to give one of them a go. An IRFZ44N (pdf) HEXFET power MOSFET plugged into the ULN2003AN, and an old PC power supply to deliver 12V 8A made up the electronics. A photo-interrupter plus an old business card served as the feedback system. This turned out to be an interesting, but also somewhat puzzling setup.


Servo Control run on Coffee, Cable Spaghetti & Arduino.

The idea was to make the servo to run at low speed by chopping the supply voltage based on the rotational position. In principle it works, but the motor is quite powerful, and my 32-alternations-per-rotation are not enough. Basically, the motor fires up, then rolls out to a stop. Stir and repeat.

ULN2003A + Arduino.

I lowered the effective power to the motor by chopping down the already chopped signal to 10%. This worked and the motor ran slower. Some side-effects: The system is undamped and a certain amount of accelleration and decelleration is noticable. Strangely, the motor does not like it when I chop the signal at a high frequency. I'm not sure if that is related to the electronic components (unlikely as the IRFZ44N has a very fast response rate) or if it's to do with motor friction. Basically, all you hear is a high-pitched sound and no motor movement at all. I would have expected a high-frequency chopping signal to make things better, but no.


Don't throw out them olde business cards.

Well, back to the real world. As expected, servos aren't the ideal choice. In particular, when something goes wrong, they might just push on and physically crash your cnc system. In comparison, a stepper motor will just lock up. It's a pitty, because these motors would be easy to connect, have high speed, are cheap, and are comparatively powerful. Finally, I wouldn't want to use business cards on a real cnc machine, and proper encoders are amazingly expensive.

Monday, 22 February 2010

A rose by any other name

The address for this blog has changed.
    blog.cncorbust.com
or even
    cncorbust.com

will get you there. It's just for fun, for even Juliet knew...

What's in a name? That which we call a rose
By any other name would smell as sweet;
So Romeo would, were he not Romeo call'd,
Retain that dear perfection which he owes
Without that title. Romeo, doff thy name,
And for that name which is no part of thee
Take all myself. [W.S.]

Sunday, 21 February 2010

Shafting the Slides

On Saturday, after much deliberation - meaning, staring at things for hours while assembling in my head - and doing my eBay Pooja, I decided to get shafts and linear bearings for the z-axis to see if this would be a better design than bearing slides. --- Is that a question? This is more of an experiment, as my exposure to bearings and shafts if effectively zero.

CNC and Cupcake World on eBay had offers for rails and bearings that I could resist less than afford. It turned out they are driving distance from my place, plus, they gave really friendly and supportive service. I ended up buying 2 x 400mm x 12mm hardened shafts and 3 matching linear bearings (SC12UU) for around $46, just to play and see.

The next morning back home in the garage I put together a quick setup to check on my new friends and it didn't take much convincing, but shafts and bearings are the way to go. It's simply a much cleaner, more aesthetic, and a more precise solution. In short, it's what you would expect your neighbour to see when he - enviously and with sawdust in his hair - peeps at your workmanship through your chamfer routed fence hole.


Let's do this nice and smooth, baby!

A number of sub-plots worth mentioning:

I got 400mm bearings and I'm planning to space the bearings 150mm outside-to-outside, giving me a run-length of 250mm. I want this much z because I think in 3D, not just cutting flat sheets of wood. The 12mm rail does show some bending when I press it down with my hand, but for one, the z-axis won't have too much side-pressure, and secondly, I visit a gym, so it's not fair. 16mm or 20mm might have been better, but it'll do.

I started with 3 bearings in the belief that 3 contact points should be enough. It does work, but somehow it lacks natural beauty and I ended up buying a 4th bearing just to make it look right. I'd be curious to get the maths on that theory.

Open question: How much more stable are 4 points vs 3 ?

Those bearings work real nicely even when a fair bit of weight is on them, though when you twist them out of axis and then push them along, they tend to grind and lock up quickly. Hence, you will want to end up with at least 2 bearings on each rail. Also, each individual bearing has a tiny tiny bit of play. You can't see it, but you can feel it. So again, 2 bearings take care of that.

CNC Cupcake also had "long" bearings on offer, but I went with 2 individual bearings per rail so I could place them further apart, just in case.

As the astute reader would have concluded by now, the convincing result for the z-axis got me into a spin and after some more "thinking" (translate to agonizing) about the actual total size of the desired work area, rail sizes, basic design framework, etc, I took the plunge and my wallet, returned to the store, and bought rails and bearings for my x and y axis for around $180.


20mm, 12mm, 20mm slotted.
We're all oiled and ready for you.

One great relief with all this is that since I now bought the stuff, I am locked in to the basic design and in particular the total size, which helps getting on with it. So, in summary:
  • x-axis: 2 shafts at 1000mm x 20mm; 4 slotted bearings (to be supported by aluminium angles).
  • y-axis: 2 shafts at 600mm x 20mm; 4 linear bearings.
  • z-axis: 2 shafts at 400mm x 12mm; 4 linear bearings.
Isaac Hayes knew it all along:
SHAFT!
Can you dig it?
...
SHAFT!
Right On!

Wednesday, 17 February 2010

Blinkie Beep

Not just a blinking LED. No, also a beeping sweeping piezo. Masterly !

Notably annoyingly loud. Had to fit a 47k resistor and it's still getting on my nerves. Don't ask how I felt when I started out with 220 Ohm.

A blue LED, as we all know, is a symbol
of quality electronic design
.

eBay loves me

The last few days went into re-thinking the z-axis, and coming up with new designs for the x, and y axis. I think I'm having issues with the (perceived) lack of precision of the bearing slides and have to remind me that this is version 1 of the router, so pardon my mm. There is no doubt, though, that I'm currently descending into a kind of addiction to the project. Must remember to eat...

I continued to tinker with that engineering software, designing things in hours that with pen and pencil would have taken 15 minutes. But it's fun and it looks soooooo neat in the end. In any case, that software might serve as the design tool for when the router actually routes.

My Arduino arrived in the mail. Thanks to the miracle of eBay, these things can now be shipped around the world for less than a good sandwich.

Plug me in and turn me on !
Before you look your night is gone...

Tonight will be a bit of Arduino IDE playtime. Just hope I don't get distracted from the core objective. Ummm - blinking LED ? New universal remote control ? Remote control toy car turned into autonomous robot ? Or the almost mundane multi-channel interrupt-driven stepper motor controller ? Atmel here I come...

I received a couple of sample ball bearings from a colleague. They'll be a useful exercise to mount something and make it turn. We'll see where it leads (or turns).

Also, my caliper arrived. It too has a purpose, beyond satisfying my need to buy 'technical bargains' on eBay.It boasts "0.01mm resolution", but that doesn't mean precision.

Hey look: 0.03mm missing ! OMG !

In any case, at these resolutions, even applying slightly different pressure while measuring will change the values. One neat thing is that - in theory - that beasty has a digital interface that could connect to - you guessed it - an Arduino. There is a chance it might serve as an active feedback mechanism for the CNC Router. However, at a total length of 150mm, it's a tad short. If nothing else, it'll sure be great at demonstrating what a lousy wood saw wrangler I am. Another use would be cnc router calibration. More on that once the router has actually been built. On that note,

delay(0);
beer.drink();

Monday, 15 February 2010

Let my fingers do the walking...

Had some time today to call around for prices.

Ball Bearings
The good news is that the shops are quite helpful and are prepared to deal with hobby quantities. The bad news is they are a fair bit more expensive than online shopping.

For example, a common bearing id=12mm, od=28mm, w=8mm deep groove, rubber seal, pre-lubricated costs $9.80 each at BJ Bearings; $7.85 at Bearing Wholesalers. I can get a pack of 10 on eBay for around $24 including shipping from the US. That's $2.40 each. I'd need around 6 or 8 plus a craparoo buffer, so 10 would be good. eBay means waiting, but no driving around either.

Aluminium
Aluminum would be a good alternative to wood. Called AAA Aluminium to get an example quote for aluminium angles 50x50x4, 3500mm cut into lengths of 4x500mm and 2x750mm. Quote is $72.29. Argh !

I'll have a look at Bunnings and Pen's Hardware to compare.

Sunday, 14 February 2010

Z-Axis Protoplasm

In the long ago, I used to build my own cupboard. Ever since, my dormant woodworking skills have gone downhill, probably due to alcohol and years of web browsing. Anyway, I spent the afternoon spreading sawdust through my garage and cut the pieces for the z-axis. A number of initial cuts were quite lousy, but I persisted and somehow it became passable. There are no screws in there yet, and I might make a few minor changes, but the general concept works.


z-axis v.0.01. The ruler is 400mm long.

The U-shaped "car" extends beyond the end of the rails, into the direction into which the slides contract (front left in the image above). This works out to be a more stable setup than pointing the car into the opposite direction as the slides move quite a bit once they are (partially) extended.

The U-shape stabilises the board's up-down-movement (up-down as in the image above). It also holds the Dremel Grip.

I will decrease the width of the Dremel Grip so it can fit between the two fences at the left and right. The top of the grip can then be mounted onto the fences.


z-Axis, view 2.

The base has 2 x 16mm guides on each side. I will screw them to the base board in A-B-fashion to minimise left-right-play. Not ideal. Maybe an aluminium angle might be a better choice.

Now, the same concept above applies to the y-axis. The main difference is that the car does not have any offset.


z-axis mimics y-axis: It will be the same design.

Also missing are the threaded bolts and, oh yes, stepper motor mounts and motors. But let's get the screws in first and verify the design...

Dremel Grip

Busy elsewhere last week, and now a lot of planning, thinking, and fantasizing, and finally a little bit of prototype cutting. First I got carried away with some engineering software to "increase productivity" and make my plans neater. In the end, it took several hours to create a drawing that by hand would have taken 5 minutes. To top it off, the software has a bug and I couldn't print the design the normal way. Howl!

The plan.

I drafted a grip for the Dremel drill. The idea is to have a pair of these, one larger at the back, one smaller at the front, to hold the Dremel in place on the z-axis car. I decided to go with 16mm MDF, which isn't ideal, but remember, I'm working on a prototype/version 1. MDF bends and also cracks easily, but it's also easily available. The grip pair needs to be exchangable so I can also fit my Bosch power drill and - if I ever should buy one - a real router.

The grip idea is not ideal. I might look at an alternative, eg, metal band, or double the width to 32mm by pairing them up. But for now it'll do.

I also spent some time on evaluating different configurations for the ball bearing slides. I think the best way to go is to have each pair of slides "side mounted", ie, their "tops" look at each other or away from each other, in the same way as you would side-mount them in a drawer cabinet. This seems to minimise their jiggle room. This also led to a pretty clear idea on how I would build each axis. More on that in 100 hours, after spending more time with the design software.

The actual wood cutting (effectively 7 small cuts plus one circular hole) was more laborious than anticipated. The main issue was my circular hole cutter. The beast is old and might just be good enough to cut cheese and even the drill bit was worn out. Swapping the drill bit became impossible because the set screw was locked in. Some force killed the rather soft and already worn metal screw head and I had to cut a new cross to be able to use a screwdriver to get it out. Adding some lubricant made it all a bit easier. Then the pitch of the screw was "like no other", so I couldn't replace it. Fortunately my repair was good enough to get the screw back in and get on at least for now. Bottom line: I need a new hole cutter.

The  implementation.

For the fun of it I also cut a 600mm board with my jigsaw to see how straight I am. The best I can do with my skills and tools is between 0.5mm to 1.0mm precision over 600mm. Ok, but not great. I hope that version 1 of my router will be more precise so it can cut the parts for version 2.

The logical extension is that version 9 should be able to split atoms.

Saturday, 6 February 2010

A Chain of Events

Today I went to a couple of bicycle shops to check out chains and sprockets as an alternative to threaded rods. Prices vary, but some sprocket sets can be had for $35, and bicyle chains for $25. Normal bicylce sprockets seem too large and difficult to mount to a stepper motor, but the (pardon my new French) "shimano rear derailleur jockey pulley set" has two small plastic sprockets that might do the job. eBay had some chains etc but I wasn't too excited.

BicycleHQ gave me very good service on a busy Saturday, and on top of that a used sprocket for free. I asked the guy if I could bargain any further, but he refused.


I am old, but I still have my teeth...

My colleague pointed out Little Bird Electronics who offer a 960mm Ladder-chain & Sprocket set for $23. It looks like plastic and has no specifications on their web site, so I sent them an email.

I also discovered Penhalluriack's Building Supplies, a hardware shop with a surprising range of products in an unexpected location (aluminium, screws, bolts, fasteners, wheels, metal sheets, etc). In particular, they have an assortment of threaded rods. Based on size, weight, and pitch factors, I'll go with the 0.5" (12.7mm) diameter. Pitch is 1/12" (~2.1mm) according to the (pardon my new English) British Standard Whitworth (and my ruler).

Threaded Rod vs Sprocket Chain
  • Threaded rods cost between $6 (600mm) and $8 (910mm). In addition I will need a coupler for the stepper motor, ball bearings to hold the rod in place near the motor, a thrust bearing, and an end-stop bearing, plus bearing housings. No idea about pricing for those items.
  • Sprockets seem to cost around $10 to $25 (or free if I'm lucky), plus chains for $25.
  • Movement with threaded rods is very slow. at 2.1mm pitch, a half-step by the stepper motor moves a theoretical 0.005mm. With the sprocket system a stepper motor half-step moves 0.35mm (chain element length 12.7mm, 11 sprocket teeth).
  • Linear positioning with threaded rods will be very stable. I don't know how rock solid this will be with chains.
  • Threaded rods may have a small pitch of 2.1mm, but their pitch drifts considerably over distance. Potentially, this could be sorted out via software. They also have a tendency to swing during faster rotation.

So, who's the winner? Maybe the x and y axis could be done with chains, and the z axis with a threaded rod. Looks like some experimentation is in order.

If you should find your parked bicycle without chain and pulleys, don't call me.

Friday, 5 February 2010

Arduino Me!

The Arduino Mega clone from eBay for $43 (AUD) is on its way. Can't wait !

It's time to find some good reasons why assembly programming is better than dating:
  1. If your date is wrong, it's easy to fix.
  2. Working with multiple devices is ok, and even more fun when they discover each other.

Arduino. New. Based on reference design.
For sale for $1 plus postage.

Mach3 has a plug-in that uses a USB port as an output, though the Mach3 SDK is a bit wild, just like its user interface. I I'll write something myself in sweet clean C#. After all, I don't get to do this sort of thing at work anymore.

Considering the joys of Windows in the real(-time) world, there is no point messing around with PC-level interrupt management. Instead, the Arduino can handle clean time-management of signals to the driver stage. Conceptually it'll be like this:
  1. 3D Design application, (3ds MaxBlender, or SolidWorks) creates the actual object.
  2. Desktop application calculates paths (lines, arcs, bezier splines) and pushes these through the USB port "at leisure".
  3. Arduino calculates precise step timing signals.
  4. Driver stage (from eBay) moves stepper motors and manages microstepping.
G-Code might be nice for the PC to Arduino transfer via USB. It would be standards conforming but it may be more work. A thought for another day.

Wednesday, 3 February 2010

Hot Arduino

It was too hot this evening to tinker in the garage, so time for some theory. At Arduino.cc I tried to figure out how suitable an Atmel microcontroller would be to control stepper motors. Arduino has a stepper motor library, but at first glance it looks rather primitive and introductory. For example, it pauses while it takes a step on one stepper, so controlling 3 (or 4) at the same time won't work. Key to this is a nice interrupt-driven routine to manage it all.


Too Hot for me.

Back in the stone age (7 to 10 years ago), I once had a go at driving 3 battery power drills using an old Atmel chip. My welding, ahem, soldering is visible below. I feel too shy to expose the underside, but you get my drift.

Cro-Magnon, or, The Missing Link:
 Atmel AVR, 3 relays, 1 power mosfet, 200g solder.

Evidently, the Arduino would make a nicer board and for under $50 from eBay for the Mega version, I can't compete.

As it seems, the Arduino language is a wrapper around a C++ compiler which allows asm inlines, so I should be safe regardless how close I want to get to the core. Some more reading and pondering required.

Driving the steppers will be a project of its own. CAM applications create G-Code that traditionally seems to be fed into a program, eg, Mach3, on an old PC. It passes signals through an obsolete parallel port to a driver board that connects to the steppers.

Me not like it. I want to use my main PC (Windows 7) or my old laptop, and an Arduino board as the controller. This will require some interesting microcontroller coding and I don't know yet if Mach3 or other software can be customised to go via USB, not a parallel port. Writing the software myself would be fun, though.

Tuesday, 2 February 2010

Ball Bearing Slides

Today I got my hands on two more ball bearing slides. These are 600mm in length and a nice addition to my collection of six 450mm slides. I might use the 600mm ones for the base (x-axis) and the others for the y and z axis.


New 600mm and old 450mm slides.

I am still not sure if I should rather go with aluminium rails and v-bearings. Right now, my exposure to ball bearings is zero. I need to find a shop that sells bearings for hobby projects. I'm not building a space telescope, nor do I buy in units of 1,000.

My 450mm slides had been used for an early prototype and they unfortunately collect plenty of dust. In fact, I am considering to disassemble and clean them, but then what kind of lubricant should I apply? I've got good old RP7 and some underwater grease for boats (argh!). Reading on the web about lubricants, it's a science.

Monday, 1 February 2010

Tightening my Nuts

After going to Bunnings yesterday and finding nothing useful, I went to Mitre 10 today. They're walking distance from my workplace, hence, convenient. A smallish outlet with employees who like to read newspapers, but they had some interesting bits and pieces. So, I found myself a couple of options of tightening a nut to a piece of wood.
Option 1 uses a bridge, tightened down with wood screws. Bolts would probably have been cleaner, but none at hand... This option will meet perfectly my "must be slim" requirement.

Option 1: Bridge

Option 2 uses a hose-clamp. Works as well, but just not as well. Also a bit clunky. Note that option 2 has a small groove in the wood to further stabilize the nut. I think the best solution will be to use the bridge of option 1 plus a small ridge in the wood.


Option 2: Hose-clamp.

Introduction

Well, here we go. For quite some time I've been thinking about building my own hobby cnc router. Maybe writing a blog might help turn thinking into doing...

The initial and well thought out plan is to "just make one", with little regard to resulting precision or intrinsic beauty. Just get started and learn.

I plan to build the initial version primarily using mdf boards, use ball bearing sliders as tracks, and use threads and nuts for movement. Basically stuff that's easily available.