How can I get an Arduino to do the following to a Stepper Motor installed on a "Lead-screw" attached to my table-saw's Fence?

  1. Turn the "lead-screw" clockwise when I press a given button, UNTIL I release the button.

  2. Turn the same "lead-screw" counter-clockwise, when I press another button, UNTIL I release the button.

  3. Adjust a "speed" knob, to control the motor's speed when the fence is moving; from very fast to very slow; and even stop when the control is completely counter-clockwise.

  4. Turn a switch off, which will remove all control to the motor; so I can turn the shaft manually without resistance, whenever I do not want the fence to be under control of the motor.

That is ALL I need.

It is that simple. So what do I need? What do I need to purchase? I am a novice.

  • First you need to figure out the mechanical requirement, ie, how big a motor and what drive voltage which is determined largely by speed, and even if you want to directly couple the shafts or use timing belts for reduction and to ease mounting tolerances - none of which are really an Arduino questions. 3d printer parts are applicable to a certain light load range and readily available to get a tactile sense of. For more substantial tasks the are a lot of more expensive solutions for CNC machine tools. The Arduino part sounds like a simple combination of a stepper sketch and an analog read one. Jun 9, 2017 at 18:32
  • patdee, I edited your question and removed an irrelevant paragraph. You can post such paragraphs on arduino.meta.stackexchange.com if you wish. Jun 9, 2017 at 19:12

2 Answers 2


I've got to ask here. Why use a stepper? This would be fairly easy with two button switches and a regular DC motor. One switch provides power to drive the motor CW the 2nd motor drives it CCW.

You would still need to choose a motor with the right torque but IMHO this method would be WAY easier than using a stepper, and arduino, writing code, etc.


We can't tell you what to buy. We can help you understand how it will work, though, and what you should look for.

First off you need a suitable stepper motor. We can't help you with that. You need one that will a) connect to your lead screw in some way, and b) have enough power to drive the screw. Maybe the robotics stack-exchange can help you better with that.

Once you have identified your stepper motor you need a driver that can control it. There's two kinds of stepper motor - "unipolar" and "bipolar" and the type of stepper motor you have chosen will determine the type of driver you need. Suffice it to say if you have a "unipolar" stepper motor you need a "unipolar" driver.

In brief: a bipolar stepper motor usually has 4 wires and needs a pair of H-bridges to drive it. A unipolar stepper driver normally has 5 or 6 wires and just needs beefy MOSFETs to drive it.

Your driver will, of course, need to be able to provide enough current to drive your stepper motor. For the finer details of the driver the electronics stack-exchange will most likely have the most expertise.

One further thing you will need is a potentiometer (and fancy knob etc) to set the speed.

Then it's just a matter of "gluing" everything together through the Arduino and writing the software.

How you write the software for the Arduino depends on the driver for your stepper motor. There are libraries with examples for most types. Adding in an analogRead(...) and map(...) to convert the voltage from the potentiometer into a speed should be simple enough.

  • Thank you user37968. But there are a number of reason why I want to use stepper motors. To user Majenko♦, I gave ALL you need to determine what I need. I used the word "TABLE SAW FENCE". It should be assumed that I have installed a lead screw on the fence. Any sawyer knows that the fence is moved to the left or right and mine takes VERY little effort; because it rides on roller bearings. All the stuff you gave me was FAR and way above what I need. Thanks anyway for trying. patdee
    – patdee
    Sep 8, 2017 at 19:59
  • @patdee Well I am sorry, but we are electronic engineers and makers, not "sawyers" (what are they? Do you mean carpenters?) I, and many others here, have no clue what a "fence" is in this context. To me a fence is what separates me from my neighbours, and I don't want it to move. My answer contained all the information you need to know to use a stepper motor. If you don't want to know that kind of information then you are looking for a ready made product and you don't want to be asking about that here.
    – Majenko
    Sep 9, 2017 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.