Hello!
I'm having some strange issues with a raspberry Pi set-up. The pi is connected to two motor hats. We have 3 stepper motors we're trying to control simultaneously. Each one is a Nema 14 (with a 19:1 planetary gearbox), they all have a rated current phase of 0.8 A and phase resistance of 6.8 ohms. A co-worker in the past has successfully run everything using 2 power supplies for the motors, each one 12 V and 1 A. I took over the project, went to run the same exact code and set up as my co-worker, and suddenly I can't get them to run simultaneously. Typically one motor will run, and the other two will sort of "blip" on and off and not move. I also tried running a single motor, and can only get them to run in one direction. If I swap the wires in the motor hat, it will run in a different direction, but I can't command them to move both ways without swapping wires. Normally I would guess this is a power supply issue, but everything is the same as what my co-worker had working before. Now I'm wondering if something broke, or if there's something my co-worker and I both missed and they just happened to get lucky in the past... Any advice greatly appreciated!
3 stepper motors and 2 motor hats
Moderators: adafruit_support_bill, adafruit
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
- adafruit_support_bill
- Posts: 88141
- Joined: Sat Feb 07, 2009 10:11 am
Re: 3 stepper motors and 2 motor hats
If you are running those motors with a 12v supply, they will be pulling a maximum of 1.76A per phase. or 3.53A total per motor. This would be an overload condition for the HAT, the motors and the power supplies.
Fortunately, since your supply is only rated for 1A, it will likely either suffer some voltage sag, or shut down completely before damage is done to the drivers on the HAT.
To keep the current below your motor's 0.8A rating (and the 1.2A rating of the HAT), you would need a supply voltage of about 5.4V or less, and 1.6A per motor.
Fortunately, since your supply is only rated for 1A, it will likely either suffer some voltage sag, or shut down completely before damage is done to the drivers on the HAT.
To keep the current below your motor's 0.8A rating (and the 1.2A rating of the HAT), you would need a supply voltage of about 5.4V or less, and 1.6A per motor.
- kmr25
- Posts: 3
- Joined: Thu Sep 01, 2022 11:03 am
Re: 3 stepper motors and 2 motor hats
Do you have power supplies you would recommend for this kind of set up? We have 2 motors on one hat and 1 motor on the other hat, and attach the supplies to the hats so they motors are powered through the hat itself. Would it be better to power the motors & hats separately?
Thanks!
Thanks!
- adafruit_support_bill
- Posts: 88141
- Joined: Sat Feb 07, 2009 10:11 am
Re: 3 stepper motors and 2 motor hats
The only way to power stepper motors is via the driver board (HAT in this case). You can't run power to a stepper motor directly.
With a 5v supply, you would need about 1.5A per motor. You could use a 4A for the HAT with 2 motors and a 2A supply for the remaining one:
https://www.adafruit.com/product/1466
https://www.adafruit.com/product/276
We also have a 5v@10A supply that could power all of them:
https://www.adafruit.com/product/658
With a 5v supply, you would need about 1.5A per motor. You could use a 4A for the HAT with 2 motors and a 2A supply for the remaining one:
https://www.adafruit.com/product/1466
https://www.adafruit.com/product/276
We also have a 5v@10A supply that could power all of them:
https://www.adafruit.com/product/658
- kmr25
- Posts: 3
- Joined: Thu Sep 01, 2022 11:03 am
Re: 3 stepper motors and 2 motor hats
Got it, thanks for the help! I'll give the new power supplies a try!
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/