I have a L293D motor shield for arduino uno. It has capability of controlling 2 servo motors and 4 DC motors. But I want to control 5 DC motors for my project. So my question is can I use the 3 pins that are there in motor shield ( to control servo motors) for controlling a DC motor? Or any other solution if any without using any other hardware?
1 Answer
No. A servo motor has its own built-in driver and you just send a low-level PWM signal to control it. That cannot directly drive a DC motor.
If you want more DC motors you will need more DC motor driving hardware. For simple speed control in one direction that could be as simple as a NPN transistor (or N-channel FET), a base resistor, and a flyback diode (just like driving a relay). For direction control you will need a H-bridge like the L293D (which incidentally is a very poor choice of driver by today's standards - very inefficient and lossy. I wish people wouldn't persist in selling it.)