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:
- 2:6835e719ff96
- Parent:
- 1:5de3a9848490
- Child:
- 3:0eec6148e739
diff -r 5de3a9848490 -r 6835e719ff96 StepperMotorUni.h --- a/StepperMotorUni.h Mon Apr 13 21:10:56 2015 +0000 +++ b/StepperMotorUni.h Tue Apr 21 14:33:20 2015 +0000 @@ -234,7 +234,17 @@ */ void set_steps_per_rotate( int steps ); + /** Setting for ramp control + * + * This function enables the ramp-up and ramp-down of the motor behavior + * + * @param initial_speed_rate speed rate. if the pps was set to 50pps and + * initial_speed_rate is given like 0.1, the ramp-up-start and ramp-dowm-end + * speed will be 5pps (= 0.1 * 50pps) + * @param ramp_steps the steps for ramp-up and ramp-down. + */ void set_ramp_control( float initial_speed_rate, int ramp_steps ); + private: Ticker t;