How to Make a Robot - Lesson 5: Choosing a Motor Controller

Hi Coleman,I love the robot tutorial.
I was just wondering if a the speed of a motor can be reduced using a the Arduino MEGA 2560. Is is possible to program it to reduce the speed of a motor. Is there also a interegated voltage regulator in this microcontroller

@Navein Suresh The 2560 should not be connected directly to a motor (because its pins cannot provide the current). You can use the MEGA to control the speed of a DC motor via a DC motor controller. There is an integrated regulator for the microcontroller alone.

If i am using 5 motors so how much motor controllers should i have to add??

@Nomy If they all need to be controlled separately, you would need five single motor controllers, or three dual controllers of which half of one is not used.

Thank you for the helpful article! I would love some help if possible, as many others before me it seems. I am interested in connecting a motor controller to a raspberry pi. The motor I have is given below. It has 2 power pins and 4 pins for a hall effect encoder. Would it be an issue to connect those encoder pins directly to the Pi so it knows its current rpm, which would then send a command to the controller to change the speed of the motor as programmed? How would I know which control method is suitable for this motor? Does that depend on the controller only? Thank you in advance.
“Metal DC Geared Motor w/Encoder, Supports DC 6V 292rpm 4.3kg.cm/DC 12V 585rpm 8.6kg.cm stall, Gear Ratio 18.8:1”

@Alex The Raspberry Pi’s pins operate at 3.3V, whereas the encoder operates at 3.3 to 24V. It’s possible that the two are compatible, but it’s at the lower limit of the encoder, so if you find issues, you might want to add a logic level converter. You absolutely need a separate ~3A continuous DC motor controller. There are quite a few which plug right into a Pi (check RobotShop.com).

Thank you for giving lot of information about robotics for us

I am designing my first robot platform with one motor for each wheel (4 motors) maze solving. I am looking at normal DC motors and continuous rotation servos - which is best?

@pinpres Normally continuous rotation RC servos do not provide any angular feedback, and as such, it might be harder to make 90 degree turns. DC gear motors with encoders however can be quite precise.