Shop OBEX P1 Docs P2 Docs Learn Events
How can I synchronize two gearmotors? — Parallax Forums

How can I synchronize two gearmotors?

chronisterchronister Posts: 17
edited 2006-01-06 18:36 in BASIC Stamp
Hello. I have a robotics project where I'd like to synchronize two gearmotors. Each motor turns a crank, which drives some equipment. I need the cranks to move in sync with each other. However I'd like to be able to adjust the timing (on the fly, using the stamp) so that one crank can lead the other slightly, or lag behind slightly. It wouldn't work to simply reduce power to one motor because then it would keep getting farther behind.

(Perhaps both cranks could be driven by ONE motor, but I haven't come up with a mechanism that would allow the timing of the two cranks to be shifted relative to each other.)

Do you have any ideas on how to tackle this problem? I appreciate your help.

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2005-12-28 18:08
    Check out the Pololu Dual Serial Motor Controller products... It is a "set and forget" type approach... The Stamp would send a command to the Dual Serial Motor Controller which would drive a motor until a new command is given.
  • chronisterchronister Posts: 17
    edited 2005-12-29 18:41
    Thank you for your suggestion. I just went to their web site and found that while this device offers dual motor control it does not offer any way to synchronize the rotation of two motors. They would get the same amount of PWM on-time, but the motors would drift out of sync whenever they experienced different loads, slight differences in performance between the two motors, etc. I think what I need is some kind of FEEDBACK mechanism in which the stamp would measure the timing difference between the two cranks and adjust the motor throttle level in order to maintain the desired timing shift between the two cranks.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2005-12-29 18:46
    ( what you're describing is the mechanical analogue of phase-locked loop )
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-12-29 19:02
    chronister -

    Encoders on each of the motor shafts will give you the RPM. If it strays, you can then apply more current (or use some other means) to get the "loaded" motor back to the same RPM. HOWEVER, that does NOTHING for the mechanical synchronicity. You would need an additional, common HOME position which could be sensed to perform that minor miracle.

    If you choose to go that route, here is what's often done. Keep slowing the faster motor down until they hit HOME at the same (or almost the same) time. Then bring BOTH motors back up to speed together. Continue speeding them up until they are at the desired RPM.

    If you do it the other way around, you MAY never get them in synch. The reason is that there is a finite OFF which is common to both motors. Top speed (whatever that may be) may not be common to both motors. In other words, you end up chasing your own tail smile.gif

    Second alternative to this is a PID tachometer/governor system on each motor, with a cross-coupled syncronicity circuit which does the motor pacing. More parts and more sophistication with something like this, and I'd only recommend it if VERY CLOSE crank synchronization is required.

    Third alternative is one motor and dual shafts, so they can never get out of synchronicity. Much more in the way of gearing involved in something like this, but little to no programmming or sophisticated motor control.

    Regards,

    Bruce Bates
  • John R.John R. Posts: 1,376
    edited 2005-12-29 19:14
    The easiest way is probably to use some type of encoder.· One example is the Parallax add on for the BOE-BOT http://http://www.parallax.com/detail.asp?product_id=28107

    Depending on your wheel setup, this may, or may not work for you.

    There are other ways to do an encoder, both commercially, and home grown.· Basically, you count pulses from someting, either an optical sensor, hall effect sensor, or other mechansim.

    I don't remember where, but I have seen DIY encoders based on disks with dark pie slice wedges and IR and/or optical sensors.· I don't rember if that was on the Parallax site or another location.· If you need more information, let me know, and I can check from home (I think I saved a shortcut).



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • chronisterchronister Posts: 17
    edited 2005-12-30 21:40
    So in general, is it probably better to see WHEN each motor reaches a predetermined home position, rather than trying to see WHERE both motors are, each time the program loops?
  • John R.John R. Posts: 1,376
    edited 2005-12-30 22:20
    Depending on how fine you need to keep things in sync, yes, this might work better. You could even put the sensor in the device(s) you are actuating.

    You could probably also do this without external sensors (or minimizing the reliance on them, and keeping finer control of motion) by replacing the motors with steppers. Depending on how your gear motors are set up, this may, or may not be feasable.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • chronisterchronister Posts: 17
    edited 2005-12-31 13:53
    Hi John,

    I would love to use steppers. I even considered that option since it would be a much more logical way of solving this problem. Unfortunately I need a very high power to weight ratio and that rules out stepper motors as far as I know.
  • Kaos KiddKaos Kidd Posts: 614
    edited 2005-12-31 15:41
    Just my .02 cents worth...
    if timing and resoultion are crit, then...
    A small disk containing 4 or more magnets in proper quad alignment and a sensor ring mounted with hall effect monitor, one for eacn motor.
    WIth this you can match the speeds sooner (4 or more changes to get a 'sync' between both motors) per each rev.
    Like stated above, slow down the motor that's in the lead.
    Gear lash (the slack beween the two moters that you want to adjust the lead/lag when in sync) is the measurement between "sync" pulses.
    I got to deal with this with 3 phase motors. our disk ring had 12 magnets on it, and each sensor ring had 2 hall effect sensors on it. Each of the 22 motors had the hall effect sensors mounted in different positions on it's sensor ring. THis was to provide for identification of which unit it was reading...
    The end effect, each motor was adjustable so the gear lash was +- 5 ms within the transmission it was connected to.
    In other words, the gear that connected the motor to the unit could be adjusted so that it eather "pushed" the connecting gear, "floated" (meaning their was space between the messing of the gears), or "pulled" the connecting gear.

    Ok, maybe that was more then .02 cents worth, maybe more like .25, but still... it did work!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Until our bytes cross again, may your chips never smoke, your bits never fall off, your parts bin never be empty and your jumpers never fall off.
    KK
    ·
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-12-31 15:47
    chronister -

    What kind of motor weight and torque would you feel would be acceptable for this application? I've seen plenty of small, geared stepper motors that had quite a good deal of torque. Much depends on how you are driving the stepper motor as well. High torque driving methods are available.

    Regards,

    Bruce Bates
  • metron9metron9 Posts: 1,100
    edited 2006-01-01 06:49
    Hmmm, I don't have any experiance with this but I do have a thought.


    As stated above, I like the idea of the magnets and hall effect but here is where I diverge.

    What if you use one motors pulse to drive the frequency of the other motor.
    Read both motors pulses and adjust for load adjusting the duty cycle for the slave motor.
    If you limit the master motor to a duty cycle of 90% then you should have enough slack to speed up the slave to match the master instead of having to slow the faster one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think outside the BOX!
  • chronisterchronister Posts: 17
    edited 2006-01-02 18:57
    KaosKidd, sounds like what you did is relevant to my problem and that you have a lot of knowledge in this area. I appreciate your help. I haven't worked with hall effect sensors. I only have a basic notion of what they are, so I don't know how to get from your suggestions above to actual implementation. Is there anything I could read online that would help me with this?

    Bruce, the motors weigh about 1.75 ounces each, without gearing, and they put out 50 watts each. This is not a "high torque" application where I can take a low power motor and gear it down to produce a lot of torque. It is a "high power" application, in which the output must have a lot of torque, and must also be very fast.

    Metron9, when you talk about reading the motor's pulse do you mean the output of the hall effect sensor? So you're basically saying check the hall effect sensors to see how far apart the two motors are, adjust the duty cycle of the slave motor (up or down) and then repeat. Do I understand you correctly?
  • John R.John R. Posts: 1,376
    edited 2006-01-02 23:08
    I guess my thought was to use the gear box portion of the gearmotors you have, but replace the actual motor with a stepper.· I don't know what configuration you have, or how b?\it your gear motor is, so this may not be practicable.
    Maybe an idea?
    chronister said...
    Hi John,

    I would love to use steppers. I even considered that option since it would be a much more logical way of solving this problem. Unfortunately I need a very high power to weight ratio and that rules out stepper motors as far as I know.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-01-03 02:37
    chronister
    Imagin a plate with a whole dead center.
    Around the edge of the plate are magnets, arranged (for example) like an analog clock (12,3,6 and 9) positions.
    This Plate is mounted on the output shaft of one motor. Next, a second plate, 100% identicle to the first plate
    (it doesnt sound like you need to identify which moter you are working with, so we'll skip all that complexity).
    A hall effect sensor is mounted close to the magnet, but not so as to touch.
    Now, when you mount the sensor, make sure its at a good reference.
    (Here I am using the analog clock, and I would mount a single hall effect sensor at the 12 oclock position on each motor)
    Now, depending on the sensor, it may need to amplified, or it's pulse can be read directly by the stamp.
    One last suggestion, I would put a sensor ring and sensor on the common linkage between the two motors, this
    would enable the "center" point for monitoring and changing the drive motors...
    A LCD showing the time in +- ms (us??) between the sensors on the common linkage for each motor.
    At this point, what I was doing was with a true PC, not a stamp. The PC contained the needed hardware and logic to advance or retard each motor. That (the actual digital control of the motors) and the software is all that remains.
    Just keep in mind that you are working in very small numbers, and the amount of variance between the max and min is very small. If permitted to grow to large, the "retarded" motor will cause the "advanced" motor to work much harder then it should, thus increasing it's heat/power etc. (I fried a $12K electric motor because of this effect...)
    I'm sure the stamp gods here can help with the code, and how to control the motors...
    The hall effect sensors simply provide a pulse everytime a magnet passes near it. All the stamp is going to do is read in that string of pulses. To this effect, there are commands for reading this stuff directly into a stamp. I'm just learning the Stamp now, so I'll be the first to admit that there are many more ppl who know much more then I in this area.
    KK
    Oh, and thanks for the compliment!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Until our bytes cross again, may your chips never smoke, your bits never fall off, your parts bin never be empty and your jumpers never fall off.
    KK
    ·
  • chronisterchronister Posts: 17
    edited 2006-01-03 13:36
    KK, I didn't understand this part of your last post:

    "One last suggestion, I would put a sensor ring and sensor on the common linkage between the two motors, this
    would enable the "center" point for monitoring and changing the drive motors...
    A LCD showing the time in +- ms (us??) between the sensors on the common linkage for each motor."

    Is "sensor ring" the same thing as the hall effect sensor? What is the "common linkage" - is that some kind of mechanical linkage between the two geartrains? (Currently there is no plan for a mechanical connection between motors but it could be done if necessary in order to achieve synchronization.)
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-01-03 15:08
    The sensor ring is the "plate with magnets" on the output shaft... and the hall effect sensor is mounted close to the magnets so as the shaft turns, it turns the ring, causing the magnets to pass close to the hall effect sensor...

    To answer your question about 'common linkage':
    The application this was used in, all the motors were 'linked' together with big gears and a long (and heavy!) drive shaft. The drive shaft was the "center" of the system. All the motors were "tuned" to the drive shaft. Somehow I was thinking your application was simular. Anyway, what the "common" sensor ring and sensor provid is a "center" point for all measurments, otherwise, you will have to spend a lot of time taking very percise measurments to calabrate what it takes to "tune" your system. With the "center" sensor, each motor's train of pulses from it's sensors are relitive and a direct relationship, (ahead, equal or behind) to the "center" point. The whole idea is to relieve all, if not then most of the "calabration" from the system. With this in place, your control system can be calabrated in any unit you want, withouy any actual conversion, or, in reality, no calabration.

    Does that Help?
    KK

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Until our bytes cross again, may your chips never smoke, your bits never fall off, your parts bin never be empty and your jumpers never fall off.
    KK
    ·
  • HiTekGizmosHiTekGizmos Posts: 14
    edited 2006-01-03 16:49
    If you are looking for a MECHANISM that you can use to adjust relative phase between two shafts you want a differential. Picture the rear end of an automobile. If you jack up the rear end with the emergency brake off you'll find that you can spin either wheel even with the transmission in gear (or park) and the opposite wheel will spin the same amount, but the opposite direction. Now put the transmission in neutral, if you turn the drive shaft you'll see that you are adjusting the relative phase between the wheels (have someone hold one wheel from turning). Now for your project connect your driving power to a shaft corresponding to one of the wheels, this will also be one of your output shafts, the other wheel shaft will be your other output shaft. The drive shaft is now your phase adjustment input. If you hold the drive shaft port stationary the shafts will rotate exactly the same amount, any turning of the drive shaft port will adjust the relative phase between the two shafts, the adjustment can be set for leading or lagging and is not limited to 360 degrees of adjustment...
  • chronisterchronister Posts: 17
    edited 2006-01-05 16:22
    Thank you! That is brilliant. I don't know if I can build a differential though. Does anyone sell them? (small scale)
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-01-05 20:01
    chronister -

    See if you can find what you need on any of these web sites:
    Stock Drive Parts: http://www.sdp-si.com/
    Wm Berg: http://www.wmberg.com/
    Andantex : http://www.andantex.com/

    There is one other company I had in mind, but I can't find it at the moment. I thought the name of the company was Nord, but it's not Nord Gear which does show up on a search. They're located in a Scandanavian country if I remember correctly. If I had to guess, I'd have to guess Sweden, but I may be wrong. I have their catalog, but it's packed away at the moment.

    Regards,

    Bruce Bates
  • chronisterchronister Posts: 17
    edited 2006-01-06 14:34
    Thanks Bruce. I found differentials, and SDP even had some small ones. However they cost $300! I'll have to either build my own or stay with the electronic synchronization approach. Do you know if there is a way to build a differential without having to use miter gears? Some kind of planetary setup maybe?·(Instead of like a car where the two wheel shafts point in opposite directions from each other, I'd be content to have the corresponding shafts side-by-side, facing the same direction.)

    Post Edited (chronister) : 1/6/2006 3:00:41 PM GMT
  • John R.John R. Posts: 1,376
    edited 2006-01-06 15:25
    Chronister;

    What kind of speed/torque are we talking about?· Is the application production, professional, or for fun?

    On the "don't laugh, it might work" end of things, some of the advanced Lego sets have differentials.· They are not in all kits, but you could probably get a Lego kit for about $40.00 and up with a differential.· I believe you can also get these as parts from Lego online, and possibly a Lego store (there are a few in places like Mall of America).

    I don't know if you could build one without bevel gears.· I'd have to break out my Legos and do some testing.· In a "past life"· (I was a mechanical engineer, now I'm an IT Manager), I used Legos to mach up various mechanisms.· It was cheap (realative to having prototypes machined), fast, easy to change, and helped others (like the sales weenies) understand what we were talking about.

    My Legos are packed away due to some remodeling I'm trying to wrap up this weekend.· If you'd like pictures of the Lego differential, send me a PM (or post here) and I'll see what I can do over the weekend, or early next week.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • John R.John R. Posts: 1,376
    edited 2006-01-06 15:27
    Forgot to mention:

    I'm familiar with the SDP differentials.· Very nice, relatively high precision units.· If you don't need that level of precision, it shouldn't be too hard to "roll your own".· Making the "cage" would be the hardest part.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-06 15:51
    For a wide variety of gears, axles, linkages etc. check out www.smallparts.com you should be able to find nearly anything you need there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-01-06 16:46
    Model hobbie stores sell complet dif's for the RC cars and trucks...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Until our bytes cross again, may your chips never smoke, your bits never fall off, your parts bin never be empty and your jumpers never fall off.
    KK
    ·
  • chronisterchronister Posts: 17
    edited 2006-01-06 18:36
    I remember the Lego differential from the Auto Chassis set I had when I was a kid. Really neat. Probably not durable enough for my high power application, but an RC car differential would be perfect. (I wish I'd thought of that!) Thanks!

    I need the two output cranks to be facing the same way and side by side, a few inches apart. I was afraid the opposing shafts of the typical differential would be a problem for my design but I figured out how to do it without too many extra gears.

    RC Car/Truck differential:

    http://www2.towerhobbies.com/cgi-bin/wti0001p?&I=LXFUD8&P=7
Sign In or Register to comment.