Re: Stepper motor driver -- schematic help...



Adman wrote:
Hi all... I'm a software guy trying to learn the ropes of electronics.

I have the goal of controlling a stepper motor using my PC parallel
port to create +5v control signals. Shouldn't be that hard, right?

My understanding of 5-wire stepper motors is that there will be one
common power wire, and four other wires coming out. Attach the power
wire to the power source, and attach the other wires to ground (using
some logic to connect the right ones to ground at the right time), and
you're all set.

I bought a unipolar stepper motor... the first one listed on this
page:

http://www.futurlec.com/StepperMotors.shtml

One thing I noticed is that the spec sheet lists that it has a "drive
circuit".

Some more investigation led me here:

http://www.eminebea.com/content/html/en/engineering/motors/pm_motor/s...

Since I bought a unipolar stepper, I think the first schematic on the
page applies. I'm not quite sure how to read it. It appears that
what I want to do is attach my parallel port data pins DIRECTLY to the
bases of each of the transistors (which is what the four non-power
wires coming out of the motor will be).

If that's the case, it looks like I use my parallel port control
signals to activate each transistor according to activate the internal
electromagnets in the proper order. Being a smart software guy, I can
handle that. When I do that, the power will go through the coils,
through the transistors, and into the little black boxes.

What are those little black boxes? Some sort of internal ground?

Sorry for the newbish questions, but every description of a unipolar
stepper motor seems to imply that I need to build or buy my own drive
circuitry. So the idea that this one might come with its own already
built right in is throwing me for a loop.

If someone could confirm my suspicions, or point me in the right
direction, I'd appreciate it.

Also, I don't actually have the motor in my hand yet. It's being
shipped. I'm just trying to get things figured out before it gets
here. :)

Thanks!
Adman
Setting up a simple stepper motor should be a slam-dunk...but it ain't...
and it gets much worse if you really want to do something interesting
with the motion.

Rule number one is, "NEVER, EVER use the parallel port of your laptop
or onboard motherboard parallel port." ALWAYS use a plug-in parallel port
card that can be easily replaced. Even if you do everything right,
you can still blow up your port. I killed my motherbord just plugging
in the parallel cable with nothing on the other end. The system had
been working perfectly for months.

Never drive the motor transistors directly from your parallel port.
The port has limited (and variable between systems) pull-up capability.
And you need some protection/current limit resistors in series with
the base. You need higher-voltage than you'd initially expect, high gain transistors. Darlingtons
make the available drive voltage problem worse. So, while it's certainly
possible to select working devices, random junkbox transistors will
not likely work well.

Even if you're a smart programmer, some things are beyond your control
an may behave differently on different systems. What happens on the
port during powerup/down? If you boot the system to dos or some other
low level language, you have some hope of reasonable and timely
control over the port. From the application level of a modern multi-tasking
operating system, you have no idea how long it will take for your command to actually reach the port pins. And what happens when the
printer driver decides to ask the printer how much ink is left?

When I built a 3-axis control system 15 years ago, I used DOS and still
had to use 3 FPGA's programmed as stepper controllers to make the motion
work smoothly and reliably with the avaialable computer processing power. I was amazed at how little timing jitter it took to
shake the mechanical stuff apart.

Next time I rework the system, I'm going to use a microcontroller to do
the motion control and a subset of a Gerber command interpreter. Serial
gerber commands are the least obtrusive way to go unless you want to get
into all the issues with USB.

So, what if you want to make some useful motion?
Stepper motors are current controlled devices with large inductance and
winding resistance. When you apply voltage, the initial current is zero.
The more voltage you apply, the faster you can get the current to rise.
But you can't leave all that voltage on the winding for long or you'll
burn up the windings. So, you really want a high voltage to drive up to
nominal current, hold there long enough for movement to happen then
reduce the current to the minimum to hold the mechanical assembly stationary until the next step.

When you turn off the current, the coil voltage will rise to some high value. You probably want to limit this. Normally, you'd think just use
a reverse clamp diode. But that makes the current decay time constant
too long to let you step the motor fast.

There are lots of tradeoffs to making all this work. It's not difficult
hardware design, but it IS hardware design.

But the most important issue is not to blow up your computer while
experimenting. Most onboard parallel port controllers are in the same chip
with lots of other stuff. When you kill a parallel port pin, you usually take out the whole computer. At the very least, use some TTL
buffers (in sockets) in the path.

mike


--
Return address is VALID!
.



Relevant Pages

  • Re: Stepper motor driver -- schematic help...
    ... I have the goal of controlling a stepper motor using my PC parallel ... with the external electronics it is quite possible to permanently damage a PC from the parallel port. ... BTW You will find that under modern operating systems like 2k, XP, NT & Vista that it requires a suitable driver stub to gain direct bitwise control over a parallel port. ... common power wire, and four other wires coming out. ...
    (sci.electronics.design)
  • Re: Stepper motor driver -- schematic help...
    ... I have the goal of controlling a stepper motor using my PC parallel ... port to create +5v control signals. ... and four other wires coming out. ... it looks like I use my parallel port control ...
    (sci.electronics.design)
  • Re: Stepper motor driver -- schematic help...
    ... I have the goal of controlling a stepper motor using my PC parallel ... port to create +5v control signals. ... and four other wires coming out. ... it looks like I use my parallel port control ...
    (sci.electronics.design)
  • Re: Robotic in Matlab
    ... It are going to be move for a stepper motor. ... how i am going to control it by parallell port. ... Then use LabJack matlab interface to read/write the commands to the ...
    (comp.soft-sys.matlab)
  • Motor Controller Stepper/Servo with Feed Back
    ... Purpose is to run a motor at sub arc minute rotation per second about ... I have seen many setups that solely rely on Parallel port and to me ... USB command executer any PIC that will control the whole ...
    (sci.electronics.design)