# How does the Linistepper, open source linear Stepper Motor Drive work?

I have been trying to get the Linistepper to work, however I can't seem the understand the working of the circuit.

The circuit is here.

The issues that I'm unclear about are:

1. What are the diodes D1-D6 for?
2. How does one calculate the resistors R18 - R23 for setting different microstepping current levels? (It is currently set to 0, 25, 55 ,100 % respectively).
3. How does current regulation in the circuit work.
4. PWM is used to achieve 3600 steps, how is this done?

The how it works page from the Linistepper home page might help: http://www.piclist.com/techref/io/stepper/linistep/lini_wks.htm

• Thanks for the info James, I had visited that page earlier and although the explanation is very lucid, I couldn't get the hang of it, I will try again though... – Kevin Boyd Mar 10 '10 at 11:28
• @jamesNewton, a link on its own is not considered an answer. If you can bring over and teach it here then it is a good answer. This will die completely with link rot. If you teach it here and then use links to read further and to reference the answer will last forever and with the full contents they can look up the source. – Kortuk Feb 25 '12 at 8:03

You might try this forum Electro-tech-online The creator of Linistepper, Roman Black, frequents it. He goes by MR RB. Who better to get your answers from?

• Who better to get your answers from? The Electronics and Robotics Stackexchange site? Just kidding, a link to the creator of the device is just about as good as it gets. – Kevin Vermeer Oct 4 '10 at 1:54
• @Mark, Excellent advice! – Kevin Boyd Nov 10 '11 at 21:05

The Linistepper generates 6 microsteps in hardware, using the diodes and resistors to make the correct voltage levels for the 6 microsteps. This gives 200 x6 = 1200 steps/rotation which is one of the Linistepper microstep modes that you can select.

To make 3600 steps/rotation the Linistepper alternates very fast in software between 2 of the microsteps. So it either does AAA or AAB or ABB (where A and B are 2 sequential microsteps) and at a high frequency around 333 kHz if you are using the 16MHz xtal. The overall effect is to provide 3600 microsteps from the 1200 hardware microsteps.

Interesting note; the Linistepper is the only stepper driver that produces 3600 steps/rotation, making it ideal for things that work in degrees as it makes 10 microsteps per degree, also the smoothing caps C5 and C6 can be tuned (by choosing their value) to give very smooth transition from one microstep to the next when running at the "tuned" motor speed. Both those factors make it ideal for telescope movement (astronomy etc) and pan/tilt setups etc.

• If I'm not mistaken are you by any chance Mr. Roman Black, the inventor of the LiniStepper? – Kevin Boyd Oct 4 '10 at 8:46
• I'm sorry but I still don't understand what you mean by alternating fast between 2 microsteps, like AAA or AAB. – Kevin Boyd Oct 4 '10 at 8:53
• @Boyd: The Linistepper, like all stepper motor drivers, puts out a constant voltage on its 4 output wires at some positions. Let's call this "A" at position number 18 (where it puts out AAAAAAAAAAAA...), and "B" at position number 21 ( – davidcary Feb 15 '11 at 16:01
• @Boyd: ... "B" at position number 21, where it puts out BBBBBBBBBBBBBBBB... . When you command the Linistepper to hold at position 19, it oscillates AABAABAABAABAAB... . You might imagine that the motor moves to position 18, then moves to position 21, then moves back to 18, but oscillation is so fast that there isn't time for the motor to move more than a tiny fraction of that distance -- that the mechanical inertia of the motor and the electrical low-pass filtering inside the Linistepper keep the motor very close to a fixed location in-between position 18 and position 21. – davidcary Feb 15 '11 at 16:12

Different output voltages are achieved by turning the PIC outputs on and off. The diodes prevent current flowing the wrong way when some outputs are high and some are low. It's a clever idea.

The 3600 steps are achieved with "micro-stepping".

• I was wondering how the circuit achive that 3600 number, what components come into play for that? As regards the diodes I'm a bit skeptical about them being used for just PIC protection... could you elaborate why do you think they are PIC pin protection diodes? – Kevin Boyd Mar 5 '10 at 14:53
• See my corrected text. I think that you will find details of micro-stepping and PWM on the Microchip web site - look at the motor control pages. – Leon Heller Mar 5 '10 at 14:57