Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
Nickname00
 
Posts: 7
Joined: Mon Apr 23, 2018 3:52 pm

Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit

Post by Nickname00 »

Dear Adafruit-Team,

is it possible to use the "Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit" with the Raspberry Pi 3? And where can I get the libary for the shield?


Luca

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

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by adafruit_support_bill »

The HAT will work with the Pi-3. Links to the library can be found in the guide: https://learn.adafruit.com/adafruit-dc- ... i?view=all

User avatar
Nickname00
 
Posts: 7
Joined: Mon Apr 23, 2018 3:52 pm

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by Nickname00 »

Thank you for the fast reply! Another question...is it also possible to use analog sensors without any extras?


User avatar
Danzxzx
 
Posts: 7
Joined: Mon Jun 05, 2017 4:30 pm

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by Danzxzx »

I have used these in a number of applications and they are fantastic but on my current project I am operating at the upper limit of the allowable current and have fried one of the channels.

Is it possible to "amplify" the signal to allow larger motors that draw more than 1.5A to be controlled using this HAT?

Thanks in advnace

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

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by adafruit_support_bill »

To run larger motors with higher current requirements, you need a beefier motor driver. We have the DRV8871:
https://www.adafruit.com/product/3190
If you are driving steppers, you can combine two of them for that:
https://learn.adafruit.com/current-limi ... 1/overview

Also check with www.pololu.com for a wide selection of higher current motor drivers for both DC motors and steppers.

User avatar
Danzxzx
 
Posts: 7
Joined: Mon Jun 05, 2017 4:30 pm

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by Danzxzx »

Thanks Bill

The motors I'm using pull around 5A so the Polou boards would have been perfect but I've got all the code written out in python and using the pi for other things in the project.

Would be possible to use the motor HAT to control a couple of beefier MOSFETS https://docs-emea.rs-online.com/webdocs ... 3c07c8.pdf similar to the ones used on the polou boards?

Thanks

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

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by adafruit_support_bill »

What type of motors are they? If you are driving bipolar steppers or DC motors and need direction control, just MOSFETs are not sufficient. You really need some H-bridges so that you can reverse the current flow.

User avatar
Danzxzx
 
Posts: 7
Joined: Mon Jun 05, 2017 4:30 pm

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by Danzxzx »

They are DC brushed wiper motors and I do need to change direction but I could potentially use a separate channel for each direction so say:

M1 forward motor 1
M2 backwards motor 1
M3 forward motor 2
M4 forward motor 2

Or would a H bridge be a better solution?

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

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by adafruit_support_bill »

Connecting two MOSFETs to control the same motor in different directions is a recipe for smoke. You really need something like an H-bridge to reverse direction. Pololu has a good selection of DC motor drivers.

One option that may be able to make use of the code you already have is to use a Servo HAT to control the motor drivers.

Our Motor HAT consists of a pair of TB6612 motor drivers controlled by a PCA9685 PWM generator chip.
The Servo HAT is just a PCA9685 PWM generator chip. You would effectively replace the TB6612 drivers on the motor shield with some more powerful drivers such as the ones from Pololu.

User avatar
Nickname00
 
Posts: 7
Joined: Mon Apr 23, 2018 3:52 pm

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by Nickname00 »

Dear Adafruit-Team,

I installed the library how you said...but unfortunately it doesn't work. I just started the example program and get this failure:

Code: Select all

Traceback (most recent call last):
  File "/home/pi/Adafruit-Motor-HAT-Python-Library/examples/DCTest.py", line 2, in <module>
    from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor
ImportError: No module named 'Adafruit_MotorHAT'
I hope you can help me.

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

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by adafruit_support_bill »

The error message says "No module named 'Adafruit_MotorHAT'", so it is not finding the motor hat library.

Try re-installing according to the instructions here:
https://learn.adafruit.com/adafruit-dc- ... g-software

User avatar
Nickname00
 
Posts: 7
Joined: Mon Apr 23, 2018 3:52 pm

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by Nickname00 »

Thank you for the fast reply but it doesn't work already. Is there an other way to import the HAT Library?

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

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by adafruit_support_bill »

I will check with some of our Raspberry Pi experts.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini

Post by adafruit2 »

nick, whats the output of

"sudo python setup.py install"?

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

Return to “General Project help”