Shop OBEX P1 Docs P2 Docs Learn Events
HELP, Bipolor Stepper +ULN2803 — Parallax Forums

HELP, Bipolor Stepper +ULN2803

davidsaundersdavidsaunders Posts: 1,559
edited 2015-04-13 11:18 in Propeller 1
I had been using nothing but Unipolar steppers, though a replacement that I just installed in my 3D printer is a bipolar stepper. With out having to order a different driver, how can I control a Bipolar stepper with a ULN2803, which is only a current sync?

Comments

  • kwinnkwinn Posts: 8,697
    edited 2015-04-12 15:01
    You can't. At least not in any practical or useful sense.
  • idbruceidbruce Posts: 6,197
    edited 2015-04-12 15:20
    David

    With a bipolar motor, you have to use h-bridges, and then if you pursue creating your own h-bridges for stepper control, it becomes complex. I always use hybrid unipolar stepper motors with bipolar drivers, but that is just me. Pololu probably has the best prices around for small bipolar drivers. If you already have unipolars, most of them can be wired as bipolar. I would recommend that procedure and getting some of the inexpensive bipolar drivers from Pololu, I think you will be glad once you have made the investment.

    I know this because I struggled with unipolars and transistors for quite some time. After getting fed up, I finally purchased the drivers and have not looked back since. I just wish I would have done it sooner.

    https://www.pololu.com/category/120/stepper-motor-drivers

    Bruce
  • idbruceidbruce Posts: 6,197
    edited 2015-04-12 15:30
    David

    Just to expand a bit more.....

    The big benefit to purchasing chopper drives is current control. Current control will allow you to increase the voltage going into the motors, and you will obtain much higher operating speeds.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-04-12 16:13
    "Real" stepper drivers will of course work much better but just about any h-bridge chip can be used to drive bipolar stepper motors. I've been using some cheap L298N to drive my steppers and I've used L9110 drivers on small bipolar steppers.

    I really like the DRV8711 drivers Mark_T told us about. They do all sorts of trick with the drive pulses and end up drawing much less current than the L298N chips pulled.
  • tritoniumtritonium Posts: 543
    edited 2015-04-12 16:38
    Hi
    How many wires do you have on the drive?
    If there are six then- if I recall correctly, the field coils are supplied with a centre tap and if the taps are connected together and connected to the motor supply, the drive can be driven as a unipolar. You can check this out with a multi-meter.
    For bi-polar I have had great results with the step-stick drivers available for $2.80 from http://www.electrodragon.com/product/stepstick-stepper-driver-board-a4988-v2/

    Dave
  • idbruceidbruce Posts: 6,197
    edited 2015-04-12 16:46
    Duane
    just about any h-bridge chip can be used to drive bipolar stepper motors

    Yes, this is true, but in that case, unless you have some some means of limiting the current, the motor should not be overvolted, unless you want to decrease the life expectancy of the motor. Motors that are overvolted without current limiting can often reach extreme temperatures, at which point, lubrication viscosity breaks down, thus resulting in premature bearing failure. Additional concerns would be enamel coating breakdown, etc.....

    Chopper drives allow you to overvolt motors without these concerns.
  • Mark_TMark_T Posts: 1,981
    edited 2015-04-12 17:49
    Low impedance bipolar stepper - current control needed, high performance possible.
    High impedance bipolar - can drive with 2 H-bridges, poor performance.
    High impedance unipolar - can drive with ULN2803 easily, poor performance.

    Poor performance means you won't get 3000rpm or anything like from the motor, BTW
    Low impedance is an ohm to a few ohms, High impedance is typically 30 ohms or more
    for which voltage drive is feasible.

    4-wire - bipolar only
    5-wire - unipolar only
    6 wire - unipolar or bipolar
    8 wire - unipolar or bipolar-parallel or bipolar-series.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-04-12 17:59
    Is there something special about ULN2803s that they are used for small and simple unipolar steppers? Four transistors would perform far better and not suffer the 0.8V plus Vce(sat) drop of the darlingtons for starters. IMO the ULN2803 is a very poor choice for this application. Even with a current gain of 100 you can fully saturate the NPNs with 5 to 10ma of base drive plus transistors and diodes are cheaper than a ULN2803. You can also use all 4 transistors at once unlike the substrate limited 2803 where the current drive drops dramatically when you try to use more than one output at a time.

    @davidsaunders: I thought it was amusing at the time in Mark's DRV8711 thread that you couldn't see why bipolar stepper driver ICs were necessary and yet you were doing 3D printing. You know, it's not always about the speed, since bipolar stepper ICs have chopper drive they can run with much higher voltage and deliver higher torque as well as making microstepping possible which even if you didn't use it for finer resolution, it still makes for a smoother step. Anyway the unipolar steppers are pretty much fine for very small motors or hobby apps IMO.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-04-12 18:35
    Duane Degn wrote: »
    I've been using some cheap L298N to drive my steppers

    I should have mentioned limiting the current when using a h-bridge.

    When I used the cheap L298N chips I used a cog to generate a PWM signal to the enable pins. I could (kind of) control the current by adjusting the duty cycle of the PWM signal. I also used my current limiting bench supply when using L298N chips.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-04-12 18:51
    Duane Degn wrote: »
    I also used my current limiting bench supply when using L298N chips.

    The best current limiting power source to use is a 12V car battery because if there is a fault it will make sure that the fault is removed....permanently!!! :)

    (In fact, don't ever use a car battery unless you have the battery fused or poly-fused. Failure to do so can result in an explosion and/or a fire hazard)

    @Duane: Those L298s used to be paired with L297 chopper drivers but even then they required huge current sense resistors as well as all those Schottky diodes on the outputs. The newer single chip solutions with current sense embedded etc make this job so much simpler.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-12 19:04
    Is there something special about ULN2803s that they are used for small and simple unipolar steppers? Four transistors would perform far better and not suffer the 0.8V plus Vce(sat) drop of the darlingtons for starters. IMO the ULN2803 is a very poor choice for this application. Even with a current gain of 100 you can fully saturate the NPNs with 5 to 10ma of base drive plus transistors and diodes are cheaper than a ULN2803. You can also use all 4 transistors at once unlike the substrate limited 2803 where the current drive drops dramatically when you try to use more than one output at a time.

    @davidsaunders: I thought it was amusing at the time in Mark's DRV8711 thread that you couldn't see why bipolar stepper driver ICs were necessary and yet you were doing 3D printing. You know, it's not always about the speed, since bipolar stepper ICs have chopper drive they can run with much higher voltage and deliver higher torque as well as making microstepping possible which even if you didn't use it for finer resolution, it still makes for a smoother step. Anyway the unipolar steppers are pretty much fine for very small motors or hobby apps IMO.
    The reason for using ULN2803's is they do the job, and are only $0.50 (50 cents) each. I can not find low counts of Transistors for less than that for 8 transistors.

    The NEMA 17 motor that I had in place was a unipolar stepper, the replacement that I miss ordered is a bipolar stepper (I should have read more carefully, usually something as small as a NEMA 17 packaged stepper is unipolar).
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-12 19:13
    So it seems that no one knows a cheat on this one. I know the standard way to control bipolar steppers, I prefer the single directional current flow through external circuits that Unipolar steppers provide. I will just have my 3D printer down for a couple of days and order a Unipolar stepper.

    And to make sure that I do not make a mistake this time I will go with a smaller stepper (of the same kind I am using for the X and Y axis).

    I was using a NEMA 17 size motor as I initially thought a smaller motor would not provide the needed torch to lift the print bed, I was wrong on that (tested just a bit ago with the X axis stepper, and more weight than the bed should ever carry).

    My printer has a set of fixed rails for the X axis, with a rail between them for the Y axis, and a print bed that is raised or lowered for the Z axis. All drivers now are feed screws (initially I used a more expensive and less effective spooled fishing line [like many low cost 3D printers]).

    I burned out the previous stepper by driving it with a drill motor to fast (to spool the bed guide down the feed screw). My bad.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-04-12 19:30
    So it seems that no one knows a cheat on this one. I know the standard way to control bipolar steppers, I prefer the single directional current flow through external circuits that Unipolar steppers provide. I will just have my 3D printer down for a couple of days and order a Unipolar stepper.

    And to make sure that I do not make a mistake this time I will go with a smaller stepper (of the same kind I am using for the X and Y axis).

    I was using a NEMA 17 size motor as I initially thought a smaller motor would not provide the needed torch to lift the print bed, I was wrong on that (tested just a bit ago with the X axis stepper, and more weight than the bed should ever carry).

    My printer has a set of fixed rails for the X axis, with a rail between them for the Y axis, and a print bed that is raised or lowered for the Z axis. All drivers now are feed screws (initially I used a more expensive and less effective spooled fishing line [like many low cost 3D printers]).

    I burned out the previous stepper by driving it with a drill motor to fast (to spool the bed guide down the feed screw). My bad.

    A "cheat" might apply to games but in electronics it's a matter of either it can or it can't, there are no "go to the next level" cheat codes available. If you know the "standard way" to control bipolar motors you must also know that they require "bipolar" drive, not something that a sink only unipolar driver like the 2803 can produce. By the time you add extra parts to the 2803 to make it bipolar you have already made that part redundant as there are far better ways of doing it.

    As for transistors you don't need big TO220 types, just the little tiny TO92 style packs are fine, as many handle 1A or more continuously, unlike the 2803. These transistors, even the 2N2222 will work and are very cheap ($1.56/100 on ebay) although there are much better ones to use.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-12 19:41
    A "cheat" might apply to games but in electronics it's a matter of either it can or it can't, there are no "go to the next level" cheat codes available. If you know the "standard way" to control bipolar motors you must also know that they require "bipolar" drive, not something that a sink only unipolar driver like the 2803 can produce. By the time you add extra parts to the 2803 to make it bipolar you have already made that part redundant as there are far better ways of doing it.
    Not everything can be done. though there are tricks to do many things that are not often thought of. Look at how often it is shown on these forums that something that was believed impossible is proven doable, often times in the design of electronics, or the control there of. That is the kind of cheat I was hoping may have been possible. I understand it is not, and I will be buying another unipolar stepper (a few so I have backups).
    As for transistors you don't need big TO220 types, just the little tiny TO92 style packs are fine, as many handle 1A or more continuously, unlike the 2803. These transistors, even the 2N2222 will work and are very cheap ($1.56/100 on ebay) although there are much better ones to use.
    I have never attempted to push so much current through such a small transistor. I am impressed, and I have a bunch of them (surface mount though), so I will have to make a PCB to replace my ULN2803's.
  • idbruceidbruce Posts: 6,197
    edited 2015-04-12 20:53
    @Peter
    As for transistors you don't need big TO220 types

    When I first started getting involved with machinery, I was driving NEMA 23 with 12V going through TIP120s. I was burning up those transistors left and right :) Those babies would get so darn hot (as well as the motors), and one time I did a temp check with my finger tip.... I learned not to do that very quickly :) My finger was sore for about two weeks :) LOL
  • idbruceidbruce Posts: 6,197
    edited 2015-04-12 21:00
    Here is a photo of my first days of driving unipolar motors with transistors.
    810 x 599 - 162K
  • msrobotsmsrobots Posts: 3,709
    edited 2015-04-12 21:05
    ...I burned out the previous stepper by driving it with a drill motor to fast (to spool the bed guide down the feed screw). My bad.

    I think doing this is generally a bad idea. Driving the stepper with a drill will generate electricity and feed it back into your system. Like a generator.

    Don't do that.

    Mike
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-13 04:15
    msrobots wrote: »
    I think doing this is generally a bad idea. Driving the stepper with a drill will generate electricity and feed it back into your system. Like a generator.

    Don't do that.

    Mike
    I am aware of that. It was just a faster way to put it together (the stepper was disconnected from everything else). I did not think it would burn out the motor, I learned a lesson on that one, and from now on I will just move them by hand to be slow enough not to overload the motor.
  • kwinnkwinn Posts: 8,697
    edited 2015-04-13 04:51
    There are cheats, but as stated in my previous post they are not really practical or useful.

    Resistors could be used on the uln transistors between the collectors and V+ and the winding connected between them. Problem is motor current is reduced and power dissipation is increased. Works for testing motors at no load but not much good for anything else.

    PNP transistors could be added, and driven by the uln NPN on the opposite side of the motor coil to create an H bridge. Works, but not a great or reliable design.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2015-04-13 04:51
    I just ordered 3 extra unipolar steppers, and a L293D to drive the bipolar stepper for a future project.

    Though I do not know if I will ever put the Bipolar stepper to use, as I prefer unipolar steppers.

    I may just wire it to a couple rectifier bridges and use it as a small generator hooked to an impeller and driven by the wind (should be able to charge 3V batteries with it :) ).
  • Mark_TMark_T Posts: 1,981
    edited 2015-04-13 04:59
    Is there something special about ULN2803s that they are used for small and simple unipolar steppers? Four transistors would perform far better and not suffer the 0.8V plus Vce(sat) drop of the darlingtons for starters.

    The advantage is one part instead of 8 (4 transistors and 4 freewheel diodes) - much simpler and easier to build. With 12V or 24V
    supply the voltage drop isn't too critical. If a multiple BJT or MOSFET DIP chip with freewheel diodes was available it would
    obviously be better (there are some FET drop-in replacements for the 2803 these days), the ULN2803 is very easy to source
    though.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-04-13 11:18
    kwinn wrote:
    Resistors could be used on the uln transistors between the collectors and V+ and the winding connected between them. Problem is motor current is reduced and power dissipation is increased. Works for testing motors at no load but not much good for anything else.
    This really isn't the worst idea in the world. The idea is that you use a much higher voltage than the motor is rated for (e.g. 5X) and add enough resistance that the motor sees its rated voltage at its rated current. The advantage is that, because of the motor's inductance, it will see the much higher voltage at first, permitting the current to build in its windings much more quickly, producing more torque at higher speeds. This "L4R" technique is used quite often with unipolar motors, but the principle extends to the type of bipolar drive you mention. The downside, of course, is the power wasted when the resistors are pulled to ground.

    -Phil
Sign In or Register to comment.