Shop OBEX P1 Docs P2 Docs Learn Events
Stepper motor, vs DC gear motor with encoder for rotating platform? — Parallax Forums

Stepper motor, vs DC gear motor with encoder for rotating platform?

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2013-01-13 18:29 in Robotics
Im getting very frustrated with my robot's drive train at the moment almost to the point where I just want to throw it away and wait till I can afford a rover 5 or something... If its not one issue it is another, last night I went to assemble the frame and found out two of my motors ribbon cables were ruined. This isnt a huge issue as I took the back housing off and patched the cables with some wire and heat shrink tubing. The point is im just tired of dealing with these kinds of issues, and im tired of soldering motor control boards. In the beginning this was exciting new territory but after so many prototypes and so many rebuilds/repairs it just getting frustrating. I have a clear plan of execution to fix and get my chassis working, along with the power and motor control system. The thing is I need a break before, working on this a few hours a day is killing the fun.

The reason im building a Robot is because im really interested in working with infra red, lasers, and sonar. I really just want to hook these things up and get to learning. So I figure I will just make a rotating platform for my wiicams and lasers, this way I can start having a bit of fun and learning more about the software side of this stuff, and then mount it to the robot when im ready.

Looking through parts I have at my disposal I have two options for the mechanical part of a rotating platform, either a stepper motor, or a dc motor with a homemade encoder. Now the reason I seek advise is because I dont really know the first thing about working with a stepper other than you need to hit the coil sets in the right order and that there is different ways of micro stepping. I have 5 or 6 stepper ive salvaged from things, most of them are all 12v and a bit big for what I need, they are also 6 wire. I do have one 5v stepper from a floppy, it also has 6 contacts on it, but two look to be linked together so im guessing its a 4 wire stepper. Now I also have plenty of motors and gears I could use to make the platform rotate, if I were to just use a homemade 3 channel encoder I could easily do accurate positioning with them. The first two channels would be standard quadrature style while the 3rd would have one black wedge use as a reference for positioning.

What would you guys recommend I don't have any darlington arrays on hand or anything but I do have plenty of l293d chips around, these could be used to drive a 4 wire stepper right?
«1

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-01-08 12:14
    Look at the StampWorks Manual, Experiment #27. It shows how to drive a stepper motor using an I293d.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-08 12:14
    Oh it would appear this is what im looking to do, with bs2 code and all

    http://www.seattlerobotics.org/encoder/may98/steppers.html

    but it still doesnt really answer which is the better approach, as I see pan/tilts are mostly done with servos and im not sure why.

    Most of my confusion comes in to play differentiating uni polar and bipolar, a floppy 4 contact moor is bipolar correct.
  • photomankcphotomankc Posts: 943
    edited 2013-01-08 14:00
    Steppers are bulky, require some type of referencing procedure to be able to tell them to go to some position and have that represent anything concrete and have no idea if they got to that position or not. They are pretty power hungry and waste a lot of juice just holding position. They require more effort to interface to electrically as well. They get really weak as speed increases. They require good acceleration profiles to get up to speed with a significant load. They generate a lot of heat even when sitting still.

    Those reasons give you some idea why servos are more popular on pan/tilt. For a platform that will rotate some commanded number of degrees a stepper can certainly do fine. With the driver chips you have available you can do at least half-step with a stepper which will help with smoothness and resolution. If it has to always point in a definite direction when you tell it to goto 95 degrees then you need to start with a known reference either a home switch or just run the platform into a hard stop to initialize can work.

    4 wire is bi-polar only, 6 wire can uni-polar or bi-polar depending on how you wire it. Driving uni-polar is easier but bi-polar generally perform better.
    http://www.osmtec.com/unipolar_vs_bipolar.htm
  • Mark_TMark_T Posts: 1,981
    edited 2013-01-08 15:22
    Because of the power dissipation issue I'd say that for part of a moving platform you'd try to
    avoid stepper motors - especially if most of the time that axis is stationary - steppers consume
    most power when stationary (well if not driven in constant current mode). Some benefit
    can be gained by reducing the power to the motor when its parked (torque is also maximum
    at stationary so some loss of holding torque when parked is not usually the limiting factor).

    However a stepper is conceptually easier to sort out - count the right number of steps and
    you're there. Handling an encoder and positional feedback is extra complexity IMO.

    You do require some sort of absolute position reference by the sound of it, so some sort
    of encoder or reference sensor is needed anyway.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-01-08 15:31
    Im getting very frustrated with my robot's drive train at the moment almost to the point where I just want to throw it away and wait till I can afford a rover 5 or something... If its not one issue it is another

    Patience, Grasshopper.

    I have been working on my design for 5 years. Every time I am "almost there", something comes up!!! I had intended to have a full rolling chasis by years end and was actually on schedule to and then shattered my left wrist and elbow. I still have a cast on and it has been 12 weeks!!!!
  • lardomlardom Posts: 1,659
    edited 2013-01-10 20:48
    When I started I thought I was in over my head but the desire to complete my project was stronger than my self doubt. You keep at it because you want it.
    I think the stepper is the easiest to control. I have to take a break from the challenges but I can't stay away for long. Do not give up.
  • idbruceidbruce Posts: 6,197
    edited 2013-01-11 06:54
    rwgast_logicdesign

    Even though I have not yet built a robot, believe me, I understand your frustation. Building any type of machinery from scratch is not an easy task. Unless you have been thoroughly trained as a machinist, a mechanical engineer, and an electrical engineer, you are bound to have successes as well as failures. It comes with the territory of gaining all this knowledge. While building my spring bending CNC, I had numerous, numerous failures, almost to the point that I also wanted to give up. There were some items that I had to design and build, only to redesign and rebuild them several more times. With die hard determination, I finally achieved a machine that I was proud of, but without a doubt, it was a long hard road. And since finishing that machine and the following others, I now have a much greater confidence in my abilities, as compared to when I machined my first part. I would suggest that you stick to your guns and conquer this beast, because it will provide confidence upon completion.

    My biggest regret during the whole process was the attempts I made at making my own motor drivers. I spent an enormous amount of time designing and soldering together numerous driver boards, and it zapped a lot of my will power. And the smartest move I made was to abandon these boards and purchase some nice motor drivers from Gecko Drive. I am still working on designing my own stepper drivers, but it is no longer out of necessity to get my machines running. And eventually I will create my own drivers, but it is no longer my highest priority, which leaves plenty of time for designing and machining.

    As for your main question, well I cannot say that I have really experimented with anything but stepper motors, but I am a big fan of stepper motors, because precise movement can be obtained with a series of electrical pulses. As with any drive system, there are several things to consider, the complexity of driving the motors, the moment of inertia, accuracy required, etc....

    Stepper motors provide more torque when driven slowly, and even at a snails pace, a stepper motor may not provide enough torque to overcome a platform of a given weight and diameter. Of course you can always use gearing or pulleys to obtain more torque, but this adds to the complexity of the design and machining.

    If your platform is not too heavy or too large in diameter, a simple stepper motor could do the trick, but if it doesn't, you could also consider a stepper driven planetary gearhead, however they are expensive. And then there is also the option of driving a large diameter platform from the outter circumference, which in turn provides the same affect as reduction gearing or pulley system. Much of your decision will be based upon weight, accuracy, diameter, and electronics available.

    To give you an example of platform driving, I have attached a photo of an approximate 15 lb. object, being approximately 18" in diameter, being driven by a single NEMA 23 stepper motor. This is the wire spool assembly for my spring bender. A 350 Chevy flywheel is mounted to the spool and the matching Chevy starter gear has been machined to fit the NEMA 23 motor. If this same motor were placed in the center of the spool, it would not have a prayer of turning the spool, however, if a stepper driven planetary gearhead were placed in the center, it probably would work just fine. Consider your application carefully, devise a plan, and then implement your plan. Even if the plan don't work out as anticipated, you may end up with parts that you can use in future projects.

    Above all, don't give up, and consider purchasing your drivers.

    Bruce
    311 x 377 - 20K
  • idbruceidbruce Posts: 6,197
    edited 2013-01-11 07:05
    rwgast_logicdesign

    And to further illustrate the driver dilemna, here is what the drivers looked like before I finally abandoned them. Just look at all the work involved in these babies. I say good riddance to bad rubbish :)
    1024 x 768 - 161K
  • TtailspinTtailspin Posts: 1,326
    edited 2013-01-11 08:12
    idbruce wrote: »
    Even though I have not yet built a robot,...
    Bruce
    Hey, Wait a minute, Can't your wire bender do a Figure-8??
  • ercoerco Posts: 20,256
    edited 2013-01-11 08:14
    @rwgast: Nobody hits a home run their first time at bat, so you just stay in there and keep swinging until you connect. A lot of games are won with a steady supply of singles & doubles. :)
  • idbruceidbruce Posts: 6,197
    edited 2013-01-11 08:46
    Hey, Wait a minute, Can't your wire bender do a Figure-8??

    I could probably come very close, but the machine wasn't really designed for that type of wire forming, due to the wire cutting mechanism. However by altering the cutting mechanism, I suppose I could make it do some more complex forming.

    I can bend little fishies though :)

    EDIT: Many wire benders combine the cutting head with the bending head, mine does not, which makes it difficult to form complex and completely enclosed wire forms.
    83 x 75 - 2K
  • ercoerco Posts: 20,256
    edited 2013-01-11 09:15
    Ttailspin wrote: »
    Hey, Wait a minute, Can't your wire bender do a Figure-8??

    Nice one, Tommy! :)
  • photomankcphotomankc Posts: 943
    edited 2013-01-11 10:12
    To expand a bit on Bruce's very good post:

    If you gear down steppers then you have to keep in mind that important phase he mentioned:

    "Stepper motors provide more torque when driven slowly"

    For instance I took the torque curves and looked at my little NEMA17 motors. I knew I did not want tiny little wheels and I knew I was targeting about 1fps of bot movement as the basic speed to move at. When I did the math a 4:1 reduction was the best I could get and I would want to go no larger than 4" wheels before I started moving into the heavy torque loss zone. To go for larger wheels and heavier reduction became a losing proposition. Past 5 RPS (300 RPM) that torque loss usually falls off a cliff.

    There are great little stepper drivers out there to handle motors of up to maybe 2A of current that are small and simple to interface to. BigEasy driver is one I use. Another nice side benefit to the gearing down on my bot is that it will not free-roll when the steppers are powered down even on a pretty substantial incline. The detent torque of the motor and the multiplication of that by the gearing makes it more likely to slip from traction loss than roll. As a result I can power the motors down when idle and save a boatload of juice in doing that.

    Get good motors even if they are more expensive. I have NEMA 17's that couldn't propel a fart with a fan much less move any weight. The nice ones on my bot were not super cheap but they had shafts that were difficult to stop with finger pressure and thier ratings have matched very well with observed results.
  • ercoerco Posts: 20,256
    edited 2013-01-11 10:22
    re: "Stepper motors provide more torque when driven slowly"

    Although it's pretty typical to use significantly higher than rated voltage to regain torque at higher speed. from http://en.wikipedia.org/wiki/Stepper_motor

    Stepper motors nameplates typically give only the winding current and occasionally the voltage and winding resistance. The rated voltage will produce the rated winding current at DC: but this is mostly a meaningless rating, as all modern drivers are current limiting and the drive voltages greatly exceed the motor rated voltage.
  • photomankcphotomankc Posts: 943
    edited 2013-01-11 11:01
    erco wrote: »
    re: "Stepper motors provide more torque when driven slowly"

    Although it's pretty typical to use significantly higher than rated voltage to regain torque at higher speed. from http://en.wikipedia.org/wiki/Stepper_motor

    Stepper motors nameplates typically give only the winding current and occasionally the voltage and winding resistance. The rated voltage will produce the rated winding current at DC: but this is mostly a meaningless rating, as all modern drivers are current limiting and the drive voltages greatly exceed the motor rated voltage.

    Right, as the RPM increases then the time available to get current through the coils is going down and eventually you get the situation where the coil never got fully saturated before it's time to change to the next step. More voltage keeps you closer to the real ability of the motor as speed increases.
  • idbruceidbruce Posts: 6,197
    edited 2013-01-11 12:11
    Although it's pretty typical to use significantly higher than rated voltage to regain torque at higher speed. from http://en.wikipedia.org/wiki/Stepper_motor

    Even if you increase the voltage, you still get better torque at lower speeds.
  • ercoerco Posts: 20,256
    edited 2013-01-11 12:21
    idbruce wrote: »
    Even if you increase the voltage, you still get better torque at lower speeds.

    Until you burn up the over-volted motor from excessive coil current at low speeds. Then you got no torque at all. Just a space heater. :)

    Sure, DC brushed motors share that characteristic. Max torque=stall torque=0 rpm.
  • idbruceidbruce Posts: 6,197
    edited 2013-01-11 13:45
    Until you burn up the over-volted motor from excessive coil current at low speeds.

    Are you saying this is the case with a chopper drive having current limiting control?
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-11 14:01
    Hey guys thanks for all the encouragement here.

    Let me first start by saying this has been very informative as to why steppers arent used alot more in robotics applications, I went out of my way to design the most efficient power system I with in my skill level. Im worried about the IR stuff hogging to many mA, so I definitely wont be using steppers on the bot after reading all this. Although Looking at all my junk stepper motors and steel rods I think it they would be perfect for a stationary arm.

    My frustration primary comes from a shoe string budget more than failed design attempts. The current design for my bot is VERY simple, it looks really nice in my opinion like a store bought product, but its still really simple. Im frustrated because Ive I went through way to many surplus motors than I should have, these motors had frayed wires and that is why I could afford them. At first I thought it was no biggie but eventualy the wires started breaking. I tried alot of solution to keep the wires from shorting and breaking, but nothing worked, until recently and it was to late. Now the motors arent on sale and I only have one that works, one thats iffy, and one that may be reparable. Im hoping I can score 4 more but if that doesnt happen Im just going to go back to a two motor design. As lardom said, you dont give up because you want something and that is very true of this project, I cant really seem to walk away from it even just for a break.

    I just feel like what im going to end up with in the end is no where near what I should have for the amount of time and effort.. Im sure any one else would have built the same bot chassis with in an hour or two given the same parts.
  • ercoerco Posts: 20,256
    edited 2013-01-11 14:52
    idbruce wrote: »
    Are you saying this is the case with a chopper drive having current limiting control?

    Nevah sed 'nuttin 'bout dat!
  • lardomlardom Posts: 1,659
    edited 2013-01-11 15:50
    @rwgast_logicdesign, I used what I could find to test my ideas. In the front view I used wire to hold the motors in place. I have no idea what the robot chassis will look like when I'm done. The plastic basket will keep everything in one place until I decide what to do! I try to focus on one problem at a time.
    1024 x 768 - 94K
    1024 x 768 - 94K
  • TtailspinTtailspin Posts: 1,326
    edited 2013-01-11 16:17
    Lardom, You win!..:thumb::thumb:
    That right there is the absolute best of the best of KISS..
    Maybe instead of wire to hold parts, Invest in a small sack of "Zip-Ties" , they are very strong, and come in many colors...
    Now lets see that laundry tub do a figure 8...:)


    -Tommy

    rwgast_.., Dont fret, just remember to have fun with it...

    The goal of this work is to develop high performance ambulating robots using minimal actuation and passive stabilization mechanisms,
    combined with high level control... (or you could just make a rolling laundry basket... Your choice...) :lol:
  • lardomlardom Posts: 1,659
    edited 2013-01-11 18:14
    @Ttailspin, I'm working on it! :smile: Getting the code to work the way I want it to is my first goal. My direction changes because I'm constantly getting new ideas. I'll get to the point where I'll try to make it look good. I have two completed projects where I've ordered custom made parts from several factories.
    This forum gave me a lot of support when I needed it. I remember clearly that after I had successfully completed my first project a couple of people confided "I thought you were crazy". I can say with confidence "Don't give up".
  • ercoerco Posts: 20,256
    edited 2013-01-11 18:19
    Larry: Great build. Bonus points if that bare Prop DIP came from a Mystery Bag!
  • lardomlardom Posts: 1,659
    edited 2013-01-11 18:52
    erco, I 'spect you noticed the plywood?
  • photomankcphotomankc Posts: 943
    edited 2013-01-11 21:49
    Definitely keep plugging away at it and you are right to do as you have and move on to something that makes it fun again. I put the whole thing down now and then and go do something totally unrelated now and then. Then when I come back to it, i'm returning because I want to not because I feel like it's now my second job.

    Im 37 years old and I just made something that's mobile this year. I have been wanting to do that since I was in high school and I have had a LOT of false starts along the way. Play with your sensors, write some code, and come back to the drive system when you have more gas in the tank for it. I've bought Motorolla HC11 micros that never went anywhere. I've purchased old computers that never did much but clutter up the house. I have DC motors that turned out to be all but useless. I have stepper motors that are absolute junk. I have Basic Stamps, ChipKit Uno's, Arduinos, Raspberry's, Propellers, and mangled RC wheels all represented an idea that popped in my head and lots did not pan out. Everyone started out and has felt much like you were talking about at one time or another.
  • ercoerco Posts: 20,256
    edited 2013-01-11 22:13
    lardom wrote: »
    erco, I 'spect you noticed the plywood?

    Natch! +10 points

    I'll start working on my new plywood bot this weekend. Retrobot II lives!
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-12 09:36
    Thank you guys for all the encouragement, I think I have a new plan for now. I looked in to just buying a rover 5 and calling it a day, but since I dont have a lot of money i decided against that. Mostly because it's a bit slow and loud, and has some problems keeping the tracks on. It looks like a nice set up but I really think I will regret buying it, if I were to buy some sort of kit id really like a sting ray, its the exact size/speed and look i want out of a robot. Im thinking for now I may just tuck my drive train away and strip my roomba down bare, using that as a chassis. It seems like it would be a perfect fit to get started and then transfer every thing to a stingray later on.

    Id like to just go off and play with sensors putting the drive train down for a while, but im really looking forward to doing is the navigation code and dead reckoning stuff. Cant really do that without motors and encoders :/. The one reason im hesitant to use the roomba is ive heard the encoders slip ahead due to the belt drive on the wheels so im not sure how bad this will effect things, the other thing is I cant figure out how to get the skid out of the thing to replace with an omni wheel or caster or something.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-01-12 12:06
    In any case, You may want to pull the roomba from the classifieds. Most everything I do myself is usually trial and error.I know that is kind of hard to bite on a limitd budget, but if you ruin something on the roomba another will come along some time. I think you are taking things too seriously and getting frustrated in the end. Patience is the virtue of life and it is a MUST with this hobby. Keep it fun, slow down and take breathers when needed. This helps to figure things out and keeps the blood pressure and stress level down.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-12 13:23
    and strip my roomba down bare, using that as a chassis. It seems like it would be a perfect fit to get started and then transfer every thing to a stingray later on.

    rwgast, Before you strip your Roomba down, try controlling it through its serial port.

    As I mentioned in the PM, the Roomba can be controlled through a serial interface. IMO, it's a quick qay to get control over a robot. I don't think I make use of any sensors in my example, but you can request sensor information from the Roomba as well as give it commands.

    You can mount additional sensors to the Roomba had have the Prop make decisions based on the combined sensor data.

    I personally think this is a really quick way to get a robot up and running.
Sign In or Register to comment.