The Motor Hat I haveBasically, I have a raspberry pi 4 with a Motor Hat to control two stepper motors. The whole thing looks like this : https://i.sstatic.net/SIjzI.jpg

Now I want to connect a servo motor, and I know that you can connect some servo motors using a the 40-pin GPIO from the rasberry pi, but can you connect one from the 40-pin GPIO extension from the Motor Hat ?

Edit : I didn't see the dedicated pins for the servo motors on the motor Hat(lower right of the Image), can I control 2 steppers and 1 servo a the same time though ?

1 Answer 1


A servo typically has three wires. You provide power via two (+ve and ground) and a control signal via the third.

You need to connect the control signal to a GPIO.

As long as your set up allows you to connect a wire to something electrically connected to the chosen GPIO it will work. I assume your HAT allows such a connection.

Note that you also need to connect the servo ground wire to a Pi ground as well as the servo power supply ground.

  • Thanks a lot, by searching were the ground and power pins were I found that I have dedicated servo pins seperatly from the other pins(I've added a better Image on the edited post where they are visible), now I just need to find out if I can control 2 steppers and 1 servo a the same time.
    – Tom
    Commented Jul 29, 2021 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.