I found this SainSmart L293D in amazon. I need to run 2 motors and a stepper motor for my project, the description says it can but I am not clear if they can do all the three at the same time. Moreover it says it is for Arduino but I want to drive it directly from Raspberry Pi using rpi-gpio, Would there be a problem with that ?. Any inputs will be greatly appreciated.

thanks Ram


Since the board provides four bridges, it should be capable of driving two DC motors and a stepper motor from the other two bridges perfectly fine.

With regards to using the board from a Raspberry Pi it all depends what you want it to do. Basically their board uses the PWMs on the Arduino to control speed, if you do not want speed control on the DC motors then this will not be a problem, if you do the Raspberry Pi only has one PWM capable pin on the GPIO header, so you would have to use a software based PWM for one or both of them, which is likely to be less precise.

  • Thanks for very useful information. PWM pin!. I am learning :-) Yes, I do want to control the speed of the motor. – Ramp Jun 10 '13 at 14:14

the original description says: "Can drive 4 DC motors or 2 stepper motors or 2 Servo", that most likely mean you CANNOT drive 2 motors and a stepper at the same time.

also, i'm afraid you won't be able to easily interface this board to the RasPi.

finally, software based PWM is fun and could be used to create a proof of concept, but I would not recommend to let any SW PWM anywhere near you designs, unless you don't care about precision and don't mind your mechanical parts jitter back and forth when you move a mouse or get some network traffic with plenty of interrupts.

  • Yep. That was my concern. I did come across a project where they have used this with Pi. – Ramp Jun 11 '13 at 20:21

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.