Shop OBEX P1 Docs P2 Docs Learn Events
"Jog" type inputs for stepper motors controllers — Parallax Forums

"Jog" type inputs for stepper motors controllers

BenjBenj Posts: 66
edited 2015-02-03 22:10 in General Discussion
I would like to use a prop for handling 4 stepper motors. I would be using DRV8825 or similar type drivers on the steppers. I'm sure this is pretty simple, but I need to be able to have an external set of buttons that (if anyone has experience with CNC) will "jog" the motors. After a certain amount of time, I want the buttons to be disabled and the motors to "home" themselves to a set of limit switches.

I've looked at the unipolar driver in the OBEX, but am not sure how to get started with inputting the external button signals into actually sending the direction and step signals.

Can anyone push me in the right direction?

If I can get that part working, then I will tackle the "homing" portion.

Benj

Comments

  • idbruceidbruce Posts: 6,197
    edited 2015-02-03 16:39
    I could most likely help you, but I have some questions:

    Will ramping be a requirement of the jog or just a steady pace?
    After a certain amount of time, I want the buttons to be disabled and the motors to "home" themselves to a set of limit switches.

    What do you mean by having the buttons disabled? Is this just basically a requirement of a button press initiating a direction then finding home?

    You mention unipolar, are you bound to uniplar drivers, or is bipolar okay?

    How many buttons do you want and what other IO is required by your project?
  • idbruceidbruce Posts: 6,197
    edited 2015-02-03 16:45
    According to this webpage, the DRV8825 is a bipolar driver : https://www.pololu.com/product/2133
  • BenjBenj Posts: 66
    edited 2015-02-03 17:05
    Thank you for the replies. I'm not bound to any particular style of motor or driver at this point as I haven't purchased anything yet. By "disabled" I mean that the end user can operate all four axis for, let's say 30 seconds. After 30 seconds, all axis return to a predetermined location or perhaps run to limit switches. During their return trip, pushing the buttons have no effect on jogging the motors. I would like ramping. 4 buttons, X+, X-, Y+, Y-. The other two axis will not be controlled by buttons.

    Benj
  • kwinnkwinn Posts: 8,697
    edited 2015-02-03 20:18
    The program running on the propeller would read the state of four switches and based on which switches are closed would command the stepper motors to turn in one direction. The software would ignore the switches after 30 seconds and return the steppers to the home position. Something like the Parallax 27801-5-Position-Switch would work for this.
  • idbruceidbruce Posts: 6,197
    edited 2015-02-03 22:10
    Benj

    Sounds a bit challenging, but of course it can be done.

    There are still more questions and decisions must be made before proceeding.

    For instance, how much torque will be required from the motors? Motor torque is going to be a key factor in motor and driver selection. Once you find a motor that has the desired torque, a driver must then be selected to match the amperage of the motor. Additionally, the selection of the driver, will also be based upon the type of motor. For example, many unipolar stepper motors can be driven by bipolar drivers, but you cannot run a bipolar motor on a unipolar driver. I personally use hybrid unipolar stepper motors to run on bipolar drivers. If you decide to go in a similar fashion, I can certainly help you, because I have been writing several software drivers for this particular setup over the past several years. However unipolar motors is not the key to the software, but rather the bipolar drivers. When selecting motors based upon torque, you should select motors that are either bipolar or unipolars that can be wired up as bipolar, to enable them to be run on bipolar drivers.

    Bipolar drivers require a step and direction input. The direction input is basically a set and forget situation, while the step input requires a pulse to keep it moving. Just recently, I released a new stepper driver object within the forum, that I had written for bipolar drivers, and it works very well, once you have the paramenters dialed in correctly. Here is a link to that new driver: http://forums.parallax.com/showthread.php/159853-New-Stepper-Driver-Object-A-Variant-Of-PulseTheStepPin

    With some careful thought, this driver can be altered to perform the tasks that you desire.
Sign In or Register to comment.