Innyve89
Posts: 9
Joined: Wed Jan 10, 2018 12:35 pm

Can I have this stepper motor lock in position?

Tue Apr 17, 2018 11:24 am

I currently have a bi polar stepper motor (https://www.robotshop.com/en/12v-17a-66 ... motor.html) powering a lever. When there is a weight on the lever the shaft turns.

I’m using a pwm controller (PCA9685) as an input to the stepper board (cytron SD02C) to get the motor to turn from the raspberry pi. I have the Dir,En, and pulse ( dir is direction, en is enable and pulse is pulse for it to turn) pins connected to the pwm controller. Is it possible to get it to lock with this setup?

https://www.cytron.io/p-sd02c
https://www.adafruit.com/product/815?gc ... gLZx_D_BwE

User avatar
joan
Posts: 15089
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Can I have this stepper motor lock in position?

Tue Apr 17, 2018 11:28 am

What do you mean by lock?

pcmanbob
Posts: 10119
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Can I have this stepper motor lock in position?

Tue Apr 17, 2018 11:37 am

Hi.

The normal function for a stepper motor is that it will hold a position once stepping instructions are stopped and power is still applied.

so having the enable pin active and no pulse command should make it hold its position, but a quick look at the user manual suggests this controller has a brake function, so it may not hold the motor in position by simple having the enable active.

you can only access the brake command if you talk to the controller via the UART interface.

By using the UART interface, user can:

On/Off, Run/Brake, and change motor’s rotation direction
Set motor speed
Request for encoder value
Track an encoder value and brake the motor
Set new baud rate for the driver
Sample source code for UART control is provided!
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Innyve89
Posts: 9
Joined: Wed Jan 10, 2018 12:35 pm

Re: Can I have this stepper motor lock in position?

Tue Apr 17, 2018 2:24 pm

How can I have two of these setup if rpi has only one uart interface? Also could I have a python code that tells it to stop or go and such?

pcmanbob
Posts: 10119
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Can I have this stepper motor lock in position?

Tue Apr 17, 2018 3:24 pm

Innyve89 wrote:
Tue Apr 17, 2018 2:24 pm
How can I have two of these setup if rpi has only one uart interface? Also could I have a python code that tells it to stop or go and such?
I have no idea on any of your questions I don't have one of these boards to experiment with, I suggest you read the user manual.

https://docs.google.com/document/d/1eG9 ... _HuRw/view
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “Troubleshooting”