1
\$\begingroup\$

I am normally pretty good with wiring up stepper motors and having a step pin which can be pulsed with a gpio output and a direction pin that can be set to high or low. Also using servo motors that can be wired into a PWM 16 channel output board and can be easily controlled with python because of its libraries (from adafruit_servokit import ServoKit). However, this motor is giving me trouble. It has an S pin and a GND pin that i would hook up to my PI and simply pulse it, but that doesnt help with direction. If anyone has hooked this up to a PI before and can give some insight before i kill 8 of these it would be much appreciated. I need it to go forward and backward and have some what of a control of the speed (which should be the delay in the pulse).

UPDATE: Using signal pin and ground from PCA9685 does not move the motor. Tired using a DAQC plate to set the voltage to high and low with a digital output pin and still no movement any ideas?

\$\endgroup\$
5
  • \$\begingroup\$ Ah, let me see. So you are playing with step motor and servo motor. This question is on your ASMC-04B servo motor. As I understand, this servo's PWM input range is 0.5ms to 2.5ms. If you have been using PCA9685 PWM controller, you might need to change the range from 0.5mS to 1.5ms to 0.5ms to 2.5ms. Good luck and cheers. \$\endgroup\$
    – tlfong01
    Commented Aug 25, 2020 at 14:17
  • 1
    \$\begingroup\$ I want to run at 24V and the PCA9685 is rated for up to 10V. Do i need to find a controller for the controller on there? or can i hook the pi up directly to the motor driver that comes with? \$\endgroup\$ Commented Aug 25, 2020 at 14:52
  • \$\begingroup\$ Ah, let me see. I think you can just extract the 16 PWM signals out from the module and forget the on board electrolyte capacitor which may be rated at 10V. Or replace all capacitor for servo to 35V cap. But I am not very sure, because I only use max 7.5V for my standard toy servos. Warning: me only friendly hobbyist. No guarantee no nothing won't melt down or blow up. \$\endgroup\$
    – tlfong01
    Commented Aug 25, 2020 at 15:02
  • 1
    \$\begingroup\$ clever idea!! i will give it a shot and let you know. no wires should melt \$\endgroup\$ Commented Aug 25, 2020 at 15:15
  • \$\begingroup\$ Good luck and cheers. \$\endgroup\$
    – tlfong01
    Commented Aug 26, 2020 at 13:38

1 Answer 1

1
\$\begingroup\$

Using the S (signal) pin and GND pin on the ASMC-04B I was able to control the stepper with a DAQC plate and a Raspberry pi. The DAQC plate can probably be replaced with a normal GPIO pin however I find the signal output when other things are running on the Pi is more reliable on the DAQC than the normal GPIO pin. Here is the code:

while True:
    DAQC.setDOUTbit(0, 0)
    time.sleep(0.001)
    DAQC.clrDOUTbit(0, 0)
    time.sleep(0.001)

time.sleep(0.001) moves the motor clockwise where 0.000001 moves the motor the other direction. My DAQC plate is set to address 0 and the pin is also 0. One again you can probably use RPi.GPIO to control it but this works for me!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.