SoftBattery         Turn your PC into a motor controller
Products

 Control

SeriCon
PulsePar
ScopePar

 3D Graphics

Canvas Commander

 Programming

CalcVendor
AppliCradle
dwTerm

 Utilities

Gaia4D
TransPad
UtilPad
F2F

FAQ/Errata/Tips

Advertize
Applications
Measurement
Motor
Modeling
Anaglyph
About
Links


Here is how to drive a DC motor or a stepper motor, using SeriCon a universal serial port software.

A DC motor can rotate, stop and rotate in the opposite direction, if it is driven by power FETs, transistors or a special "driver" IC consisting of them, and if this driver circuit's outputs are turned on and off by inputs. For example, if both the two outputs (connected to the motor) have the same voltage, the motor stops, and if not, it rotates. SeriCon can let you turn on and off RTS/DTR to control a DC motor, if the pins are connected to the driver IC's inputs, by way of a level-shifter IC (since driver ICs need TTL/CMOS-compatible input voltages).

How to drive a stepper motor is not that simple. There should be 4 pulse signals into the motor and there are various ways in how they vary to rotate the rotor a unit angle called one "step". One of the most popular ways is the "2-wire way", in which two signals are just the inverses of the other two called "A" and "B" pulsating as below:

Any level change in the signals rotates a step angle and can be called a step (Therefore there are 6 steps in this figure). How can we define a step using one statement? An answer is "B copies A if they are different, and A changes if they are the same". The motor rotates in the opposite direction if they swap the role in this definition of a step.

Press the sTep button to recognize that RTS and DTR correspond to A and B respectively explained above. Check the bacK button to change the rotation direction. While the sTep button lets you make manual steps, the aUto button can be checked to repeat stepping periodically. The period is specified by the spinner (up-down control) next to the button, in miliseconds.

If your stepper motor should stop before the rotating object hits a boundary surface or something, you can detect it using a sensor to turn one of CTS, DSR, or RLSD on or off which can be selected to stop the stepping. Use the [Bit]->[Stepper...] menu to choose input pins and the levels as the condition to stop, as the following screenshot.

This screenshot depicts the default situation, where no input disables stepping. But, for example, if Cts is checked in this dialog box, any step will not happen unless the CTS pin is low. If you want the low CTS level to disable the stepping, uncheck the Level button. In summary, steps are disabled if any one or more checked inputs has the specified levels.


Copyright(C) 2009 http://www.softbattery.net