1

Disclaimer: Im still new to the Pi and world of electronics, and google is giving me mixed results

Im going to be attempting to build a robot with the raspberry pi. The question is how is the pi at controlling motors? Or should I used something like an arduino to control the motors(Pi is main computer controlling the arduino). Or something different entirely?

I plan to have this robot be doing some ultrasound and/or vision tracking, voice recognition(possibly), and do some decision making so I will still need it to be capable of doing these calculations

Motor Specs (4 of them): Suggested Voltage: 4.5VDC No Load Speed: 140RPM No Load Current: 190mA Max. Load Current: 250mA Torque: 800 gf-cm

2

Both the Pi and an Arduino should be able to handle the decision making. The Pi will be better once the decision making becomes more complicated.

The Pi is just as good as an Arduino at controlling motors.

Neither the Pi nor an Arduino can control a DC motor directly. They both need the support of external hardware to safely switch the currents involved.

I suggest you look at L9110S or L298N based motor driver boards. Both can control a pair of DC motors and require either 4 or 6 GPIO per board depending on how you choose to drive them. If you want a chip based solution a L293D might be worth considering (power requirement might be tight) or you could design your own controller from discrete components.

The above will allow you to independently turn the motors clockwise or counterclockwise and control the motor speed by applying PWM to the GPIO.

  • ok that makes sense. Is there much reason for an arduino then if the pi can handle more complicated decisions? Other than the price maybe – dka13 Mar 8 '18 at 16:55
  • 3
    With the pi you are dealing with an operating system that may or may not prioritize your code. There are times with very complex or time sensitive code (think Fast flying robot) where the pi would not be good to make quick decisions. Where the Arduino or other micro controller is only running one piece of code and it is easy for the programmer to control what its doing down to every clock tick. For what you are dealing with, especially vision, voice recognition the pi is going to be better suited. – Chad G Mar 8 '18 at 17:08
  • The Pi is just as good as an Arduino at controlling motors. That's an incredibly bold statement... Perhapse you meant "both good" rather than "equally good". Stating that they are equal will open the answer up to a LOT of critisizm. – Philip Couling Mar 8 '18 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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