I have two dc motors that I want to power using an Arduino Uno. I want to be able to set the speed and direction of each motor SEPARATELY. I know I need transistors but what type of transistor and how should they be arranged?
Two motors, speed and direction. You want to look at using a H Bridge to control direction and apply PWM (Pulse Width Modulation) to control speed. Since you make no mention of it whatever H Bridge you choose must be able to support your motor voltage and current requirements. Can you build an H Bridge using discrete components? Yes but it is much easier to use a modular ready to run off the shelf module. A Google of H Bridge Circuits will bring up design configurations.
Use your Arduino or uC of choice to drive your H Bridge. Just write your code accordingly.
Note: Once you Google H Bridge you will see plenty of modules using the now quite old L298 chip. I suggest you try to avoid those as they are not as efficient as newer units. The L298 does not use MOSFET technology.
Ron
It depends on the motors and their requirements.
For back and forth, look up "H-bridge".
For moving more than 1 motor independently, look into:
You need an H-bridge. It is possible to make one using transistors, but the commercial ones are cheap and will work much better than anything you could make. Pololu has the best selection.
Don't. The Uno is not a power supply for motors.
You can use L293D H-bridges instead of transistors, but if you want to build one with only transistors you need 2 PNP and 2 NPN transistors. Also, the Arduino can't provide enough power to run the motors and you should use a 9v or 12v battery.
"L293D" and "9volt battery" raises two red flags.
Leo..
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.