Can the Adafruit DC & Stepper Motor HAT Control Servo Motors?

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/
Locked
User avatar
JJMoney
 
Posts: 20
Joined: Sun Nov 27, 2022 7:01 pm

Can the Adafruit DC & Stepper Motor HAT Control Servo Motors?

Post by JJMoney »

Hi there,

I have a project where I would like to control one servo motor and one stepper motor at the same time. I was wondering if the Adafruit DC & Stepper Motor HAT shown here could control servo motors as well: https://www.adafruit.com/product/2348.

If so, is there anything I'd have to do differently with the servo than what would have to be done with a DC motor?

If not, are there any other products that could do what I'm looking for?

FYI, I'm running my project using the Raspberry Pi 3 Model B V1.2.

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

Re: Can the Adafruit DC & Stepper Motor HAT Control Servo Motors?

Post by adafruit_support_bill »

The HAT does not have a controller for RC Servos. But all of the header pins are available, so you can control one directly from a GPIO pin on the header: https://learn.adafruit.com/adafruits-ra ... ervo-motor

We also make a PWM/Servo HAT which can be stacked with the motor HAT to control as many as 16 RC servos:
https://www.adafruit.com/product/2327

User avatar
JJMoney
 
Posts: 20
Joined: Sun Nov 27, 2022 7:01 pm

Re: Can the Adafruit DC & Stepper Motor HAT Control Servo Motors?

Post by JJMoney »

adafruit_support_bill wrote: Sun Nov 27, 2022 7:31 pm The HAT does not have a controller for RC Servos. But all of the header pins are available, so you can control one directly from a GPIO pin on the header: https://learn.adafruit.com/adafruits-ra ... ervo-motor

We also make a PWM/Servo HAT which can be stacked with the motor HAT to control as many as 16 RC servos:
https://www.adafruit.com/product/2327
Hi,

So with this HAT attached, I can connect to all of the RPi's pins as if the HAT wasn't there? If so, I believe I would need the 2x20 extra tall headers for my RPi, correct? (BTW, the listing for the HAT I mentioned suggests that the RPi B would need the 2x13 headers when this model has 2x20 pins)
Last edited by JJMoney on Sun Nov 27, 2022 7:45 pm, edited 1 time in total.

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

Re: Can the Adafruit DC & Stepper Motor HAT Control Servo Motors?

Post by adafruit_support_bill »

Yes. You can use stacking headers to extend the GPIO header. The HAT also has breakout holes for all of the GPIO pins.

The only GPIO pins used by the HAT are SDA and SCL. And those can be shared by other i2c devices.

User avatar
JJMoney
 
Posts: 20
Joined: Sun Nov 27, 2022 7:01 pm

Re: Can the Adafruit DC & Stepper Motor HAT Control Servo Motors?

Post by JJMoney »

adafruit_support_bill wrote: Sun Nov 27, 2022 7:42 pm Yes. You can use stacking headers to extend the GPIO header. The HAT also has breakout holes for all of the GPIO pins.

The only GPIO pins used by the HAT are SDA and SCL. And those can be shared by other i2c devices.
Got it! In case you didn't see my last edit - I believe I would need the 2x20 extra tall headers for my RPi, correct? BTW, the listing for the HAT I mentioned suggests that the RPi B would need the 2x13 headers but this model has 2x20 pins. Is this a mistake?

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

Re: Can the Adafruit DC & Stepper Motor HAT Control Servo Motors?

Post by adafruit_support_bill »

The original Raspberry Pi Models A & B both had a 2x13 header. All Models since - including the 2-B, 3-B and 4-B all have the 2x20 header.

https://en.wikipedia.org/wiki/Raspberry_Pi

Locked
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/

Return to “Adafruit Raspberry Pi® accessories”