Page 1 of 1

Stepper Motors and HAT

Posted: Thu Jun 20, 2019 9:02 am
by archipi
Hi,

I'm trying to build my first Pi project but I'm unsure of what equipment or extensions I need for that. I want to connect two stepper motors and a vibration motor to the Pi and activate them according to certain buttons pressed on a Wii remote (connecting the wiimote is a whole different problem I'm facing).

I have looked at this HAT (https://thepihut.com/products/adafruit- ... 7739845393) but it says you can either connect two stepper or four DC motors. Would I need to get two of them and stack them to have two steppers and the vibrating disk (https://thepihut.com/products/adafruit- ... motor-disc)? And what would I need to stack them?
Also, do I need to get a battery pack if I don't plan on disconnecting the Pi from the main power cable?

Lastly, I do have an Arduino starter kit which already includes a stepper motor. Are the Arduino elements compatible with the Pi? From what I've seen online the motors look identical.

Re: Stepper Motors and HAT

Posted: Thu Jun 20, 2019 10:59 am
by pcmanbob
Hi.

Do you really need another motor hat to drive your vibrating mini motor disc ?

you only need to turn it on or off and no direction change needed, so you could just drive it using a gpio pin and a transistor as suggested in text.

a simple 2N2222 transistor & 470 ohm resistor is all you would need.

as the motor hat only uses I2c to control it , you still have all the other gpio pins free to drive the vibrating mini motor disc.

it would also be cheaper than a second hat.

Re: Stepper Motors and HAT

Posted: Sat Jun 22, 2019 10:41 am
by archipi
pcmanbob wrote:
Thu Jun 20, 2019 10:59 am

as the motor hat only uses I2c to control it , you still have all the other gpio pins free to drive the vibrating mini motor disc.
Hi, thanks for the tip.

I have connected the hat to my Pi now but it has taken up all the pins of the 40 GPIO as far as I can see? Which other pins do you mean?

Re: Stepper Motors and HAT

Posted: Sat Jun 22, 2019 11:15 am
by pcmanbob
Did you look at your hat , there is a row of holes marked as gpio pins which you can use ( green arrow ) and 5v and ground in another row of pins
( yellow arrow )


Image

I suggest you go and read the documentation on the site you posted the link to.

https://learn.adafruit.com/adafruit-dc- ... spberry-pi