Stepper Motors

ftComputing : Programme für die fischertechnik-Interfaces und -konstruktionskästen
  
ftComputing.de
Home
Back
Sitemap
Index
Links
Impressum
Mail
 

Operating Stepper Motors

Is an interesting point. ROBO Interface doesn't support it directly. Therefore on this place a little library to do it. Constructed in the style of the delivered Position ES library. It contains subs for operating single stepper motors using ROBO Pro. It works more slow than quick, but it is nice to look them working. 

Operating them as X/Y-couples (plot mode) seems me to be too complicated. I think, changing to the compatibility mode and operating them with e.g. C# (in german) and the assembly FishFa30.DLL (in german, class FishStep) is the better solution.

For notes to operate steppers look to Schritt1 and Schritt2 (in german). The described timing for the Intelligent Interface is nearly the same for the ROBO Interface.

The ROBO Pro solution shown here, has ben tested with the ROBO Interface - USB - ROBO Pro and the Intelligent Interface - COM - ROBO Pro.

The Test Assembly

Very simple : Motor on the left connected to M1/M2 with end switch I1, motor on the right connected to M3/M4 with end switch I3. This a pure experimental construction. To simulate home position, the appropriate end switch must be pressed manual.

Wiring : M1 + (front pin) : 
red line, - : black
M2 + : gray, - : green.

The Main Program

Is very simple :

One sub call followed by the next and some pauses to look for results.

Drive to home position. The position 0 has a special meaning. In this case no steps are counted, it runs until the end switch is pressed.

Run to position 48 (counted from end switch) with the left motor.

Run to position 48 (counted from end switch) with the right motor.

Back to 1 

 

Running simultanously to position X = 64 and Y = 64. Because of there is no interpolation, first it runs with an angle of 45° and than linear. In this case only 45°.

 

Rechts : Running Right

Used to run a stepper to the right :

M1 : left, Pause 10 ms

M2 : left, Pause 10 ms

M1 : right, --

M2 : right

The motors offered by fischertechnik or Knobloch have 7.5° steps. A cycle with 30° therefore is the smallest unit to be controlled (12 cycles = 1 revolving).

 

StepTo : Running to Position

Correponds mostly to the library sub Pos from Position ES.

Impulse counting was replaced by subs Links and Rechts.

The Links (left) on the right side is responsible for running home (to end switch).

StepToX : Running to Position X

To simplify the practical use, motors, switches and global variables are fixed for running X.

 

StepToXY : Running to Position X/Y

The subs StepX and StepY as X/Y-couples. Y thereby runs in its own thread, which is started with the sub call and and by reaching position.

Notice : The motors run independent from each other, therefore there is no straight line between two points. Look above.

Update (dd.mm.yy) : 10.03.2005