Page 1 of 3 123 LastLast
Results 1 to 12 of 25

Thread: Wiring two stepper motors to a single controller

  1. #1
    Registered
    Join Date
    Sep 2010
    Location
    France
    Posts
    23
    Downloads
    0
    Uploads
    0

    Wiring two stepper motors to a single controller

    Hi all !

    I'm new to this forum so I didn't know exactly where to post my first thread :

    Wiring two stepper motors to a single controller

    To summarize, I was wondering if a stepper motor driver could drive two stepper motors at the same time. Needless to say, I googled the topic extensively and was surprized to come up empty even on CNCZone. So I rolled up my sleeves and tried to answer my own question. Because there's not a lot of information on this topic anywhere, I'm sharing the results with you.

    Fair warning : I'm french so I like to talk. Go get a coffee : it's a rainy sunday here, this could be a long post.

    Now, to put it into contest, my question came about when I decided on the design of my new CNC mill (I've already made one which works damn well, but now I need something meatier).

    To make a long story short, I decided on a mobile gantry design but didn't want to run a single ball screw under the work table, because I want to use heavy vises and large work pieces, and I fear this design would crumble or at least flex. So I went with a design using two ball screws, one on each side of the gantry, for the Y axis.

    I use Mach 3 which, as you know, offers the "slave axis" functionality. I had three problems with that :
    - It takes two more pins on my parallel port for no gain in terms of machine features.
    - It requires one driver per motor : if one fails and not the other, that could be bad, and besides, two drivers == twice the cash.
    - If somehow the Mach 3 PC has a bug, and decides to drive both steppers differenty, again, it would be kinda bad.

    The main thing I want to avoid is one ball screw moving and not the other. I especially fear the resulting damage to myself, my machine and whatever I was machining. The potential time and money waste is too high to contemplate.

    I gave thought to using one stepper motor to drive both screws, but it isn't practical : both screws will be one meter apart, I don't think belts have the rigidity to maintain accuracy between the two screws. Besides, I like the idea of having more torque.

    With a single driver, I figure that if anything breaks before the motors (PC, driver, software) it can't cause one motor to spin and not the other.

    Without further ado, let's get to the test...

    Jean


  2. #2
    Registered
    Join Date
    Sep 2010
    Location
    France
    Posts
    23
    Downloads
    0
    Uploads
    0

    The test

    I'm an electrical engineer, working in aeronautics, and I have a fair background in machining, power electronics and CAD from college. Nevertheless I'm not an expert on rotating machines, so I'll give you as much info as possible... and I welcome questions and comments.

    The driver I use is a made-in-China CW250-AC, which can be picked-up on eBay under a number of different names. It's one of those integrated microstepping drivers with screw-on wire terminals and a big heat-sink. Very practical and works surprisingly well.

    I've set it up for 1/5th microstepping and its maximum allowed current, which is 5 amps. It's driven by a PC through a crude break-out (the CW250-AC has input optocouplers, no need to overdo it)

    Power comes from a 150W 24V switch-mode PSU, way overkill but I don't have anything smaller on hand.

    The motors are two identical 85BYGH450C-03A, specs are :
    - NEMA 34, 150mm body (what I call big-ass : they weigh 5kg each !)
    - 6.3 N.m torque at their rated current of 4 Amps.
    - 200 steps/turn
    - insanely low coil resitance and inductance

    I first tested each motor separately, then both in parallel.

    If you intend to try this, let me advise you to check very carefully your connections with an ohm-meter : you really don't want to have one motor correctly wired and not the other.

    One fun test : if your steppers are correctly wired in parallel, unplug the controler and spin one shaft by hand : the other motor's shaft should make the exact same move. If it moves in the reverse direction... you've made a deadly mistake :-)

    On to the results...

    Jean


  3. #3
    Registered
    Join Date
    Sep 2010
    Location
    France
    Posts
    23
    Downloads
    0
    Uploads
    0

    Test results

    First and foremost : it works. You can use one driver to power two steppers and they'll both make the exact same moves.

    Now of course it can't be that simple.

    First, to be safe, I set-up the driver's current limit to 2 amps. If you can count, that's 1 amp per motor, into motors meant to run at 4 amps. Needless to say, as soon as the speed and acceleration went-up, both motors stalled. I tried lots of random movements, with a small clamp on each shaft, to check that they always stalled at the same time. In other words, under those conditions, stalling can't destroy your machine tool.

    Since I had verified that my setup wasn't going to blow up, I raised the driver's current limit to 5 amps. Again, that's 2.5 amps going into each motor, well below their rated 4 amps.

    Mach 3 motor tuning was setup for 200 steps per turn (1/5 µstepping, 5mm-pitch ball screw, 200-step motor). Without load, I achieved speeds of 6000 mm/minutes (acceleration : 250 mm/min-˛). If you've been following, that's equivalent to 100 mm/second, well above what I could live with )

    When I rose the speed and acceleration past those values, I started to stall. This is where things get (more ?) interesting.

    As I expected, with slightly excessive parameters, very small differences in the motor resulted in one stalling while the other kept running. When using really excessive parameters, again both motors stalled at the same time, in a way that would not damage my machine tool.

    I did one hour of testing, all in all, with no fan on the driver. It didn't heat any differently than if I had used only one motor at 4 amps. I also couldn't detect any weird behavior (smells, noises, vibrations that you wouldn't get normally). The motors remained cold to the touch, which was expected given the low amperage.

    On to results interpretation...

    Jean


  4. #4
    Registered
    Join Date
    Sep 2010
    Location
    France
    Posts
    23
    Downloads
    0
    Uploads
    0

    Results interpretation

    First, I feel the need to remind you again to measure those motors before you pair them. Remember that when putting two resistors in parallel, more current will flow through the most conductive. If I had been using an 8 amps driver and my motors had been different in that regard, then one would have been working at a higher current than what it's rated for.

    Given how small the resistances are (smaller than the ohm-meter probes !) you can't possibly get a really accurate comparison of your motors, but really a 10-20% difference shouldn't be a problem. You're looking for a 1000% difference, something that might cause way too much current to go in one motor.

    In the end, this is a very incomplete test because it wasn't done under load. I suspect I wouldn't have been able to hit 6000 mm/min dragging a 30 kg gantry on linear rails using two ballscrews. I'll tell you what happens when I build the damn thing and get there.

    Current is the big question : if you pump more in the motors, you'll reach higher speeds before stalling... on the other hand, there's a case to be made for using LESS current :

    I'm not using two motors because I want twice the torque, it's simply for mechanical design considerations. 6.3 N.m is more than I need, twice that much wouldn't make a difference. I could halve the current and get the torque I need from those two motors.

    Of course, that means I'll stall sooner, but that's not what's important : I want to ensure that if I do stall, then BOTH motors stall together.

    Here's what I figure would happen in the case where one motor stalls : given the ball screw pitch, the stalled motor will act like a brake, increasing the load on the remaining motor past its own stalling point, "forcing" it to stall pretty much at the same time.

    The problem lies with the width of the gantry, which will act like an elastic cantilever : when one motor stalls, the other may keep turning, bending the gantry until it stalls too (or doesn't, )

    If I use less current, the other motor will definitely stall sooner. I'm 100% certain that it'll at least stall a few steps after the first motor, but that might not be enough to cause permanent damage to the machine tool.

    As I type this (thank the forums !) I'm getting an idea : what if I use a timing belt between the screws, in addition to using two motors ? This way, once a motor stalls, the belt will cause the other motor to stall, much faster than if relying on the gantry's rigidity ! Also, if somehow one motor looses a few steps but not enough to stall, the belt will cause them to stall. And checking the belt would also be an easy way to verify that both axes are in sync. After all, isn't that what TIMING belts are made for ?

    Well, that's all for now. I hope you have lots of comments, especially to tell me what I'm doing wrong and what is dangerous : I'd really like to know before I wreck a thousand bucks of hardware and end-up in a hospital with an end-mill shoved up my nostril

    And I'm game if you want me to try something with my steppers : for now, the test setup will stay where it is. I'll try to locate an 8-amps driver just for the kick of it.

    Thanks for your time, hope it was good for you too

    Jean


  • #5
    Registered neilw20's Avatar
    Join Date
    Jun 2007
    Location
    Australia
    Posts
    3,424
    Downloads
    0
    Uploads
    0
    Loosely locked with timing belts is just what I thought would be good insurance.
    If both sides of the belt had the same slight slackness all the time, you could detect more tension in one side than the other and operate a switch to warn/stop on out of sync condition -- or just feel the belt tension with your fingers.
    If each motor winding is in parallel and the motors are identical it should work well.
    If you put the windings of the motors in series in an attempt to cause equal current in each one, you will almost sure get some strange happenings - a bit like a car differential, which is quite the opposite of what you require.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.


  • #6
    Registered
    Join Date
    Sep 2010
    Location
    France
    Posts
    23
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by neilw20 View Post
    Loosely locked with timing belts is just what I thought would be good insurance.
    If both sides of the belt had the same slight slackness all the time, you could detect more tension in one side than the other and operate a switch to warn/stop on out of sync condition
    Actually I'm more interested in causing both motors to stall at the same time : detection means I'd have to trigger an e-stop but that wouldn't take care of any rotor inertia.

    If I use a tight belt, however, it will ensure that one motor can't stall without the other. It's based on the simple fact that if the motors are identical, and one stall, then the second motor has to be close to stalling already. When that happens, the belt "brakes" the motor immediately. Hell, I'm so paranoid I might even use two belts, one at each end of the ball screws

    Still, it'd be nice to be able to detect a stall and trigger an e-stop automatically : anyone has any idea how it can be done ? As usual, I'll keep searching and update this thread.

    Jean


  • #7
    Registered
    Join Date
    Aug 2010
    Location
    USA
    Posts
    34
    Downloads
    0
    Uploads
    0
    Jean,
    Why not connect the input of the second motor driver's input (A) to the same parallel port pin that the first motor driver's input (X) is connected. Then no worries about motor current mismatches. The parallel output should easily drive two input loads. Especially if they are optically isolated. Just connect both A & X driver inputs to the X axis optical isolators' output.
    I do like the belt between the two lead screws idea. I have often worried about one of the motors stalling even when they are driven from different port pins. To me it's the same problem. Then you can use the parallel port A axis output for another axis. Joe


  • #8
    Registered
    Join Date
    Sep 2010
    Location
    France
    Posts
    23
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by toughtool View Post
    Jean,
    Why not connect the input of the second motor driver's input (A) to the same parallel port pin that the first motor driver's input (X) is connected. Then no worries about motor current mismatches.
    Thanks ! That's a very good point, I should have thought of that

    That still leaves the cost issue : if there's a safe way to use one driver for two motors, then it should be done.

    Also, if you're as paranoid as me, you'll consider the possibility that one driver may die and the other keep on going : it would have the same effect as one motor stalling and not the other. With a single driver, if it dies, both motors stop.

    I'll be limited in terms of current, though, unless I buy a beefier driver just for this axis, but even if that driver is twice as expensive (and therefore negates any savings) I'd do it just for safety.

    Jean


  • #9
    Registered vger's Avatar
    Join Date
    Jan 2006
    Location
    usa
    Posts
    685
    Downloads
    0
    Uploads
    0
    Jean,

    It seems to me that the best solution may be to use a single (perhaps larger) motor to drive both screws. Trying to ensure that both steppers are locked in sync with one another is problematic. If one motor skips steps you could end up with one end of your gantry offset slightly and you would be out of square but still cutting. You could add encoders to both motors for feedback, but then if an encoder fails you are in trouble again.

    The screw assemblies I'll be using on my new build are from an old laser cutting machine. They are both driven with one motor and are linked together with 90 degree gearboxes (bevel gears) with a drive shaft between them. This is a servo motor system, not stepper, but a similar system might work for you if the gears were meshed tightly enough.

    Steve


  • #10
    Registered
    Join Date
    Oct 2005
    Location
    Australia
    Posts
    2,387
    Downloads
    0
    Uploads
    0
    Since you are an electrical engineer, i'm surprised you didn't connect both stepper motors in series instead of parallel?

    The motors are current operated, and the driver is motor current regulated. So putting the 2 motors in series (where they MUST receive identical current) should give a much better result (especially with your low inductance motors) than in parallel.


  • #11
    Registered
    Join Date
    Sep 2010
    Location
    France
    Posts
    23
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by RomanLini View Post
    Since you are an electrical engineer, i'm surprised you didn't connect both stepper motors in series instead of parallel?

    The motors are current operated, and the driver is motor current regulated. So putting the 2 motors in series (where they MUST receive identical current) should give a much better result (especially with your low inductance motors) than in parallel.
    Hi, sorry for the late reply. Well like I said, I don't have much experience with motors. I'm more of a digital electronics expert. I do FPGA, and the only power electronics I do is usually the power supply for those FPGA's. But you're totally right, in series both motors will have the same current.

    I think I'll try that tomorrow. My motors are rated for 6V at 4A (like I said, insanely low resistance !) so two motors in series will mean 12V at the controller's output, and that shouldn't be a problem since I use a 24V power supply.

    I not sure, however, that a series wiring will help with "synchronized stalling". I need to study how the motor's current demand evolves when stalled.

    As usual, I'll keep you guys posted.

    On a side note, I'll soon order some timing belts and pulleys to try my mechanical approach to stall synchronization. I'm also studying an electronic approach (what I do best) to detecting a stall on one motor and ensuring the other doesn't keep moving. I'll probably use Hall-effect sensors to verify at all times that both motors make the exact same movements, and that those are consistent with the input they receive. Almost like a closed-loop servo.

    It occurs to me that the problem I'm trying to solve has broader application than machines with dual-drive axes : PKM's and possibly any machine tool could benefit from stall detection.

    Cya,

    Jean


  • #12
    Registered
    Join Date
    Sep 2010
    Location
    France
    Posts
    23
    Downloads
    0
    Uploads
    0

    Made in China == double check everything !

    Hi guys,

    It's morning and the coffee and croissant have been devoured... time to work !

    I've unwrapped a cheap clamp meter I got at an electronics shop in town. Ten bucks, so I thought "not a big loss if it's crap". I've just used it on my test setup, which is still two stepper motors wired in parallel. I wanted to check exactly what current went where. Got a few surprises.

    Bear in mind that the clamp is chinese, so I wouldn't trust its accuracy as far as absolute measurements go. Relative measurements should be fine.

    First, my chinese stepper driver (CW250-AC) is a rip-off : if the meter is to be trusted, it delivers only 2.2 Amps per phase went set at 5 Amps. Granted, the setting is a current LIMIT, and granted, 2.2 times 2 is 4.4 which is "kinda close" to 5.

    But really, either I'm stupider than I think, or when a stepper motor is rated 4 Amps, it means 4 Amps per phase, not 2 + 2 amps, right ?

    Perhaps I can reduce stall if I can secure some brand drivers, like Geckos ?

    A more important test was current splitting between the motors and windings. My big-ass steppers have actually 4 windings each (two per phase) or 8 wires if you prefer. As I suspected :

    - Both windings on the same phase of the same motor draw different amounts of juice.
    - The same phase on two separate motors also draw a different current.

    I'm not sure as to what that means in terms of stalling, since both motors, tested separately, can handle the same speed and acceleration before stalling.

    The differences are small enough that I don't really fear any trouble wiring them in series. I'll go ahead and try that. If I haven't posted my results later today, it probably means I burned down my lab

    See ya !

    Jean


  • Page 1 of 3 123 LastLast

    Similar Threads

    1. Need Help!- Wiring two stepper motors to a single controller
      By Nefastor in forum Gecko Drives
      Replies: 2
      Last Post: 09-20-2010, 05:32 AM
    2. Need Help!- Wiring stepper motors
      By spincaster in forum Stepper Motors and Drives
      Replies: 5
      Last Post: 04-22-2010, 01:34 PM
    3. Problem- Wiring for stepper motors
      By der_fisherman in forum Machine Problems, Solutions , Wireless DNC, serial port
      Replies: 2
      Last Post: 10-20-2008, 01:40 PM
    4. Single Axis Controller to run two motors
      By edo in forum General Electronics Discussion
      Replies: 6
      Last Post: 01-08-2007, 06:56 PM
    5. What to use for wiring stepper motors?
      By CNC Darren in forum General Electronics Discussion
      Replies: 8
      Last Post: 11-02-2004, 12:40 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.