Unipolar stepper motor operation library
Dependents: LAB04_Oppgave1 test_stepper Stepper_Motor_Demo StepperMotorUni_Hello ... more
Unipolar stepper motor library
This library generates pulses on 4 digital output pins of the mbed. The pulses are generated by mbed's ticker function.
The mbed pins cannot drive the stepper motor directly. So it requires driver stage for the motor. The circuit may be like following diagram.
The driver stage should be chosen by requirement for the stepper motor.
The mbed generates pulses on 4 output pins for external driver stage.
This library can generate 3 types of pulses.
1 phase drive (wave drive)
2 phase drive
1-2 phase (half step) drive
Components pages
Components pages are available for bipolar
and unipolar
motor libraries
Diff: StepperMotorUni.h
- Revision:
- 4:6909efe4c8ac
- Parent:
- 3:0eec6148e739
- Child:
- 5:93f9ce526f38
--- a/StepperMotorUni.h Tue Apr 21 14:37:52 2015 +0000 +++ b/StepperMotorUni.h Wed Apr 22 03:24:21 2015 +0000 @@ -2,8 +2,8 @@ * * @class StepperMotorUni * @author Tedd OKANO - * @version 1.1 - * @date 21-Apr-2015 + * @version 1.1.1 + * @date 22-Apr-2015 * * Copyright: 2010, 2014, 2015 Tedd OKANO * Released under the Apache 2 license License @@ -15,28 +15,29 @@ * @code * #include "mbed.h" * #include "StepperMotorUni.h" - * + * * StepperMotorUni motor( p26, p25, p24, p23 ); - * + * * int main() * { * motor.set_pps( 50 ); - * + * * while ( 1 ) { * motor.move_steps( 24 ); * wait( 1 ); - * + * * motor.move_steps( -24 ); * wait( 1 ); * } * } * @endcode - * - * version 0.51(27-Nov-2010) // initial version (un-published) - * version 0.6 (15-Jan-2014) // compatible to LPC1768, LPC11U24 and LPC1114 targets - * version 1.0 (19-Jun-2014) // version 1.0 release + * + * version 0.51 (27-Nov-2010) // initial version (un-published) + * version 0.6 (15-Jan-2014) // compatible to LPC1768, LPC11U24 and LPC1114 targets + * version 1.0 (19-Jun-2014) // version 1.0 release * version 1.0.1 (14-Apr-2015) // API document correction - * version 1.1 (21-Apr-2015) // ramp control function enabled + * version 1.1 (21-Apr-2015) // ramp control function enabled + * version 1.1.1 (22-Apr-2015) // fixed: find_home_position compatibility with ramp control feature */ #ifndef MBED_STEPPERMOTOR_UNIPOLAR