Hi Henrik

Many thanks for taking the time to reply so thoroughly, your input is valuable.

The rack will be on an angle, about 20 degrees which means the down stroke is ok but the back stroke will be pulling uphill slightly. The gearing of the rack and pinion has not yet been thought of as I have no idea of motor strength yet.

Speed: 30 to 100 back/forth movements per minute
Stroke: anything from 1 to 4 inches
Power: max 2kg. BUT if the rack slips and the motor loses its place I want the microswitch in place so it makes contact to tell the motor it slipped, hope that makes sense.

Speed and stroke will be independantly controlled via potentiometers, unless you know a better way.

Which PICKit3 version do I need? PG164130 or DV164131

If you need anymore answers please let me know.