gregoff
Posts: 31
Joined: Fri Aug 22, 2014 7:07 am

Controlling two DC motors and one servo

Fri Aug 22, 2014 7:23 am

Hi all,

Starting with my first hardware project with my RPi (only doing software stuff until now).

I want to connect two DC motors as well as a servo to a RPi.

I've been reading a guide at https://learn.adafruit.com/adafruit-ras ... a-dc-motor and understand that I can use a L293D to control the DC motors in both directions and with variable speed as well. So far so good. But, I want to be able to control a servo as well. I understand there's only one PWM, but it can maybe be solved with ServoBlaster? Suggestions?

Pre-conditions: I want to drive a RC boat that will weigh a couple of kg's, so I will need the "biggest" possible DC-motors this thing can handle. The servo might the RPi be able to handle directly from the board using servoblaster?

All input is appreciated!

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Controlling two DC motors and one servo

Fri Aug 22, 2014 9:14 am

You'll need to check that any chip or motor driver board you select can handle the voltages/amperages of your chosen DC motors. Typically solutions based on L293D, L298N, L9110S, will only handle a few amps.

Servoblaster, piblaster, RPIO.GPIO, and my own pigpio, amongst others, will let you drive multiple servos from C or Python.

Return to “Beginners”