Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 6 months ago.
Unipolar Stepper Motor Problem not function
hello sir, I got problem on using the unipolar stepper motor. i already make reference on this website https://developer.mbed.org/components/Stepper-motor-unipolar/.
For the connection on IC
- Yellow = pin 17
- Red = pin 18
- Black = pin 19
- White = pin 16
- Brown = Vcc
- Orange = Vcc
For the arm Mbed
- p26 = pin 1 IC
- p25 = pin 2 IC
- p24 = pin 3 IC
- p23 = pin 4 IC
The codding is
#include "mbed.h" #include "StepperMotorUni.h" StepperMotorUni motor( p26, p25, p24, p23 ); int main() { motor.set_operation_phase_mode( StepperMotorUni::HALFSTEP); motor.set_pps( 200 ); while ( 1 ) { motor.move_steps(48); wait( 1 ); motor.move_steps( -48 ); wait( 1 ); } }
- This is my Motor and connection
- This is the result
- This datasheet for this stepper motor https://drive.google.com/file/d/0BzFWfMiqqjyqYVRXQkdSVUI2djQ/view .i dont know the problem.. the result i got the motor only make vibration on rotation. Please help me for my project
1 Answer
7 years, 6 months ago.
Hi,
The connections from the mbed to the IC look correct. I checked your motor datasheet. It looks like you have the motor phases crossed. If you are using the TD62083 it only has 18 pins.
I think it should be on the IC TD62083 more like:-
pin18 (O1) black (phase1+)
pin17 (O2) white (phase2+)
pin16 (O3) red (phase1-)
pin15 (O4) yellow (phase2-)
Vcc brown (phase 1 common)
Vcc orange (phase 2 common)
Check the diagram on the program notes and the motor datasheet to see if you agree.
Here's a useful link from Adafruit for stepper motors. Yours is the six wire type motor.
https://learn.adafruit.com/all-about-stepper-motors/types-of-steppers
Sir sorry for false about the pin IC its true it have a 18 pin and i already make a connection as the same pin as you told me. But the result is the same. The Motor is not make rotation but only vibration then i try to change the pps of motor to 20 but it not change the result. the below is my new codding that i change the pps
/** "Hello" program for StepperMotorUni class library * * very simple sample of "StepperMotorUni" operation * * version 1.0 * copyright: 2014 Tedd OKANO * released under the Apache 2 license License */ #include "mbed.h" #include "StepperMotorUni.h" StepperMotorUni motor( p26, p25, p24, p23 ); int main() { motor.set_operation_phase_mode( StepperMotorUni::HALFSTEP ); motor.set_pps( 20 ); while ( 1 ) { motor.move_steps( 90 ); wait( 1 ); motor.move_steps( -90 ); wait( 1 ); } }
- this is the result
- this in my new connection
- This my first time using stepper motor, normally i using servo. so i want to try something new for me
It is difficult to tell from the gif file but I do not see the one second pauses between movement that should be given by the wait statements.
How is the board powered? Is the power supply voltage constant or is it reducing when the motor coils are powered? That is the next thing I would check. Can you measure the voltage with a multimeter?
If the power supply is not strong enough it might be resetting the board each time.
You could also try changing the driver mode to the simplest one-phase mode. This might make it clearer if there is a mistake in the motor wiring.
Simple driver mode only one coil at a time
#include "mbed.h" #include "StepperMotorUni.h" StepperMotorUni motor( p26, p25, p24, p23 ); int main() { motor.set_operation_phase_mode( StepperMotorUni::ONE_PHASE ); ... ...
200 pps seems very fast to me although this is in the value in the example program. What happens if you try something slower like 20 or 50 for pps? Otherwise check again very carefully the wiring of the motor connection. Do you have the correct phases connected in the correct order?
posted by Ian Kilburn 05 May 2017