Shop OBEX P1 Docs P2 Docs Learn Events
Salvaged Stepper Motor from scanner driven by a BS2 (video) — Parallax Forums

Salvaged Stepper Motor from scanner driven by a BS2 (video)

Martin_HMartin_H Posts: 4,051
edited 2011-12-17 08:00 in General Discussion
Someone gave me an old scanner, so I naturally took it apart. The most interesting bit was the stepper motor and scan head drive system. Now I know this isn't exactly revolutionary, but I've never worked with stepper motors, so I decided to try. I built a control board using some TIP 120's which I then pulsed in sequence using my BS2e and code from the Parallax website from their unipolar stepper motor product.

The result sort of worked. Without the belt attached I could turn the stepper either direction, but with the belt attached I couldn't get much torque out of it. As the stepper motor had no markings on it, nor did the scanner come with its original power supply, I had no idea what voltage it required. So I feed it 6 volts, 12 volts, 18 volts, and finally 27 volts. At 6 and 12 volts it barely turned, at 18 it feebly worked, and at 27 it got hot and I pulled the plug quickly. Anyway here's a video:

[video=youtube_share;oh6Ag4xvV3E]

I can see why steppers fell out of favor as it takes four pins, with that many you could drive an h bridge and read a shaft encoder on a DC motor.

Comments

  • kwinnkwinn Posts: 8,697
    edited 2011-12-14 19:57
    A lot of stepper motors are driven with high voltages and some form of current limiting to give them more torque. The windings are inductors so it takes time for the current to increase. The higher the voltage the less the time required. The old Okidata 82 printers drove 5V stepper motors with 35 volts to start them then switched to 5 volts for the rest of the step or to hold them.
  • GadgetmanGadgetman Posts: 2,436
    edited 2011-12-14 23:41
    Steppers are NICE. And you get much better accuracy than with a DC motor/shaft encoder solution.

    Typical steppers these days are 200step/1.8 degree rotation, or even 400step/0.9degree rotation.
    That is, a it needs either 200 or 400 FULL steps to rotate a single turn. Start halfstepping them, (400/800) or go microstepping(16 microsteps per full step) and you hit ludicrous numbers of steps.(3200/6400 steps)

    One example...
    On the Mendel/Prusa Mendel 3D printers they use steppers.
    They use belt-drives to transfer the motion to the moving parts, and with T5 belts and cogwheels with 8 cogs,(T5 = 5mm between cogs) you get 40mm circumference on the drive wheel, and also 40mm travel for one whole rotation. Divide that on the number of possible steps(3200), and you get a ludicrous short distance travel per step. Even just dividing by the number of full steps(200) gets you a travel of 0.2mm / step.
    Combine it with a 'worm drive' (such as the Z-axis on the 3D printers, where they've just mounted a M8 threaded rod with a pitch of 1.25mm on the motors. That is, 1.25mm travel per full rotation. Also see the head-positioning on 3.5" and 5.25" floppy drives.) and well...

    That is one advantage with steppers...

    The OTHER great advantage is the HOLD. If you energise a winding, and keep it energised, the motor doesn't continue to spin, like a DC motor would. No, it stays there. Unless you apply a greater mechanical force, it won't move.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-12-15 01:53
    Excessive heat is always a good indicator that something is wrong. So bring down your voltage to a more sensible level.

    Stepper motors are at the core of a lot of precision digital positioning devices. They are not really made for RPMs; they are intended for precise, repeatable positioning. Four wires is not really that big a deal and these days you can get a good little stepper motor controller for a very reasonable price. Take a look at what Pololu sells.

    Of course, using TIP120s and a BS2 or Propeller offers the opportunity to do more with the encoding. But overall, steppers are easy and here to stay.

    Apparently, the older the scanner, the best the hardware for hackers. My scanner is newer and really doesn't offer much to salvage. I have considered shifting to a digital camera and photo bench for all my scanning needs as it is faster and as good or better - but salvaging my scanner is rather useless.
  • idbruceidbruce Posts: 6,197
    edited 2011-12-15 04:25
    @Martin_H

    Ahhh.... I can remember those days very well. I performed a very similar experiment many years back, which has forever changed my life, because I am now build CNC and other types of machines using stepper motors.

    Take a look at the pic below and you will see several boards using TIP120 transistors to control numerous stepper motors. In addition to the TIP120s, these boards also utilize the 74HC595 to expand the number output pins. One of the biggest problems with this type of board is the ability to control the current going through the motor coils. To make the motors go faster, you must supply higher voltage, but you also want to keep the current down. With this type of board, you could use current limiting resistors to accomplish this task, but they can get rather big and costly, being dependant upon the current. As you increase the voltage, you also want to increase the speed of the executing code. It is for this reason, you will probably get much better performance, trying a very similar experiment with a Propeller chip. That being said, you will never get the performance from this type of setup like you would if you were using PWM with current control.

    A board similar to the one linked below would really make this setup ZING.
    http://www.pololu.com/catalog/product/1183

    Bruce
    1024 x 768 - 161K
  • Martin_HMartin_H Posts: 4,051
    edited 2011-12-15 04:45
    @idbruce, that makes total sense as the original control board had some huge resistors on it, and that's why I can't get enough torque at lower voltage, but at higher voltage the motor overheats. I will try it again with my Propeller chip, we'll see if overheating damaged the motor, and how things go.
  • idbruceidbruce Posts: 6,197
    edited 2011-12-15 04:51
    Martin_H

    Keep in mind that as you drive up the voltage, you are also increasing the current. If you go to high with the voltage, providing that you are not using current limiting resistors, you will start releasing the magic smoke contained within the TIP120s.

    WARNING!!!!!!!!!!!!!!!!!!!!!!!!

    If you pump a lot of current through the TIP120s, they will get very HOTTTT. Do not touch them to see how hot they are getting :)

    Bruce

    EDIT: Unless of course you require a duplication of the mounting tab on your finger.
  • idbruceidbruce Posts: 6,197
    edited 2011-12-15 04:59
    Martin_H

    I would imagine that you will burn up a TIP120 before you damage the motor.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-12-15 06:07
    The PWM current limiting of stepper motors is not very well documented on the web, but it isn't that hard to do. And it is often easier to just provide current limiting resistors it each coil, if you want solid simple protection.

    In general, the insulation in the stepper motors will tolerate quite a bit more voltage than their rating, as long as the wire doesn't get so hot as to char the insulation. That is why PWM is relied upon. Having a temperature sensor monitor how hot the stepper is getting (and maybe the TIP120) can guide you to making good decisions toward a stable scheme.

    I think you will soon discover that companies religiously guard their top notch stepper motor designs as there are a lot of bits of hard earned info that make a really successful, durable motor controller. The hobby info is merely a fundamental introduction.
  • idbruceidbruce Posts: 6,197
    edited 2011-12-15 07:09
    And it is often easier to just provide current limiting resistors it each coil, if you want solid simple protection.

    Perhaps simple, but costly and ugly. Additionally, with BIG current limiting resistors, you are restricted to one voltage. If you want to change voltages, you must buy another set of BIG resistors. Whereas with PWM current limiting, it is simply a 1/8 or 1/4 watt resistor to set max current.

    To each their own.

    Bruce
  • tobdectobdec Posts: 267
    edited 2011-12-16 07:59
    Ive found if your just want to power a few small bi-polar steppers with the HW board use Texas Instruments SN754410 dual h-bridge IC. These are cheap and great for small projects, anything bigger than a boe-bot and you need a custom solution as they can only provide about half an amp.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-12-16 08:52
    I'll add (I didn't see it mentioned in the other replies) if you get poor stepping in one direction, one likely cause is the sequence is not right. You can do some quick tests by using wave stepping, which powers one coil at a time instead of two.

    The other likely cause is that it very much sounds like the stepper isn't getting enough current. I doubt the motors were originally driven higher than 5V or 12V, but likely at MUCH more current (probably chopped as well) than you're providing here.

    Homebrew drivers are okay, but they seldom work as well as a custom chip, even an oldie like the L298, which was made for the job.

    -- Gordon
  • Martin_HMartin_H Posts: 4,051
    edited 2011-12-16 11:05
    I'll add (I didn't see it mentioned in the other replies) if you get poor stepping in one direction, one likely cause is the sequence is not right. You can do some quick tests by using wave stepping, which powers one coil at a time instead of two.

    The other likely cause is that it very much sounds like the stepper isn't getting enough current. I doubt the motors were originally driven higher than 5V or 12V, but likely at MUCH more current (probably chopped as well) than you're providing here.

    Homebrew drivers are okay, but they seldom work as well as a custom chip, even an oldie like the L298, which was made for the job.

    -- Gordon

    Thanks, I'll give a second look to step sequencing. If there's a problem it's not the code as that was a cut and paste, but in how I identified the coils. I used my multimeter and found a lead with half the resistance of the other leads. I then applied 7 volts to it and then grounded pairs of other leads to identify a pair from a single coil. Current is possible because I have no idea what sort of power source this thing formerly used.

    I have an L298 which I plan to try with a bipolar stepper motor I salvaged out of another printer. I couldn't try it with this one because I thought the L298 wouldn't work with a unipolar motor.
  • idbruceidbruce Posts: 6,197
    edited 2011-12-16 11:11
    I couldn't try it with this one because I though the L298 wouldn't work with a unipolar motor.

    Martin

    You can configure (wire) most unipolars to run as bipolar, but you cannot configure a bipolar as a unipolar.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-12-16 11:12
    idbruce wrote: »
    You can configure (wire) most unipolars to run as bipolar, but you cannot configure a bipolar as a unipolar.

    Hmm, I thought that was only true for 6 and 8 lead unipolars and not the 5 lead ones?
  • idbruceidbruce Posts: 6,197
    edited 2011-12-16 11:17
    Martin

    I believe you are correct about the five wire motors. If I remember, I will try to look it up later.

    Bruce
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-12-16 12:16
    I'm pretty sure you can't use a 5-lead stepper in bipolar mode, since applying current through one coil would apply it at the center tap of the other. .

    The L298 is not intended for use in unipolar drive (something about current drive through the two coils), though I've seen some circuits that did it that way. There are plenty of other unipolar drivers out there. I've always had a fondness for the Allegro controllers, maybe because they used to send me free parts for evaluation!

    -- Gordon
  • Al BoothAl Booth Posts: 137
    edited 2011-12-16 15:29
    4, 6, and 8 lead stepper motors can be configured as bipolar
    5, 6, and 8 lead stepper motors can be configured as unipolar

    Al
  • idbruceidbruce Posts: 6,197
    edited 2011-12-16 15:40
    Al

    4 wire steppers are already bipolar and 5, 6, and 8 are already unipolar
  • Martin_HMartin_H Posts: 4,051
    edited 2011-12-16 17:14
    I had a peak under the plastic shield of the unipolar stepper where the wires connect and compared it to the bipolar stepper. They are basically the same and have six terminals, and the bipolar stepper has four of six connected to wires. The unipolar stepper has four connected in the same places with a fifth connected to the center. There is also a jumper between the two center terminals, and I bet cutting this jumper would convert it to a bipolar stepper.
  • Al BoothAl Booth Posts: 137
    edited 2011-12-17 08:00
    idbruce

    I partially agree with your correction, but a more accurate statement is

    4 lead stepper motors are bipolar
    5 lead stepper motors are unipolar
    6 and 8 lead motors can be configured as either unipolar or bipolar

    NOTE: This assumes that we are NOT talking about the 5-phase Vexta stepper motors.

    Al
Sign In or Register to comment.