[HELP] Problem with Motor HAT and Stepper Motors

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mrivaj
 
Posts: 3
Joined: Thu May 17, 2018 5:19 am

[HELP] Problem with Motor HAT and Stepper Motors

Post by mrivaj »

Hello!

I'm using the Adafruit Motor HAT with my Raspberry Pi 3B, for a motion tracking sistem. I have two motors (https://www.ebay.es/itm/3x-Motor-PAP-Ne ... 2749.l2649 and https://www.ebay.es/itm/Nema-17-Motor-P ... 2749.l2649)

With the small one, alls works perfect, unless one day, that I shutdown the Pi and forgot to disconnect the power adaptor of the motors (Universal adapter, 4.5V, 2.1A). When I see it, the motor was so hot, and I think "Ops, I break this motor". I change it to another one, but it doesnt work anymore. I mean, the motor can move, but it seems to be "laggy". After that, my code can make the motor to follow the movement in front of my camera, but now it can't, I mean, is like the motor doesn't do all the steps

By type movement:
1. Single: Laggy
2. Double: Laggy, but less than single
3. Interleave: Laggy
4. Microstepping: Seems to be good

I'm doing my thesis and I only have like ten days to finish it, so, if I need to buy and wait for a new MotorHAT... i'm dead

How can I know if its a power problem or a Motor Hat problem, without buying a new PSU?

I don't understand this, because, if its the HAT, why it moves? And, if its the PSU, why it moves?

I'm sure that the connections and the soldering are OK,because all works smoothly before the "incident"

Code of the file "StepperTest.py" :

Code: Select all

#!/usr/bin/python
#import Adafruit_MotorHAT, Adafruit_DCMotor, Adafruit_Stepper
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor, Adafruit_StepperMotor

import time
import atexit

# create a default object, no changes to I2C address or frequency
mh = Adafruit_MotorHAT()

# recommended for auto-disabling motors on shutdown!
def turnOffMotors():
    mh.getMotor(1).run(Adafruit_MotorHAT.RELEASE)
    mh.getMotor(2).run(Adafruit_MotorHAT.RELEASE)
    mh.getMotor(3).run(Adafruit_MotorHAT.RELEASE)
    mh.getMotor(4).run(Adafruit_MotorHAT.RELEASE)

atexit.register(turnOffMotors)

myStepper = mh.getStepper(200, 1)  # 200 steps/rev, motor port #1
myStepper.setSpeed(30)             # 30 RPM

while (True):
    print("Single coil steps")
    myStepper.step(100, Adafruit_MotorHAT.FORWARD,  Adafruit_MotorHAT.SINGLE)
    myStepper.step(100, Adafruit_MotorHAT.BACKWARD, Adafruit_MotorHAT.SINGLE)

    print("Double coil steps")
    myStepper.step(100, Adafruit_MotorHAT.FORWARD,  Adafruit_MotorHAT.DOUBLE)
    myStepper.step(100, Adafruit_MotorHAT.BACKWARD, Adafruit_MotorHAT.DOUBLE)

    print("Interleaved coil steps")
    myStepper.step(100, Adafruit_MotorHAT.FORWARD,  Adafruit_MotorHAT.INTERLEAVE)
    myStepper.step(100, Adafruit_MotorHAT.BACKWARD, Adafruit_MotorHAT.INTERLEAVE)

    print("Microsteps")
    myStepper.step(100, Adafruit_MotorHAT.FORWARD,  Adafruit_MotorHAT.MICROSTEP)
    myStepper.step(100, Adafruit_MotorHAT.BACKWARD, Adafruit_MotorHAT.MICROSTEP)
Video: https://drive.google.com/open?id=1JenTC ... kgzR6QO8Q9

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: [HELP] Problem with Motor HAT and Stepper Motors

Post by adafruit_support_bill »

The 17HS4401 motor is not compatible with the HAT. It requires a current-limiting driver such as the DRV8833 or DRV8871.

The 17HS2408 should be usable with the HAT if your motor supply voltage is no more than 5v. So your 4.5v supply should be OK.

Measure the voltatge at the external supply terminals.
If you post a photo showing your soldering and connections we'll take a look at that too.

User avatar
mrivaj
 
Posts: 3
Joined: Thu May 17, 2018 5:19 am

Re: [HELP] Problem with Motor HAT and Stepper Motors

Post by mrivaj »

adafruit_support_bill wrote:The 17HS4401 motor is not compatible with the HAT. It requires a current-limiting driver such as the DRV8833 or DRV8871.

The 17HS2408 should be usable with the HAT if your motor supply voltage is no more than 5v. So your 4.5v supply should be OK.

Measure the voltatge at the external supply terminals.
If you post a photo showing your soldering and connections we'll take a look at that too.
Finally it seems to be something with the 3d part that moves the structure. The 17HS4401 motor works with the hat now. I should remove it from my setup¿?

So, what is the most powerful motor compatible with this HAT? I need to use two, and I have two 17HS2408 and two 17HS4401. I need to finish it by the next friday, so i'm in a hurry

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: [HELP] Problem with Motor HAT and Stepper Motors

Post by adafruit_support_bill »

The 17HS4401 motor works with the hat now. I should remove it from my setup¿?
Yes, you should remove it. It will eventually burn-out the drivers in the HAT.

To get the maximum stepper motor power from the HAT - look for a motor with a voltage rating of at 12v or more and a phase resistance of 10 ohms.
Higher resistance will be less power. Lower resistance will overload the HAT.

User avatar
mrivaj
 
Posts: 3
Joined: Thu May 17, 2018 5:19 am

Re: [HELP] Problem with Motor HAT and Stepper Motors

Post by mrivaj »

adafruit_support_bill wrote:
The 17HS4401 motor works with the hat now. I should remove it from my setup¿?
Yes, you should remove it. It will eventually burn-out the drivers in the HAT.

To get the maximum stepper motor power from the HAT - look for a motor with a voltage rating of at 12v or more and a phase resistance of 10 ohms.
Higher resistance will be less power. Lower resistance will overload the HAT.
I don't understand. Why it doesnt say anything of this limits in the documentation? Maybe i dont see it, but now I don't have time for change motors now.
The docs say that the motorHAT can carry 1.2A pero bridge, if each stepper uses two ports, its not the maximum 2.4A per motor? How can I now if a motor is okay or not?
I need to move 1.5kg with this motor, one in x-axis, and another in y

How many time I can use the 17HS4401 ? I need to use it from now to 16th June. it isn't any other way for using it that buying another driver?

And, whatever... are you saying that it will be better a 3USD hardware than a 30 USD board?

I don't know what to do now

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: [HELP] Problem with Motor HAT and Stepper Motors

Post by adafruit_support_bill »

The current used by the motor follows Ohm's Law - not the max current rating. The motor has no way to limit the max current. You need to do that by choosing an appropriate driver and/or power supply. https://learn.adafruit.com/all-about-st ... he-stepper

Since that motor has an extremely low (1.5 ohms) phase resistance, controlling the motor current with the supply voltage alone is not practical. That motor requires a current limiting driver.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”