Stepper motor driver connections

Advert

Stepper motor driver connections

Home Forums Electronics in the Workshop Stepper motor driver connections

Viewing 25 posts - 1 through 25 (of 42 total)
  • Author
    Posts
  • #348582
    Hnclad
    Participant
      @hnclad

      Hi, hoping a wizard on this forum can help with connections from and to a stepper motor. I am confused as to which connections to make to a stepper motor to drive an indexing head. The motor and motor driver were bought as a pair from Arc Euro. The stepper motor has 8 wires and has to be wired as a unipolar 4 phase configuration. This part I understand and I have identified the 4 phase wires and connected the 4 center tap wires. These wires then become the power connections. This is a problem.

      The motor driver is a common type that I see on many youtube videos. The pulse and dir. connections are made from the printer port of a Windows XP computer. The 4 phase wires A+ A- and B+ B- are clearly identified and the power supply is 18volt dc. connections are easily identified. The centre tap on the motor is supplied with 5volts+ from an old computer dc supply, which seems to me I am mixing 2 dc sources, also where do I connect the -5volt dc wire there is no ground on the driver? Hate to make the 5volt connection and fry the motor or driver.

      Appreciate any help. Dave.

      Is there any way to upgrade this by using a separate board with a USB interface connected to the motor driver?

      Advert
      #31941
      Hnclad
      Participant
        @hnclad

        Rotary indexing

        #348590
        Sam Stones
        Participant
          @samstones42903

          Hi Dave,

          Compared with others on this site, I have insufficient knowledge to tackle this problem square on.

          However, I can, to some degree, read circuit diagrams. Have you got a handy circuit or knock one up to give the likes of me a better indication of the problem?

          Sam

          Edited By Sam Stones on 03/04/2018 05:17:27

          #348591
          John Olsen
          Participant
            @johnolsen79199

            This is going to depend a bit on the actual driver you have, so I had a look on the Arc Euro site but they don't seem to list any.

            With some drivers, there will be a connection for a 5 volt supply, used for the internal logic, and a higher voltage (maybe 12 to 24V) used for the actual motor. The centre tap of the motor windings would connect to the positive side of the higher voltage supply (either on the driver or direct to the supply) and the ends of the windings would connect to the A+, A-, B+ and B- connections on the driver. There is no separate negative connection to the motor. The 5 Volt supply would just connect to two terminals on the driver. Some drivers will not need the 5 Volt supply as they have an internal regulator to provide that.

            One approach might be to look on ebay ad see if you can find the same items, they usually have a bit of connection data with them. Otherwise you could try an PM to Ketan Swali on this site, he may have access to datasheets if this is something they have sold.

            John

            #348592
            Joseph Noci 1
            Participant
              @josephnoci1

              OK, I will try again – Keyboard developed a 'sticky key' during the last attempt…

               

              To use a UNIPOLAR wired motor on a BIPOLAR stepper driver does not make sense. A Bipolar driver cannot drive the center tap at all – You cannot provide a power source to said center tap as there is no ground to reference it to – The bipolar stepper driver will be most upset…

              IF the stepper motor is a true 8 wire motor , ie, it has 4 SEPERATE windings as you intimate, and if your stepper driver is a Bipolar driver, labeled on the motor connections as A+, A-, B+, B-, then simply wire the motor in BIPOLAR mode, either Series or Parallel, and connect it to the driver.

              You do need to know the wire colour codes of the motor you have. Then connect  either in SERIES or PARALLEL mode as in the last two images in the picture below.

              If you require Hi-RPM from the motor, connect as in the series connection, and provide the driver with the maximum DC supply voltage is can handle, in order to obtain useful torgue from the motor.

              If you require Hi-Torque rather, then connect as in the parallel connection.

              The indicated wire colour in the images are not an international standard, and so may not apply to your motor. 

              You NEED to get the connection directions correct, to ensure correct current flow..ie, a reverse winding in a series or parallel pair will pop the driver..

              Joe

              unipolar motor connections.jpg

               

               

              Edited By Joseph Noci 1 on 03/04/2018 07:28:30

              #348603
              John Haine
              Participant
                @johnhaine32865

                The drivers I have bought from ARC were all bipolar and did not need a centre tap on the motor winding. Can you post a photo of your drive? I should be able to unearth the drive manual, I could scan and mail it to you. Your drive may well be marked 2M542.

                #348619
                Muzzer
                Participant
                  @muzzer

                  If you have a 2-channel scope you can spin the motor with a cordless drill and observe the waveforms from 2 of the windings. If they show either a zero or 180 degree phase difference, they are for the same phase winding and can be connected in parallel or series as Joe. If they are +90 or -90 degrees different, they are from differing phases.

                  If you don't have a scope, you can use a volt meter on the AC range. If you start with measuring one winding voltage, then connect another in series, the ratio of the second voltage divided by the first will tell you what you need to know.

                  • If the voltage is zero, the windings are from the same phase and are 180 degrees out of phase. You need to swap one around, then you will have them connected in series.
                  • If the voltage is doubled, they are from the same phase and are in phase with each other. They are in series.
                  • Otherwise, you will have a winding from one phase in series with a winding from the other. The second voltage will be 1.4 times the first. You should ignore that second winding and connect one of the other 2 windings, then repeat the measurements until you have found the matching winding.
                  • Obviously this is the only excuse you need to buy a cheap, 2-channel scope. There was a recent thread about this…

                  When it comes to series vs parallel, surely a series connection will result in a lower top speed? Think of back EMF.

                  The current supplied by the driver is generally configurable, so whether the windings are in series or parallel, the current in each winding (if correctly supplied) and hence the total torque (total amp turns) should be the same. The only exception would be if the driver were only capable of a limited load current (unable to supply enough for the parallel connection). You don't apply the full supply voltage to the windings, instead use PWM to regulate the current. So the resistance of the windings is not the limitation.

                  Murray

                  Edited By Muzzer on 03/04/2018 10:47:02

                  #348643
                  Joseph Noci 1
                  Participant
                    @josephnoci1

                    When it comes to series vs parallel, surely a series connection will result in a lower top speed? Think of back EMF.

                    I did not expand to much on my statements, as it had little to do with Dave's question.

                    In fact, a series wired motor gives more stall torque but torque drops of rapidly with velocity. A parallel wired motor has less stall torque, but the torque drop-off with velocity increase is much less.

                    And that is why( as I indicated) you need higher drive voltage for series connection to achieve higher velocities – the inductance is doubled in each winding set, and Di/Dt demands that a greater voltage be used to get the amps to flow more quickly at the Stepper driver PWM rate.

                    Also note that when wired in parallel, not only is the inductance halved, but likewise the DC resistance, so you need to supply twice the peak currents from the driver. In the series wired case, the current is 1/2 the previous, but the voltage needs be double..so set the current limit on the stepper drive to that required by the motor in series connection.

                    Joe

                    #348653
                    SillyOldDuffer
                    Moderator
                      @sillyoldduffer
                      Posted by Hnclad on 02/04/2018 23:30:43:

                      The pulse and dir. connections are made from the printer port of a Windows XP computer.

                      Is there any way to upgrade this by using a separate board with a USB interface connected to the motor driver?

                      Parallel printer ports are easy to program, provide plenty of pins and reasonably predictable performance. Quite useful for CNC but unfortunately far from the best way to drive a printer which is what most people want of their computers. As USB is far more flexible and can connect devices of all kinds, not just printers, it's now rare to find a computer that comes fitted with a parallel connection.

                      You can get USB to parallel converters like this one. Trouble is they aren't an exact duplicate of a true parallel port. It may not provide the pin level control needed for CNC or do so fast enough to drive a machine effectively. Another problem is that USB is shared, meaning your CNC device won't have any priority, and may be fed commands in drips and spurts. I believe you can get a specialised USB converter board specifically designed for CNC but a quick Google didn't find it. I'm not into CNC myself – with luck my poor answer will attract an expert.

                      Dave

                      #348657
                      Muzzer
                      Participant
                        @muzzer

                        It doesn't matter if you connect in series or parallel. As long as you have the same current through each winding, you will generate the same torque. You'll need twice the supply voltage to achieve the same torque at the same speed in series connection (and half the current), compared to parallel. You don't get anything for nothing and the motor doesn't know or care where the amp turns came from.

                        Stall torque doesn't really apply, as we are talking about drivers that generate a regulated constant current. If you connect your 36V / 48V supply directly across your motor, there will be a bad smell which will allow you to throw your motor away. The resistive voltage drop will be a small fraction of the total supply voltage (unless you've grossly mismatched the supply voltage and motor resistance), so in fact it's a question of making sure the driver is set up for the specified motor phase current that is appropriate for series or parallel connection, whichever you choose.

                        Murray

                        #348659
                        Neil Wyatt
                        Moderator
                          @neilwyatt

                          I would never bother trying to drive a stepper with a parallel port in an age when you can buy an intelligent stepper driver built into a module for a pound or two.

                          As a minimum they just need a 'step' pulse to control it, but you can add direction and enable inputs if you want/need them. Typically they have an onboard preset you can use to set the current limit, most can be tuned to give better performance for slow/small movements for precision applications.

                          Neil

                          #348667
                          John Haine
                          Participant
                            @johnhaine32865

                            Does your driver look like this?

                            61hajnsjjbl._sy450_.jpg

                            This the type that ARC used to supply. If it is then you can get a data sheet here.

                            #348673
                            SillyOldDuffer
                            Moderator
                              @sillyoldduffer
                              Posted by Neil Wyatt on 03/04/2018 14:08:23:

                              I would never bother trying to drive a stepper with a parallel port in an age when you can buy an intelligent stepper driver built into a module for a pound or two.

                              Neil

                              Unless Hnclad owns a CNC software package designed to run on an XP computer with a parallel port? If that's the case I don't know how to make a USB control module work with a Windows package designed to talk parallel. Is it possible?

                              But apart from that you're quite right Neil. Writing new stepper code for a Microsoft-XP parallel-port combo isn't a good idea now that both technologies are so far past their 'Best Before' dates!

                              Dave

                               

                               

                               

                              Edited By SillyOldDuffer on 03/04/2018 15:24:35

                              #348695
                              John Haine
                              Participant
                                @johnhaine32865

                                Ordinary USB to parallel printer adapters will not work with PC motion controllers (e.g. Mach 3) that run on the PC itself because they don't provide proper real-time accurate pulses. You can buy a motion control card with a USB interface but these have to use a Mach 3 plug-in to drive them – all the accurate pulsing is done in the motion controller and Mach3 just provides a front end. But given you can get old PCs for free with a parallel port still then using something like Mach 3 or Lunux CNC is I suppose an option if you just want an indexer, but either the Ward or the Arduino design would be easier I suspect and you don't need a clunky old PC taking up space.

                                Until the OP confirms just what driver he has all this seems speculation, and once he does the answer will be much more obvious.

                                #348697
                                Joseph Noci 1
                                Participant
                                  @josephnoci1

                                  Muzzer, I am not sure I agree…Not to hijack this this threads question, but..

                                  You are correct for stabilized conditions, ie, where the current has in fact reached its peak in the allotted time ( in this case , the interval between step pulses-not PWM frequency-).

                                  Your statement

                                  As long as you have the same current through each winding, you will generate the same torque.

                                  of course holds true under stable conditions, but at high speeds, in series connection, the winding inductance has doubled, as has the dc resistance of the windings. This gives a winding time constant some 4 times more that the parallel connection, and at higher speeds, the current may not build to a stable condition..This is often overcome by increasing the driver supply voltage some four-fold, or more, if the driver can handle it.

                                  Joe

                                  #348702
                                  Hnclad
                                  Participant
                                    @hnclad

                                    Thanks to everyone who replied. I have the data sheets for the motor and driver but haven't figured out how to upload them on this site. I'm new here. The motor driver shown by John Haine is exactly what I have, if this driver is only capable of driving bipolar series and parallel motors then it is useless to me as the software I have from the constructor is for a unipolar motor.

                                    The motor data sheet shows that the 8 wire motor can be wired for bipolar series and parallel and unipolar by bringing out the center taps. The motor is 4.5volt+dc. and the centre taps become the power wire in unipolar configuration.

                                    The data sheet for the motor driver is specific that the power supply is between 18 an 50volts+dc. If the driver is compatible with a unipolar stepper motor then I can upload the data sheet, if not then I guess I have a motor driver for sale, cheap.

                                    I did try using the motor as a series wired configuration but the rotary positioning was not accurate???

                                    Thanks Dave.

                                    #348718
                                    Neil Wyatt
                                    Moderator
                                      @neilwyatt
                                      Posted by Hnclad on 03/04/2018 19:09:15:

                                      Thanks to everyone who replied. I have the data sheets for the motor and driver but haven't figured out how to upload them on this site. I'm new here. The motor driver shown by John Haine is exactly what I have, if this driver is only capable of driving bipolar series and parallel motors then it is useless to me as the software I have from the constructor is for a unipolar motor.

                                      The motor data sheet shows that the 8 wire motor can be wired for bipolar series and parallel and unipolar by bringing out the center taps. The motor is 4.5volt+dc. and the centre taps become the power wire in unipolar configuration.

                                      The data sheet for the motor driver is specific that the power supply is between 18 an 50volts+dc. If the driver is compatible with a unipolar stepper motor then I can upload the data sheet, if not then I guess I have a motor driver for sale, cheap.

                                      I did try using the motor as a series wired configuration but the rotary positioning was not accurate???

                                      Thanks Dave.

                                      It's not an issue with the match of driver and motor, the gear you have should be fine if you have described it accurately.

                                      The driver needs software that outputs step and direction on two pins. Such software doesn't give a fig how the driver is connected to the motor. You have said you have this type of software in your first post.

                                      The old-style software outputs four phased signals on four ports. These are intended to be used with drivers that are usually simple open-collector transistor or darlington switches intended to work with a four-pole unipolar steppers. Such arrangements are becoming rare as they put a greater load on the processor and generally don't support microstepping.

                                      You just need to identify the correct pins for step and direction (and ground and possibly enable) from the computer. These inputs are opto-isolated so they have NO ELECTRICAL CONNECTION to the driver or the motor, aside from lighting up three infra-red LEDs inside sealed units.

                                      This means the 5v computer electrics are totally separate from the 18V motor electrics.

                                      You then feed the driver with a suitable voltage across the GND +V terminals and wire the stepper up so it has two bipolar coils across A+/- and B+/- . Join the coils to make a centre tap but DO NOT CONNECT THE CENTRE TAP TO ANYTHING, just insulate the join.

                                      You then need to set the dip switches to give the current limit and microstepping settings you want.

                                      The actual motor driving voltage is relatively uncritical compared to the current setting – the driver will regulate the current by shortening the pulses at a higher voltage. Higher volts generally means a more responsive stepper, though.

                                      If the motor does not work and just 'growls' or steps very poorly, you may have one of the coil pairs wired wrongly so they are acting against each other.

                                      If the motor turns the wrong way swap over the B+/- connection only.

                                      Neil

                                      Neil

                                      #348722
                                      Joseph Noci 1
                                      Participant
                                        @josephnoci1

                                        Pictures and words..

                                        Neil said it – Your motor and driver will work fine if your software delivers STEP and DIRECTION pulse control to the driver.

                                        Connect up as these diagrams –

                                        The Motor winding are shown in parallel – connect in series if you wish and as Neil said, leave the center tap unconnected.

                                        Then connect to the PC printer port as below – your driver data sheet indicates that active low STEP pulses are required, so connect the printer port pin to the -ve PLS input. Connect +5V to the +ve pulse input, ditto for the DIR control.

                                        Joe

                                        stepper if.jpg

                                        #348799
                                        Hnclad
                                        Participant
                                          @hnclad

                                          Hi. To everyone who has participated in this thread, thank you. You have helped me enormously to understand stepper motors. To Neil a special thanks for explaining everything so that even I can understand it. I guess I was fixated on using the motor in a unipolar configuration. I should have uploaded the spec. sheets for the motor and driver at the time I asked the question. It would have saved a lot of time, sorry about that. I have scanned the spec sheets into the computer so I can upload them if it would help anyone. A thanks to Joe for the diagram for wiring the motor in bipolar parallel. In this configuration you have 5vdc supply. Since the driver is connected to a computer via the parallel port, is this necessary as it is getting it's power from the computer?

                                          Thanks to everyone

                                          Dave.

                                          #348802
                                          Joseph Noci 1
                                          Participant
                                            @josephnoci1

                                            Hi Dave,

                                            You may not need the +5v Supply Dave. To know definitively I would need to know what the sense of the output Step pulse is, from your PC printer port.

                                            If your CNC software generates a positive going pulse ( your driver requires a pulse of at least 2us) then you can connect the PC port pin directly to the PLS+ input, and connect the PLS- input to the PC printer port ground pin.

                                            If however the sense of the pulse is low-going, ie, from +5v down to GND and up again, then you have to connect the PC printer port pin to the PLS- input, and have to provide a +5V source to the PLS+ input ( as in my drawing).

                                            If you have no idea either way, just connect the printer STEP output pin of the printer port directly to the PLS+ input, connect the PLS- input to the printer port ground, and try it! You do not even need to connect up the DIR+/DIR- inputs to the driver to try this – all that happens is that the motor will not reverse direction while testing…

                                            Joe

                                            #348803
                                            SillyOldDuffer
                                            Moderator
                                              @sillyoldduffer
                                              Posted by Hnclad on 04/04/2018 16:06:38:

                                              A thanks to Joe for the diagram for wiring the motor in bipolar parallel. In this configuration you have 5vdc supply. Since the driver is connected to a computer via the parallel port, is this necessary as it is getting it's power from the computer?

                                              Good news, it's easier than that. Stepper drivers usually get their operating power by tapping off the + – VDC input from the motor supply (shown 24V to 50V on Joe's diagram.) They don't need a separate external 5V power feed. Internally the driver will have elaborate arrangements for making 5V (or whatever else is needed) by filtering and regulating the crude feed used to power the motor. You don't need to worry about how it works.

                                              It's a very bad idea to directly connect a power device to a sensitive computer. So considerable care is taken inside the stepper driver to electrically isolate the computer from the stepper electronics and the motor power supply. Joe's diagram shows the printer port providing two connections, one sets the direction of rotation while the other sends pulses to step the rotor. These wires only carry low power logic signals to operate an opto-isolator – there's no electrical connection whatever, it's a communications link. There's only one true electrical connection between the controller and the computer. It's a ground wire used to provide a signal return for the comms link, marked on Joes diagram as 'GND Reference for +5V'.   The +5V is used to permanently set the logic sense of the Enable, Direction and Pulse inputs: it's not a power input. 

                                              Dave

                                              Typical. I press send only to find Joe got in first!

                                              Edited By SillyOldDuffer on 04/04/2018 16:44:49

                                              #348804
                                              John Haine
                                              Participant
                                                @johnhaine32865

                                                Dave, you'll see in Joseph's diagram that there is a +5V supply and a "stepper supply" to the driver. You shouldn't assume you can get the 5V from the computer, I'm not even sure that +5v is available on the parallel port! My break-out boards (BoBs) for both my lathe and mill get a 5V supply from a separate USB connection, whose only function is to supply this, no data. So you will need to provide a 5volt supply. The easiest way to do this, since you will need a stepper supply anyway, is to have a small regulator (78L05) to derive the 5V from the stepper supply; or you could probably buy a wall-wart type supply to give 5V.

                                                A BoB is quite a good idea as it can also provide isolation through opto-couplers, and the ones I have incorporate voltage regulators to supply the 5V from the stepper supply too.

                                                Another thing to watch out for is that by the description of your software it sounds like it steps the motor directly, i.e. isn't microstepping, and will assume that the motor does 200 steps per rev. If you look at the lower table on the driver you will see that the minimum number of steps per rev is 400, which could lead to some interesting errors if you aren't aware of it. So for example, if you wanted to step 50 divisions, you would find that it distributes these around half a circle. To actually get 50 divisions you would need to program 25 and "go round twice". This also means I think that you won't be able to do an odd number of equally spaced divisions per rev.

                                                #348823
                                                Joseph Noci 1
                                                Participant
                                                  @josephnoci1

                                                  I won't go into the vagaries of full and half stepping and all the bog's that beckon …To go down that road we do need to know what Dave's software can actually do – else we just fill Dave's question with more complications before he even gets the motor to turn!

                                                  However, We are not yet done it seems..

                                                  Dave, my answer holds with reference to the need or lack of the +5V supply. As I said, if your software drives the pulse low-to-Hi, then just connect the printer port pin directly to the PLS+, with the PLS- at Printer Port GND.

                                                  This connection works because the printer port Driver IC can then supply, or source, the current needed to drive the opto-coupler in the Stepper driver input. If you already know this, forgive the following explanation –

                                                  Consider that the Stepper driver is looking for a 'contact closure' on the STEP input to provide a STEP command to the motor itself. Imagine that contact to be a relay contact, (instead of the opt-coupler it is..) and that the Printer port has to provide the current through the 'relay' coil to close that contact.

                                                  That can be done by grounding the 'bottom' of the relay coil, and supplying a voltage ( from the printer port pin) to the top of the coil. This would then be called "sourcing" the current to the coil.

                                                  Another way is to provide a separate voltage supply to the top of the coil ( the added +5V supply..) and then connecting the Printer Port pin to the bottom of the 'relay' coil. When the printer port pin pulls this connection to ground ( the same ground as the ground of the added +5V) supply), then current flows in the coil and the contact closes. This is termed 'sinking' the current to ground.

                                                  The fact that the 'relay' is an opto-coupler makes no difference – the end result is the same.

                                                  But be careful of grounds between the driver, the PC and the +5V supply, if used.

                                                  John Haine mentions a 'BOB' – this is a board that generally provides opto-isolation between the PC and the stepper driver and the rest of the CNC machine. It is not a bad idea to use such a board, as it does protect the PC to some extent, but don't get hung up on it just yet.

                                                  The Stepper Driver INPUTS ( STEP and DIR) ARE opto-isolated anyway, and the -Ve lead of the Driver main DC supply is normally NOT connected to ground or referenced to the STEP and PLS inputs. Just leave that ungrounded in the entire machine!

                                                  If using a separate +5V supply to source the PLS+ and DIR+ input current, connect the ground (-Ve) of that 5V supply to the printer port ground. A small Wall Wart giving 5V out at 100mA will be good enough.

                                                  DO NOT use a 5volt regulator to obtain +5V from the Stepper driver main DC supply! That will require that you connect the driver main DC supply -Ve to the PC Printer Port Ground. That is inviting trouble..The DC supply to the driver must go only to the driver – do not reference it to the PC ground.

                                                  Joe

                                                  #348848
                                                  Hnclad
                                                  Participant
                                                    @hnclad

                                                    Hi. I have been away from the computer most of the day, so the latest posts are a lot to absorb.​ I have scanned the data sheet for the motor and driver. If some one can tell me how to attach them to this message I'll upload them.

                                                    Joe, thank you for the lengthy explanation it will take me a while to absorb this and see what is relevant to my situation. As you have pointed out I may not need the 5vdc.

                                                    Here are the pin numbers to be used from the printer port supplied by the constructor.

                                                    Pin 8 to step.

                                                    Pin 9 to dir.

                                                    Pin 20 to grnd.

                                                    John Haines has raised a curious thing that bugged me when I ran the stepper motor as a bipolar motor. When indexing a full turn the indicator needle on my indexer did not return to the starting position. I'll leave it there for now.

                                                    Dave

                                                    #348849
                                                    Hnclad
                                                    Participant
                                                      @hnclad

                                                      Hi. I have been away from the computer most of the day, so the latest posts are a lot to absorb.​ I have scanned the data sheet for the motor and driver. If some one can tell me how to attach them to this message I'll upload them.

                                                      Joe, thank you for the lengthy explanation it will take me a while to absorb this and see what is relevant to my situation. As you have pointed out I may not need the 5vdc.

                                                      Here are the pin numbers to be used from the printer port supplied by the constructor.

                                                      Pin 8 to step.

                                                      Pin 9 to dir.

                                                      Pin 20 to grnd.

                                                      John Haines has raised a curious thing that bugged me when I ran the stepper motor as a bipolar motor. When indexing a full turn the indicator needle on my indexer did not return to the starting position. I'll leave it there for now.

                                                      Dave

                                                    Viewing 25 posts - 1 through 25 (of 42 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up