Shop OBEX P1 Docs P2 Docs Learn Events
Stamp Controlled Rotary Table — Parallax Forums

Stamp Controlled Rotary Table

Bill ChennaultBill Chennault Posts: 1,198
edited 2007-05-02 17:17 in BASIC Stamp
All--

Has anyone any experience with a rotary table--such as found on a milling machine--driven by a stepper motor and controlled by a Stamp?

I would certainly like to hear of your experiences and learn something of the rotary table and stepper used.

Thanks.

--Bill

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-27 20:20
    Bill,

    Have you checked the following lengthy thread? It covered similar material. Take care.

    http://forums.parallax.com/showthread.php?p=539099


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-04-28 02:45
    Chris--

    Yes, I have read that thread. But, thank you for looking it up for me.

    I ordered a rotary table today and will see if the handle mount will accept a NEMA-form stepper or if I will have to build an adapter. If all else fails, I will use the table on my drill press or (soon to be here) mill.

    I would like to attach three rotary tables together to build an extremely repeatable arm with a simple gripper. I know an arm with that many degrees of freedom can be constructed far, far cheaper. But, I want the repeatability because I am very interested--and have had some success in writing--genetic programs that do a pretty good job of learning.

    What I want to do is simply move a marble or a block from one specified area to another specified area . . . but I want the computer to COMPLETELY figure out how to do it. A Stamp or Stamps will be involved in direct arm control while a PC will generate millions of Stamp programs which I will figure out how to batch through the Stamp IDE and download to the Stamp controlled arm.

    Millions of programs, or maybe only a few hundred thousand depending on how intelligently I can write the genetic algorithms, demand something close to industrial strength repeatability. Thus, the mill rotary tables.

    Thanks!

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • metron9metron9 Posts: 1,100
    edited 2007-04-29 01:18
    I don't understand the need for rotary tables would not just the stepper motors with gear reductions work?
    Could you describe the detail of the arm you are building?
    What language are you writing the code with to generate the genetic program?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-04-29 14:18
    transdot.gif
    metron9--

    My purpose, I suppose, is multi-fold. I would like to have a rotoray table for my drill press and my mill . . . which should be here "real soon now."

    Additionally, I remain fascinated by genetic algorithms. It strikes me that the Stamp instruction set is so simple, that the Stamp instruction set will fit easily within my existing GM framework. This "framework", which I will probably rewrite from scratch, using only its original concept, can literally generate hundreds and hundreds of thousands of·simple Stamp programs in an hour or far less, depending on the final complexity I desire.

    I have written GM programs using all the ackwardness of VB, that in turn write programs that actually learn on their own by evolving over time. Of course, this evolution means that MILLIONS and MILLIONS of mutations have to be killed off, but, hey! Man! they are just mutated computer programs! [noparse]:)[/noparse]

    When the "evolutionary criteria" are specified correctly, you (or at least I am) stunned to watch how fast a good computer can close in on the answer to a pre-determined problem. Now, all of my GM programming has been limited to solving everything from linear (in the beginning) to higher-order equations; concluding in re-creating the quadratic formula. The neat thing is that none of them approach the problem in the same manner you or I would. However, I did work on the quadratic formula GM-thingy long enough for it to evolve from nothing to working very well after killing off only a few million mutants and programs that produced results that were outside the range of acceptable results (think biological behavior; only the fittest survive to breed).

    Now, the arm. I want extreme repeatability in an arm. Repeatability found only in the machinist's world. Rotary tables are a great answer. I would like to attempt to build an arm that is driven by GM programs generated on a PC and downloaded to a Stamp for execution on the rotary table-based arm (and gripper). Simple vision may be involved. I mean REALLY simple vision.

    Additionally, using rotary tables gets me out of the realm of building precision equipment, which is not my forte. To answer your specific question about the arm, just think of three rotary tables, each attached at 90 degrees to the other. This will give me the freedom of movement of a human shoulder. I don't yet have a clue about the gripper, but there will be nothing sophisticated about it. There will be no elbow because the shoulder will be positioned above the workspace, eliminating the need for an elbow.

    This is not something that will be good for ANYTHING other than to give me more experience in genetic programming and computer control of actual mechanisms.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • metron9metron9 Posts: 1,100
    edited 2007-04-29 14:59
    Cool, Is it possible for you to post one of those VB programs so we can see what you see if the run on a PC? Not sure what the output is, if it's on screen graphics or just a data listing. I sayJUST a data listing but of course to the reader that understands the data it can be very exciting.

    I have played with some cell structure type programs of survival of the fittest but only the linear type program.I just don't think I can think of programming in terms of Genetic algorithms. Is this the same concepts as AI programming or could you recommend any introductory books on the subject? Perhaps you have a few of the simpler ones gathering dust on a shelf somewhere?

    Sounds like a very interesting project.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • Ken GraceyKen Gracey Posts: 7,400
    edited 2007-04-29 15:23
    Hey Bill,

    Of course you can do this. I assume you probably got a 4-6" Vertex-style rotary table. Many people mount steppers to these, especially the guys on the YahooGroups Home Shop Machinist discussion boards. More likely than not you will need to machine an adapter between the stepper and gear on the rotary table, along with a bracket. If you provided such a drawing for the bracket I could be talked into making it for you.

    For stepper drivers, check out the Gecko drives. I'm sure you already know about these. Their stuff is the best, and really low-cost too!

    Indeed, it would be a darned accurate base for an arm. Keep in mind there will be some backlash. This backlash is usually measureable and repeatable so you can manage it through the stepper controls.

    On thing of interest that came up in my mind is that you're choosing a rotary table for precision. And you need precision because you don't have feedback - you have an open-loop stepper control system. That's fine, but I'm wondering if it would be possible to use an alternative to a rotary table, with feedback. I don't know that that alternative is, but I'm sure there is one. At least on the rotary table you know it'll work with precision and has plenty of rigidity.

    Ken Gracey
    Parallax, Inc.
  • curious1curious1 Posts: 104
    edited 2007-04-29 19:49
    Hello Bill,
    A little on the pricey side but you may want to concider these motors. A project as cool as what you describe may justify them. They are 24vDC and have the controller and encoder built in. Closed loop. Resolution can be set from 200 ppr to 50,000 ppr. Acceleration / deceleration, speed and position all controllable by 16 onboard program banks or by external TTL pulse and dir. signals from PLC, PC or Stamp. Ramp up and down to speed and S curve accel. profiles would be handy or necessary with the inertial loads you will most likely have.
    I have one set-up as a rotary indexer with a PLC. There are 2- 3:1 reductions through the belts and pulleys making the final resolution 450,000 pulses per revolution. Not that I need that, but it's there.
    Check them out . CoolMuscle.com
    Good luck,
    RC

    Post Edited (curious1) : 4/29/2007 7:57:48 PM GMT
    800 x 600 - 104K
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-04-30 13:41
    metron9--

    I think I still have all of those VB programs on my laptop at home. However, they are really not too sophisticated and anyone could write one given a basic understanding of the rules of natural selection·while treating mathematical and·logical operators, as well as constants and variables as "genes". The way the VB programs (mine, at least) worked was to produce syntactically correct VB statements. If they were not syntactically correct, then they "died" on the first round.

    Syntactically correct statements were then randomly (man! I use that word with all the caution that exists!) stacked together to form a "DNA" structure (just·a VB program) which, when executed, produced output.

    I would usually produce about a hundred thousand programs anywhere from 10 to 200 lines long (again, the length of the program was randomly chosen). Next each one of these programs was executed and the results from each one stored in a big table.

    The next step involved testing the results to see if ANY of them produced something that was closer to the final goal than NOTHING. (There are many statistical ways to test the results, you can even make some up, but an elementary statistics book is a great help!) Well, if you create a hundred thousand programs, at least A FEW of them will be better than the rest. So, keep those few, usually about a hundred or maybe 150, "kill off" the unfit programs, randomly mutate the few that are left in TWO ways. The first is easy, simply introduce a randomly selected operator, constant, or variable and insert it into the gene (VB statement), but this time make sure your modification is at least VB-viable. The second modification was a little trickier. You have to "mate" successful genes. In other words, you might randomly select a portion of an already successful gene (VB-statement) and insert it or tack it on to another already successful gene. Again, you make sure the resultant mating is syntactically correct. (Else the DNA strand will die real quick!)

    Run all the programs again, kill the losers, mutate the survivors, and do it all again. And again. And again. Soon you will see millions, if not billions of computer years flash before your very eyes. (I think my longest run was only about three hours.) Of course, all of this repetition is automated via VB, as well, so it is not like you are pounding away at the keyboard. It is more like you are Nature using her greatest tool: Natural Selection to ensure The Survival of the Fittest.

    Well, it works, very quickly the fitter began to get even fitter. Finally, you wind up with a winner or, more likely, several winners.

    This is a VERY CUMBERSOME thing to do in VB, however. What you must do is create all the VB structures necessary for the VB interpreter to execucte. I just made templates out of them and used them over and over again. Each time a program is created, you place·its auto-generated program name in a list for VB to eventually execute in turn. (My favorite names were like 1.vb, 2.vb, etc.) In other words, generate, say, 100,000 syntactically correct VB programs placing each one's auto-generated name in a list. After you have finished generating programs, you have a list of names which you can then batch through the VB environment automatically.

    Essentially, repeat the above until you have created another few hundred thousand DNA strands (VB programs).

    I chose VB because at the time I was a REALLY HOT VB code cutter. The real way to do this would be in C or assembler. I believe I have three books on the subject written by the father of genetic algorithms . . . I was going to insert his name here but I had to look it up on the Internet and instead of 20 hits on genetic algorithms, I got a JILLION!!! Forget everything I wrote above and just ask Google for a good book. I guess it has become a fairly popular topic in the·four years since I last cut any GA code. Maybe that is because it WORKS.

    At least, Nature seems to like the underlying principles.

    --Bill
    ps It is nice to have a lot of disk space if you do this in VB.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-04-30 14:02
    Ken--

    I bought this little heapie-cheapie from Griz to play with . . . if it doesn't work out, I will use it somewhere. I think I can build the mount, but if I can't I will sure call on you! Wouldn't it be neat if those handle mounting screws were 2.74" (or is it 2.71"?) apart like a NEMA-34? I will use an off-axis coupler to couple the stepper to the table. Since I have several laying around, they will doubtless not fit!

    I PLAN to handle the backlash by backing up a revolution and reapproaching the desired point.

    Ken, precision is a good thing. The rotary tables will PROBABLY give me the open-loop precision I need. The real reason I chose rotary tables (remember, there will be three of them bolted together via their t slots, each at 90 degrees to the previous) is for reliability over thousands of very low stress operations with "pretty good" or "pretty darned good" precision.

    I have thought about closing the loop if I cannot achieve "pretty good" precision. Like you, I don't know and like you, I will have to think of something. Measuring actual table position is probably the only way to go. But, I am hoping to avoid that complexity.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-04-30 14:04
    curious1--

    Thanks for the link! I will check them out!

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • metron9metron9 Posts: 1,100
    edited 2007-04-30 14:32
    I am no math whiz but isn't thre a finite number of movements an arm could make given it has three rotating joints each with a finite number of positions? Would not a simple heuristic approach similar to a chess algorithm be suitable for the above stated goal. Isn't the genetic coding algorithm simply a random sequence that tests all possible combinations of movements?

    I once was given one of those little games that looks like a triangle with holes in it, golf T's are put in all but one hole. The object is to remove all golf T's by jumping over I think it was 2 T's at a time. I did not realize the answer to the puzzle was written on the sticker on the bottom of the puzzle so I wrote a program to solve the puzzle. My first try was to have the computer try every move at random, after calculating that would take at that time my 286 MHZ computer many months I rewrote the program to keep track of the path it took, backing up a move and testing all possibilities from that point. It took a few minutes for the program to run but solved the puzzle. I think that logic is similar to the killing off of the paths that did not work. Anyway it was a cool program and I wish i would have saved it. As it ran it showed a graphic on the screen of the moves it made to solve the puzzle.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-04-30 15:42
    metron9--
    Ha! That was a cool program! And, I would have never found the answer on the bottom either. [noparse]:([/noparse] You wrote a program that used something I am going to call "directed learning" to achieve a specific goal. The whole purpose of genetic programming using genetic algorithms is to have the computer figure everything out from scratch . . . and I do mean scratch: You tell it noting, zip, nugatory, nada.
    In fact, In the Beginning (!), the GA program will produce "genes" like "a = 3" and "72 = p". (I always thought I would have a good run when I saw an initial gene like "a + b = 9"!) Note that the first and third genes would probably pass my evolutionary test and survive until at least the next generation, while the second gene would DIE A HORRIBLE DEATH, because it was syntactically incorrect from VB's point of view.
    Now, there is a similarity between your program and the GP stuff I wrote in that the desired outcome is set in advance. If I had stayed the course and gone to C or assembler, I would have eliminated the specific goal, as well. I am not conversant with the latest research, but I am fairly confident that goal has been achieved.
    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • bennettdanbennettdan Posts: 614
    edited 2007-04-30 17:26
    Bill Chennault,
    ·· I have used the Gecko drives on my mill like Ken said they are very nice and easy to interface to a stamp or directly to a PC. I have a very simular rotary table at work and all you would need to do is make a four spacers and bolt a plate with long bolts to the existing four bolts on the handle then use a spiral coupling and attach it to your stepper.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-04-30 17:55
    bennettdan--

    It looked easy, but what you posted sounds REALLY easy!

    Thanks.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-04-30 18:32
    curious1--

    Any time you have to make an application to get a price, then you know it is not hobbyist-priced. Or, even close. But, you are right, they do look cool!

    Got any idea what they cost? Hundreds? Thousands?

    Thanks.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-04-30 18:46
    Ken--

    I bookmarked the Gecko site.

    Thanks.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-05-02 00:49
    Ken (and All)--

    Here is a picture of that little rotary table I bought from Grizzly. As you can see, I have removed the handle.

    It seems it would be a rather simple matter to build a mount--perhaps using longer screws--that would bolt right onto this table and then all one need do is use some kind of misalignment shaft coupler (McMaster Carr) to connect the stepper to the shaft of the rotary table handle.

    What do you think and do you have stepper motor recommendations? Remember it will never move a big load. However, it will hold two more just like it plus a really Mickey Mouse arm that will lift maybe an ounce or two. The table weighs 9.5 pounds, so it would be supporting a total of 19 pounds plus a pound or two at the most for the arm.

    What kind of stepper would you think might do the trick? Like some have said, it would be a neat Stamp controlled project. (I would use a PC to send commands to the Stamp to interpret for the stepper controller.)

    Somehow, I think I screwed up linking this image to my web site. I did not mean to upload it to your site. I wonder if that is what I have done?

    --Bill

    Grizzly%20Rotoray%20Table.jpg



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Ken GraceyKen Gracey Posts: 7,400
    edited 2007-05-02 04:00
    Hey there Bill,

    Okay, I think I know where you need to go with this thing.

    There are two ways. You could couple the shafts like you mentioned using a coupler that fits both the stepper and rotary table shaft. I think this approach is "okay" and it's common to use a direct coupling for putting stepper motors on rotary tables. The stepper motor will extend a bit from the table's shaft, which will require several standoffs and/or further hardware for fixturing the motor to the shaft.

    Another way is to offset the motor from the table's shaft. Using this approach you can get away with a smaller stepper motor, and it could provide a belted connection between the motor and table. One thing that's nice about this method is that you can certainly find small timing belts and slotted "cogs" [noparse][[/noparse]is that the name] which fit both sizes and shapes of shafts. Standard Drive Products is the place to start.

    Not sure where to buy the motors, or what size, but I know how I'd go about choosing them. I'd ask a few questions on the YahooGroups HomeShopMachinist forum.

    Then, report back here with your choice. Find out the shaft size and shape for both the rotary table and motor. We're going to need to know the sizes and shapes.

    Ken Gracey
    Parallax, Inc.
  • kelvin jameskelvin james Posts: 531
    edited 2007-05-02 06:44
    I assume this what you want to be the end result of the rotary tables. If so, it should clear things up a bit.
    350 x 320 - 19K
  • curious1curious1 Posts: 104
    edited 2007-05-02 11:08
    Bill Chennault said...

    curious1--

    Any time you have to make an application to get a price, then you know it is not hobbyist-priced. Or, even close. But, you are right, they do look cool!

    Got any idea what they cost? Hundreds? Thousands?

    Thanks.

    --Bill



    Bill,

    The last ones we bought were NEMA 17's,· $ 435 ea. +/-.

    KELVIN, Please supply a link to the unit in the photo. Thanks
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-05-02 13:59
    Ken--

    I will think about the offset idea and thank you for the link to the Yahoo group.

    When the next significant thing happens, I will report back.

    EDIT: You know, using the "offset" approach, it would be simple to achieve some reduction and gain a little torque.

    --Bill


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.

    Post Edited (Bill Chennault) : 5/2/2007 2:12:01 PM GMT
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-05-02 14:04
    Kelvin--

    Yes, that is what I would like to achieve. I believe you posted the picture of the setup using two rotary tables. The same company has a photo supplied by a customer of exactly what I would like to do using three rotary tables.

    However, I have not been able to find pricing on their stepper-controlled tables, plus I think they are six inch tables. A little large--but doubtless useable--for my purposes.

    I would like to keep the cost of the project in the thousand dollar range, or less. And, I would like to reuse the rotary tables on my drill press and mill. I am not positive I can achieve these goals, though.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2007-05-02 14:07
    curious1--

    Well, they are certainly full-featured! I REALLY like the encoder feedback.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • kelvin jameskelvin james Posts: 531
    edited 2007-05-02 17:17
    Bill

    A possible option for direct motor drive--- i assume the turn shaft to worm is probably a one piece machined unit, so not much can be done to modify it, unless the gear is seperable from the shaft. I was thinking that you could get another same size worm to fit the shaft of the stepper, and make an adapter plate to bolt the motor to the frame using the machined holes. The overall length of the worm and motor shaft has to be considered for the distance to be covered, and alignment has to be precise.
    Also, the second axis will be the load bearing one since it is vertical, as opposed to the first which is horizontal.

    Here is the link to Velmex for Curious

    www.velmex.com/motor_rotary_tables.html#a
Sign In or Register to comment.