MechMate CNC Router Forum

Go Back   MechMate CNC Router Forum > Computing, Software & Programming > 80. Computer Hardware & Software
Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #31  
Old Tue 28 August 2007, 08:32
domino11
Just call me: Heath
 
Cornwall, Ontario
Canada
Aubrey,
Here are a few app notes from Allegro. Some reference specific brand steppers or specific Allegro chips but they have a lot of info on drivers and steppers and how to interface to them. Maybe of some interest to you.
Attached Files
File Type: pdf an29504.pdf (133.3 KB, 87 views)
File Type: pdf smh15.pdf (15.9 KB, 29 views)
File Type: pdf smh29.pdf (163.3 KB, 33 views)
File Type: pdf smh1011.pdf (46.2 KB, 29 views)
File Type: pdf smh1213.pdf (39.6 KB, 26 views)
File Type: pdf stp99-11.pdf (186.9 KB, 37 views)
Reply With Quote
  #32  
Old Tue 28 August 2007, 09:22
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Heath, that post shows 10:17 to me as my local time (during the morning tea-break) - you slow people are still in bed then, 6 hours behind us.

(This post shows me 17h22 - after the home commute)
Reply With Quote
  #33  
Old Tue 28 August 2007, 11:14
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Quote:
Originally Posted by Gerald D View Post
When are you winding your own steppers?
Yea! Right!

Thanks for the OK to carry on this project on Mechmate.
Aubrey
Reply With Quote
  #34  
Old Tue 28 August 2007, 11:45
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Quote:
Originally Posted by domino11 View Post
Aubrey,
Here are a few app notes from Allegro
Thanks - I see one of the pdf's have a seemingly complete driver circuit - will have to study this (untill I understand it)
Does anyone have a site that you can get a price on without having to send a RFC?

Aubrey
Reply With Quote
  #35  
Old Tue 28 August 2007, 11:58
domino11
Just call me: Heath
 
Cornwall, Ontario
Canada
Aubrey,
Some of the better sites for electronics components (in the US anyways, Im in Canada and get stuff shipped to me all the time) are

www.digikey.com
www.mouser.com
www.newark.com

You can at least use these for price checks
Reply With Quote
  #36  
Old Tue 28 August 2007, 12:01
domino11
Just call me: Heath
 
Cornwall, Ontario
Canada
Gerald,
Yeah I figured as much, I thought the forum corrected for your own time zone. Funny here in Canada everyone calls the morning and afternoon breaks "coffee breaks". Tea doesnt seem to be as popular here. Is coffee poplular in South Africa at all?
Reply With Quote
  #37  
Old Tue 28 August 2007, 12:12
domino11
Just call me: Heath
 
Cornwall, Ontario
Canada
Aubrey,
here is a discrete design from Phils site. Take a look, easy to get parts
Attached Files
File Type: pdf osunischematic.pdf (28.3 KB, 71 views)
File Type: pdf 1axisttcopper.pdf (62.5 KB, 48 views)
File Type: pdf osunidata.pdf (345.7 KB, 55 views)
File Type: pdf osunilayout.pdf (87.3 KB, 45 views)
Reply With Quote
  #38  
Old Tue 28 August 2007, 12:22
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Coffee sure is popular, but 90% of it is "instant" (and vile). We didn't have a Boston tea party so we don't have an issue with the word "tea"

We are also the home of Rooibos (Red bush) tea which has become a popular export.
Reply With Quote
  #39  
Old Thu 30 August 2007, 10:00
Tom Caudle
Just call me: Tom
 
Texas
United States of America
From an old power design engineer that has done motor drives (Up to 10HP) and switching power supplies (up to 2KW) I can tell you that even experienced Electrical Engineers avoid working with high current, big inductive loads and higher voltages. All the young engineers think EVERYTHING is digital and 5V or less (:-)

I have watched the threads on the DIY motor drives (CNCZone has one on a DIY Servo controller that has been going on for almost a year!) with a smile; it's not as simple as just finding a chip and putting the recommended components together. You need to have some pretty good test equipment (high speed Digital storage scope, active high speed current probe, good bench power supplies) and plenty of spare parts. Board layout is critical and you can't get too far with a hand built breadboard in the power sections. Even with a proven layout and cards being available the chances for success on the first try are low.

I have the experience and equipment to easily design my own stepper or servo controller. I do not have the hundreds of hours to devote to a project that really works. You can twist a stepper with some transistors and a few cheap chips BUT it will top out at about 60 to 100RPM and be really ragged (full step). It would be fine to spin a sign around or to move a toy but would be virtually useless for any CNC work. The easiest is a simple Unipolar driver (two power transistors per coil, 4 per motor) using LR (big resistor) current limiting. None of those work very well for larger applications or CNC.

This "hobby" of Home Shop CNC is interesting. For some it's enough to just build something (they are enjoying the journey). For others it's about what you can do with your own machine that motivates them (they are about the destination). There are varying levels of integration for a project. You can buy some parts ready made and others do yourself. You can buy the metal parts partially or fully cutout and fabricated or you can (as an extreme example) dig your own iron ore and smelt it and make your own steel. You can design and build your own electronics, wind your own transformer and build your own motors. Each one of those projects assumes you have the knowledge and skillset required to pull it off.

When I built my first table on a limited budget I scrounged everything I could find...still, I saved up and bought my motor drivers from Gecko because I KNOW what it takes to build one that actually works reliably and effectively.

If you want an educational project and to teach yourself some electronics then build your own motor controller. At the end you will learn a lot. If you want to build a CNC table and get it moving and cutting then buy some drives and realize there are MANY other challenges in the process.

This may come off as sounding mean spirited...it's not sent in the vein. It's from a grizzled old design engineer and comes from experience. I have been in the HSCNC space for over 6 years and have watched dozens of guys post on various lists about how they have been reading and thinking about the technology and THEY have a idea that will revolutionize the process and THEY are going to design and build the ultimate motordrive/interface/power control/[put your idea here], and it will be better than anything out there and cost pennies to make. Something bad must happen to them because so far I have never heard from any of them again!
Reply With Quote
  #40  
Old Thu 30 August 2007, 14:28
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Hi Tom
Dont worry about "mean spirited", your comments are appreciated whichever way they go.

I have been doing a fair amount of research and what I have read leads me to the same conclusion: "Stepper Driver hardware is not as simple and as easy as the uninitiated would first realise".

In my case it is really that I need to get the mill moving to see if the mix of designs that I used are working together. This need not necessarily be at the speed of light, quite the opposite in fact. At work we always run a new program (or modified ones) at 10% of the feed rates that are programmed just to see what it is doing. (Finger trouble is a b1tch!) On the Fanuc controler this is a rotary switch so it is easy.

Once the mill is alive, there are many aspects which I have to master before I would consider running at optimum feed rates especially on the software side as the apps we use at work are way out of my league financially. I'm definitely on a "freeware" budget at his stage.

I am also using the project to get my electronic skills kickstarted again after a 30 year absence. I do realize that education comes at a cost, normally fried components in this case - so be it.

So if the mill is painfully slow, at least I know that it is working and that knowledge will make the US$1200 investment in a trio of good commercial controlers easier to swallow.

Once I build my MechMate, I will be needing an accuracy of one tenth of a millimeter (cutting wood) so microstepping capability is actually not really required in this application. (The neighbours music will easily drown out the noisy steppers - they must just wait, my injection molder should be up some time in December, then we'll see who can make a bigger racket!)

I am also under no illusion that whatever is designed and built, it will fall short of the speed and dependability of the commercially available units. On the plus side, it should be a whole bunch cheaper and more accessable than imported commercial units.

So in the meantime, I must get some motion - ANY motion - EVEN INACCURATE motion. Only at that time can any realistic assesments be made as to what shortcomings are present, what the priorities are as far as reducing said shortcomings and what the financial considerations are.

As "modularization" is the key buzz-word here, I have yet to see a design that splits the driver board into a logic and a power module. To me, this makes perfect sense.

My modules will be as follows:
1) Computer (got Ubuntu up so it may well be EMC)
2) Breakout Board (see original Low Cost Electronics thread)
3) Logic Board (abreviated PICStep)
4) Power Board (from a unit using scrap power transistors out of old hi-fi sets to one using a 300 amp DC welding plant as a power source to take a rediculous example.)

From what I have read (and from what you have posted if I understood you correctly), the power circuit is where the entire system becomes efficient or blows up.

By using the 4 module approach, the guys that know about chopper circuit design can build very fancy power boards without having to worry about the preceeding logic and the guys on a limited budget can get thier machines moving while planning the purchase of components to build the more high performance power boards.

Who knows, maybe companies like Gecko and others will soon start offering logic boards and seperate power boards.

Anyway, 10:30pm local - I'm off to bed.
Best
Aubrey
Reply With Quote
  #41  
Old Thu 30 August 2007, 18:20
Les Filip
Just call me: Les
 
Austin, Texas
United States of America
Aubrey,

Since you keep stating that the speed doesn't matter to you, you may still be thinking that with a "lower cost" driver your CNC router will simply move slower but still have good cut quality. That is not at all the case. The real issue is the quality of the motion. Without a properly designed driver, it will be horrible and will result in ridiculously bad cuts, REGARDLESS of the speed of the router through the wood.

So, to clarify, do you understand that the issue is not speed?
Reply With Quote
  #42  
Old Fri 31 August 2007, 08:09
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Quote:
Originally Posted by Les Filip View Post
Without a properly designed driver, it will be horrible and will result in ridiculously bad cuts, REGARDLESS of the speed of the router through the wood.

So, to clarify, do you understand that the issue is not speed?
Hi Les
I am starting realise that there is an issue that I have not got a handle on yet.

Let me put the situation down as I understand it.
1) Stepper motors have 4 coils, each coil can be polarised seperately,
2) For the sake of illustration, lets call them A1-A2, B1-B2, C1-C2, D1-D2.
3) The most basic form of stepping would be to energise the coils individually.
ie placing 0v on the "1" and 10v on the "2" connections on A, then B then C, then D would step the motor 4 times - the whole process starts again at A.
4) After having done the cycle 50 times (200 steps per rev divide by 4 steps per cycle for my motor) then the motor shaft will have done 1 complete revolution and will be at exactly the same place as when I started.
5) This is the "low torque" method.
6) To double the torque (I think it is actually slightly less than double), you apply a voltage to the opposite coil in reverse polarity. ie A1=0v, A2=10v and C1=10v, C2=0v.
7) Either way, the motor is being driven in "full step" mode.

At some point, something called "resonance" takes over and the motor simply vibrates. Lets not consider this phenomina at this time as I'm sure it is a rather complex issue.

There are other sequences of applying current to combinations of coils to produce "finer" steps but for the sake of clarity, lets leave it here for the time being too.

Is my understanding correct (not taking resonance and partial stepping into account at this time) as it stands or is my education lacking?

All the best
Aubrey
Reply With Quote
  #43  
Old Sat 01 September 2007, 13:53
Les Filip
Just call me: Les
 
Austin, Texas
United States of America
Aubrey,

I have no doubt you understand the basics. But, as they say, the devil is in the details. Ignoring or putting off things that will very much matter later will not make them disappear. In fact, you should be planning for those issues now so that the work you are doing will not be wasted.

Let's use an analogy to shine some light on the resolution issue. JPEG images look fine for the most part, but are actually compressed versions of an original (whether a high resolution scan, or a RAW camera sensor image). There is not so much compression that most people care, but there is enough to produce a savings in storage requirements or transfer speed. In some cases, up to 90% of the original data is lost.

This is what you think you are building. In reality, the Gecko drive is what is described above. A non-perfect, non-microstep drive would be the equivalent of throwing away another 90% of the data that's left. Think about it - if you could go on compressing images forever and still have them be decent quality, then we could store millions of images on a single floppy disc.

Along each axis a microstepping drive will have ten times the resolution of a full step drive, which means a 2 axis microstepping system will have 100 times the resolution of a full step drive. On a 3 axis system the overall difference could be 1000x if all axis were being used at once.

Another thing to consider is that microstepping is done using specific formulas derived from testing of particular types of motors. It is by no means a directly proportional relationship to go from one full step to the next. It is non-linear to say the least. Dealing with this changes the circuit entirely from what you want to build to something else. To something like a Gecko.

If, as you say, you want to ignore these issues, you will be getting motion quality that is a magnitude worse than you are thinking.

Do you want to produce parts that are acceptable quality or just merely recognizable? Smoothness of motion is essential, at any speed, especially on a curved cut.

Take Care,
Les
Reply With Quote
  #44  
Old Sun 02 September 2007, 11:00
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Quote:
Originally Posted by Les Filip View Post
Aubrey,

I have no doubt you understand the basics.
Hi Les,
In reality I dont think that I have enough of a grip on the basics, that is why I'm always asking dumb questions. I'm not doing so to drive anyone insane at all.

The hardware I am using at the moment is as follows: stepper - 200 steps/rev, leadscrew - 16mm 2mm pitch.
This should give me a resolution of 1/100th of a mm per full step (just under 1/3 of a thousandth of an inch) which "should" be fine enough for the purpose that the machine is being built.

The backlash on the lead screw nut is probably a lot more than 1/100mm at present, but I can only test and measure it accurately (and maybe fix it) once I am able to drive the lead screw with the stepper.

As to my previous question, I am pretty sure that the motor shaft will be exactly where it started after 200 clean full steps.

This would be due to the fact that there can not be any "slip" between the poles on the shaft and the shaft or between the poles in the casing and the casing. There can only be "slip" when the motor is pulsed and for some reason, the step is skipped.
Any "inaccuracy" would be due to the fact that the 2 poles are not exactly lined up but they would still be "within the general area" of where they should be.
Step the motor again and it will then be "within the general area" of where they should be on that step.

I dont think that the resolution variance is accumulative but rather affects only that one step.

For Example:
Motor steps 1.8 degrees per step (full)
Lets take a variance of 25% as applicable to the step. (probably ridiculously high)
This equates to 0.45 degrees.
Each time you step the motor, it moves another 1.8 degrees on from where it should be (due to the physical positioning of the poles within the motor) with a variance or plus 0.45 to minus 0.45 degrees.
On a full revolution, that is 0.45 degrees (as it is only applicable to the step preceeding the measurement).
Doing the math: (2 / 360) x 0.45 = 0.0025mm either side of where it should be exactly after a full revolution or in this case, moving 2 millimeters.

I think that 2.5 microns is plenty accurate (considering the gearing, which is very fine to begin with) and we are not even dealing with microstepping yet. My micrometers cant even read that accurately LOL.

But I dare say that the proof of the pudding will be in the eating and maybe (I have been known to be soooo wrong on occation) I will be eating humble pie at some stage. Hope not though.

Thanks for your input and please keep it coming.
Best
Aubrey
Reply With Quote
  #45  
Old Sun 02 September 2007, 11:54
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Logic Board Feedback

Time for everyone to have a good laugh at my expense!!!

Wrote the PIC logic program (using single coil full stepping) and ran it on a friends emulator.

When I put 1 on the Direction pin and 0 on the step pin, thigs work as expected and nothing happens.

However, when I put a 1 on the step pin, I do not get a single step, the thing carries on stepping! On a mill, this would ram the axis into the end stop (or over travel sensor if one is fitted).

NOT good at all!!!

Basically the PIC is running a good deal faster than the parallel port baud rate and when it sees a 1 on the step pin, it steps. That is what it has been told to do!

What we now have to do is detect whether the 1 on the step pin has already been executed or if it is a new step instruction. This has to be driven by the app on the pc as the controler card ( or the breakout card for that matter) cannot "guess" when the next step is presented and to use a timer would be ineffective as the feed rate (and thus the time between steps) are probably altering constantly.

When I had a look at the original "Lower Cost Electronics" thread, I saw that the charge pump was connected to pin 14 (AutoFeed) on the parallel port.
That raised the question: Pin 1 is the "Strobe" pin and strobes are normally used to syncronize things. Why is the charge pump circuit not monitoring the strobe pin?
Next, How does Mach3 ( or any other similar app) let the controler circuit know that the data on pins 2 to 9 is another instruction (ie the data has "changed" even if it is the same)?

Maybe Mach3 can be set to use pin 14 as the strobe or maybe we should be using pin 1 to drive the charge pump.
Has anyone got the answer?

Another question: When Mach3 sends a new data byte to the port, does the strobe pin (pin 1, pin 14 or whatever) simply change state with each new instruction set or does it go low then high (or high then low) to signal the connected device that there is a new data set present on the port?
(edit) Or maybe Mach3 sends "00000000" to the port between each data set? Think I'll go check out some of the Mach3 support sites!(edit)

Anyway, whatever the answer is, we have to use that information to prevent the Logic Board from merrily stepping away when it has only been given a single step instruction.

Maybe this is the kind of trap that Les, Tom and others have been warning me about. There are probably many more that I will stumble into, who knows.

Anyway, its all in the interest of gaining knowledge.

All the best
Aubrey.

Last edited by Aubrey; Sun 02 September 2007 at 12:10.. Reason: Thought of another possible option
Reply With Quote
  #46  
Old Sun 02 September 2007, 12:53
Richards
Just call me: Mike
 
South Jordan, UT
United States of America
Aubrey,
If you were building a microcontroller circuit to feed pulses to a Gecko G203 stepper driver, you would be working with Active High signals. That means that a Step signal starts off at 0 (Low or Zero volts), then pulses 1 (High or 5V) for a minimum of 5nS, then it returns to the 0 level. The wait time between pulses is dependant on the pulse rate speed that you're sending, but the 5uS "High" state is fixed. Other stepper drivers might require Active Low signals and may also require longer On State delays.

When you're building your own stepper driver that uses a microcontroller to detect pulses from an outside pulse generator (Mach 3 driving a parallel port, for example), then you need the microcontroller to act everytime it detects a valid signal. Normally that active state is latched by outside logic (perhaps a 7474 chip) and the microcontroller's interrupt driven input pin is signaled. The microcontroller activates an output signal and then de-latches the 7474 after a time lapse longer than the step pulse width has expired.

There's really nothing simple about designing a simple stepper driver if you're using a microcontroller as part of the design. If you do that, then you also have to learn how to program, test, debug and implement the microcontroller into the design. It's not exotic, but it is another field of study with its own requirements.
Reply With Quote
  #47  
Old Sun 02 September 2007, 12:57
Bill McGuire
Just call me: Bill
 
Weiser, Idaho
United States of America
Aubrey...
I for one am applaud you for your desire to produce a cheaper, better mousetrap... and hope you succeed. The side benefit is for folks like me who have a much less grasp on the basics of the design and engineering behind the electronics of these machines.

Just the fact that I am able to audit this thread has increased my own knowledge greatly...
Reply With Quote
  #48  
Old Mon 03 September 2007, 14:35
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Quote:
Originally Posted by Richards View Post
There's really nothing simple about designing a simple stepper driver....
Hi Mike,
C'mon... Say "I told you so!"
Guess my education will now include the 7474 flip-flop as well.

If I understand your post correctly, the data pins on the parallel port (2 thru 9) are pulsed with the command byte for a period of at least 5 nanoseconds and then return to the "00000000" state until it is time for the next command byte to be sent (and therefor executed).

This being the case, it should be relatively simple to get the PIC to store the Step/Direction bits that it has just sent thru to the power boards in a variable (say "LastCmd") and on the next loop, test if the Step/Direction bits still are still the same as those stored in "LastCmd".
If it is the same, the PIC skips over the section which sends signals to the power board which will put it back at the start of the loop.
If the Step/Direction is "00" then the PIC is to place "00" in "LastCmd" and restart the loop.
I dont think it would be a good idea to send the "00" Step/Direction command to the power board as the motor will in all probability still be moving to where the last non "00" instruction told it to go.
In addition, if you turn all the coils of the motor off, the motor may be dragged off the position where it is supposed to be.
At this point, the PIC will not change the Step/Direction bits being sent to the power board and just loop untill a Step/Direction signal is received which is different to "00".
It may also be a good idea to have a timer running that is reset after every non "00" command is processed. Setting the timer to (say) 30 seconds will mean that the timer will fire 30 seconds after the last actual stepping command has been set. When the timer fires, all "Power" boards can be sent a "00000000" command byte which will then switch off any coils that are active, thus preventing the motor overheating and potentially burning out.

Quote:
Originally Posted by Richards View Post
.... then you also have to learn how to program, test, debug and implement the microcontroller into the design. It's not exotic, but it is another field of study with its own requirements.
I am very fortunate in that I am able to learn a new programming language in a relatively short period of time. ASP took me 6 weeks and at the end, I had an inventory control type app up for my then employer. PHP took me 4 weeks as it is able to do things without the need for buggy 3rd party dll's and the documentation is good too.
Unfortunately, for some reason, I have not got around to "C" or really into Mnemonics (as in PIC) yet but give me time....
This project is being done using PICBasic which is compiled by a buddy. He also has the "Emulator" which caught the "Runaway" bug reportd in my last post.
As far as PIC's go, I bought the PICKit(1) about 3 years ago. Currently I am playing with one of the 40 pin "16" series chips which will be controling a machine that I am building at work.
Had (past tense) a prototype board but somehow 380 VAC managed to get in and there was a fireworks display. Since then, I tend to go overboard on the opto-isolators because they are a relatively inexpensive form of insurance (being rated at 1000v). You will see what I mean when I post the Logic Board schematic and PCB details.
So far the PCB is single sided with no jumper wires. I find that resistors and capacitors are very usefull for laying tracks under. As to how wise it is to place tracks under capacitors, we will see. I am still busy checking IC pins and other component polarities at this time.

Last but not least, Welcome to Bill.
Thanks for your comments but I ask you to remember that the aim is not (at this time at least) to build a "Better Mousetrap" but to build a "More Affordable" one.
I think that taking the driver board and splitting it into a "Logic" board and a "Power" board may just get the guys that know about chopper circuits, high voltage/amperage switching and the like to do some development as they dont have to re-do the logic component.
Also, being fully isolated from the "Logic" board, if there is a meltdown in the "Power" section, you should not have to start the whole thing all over again which is more than likely with a combined logic/power design.

My first "Power" board will simply be 8 power transistors wired in 4 push-pull pair configuration supplying the voltage and amperage as stated on my motors.

My wife just switched off the study light (her way of hinting that its time to sleep) so its time to say goodnight.
All the best
Aubrey
Reply With Quote
  #49  
Old Mon 03 September 2007, 16:05
Richards
Just call me: Mike
 
South Jordan, UT
United States of America
Aubrey,
You're starting to get the whole picture. It's a big task, but, like all tasks, it can be managed if you take it one small part at a time.

One clarification, you talked of switching BYTES when you should be thinking of switching BITS. Each bit is independent of every other bit on the parallel port. You'll have to save the byte that was last transmitted and then mask the bit by using the OR and the AND operators to set/reset the intended bit. It takes a few minutes to get your mind around it all, but then the epiphany moment comes and everything is clear.
Reply With Quote
  #50  
Old Mon 03 September 2007, 21:43
Greg J
Just call me: Greg #13
 
Hagerman, New Mexico
United States of America
Aubrey,

I agree with Bill, and I'll state it again, You'r an inspiration!!

When you have time, Google what Mark Twain had to say about "inspiration".

Keep up the good fight.

Greg
Reply With Quote
  #51  
Old Mon 03 September 2007, 23:05
Les Filip
Just call me: Les
 
Austin, Texas
United States of America
Aubrey,

I don't want to sound like a broken record, but full stepping is NOT very good quality for CNC work. Even some microstepping CNC machines do not produce very good results - because of the quality of the motion and because of torque issues.

That is why, and this is only my opinion, it is not worth it to go to this amount of effort for full steps. The minute you get your driver working it is going to feel like you are on top of the world. Soon thereafter you will want better quality. You will then want to build a "lower cost" microstepping drive. You will then realize what a few people have been trying to tell you about the time commitment involved with a project of this magnitude. There are probably less than 100 people in the world who can design what you really want to make. If you take into account what it will require in time, materials, and the goodwill of those willing to help you make a microstepping drive, you will then see you would be FAR better off buying a Gecko or pre-existing equivalent.

On the upside, if you succeed then you can sell them to many people. Of course, Gecko or any other big company could introduce a cheaper drive at any time and therefore negate your efforts completely. I applaud you for continuing the effort, and I will not butt in again since I have no advice that will realistically advance your agenda. I just wanted to let you know you are travelling up a steep hill and even though you have a lot of help right now, as the project advances that help will be much harder to come by.

The going price for a custom made stepper motor controller and microstepping driver combo starts at US$5,000 from a friend of a friend who does this type of design work day in and day out, and that is not for you to own the design itself. You would still have to buy the boards from him, at a price not much less than a Gecko.

That's it for now. Good luck with everything.

Take Care,
Les Filip
Reply With Quote
  #52  
Old Tue 04 September 2007, 03:05
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Les, I have been scanning every third line of this thread, or so.......

Aubrey has his motor on a leadscrew with a fairly fine resolution (I think about 2mm per motor rev). With my rack&pinion I think I am at about 75mm per rev - my 1/10th microstepping is still 3 times "worse" than his full stepping??
Reply With Quote
  #53  
Old Tue 04 September 2007, 06:36
Richards
Just call me: Mike
 
South Jordan, UT
United States of America
As Gerald pointed out, full-stepping stepper motors have their place. Somewhere on my 'wish list' of projects that I want to tackle 'someday' is a ball-screw driven Z-axis. The main problem is that, with a typical five-turns-per-inch ball screw, I would have to send 10,000 pulses per inch with a Gecko stepper driver. Sending that many pulses per inch of movement would not give me the speed that I need. However, if I used a full-step stepper driver and only had to send 1,000 pulses per inch, the project would work. I would still have 0.001-inch per step resolution and the speed would be acceptable.
Reply With Quote
  #54  
Old Tue 04 September 2007, 12:43
Tom Caudle
Just call me: Tom
 
Texas
United States of America
Perhaps Aubrey will beat the odds. After having been around all of the lists for 6 + years I have seen dozens of well meaning guys decide that they can build an better/faster/cheaper [pick one] drive using everything from PICS to descreet transistors. So far it has never happened at a level that other users could benefit from. Honestly, if it were as simple as programming a chip and throwing a few power components on a card it would already be available. There are cheap DIY solutions for steppers up to about 3A max in the form of HobbyCNC and Xylotex. We sell a 4 axis complete Xylotex based unit with power supply, enclosure, motors and cableing for $640 bucks. It's undersized for a full sized table.

We do extensive embedded development with PICs and other chips, as well as my background in power electronics. I know the limitations of the approach of trying to re-invent the wheel. If you want to see a good application of a PIC look at our MPG101B hand controller. It scans 16 keys, an analog joystick, does proportional speed and direction for jogging on two axis, supports 4 axis control, has status LED's, supports a Mini-byte communication with MACH and has the ability to be reconfigured by the user with a GUI application. All using a single small 18 pin chip.

I of course do not consider my time to be 'free' (even my so called free time). So any costs to build, design, troubleshoot, redesign, troubleshoot, burned up parts, etc has a value to me.

Every day your machine lays in pieces is one less day you have to use it and enjoy the fruits of you labor.

I realize that a lot of the potential builders may have a problem with even the reasonable costs of available components. What I did with my first table was to scrounge as many mechanical components as I could over what was perhaps a year. I had to compromise parts of the design to match my components, but I did do a buy vs build analysis of all the pieces. I realized that I could not go through the design process (even if I counted my time as free) buy the parts, pay for PCB's and come anywhere close to the lower cost of a Gecko.

We all tend to see solutions to problems in our own context. A software person sees the solution as a software issue. A hardware person tends to want to fix everything with descreet components. The true solution is both when dealing with driving motors for complex movement.

Sorry to wax so judgemental. It's all been tried before. I guess we would still be walking if the Wright Brothers had taken my advice, but then again there was not a Piper factory down the street from them (:-)
Reply With Quote
  #55  
Old Tue 04 September 2007, 16:40
Les Filip
Just call me: Les
 
Austin, Texas
United States of America
Quote:
Originally Posted by Gerald D View Post
Les, I have been scanning every third line of this thread, or so.......

Aubrey has his motor on a leadscrew with a fairly fine resolution (I think about 2mm per motor rev). With my rack&pinion I think I am at about 75mm per rev - my 1/10th microstepping is still 3 times "worse" than his full stepping??
While the resolution is indeed better than I initially thought, I still think the quality of motion is going to be a huge factor in whether or not the full step "lower cost" driver will work acceptably well. In order to achieve good quality motion, the driver is going to be much more complicated than Aubrey currently thinks it will need to be.
Reply With Quote
  #56  
Old Wed 05 September 2007, 15:19
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Quote:
Originally Posted by Richards View Post
One clarification, you talked of switching BYTES when you should be thinking of switching BITS. Each bit is independent of every other bit on the parallel port. You'll have to save the byte that was last transmitted and then mask the bit by using the OR and the AND operators to set/reset the intended bit. It takes a few minutes to get your mind around it all, but then the epiphany moment comes and everything is clear.
Hi Mike,
Think I was talking with regard a single logic board. The logic board only gets 2 bits of info from the breakout board. ie. Step and Direction.
The output from the logic board is a pair of bits for each coil on the motor. On a 4 coil motor thats 8 bits or 1 byte.
You are correct when you say I should be switching bits but as there are 8 of them, instead of doing eight 1 bit switches, I simply do one 1 byte switch. (Effectively that means I'm lazy! )

For those who dont know what Mike and myself were talking about, let me try to put it in english.

Each coil can have both leads set to 0 volts "00" or not doing anything, lead A=10v + B=0v ( ie 10 )making it a North pole, lead A=0v + B=10v ( ie 01) making it a South pole.
(A 4th is A=10v + B=10v but this would have the same effect as the "all 0 volt case but wastes time doing funny "chopper" things in some cases)
Using a simple case:
10 00 01 00 = coil 1 north + coil 3 south (steparray[1])
00 10 00 01 = coil 2 north + coil 4 south (steparray[2])
01 00 10 00 = coil 3 north + coil 1 south (steparray[3])
00 01 00 10 = coil 4 north + coil 2 south (steparray[4])

The program also has integer variable called arraypointer (initialised to 1 at the start)
Using a full register (8 bits, on a 20 pin PIC, Register B is normally the one with all 8 bits, Register A often stops short of the full 8 for some reason but it all depends on the PIC you are talking about) on the PIC as the output pins, instead of programming "regb.1 (or Register B, Bit 1) = 1, regb.2 = 0" and so on, all you do is say "regb = steparray[arraypointer]" and all 8 bits in steparray[arraypointer] get placed on the appropriate bits (in reality, the output pins) which then go to the power board.
Note that arraypointer = 1 at this time.
The next time a Step/Dir is received, if Dir = 1 then increment arraypointer or if Dir=0 then decrement arraypointer.
Important: In the above example, there are only 4 elements in the array. Once you have done the increment/decrement, if arraypointer = 0 then make it 4, if arraypointer = 5 then make it 1 so that you dont move outside the array upper and lower boundaries which would be "unfortunate" to say the least.

At this point, you have the next arraypointer so you say "regb = steparray[arraypointer]" again and the pins get the appropriate values and the power board can do its thing.

When programming, I like to break things down into small chunks, usually in the form of subroutines or functions. This means that you are able to get the individual parts to work and when you string them all together into a program, if something is a problem it is easyer to pinpoint the function that is the problem and because the code in the function is smaller and does only one thing, its normally far easyer to debug.

The function for this would be something like:


Function DoStep(tDirection as integer){
//increment or decrement arraypointer as required
If (tDirection == 1){arraypointer = arraypointer + 1}
Else (arraypointer = arraypointer - 1}

//ensure arraypointer within boundaries of array
if (arraypointer == 0){arraypointer = 4}
if (arraypointer == 5){arraypointer = 1}

//send the info to the power board
regb = steparray[arraypointer];
}
End Function


Now you can call this function from anywhere in the program and the appropriate info (bits) will be sent to the power board.
Should there be a bug in sending info to the power board, this is where it will be, not in various places spread throughout the program.

Personally, I use many comments (the // indicates a comment) all over the place which makes the program far more readable (which is very handy in a years time when you need to modify it!), easyer to debug (some times computer processors get a mind of thier own) and it looks neat (which is a point of pride!).

The DoStep function above is what will be used to signal the power board when we get to the program. Maybe there will be minor syntax changes, but nothing else and if the C boys want to, they will be able to get it translated to C in about a minute flat.

All the best
Aubrey
Reply With Quote
  #57  
Old Wed 05 September 2007, 15:23
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Quote:
Originally Posted by Greg J View Post
Keep up the good fight.
Greg
Thanks Greg,
I'm Irish, fighting is what we do best
Regards
Aubrey
Reply With Quote
  #58  
Old Wed 05 September 2007, 15:47
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Hi Les,
Thanks for your comments and kind wishes, its really appreciated when it comes from someone who obviously is knowlegable on the subject.

Two posts back I gave an example using the "full step" sequence. By rewriting this array (adding four more elements) we "should" get half stepping, and so on. But that is after the logic board actually works. For me, programming is easyer than that "electronics" thing and the only difference between full stepping and micro-stepping as far as I can see is how many elements you have in the array if you disregard the power circuitry.

As to selling the boards, I dont think that will be right. This is after all an effort by a whole bunch of other people as well as myself. I dont hold "copyright" to it.

What I would like to do is mill boards for those that need them as a "keep busy" when I retire (not too far away) but that is for then, this is now.

Please feel free to "butt in" as you put it anytime, sometimes I will be needing a bit of "bringing down to earth" or an "I told you".

Once again, thanks for everything that you have brought to this thread.

All the best,
Aubrey
Reply With Quote
  #59  
Old Wed 05 September 2007, 15:49
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Quote:
Originally Posted by Gerald D View Post
Les, I have been scanning every third line of this thread, or so.......

Aubrey has his motor on a leadscrew with a fairly fine resolution (I think about 2mm per motor rev). With my rack&pinion I think I am at about 75mm per rev - my 1/10th microstepping is still 3 times "worse" than his full stepping??
Mmmm..... Good Point Gerald
Aubrey
Reply With Quote
  #60  
Old Wed 05 September 2007, 16:18
Aubrey
Just call me: Aubrey
 
Jhb
South Africa
Hi Tom.
A point to remember is that this is also me getting into electronics after a 30 plus absence. And maybe someone out there will also gain a better understanding on the way.

Although I hate "buzzwords", there are two that I would like to borrow, "Affordable" and "Scalable".

In my case, that means I can afford the "Model T" now, I can improve it (when I become a chopper drive expert) and should I need something more, I"ll get a Caddy (Gecko or whatever).

Quote:
Originally Posted by Tom Caudle View Post
We all tend to see solutions to problems in our own context. A software person sees the solution as a software issue. A hardware person tends to want to fix everything with descreet components. The true solution is both when dealing with driving motors for complex movement.
A very valid point!
I'm actually dreading the day that this thread starts on the power board. But then again, if it was easy it would be boring.

Also, with NASA and all the other governmental space organizations around, it took a private organization burning ground up tyres (from what I've heard) as a fuel, to get a private citizen into sub-orbital space.

Thanks for the input, Its needed to bring me back to earth every now and so often.

Best
Aubrey
Reply With Quote
Reply

Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:44.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.