Yahoo Groups archive

Homebrew PCBs

Index last updated: 2026-04-28 23:05 UTC

Message

Re: [Homebrew_PCBs] home brew cnc drill etc

2005-06-01 by Alan King

Lez wrote:

> 
> Alan King wrote:
> 
>>   First off, votes don't count much if you haven't actually done both of what 
>>ever is in question.  The group can easily be tremendously wrong on a vote, 
>>simply because one way seems better than another from looking at it, if you 
>>don't actually construct both.
> 
> 
> True, but thats the look of the draw, hopefully someone will have tried 
> or had experience etc.
> 

   Yep, but it gets very difficult to judge who's vote should count where.  Do 
they really have enough experience with both to judge properly or did they just 
not understand one of the methods well enough to try it correctly?  The results 
may be uesful, may not be, it ends up very ambiguous..

> 
>>   Hardly needed anyway, nothing to stop anyone from departing from instructions 
>>if they want to do it a different way.  Two or three different ways isn't too 
>>many either.
> 
> 
> No but if one person doing it is own way has a problem, he's on his own, 
> even with the help of others they cant really /see/ his problem except 
> by his description, to quote etc a picture is worth a thousand words, 
> and if your building the same thing then holding it in your hands has 
> got to be worth a thousand pictures, and if more than one person is 
> holding it, more chance of seeing the problems solution.
> 

   Lol I didn't have any problems..  I already understood the rails from other 
uses, and once I hit the idea of angle iron to do the 90 degrees part along the 
whole rail it was a breeze.

> 
> 
>>   Can't imagine anything coming close to as fast as what I've got for being put 
>>together.  You could easily use printer rails etc if you like in place of them, 
>>but you'll have to spend more time getting them aligned.  Once I give basic 
>>dimensions on mine and how to put together there won't be need for much else, if 
>>you want to make it different it'll still be a good basic guide.  I could easily 
> 
> 
> So you've come this far on your own, hell even completed it etc, your 
> design may well be worth adopting I'm _not_ saying a johnny come lately 
> group of us banding together _will_ come up with anything better.
> 

   And I'm not saying that a better one couldn't be built, just that mine is 
very straight forward and simple to construct.  Anyone inexperienced would 
probably be better off with it as a $75 training exercise, and then make a 
better one if they need it, than to start building a different design from 
scratch.  The rails and angles take some of the alignment work out of it for a 
first try.

> 
> 
>>put together 10 of my mechanics in a day, maybe just an afternoon.  I doubt many 
>>others could do that.  At only $75 or so for the hardware, it's a great thing to 
>>start with, then do more if you decide you need it.
> 
> 
> But can everyone buy that hardware?
> 

   All hardware was straight from Lowes and Ace Hardware, so if you're in the US 
the answer is yes.  It's all standard cheap parts from other uses, that was the 
main thrust of my design criteria.

> 
> 
>>   The real thing is for me to decide to donate my board layout and code.  Both 
>>are superior.
> 
> 
> mmmmmmm, trumpet, own and blowing.....
> 
> You /dont/ know that its superior to something that may get built and 
> has not even been roughly designed etc, would be nice to see it mind, 
> I'm not saying yours is poor just that you cant really claim it to be 
> the best in the world unless its compared to the rest in the world.
> 

   When you see it you will understand.  Up to 5 phase with 10 MOSFETs with only 
2 layers and wide traces in a very compact design, 3 complete motor driver sets 
in less than half of a free Eagle board.  Micro side can easily be rearranged to 
handle different controllers etc.  I enjoy the topology and layout as much as 
anything, haven't seen a common 220 FET layout anywhere near as versatile on the 
net.  4, 5 or 6 wire motors are all a breeze with it, bipolar, unipolar, or 5 
phase.  I've already compared it to pretty much everything on the net several 
times, latest thorough search on CNC was last year.  Only found a few in the 
same league.  Mine needs further development since it's capable of chopping 
operation etc, but for where it's at now it's as good as anything I've seen, and 
I'm very good with Google so I doubt I missed much of anything to see.

   For line drawing, do an experiment.  Divide a number by 10.  Or 100.  Etc. 
It is simply shifting the decimal point, one of the first math things learned in 
school.  And it's provably perfect.  Divide something by 1000, and add it 1000 
times, and you will always get exactly the starting number, because the division 
by the power gave a perfect answer, with no error.

   Instead of dividing by the number of steps of the direction with the most 
steps, you divide by the next higher binary power.  The division is all shifts, 
therefore provably perfect.  Add the result that same power number of times, and 
you will get the exact same number you started with.  Say you need 9,357,463 
steps on X, 623 steps on Y, and 11751 steps on Z.  Divide by the 16 million 
binary power that is next above the 8 mil, and go through the loop 16 million 
times.  All steps will happen exactly where they're supposed to in relation to 
each other, and you will have taken exactly that number of steps on each axis at 
the end.  Even high precision floating point has some error, and most stepping 
code adds one somewhere if needed to fix it.  This doesn't, the calculations are 
simply perfect.  No comparing needed here either, it is fundamental math 
properties, the expressed answer is perfect if you divide by a base power.  Add 
that perfect fraction any number of times and the result will always be perfect 
for how many times you've added it.

   The next higher power can be up to 2 times the number of actual steps needed. 
  Go through the loop adding the fractional part, and if no step then go through 
again immediately, since you don't need to wait for the motor if you didn't take 
a physical step.  You will never skip the loop twice in a row, the divisor never 
needs to be more than twice as big as the actual number of the axis with the 
most steps, the next power of two.  Since you've divided by a number higher than 
the greatest number of steps, all single pass add results are fractional or 
exactly one if it was exactly the two binary powers.  They will only overflow 
into the ones column, never counting by more than one and jumping over a step. 
The fractional adds are full adds, the higher parts only have to be incremented 
by one and carried up, no real add needed.  You can really divide by a far 
higher binary power and be ok, but then you spend a lot of time doing add loop 
passes that don't result in steps.

   Beats the heck out of the normal algorithm that everyone uses, which takes 
the largest distance and divides directly by them, using silly numbers like 7 
and 11 and any other not so easy number instead of binary powers.   That's the 
main excuse everyone uses to swear you need floating point for precision, 
instead it is a lack of understanding and binary math skills.  Seperate things 
out properly and every problem is simple to solve, and it's actually more 
precise than the errors from imperfect fractional results with floating point. 
My routine always lands on the last step without fail, no need for tests and 
correction.


   Only seen the general idea independently in a single C code snippet at the 
bottom of a long page on drawing algorithms, when looking to see if anyone else 
was using it after I thought to do it.  Never ever seen it in assembly for a 
microcontroller, despite it being 100 times better than floating point for 
assembly and totally eliminating any need for the floating point.  That's vs 
tons and tons of 'use floating point' micro examples on the net.  I'd say mine 
is a couple orders of magnitude better than anything I've seen previously in 
assembly.  I did post the main code to the SRS list last year when people were 
swearing you had to use floating point, so may be being used somewhere else now.

   Funny thing is I hate work and math.  I learned early on that if you spend 5% 
more time understanding the root concept and breaking it down further than most 
people bother, you can eliminate about 95% of any actual work by making the 
whole solving process more simple.  Haven't run into a single thing that wasn't 
fairly easy to solve with binary math, and almost never requires anything more 
than adds and subtracts and shift multiplies or divides, and a good 
understanding of where you're going with the problem.  Hating the work parts of 
math so much has made me far better than most at binary math, in order to almost 
completely avoid any working at it.  After the initial time investment, it's all 
simple to me now.



   So may sound like tooting my own horn, but the fact is I've researched it 
quite a bit and don't see much to equal it from a common sense standpoint, 
without spending a good deal more money or effort.  At least for the parts I've 
spent some design time on.  Certain aspects need more work and improvement would 
be easy, but it worked well enough as it was for what I needed that I simply 
didn't work on the extra features yet.  I was looking to possibly build and sell 
these, so I had a very strong bend towards maximum functionality with minimum 
cost and work in building and no oddball parts.

   Still might even do it eventually, I have most of the parts on hand to make 
20 or 30.  And at a cost where I could do ok at $250 for mechanics, motors, 
controller and power supply all included.

Alan

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.