Stepper motors convert electrical energy into discrete mechanical rotation. They are ideally suited for many measurement and control applications where positional accuracy is important. Stepping motors have the following advantages:
- Full torque when rotation is stopped. This is in contrast to brushed and brushless DC motors, which cannot provide full torque continuously when the rotor is stopped. This aids in maintaining the current position.
- Precise open-loop positioning and repetition. Stepper motors move in discrete steps as long as the motor stays under the maximum torque and current limits. This allows the rotor position to be determined by the control sequence without additional tracking or feedback. High quality stepping motors have three to five percent precision within a single step. Affordable assignment writing
- Quick starts, stop, and reverse capability.
- High reliability because there is no brush or physical contact required for commutation. The life span of a stepping motor is dependent on the performance of the bearings.
- Microstepping mode can be used allowing direct connection to a load without intermediate gearing.
- A wide speed range can be controlled by varying the drive signal timing.
Did you try Google? There are quite a number of libraries and tutorials out there on how to drive a stepper motor - and you can easily adapt them to the PSoC. Actually, the Adafruit page for your driver even has a tutorial on it...
Basically you need
- PWM which must be programmed for the stepper frequency
- Counter to stop the motor when the required number of steps is reached
- Interrupt at end of a programmed number of steps done
- some glue logic and clock syncs
- provision for safe enable during power-up
- logic to start a programmed number of steps
You will need a PSoC5 LP or a PSoC442xx to use some UDBs for the glue logic
HI, we tried finding some relent codes on google but did not find any thing that fits the psoc 5. do you know where we should look, or have an example to a working code.
thanks a lot
No. This forum is not a generic code repository. It should help when you have a _specific_ problem with PSoC. Please look at the PSoC101 videos, read some introductory material, try to blink some LEDs. Then it should be fairly easy to get the motor running, given Bobs hints from above and e.g. this Instructable. (which I just found on the first page of a Google search) It just needs you to be able to control some pins from software, but you can use a PSoC LUT to do it in hardware.