Let's Make Robots!

choosing required components

I am trying to build a robot but I could not figure out how to build it since I am newbie.

My plan is buliding a robot that has 4 DC motors( 4WD ), 5 Servo motors (arm) , 10 sensors (IR and Ultrasonic) and magnetic sensor.

my main issue is finding a microcontroller board that can handle all these actuators & sensors.

In fact, I could not find any board that can control 4 DC motos (bi directional) and has output of 3A for each motor.

I know that there are a lot of shields for arduino that expands board's I/O but I do not which one to pick in order to contol  these motors and sensors.

So, could someone please explain to me how to connect all these motors and sensors to an arduino board ?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

That's a piece of cake, a second is a very long time for a micro controller (Arduino) or a raspberryPi (micro processor).

From what I understand, a problem could happen in the controller because of some limitions. So, could you please tell me how to solve it ?

Wow, talk about a wide open question. First off, there's no way you'll get anything close to what usually passes for artificial intelligence out of a microcontroller. Second, any number of problems could arise because of "some limitations" of that controller. How you solve them depends on which ones they are, so "which limitations do you anticipate?" is the question.

Further, you said something about connecting your laptop or PC to it in "big space." That implies either a very long USB cable or some form or telemetry. This sounds more and more like another Curiosity rover derived project.

Well you have not got my point.

First of all, neither a long USB cable nor telemetry.

This is how I want it:


the second thing, the microcotroller will not compute and compile the code. The laptop will run the code in C and send commands to the microcontroller(increase power, stop, check sensor ... etc).  (Look at "Beginning C for Arduino" book)

But, you are saying the microcontroller cannot handle all these components at the same time (like slow responding). is that right ?

Instead of using a large lap top, have you considered one of the many smaller embedded controllers available these days? Most of them seem to run Linux which is probably the most efficient but I think some are capable of running Windows.

I think the Rasberry Pi is the cheapest but there are many to choose from, all with different levels of processing power. Some of the lower powered controllers could even be run from the Spider controllers 5V output which can deliver up to 3A.

For example, use a 7.4V (2S) LiPo battery for the servos and maybe something like a 3S LiPo for the controllers. The Spider can accept any input from 7V to 32V.

this would allow you to use a smaller chassis such as the Rover 5 or the 4WD Wild Thumper.

If you want a bigger robot arm then the 6WD can take our 6DOF arm.

Yes, Rasberry Pi is my second option but I found an issue in using such Small PC. It is in serial communication using USB port.

Small PCs cannot communicate that well with Arduino boards.


But I do not know what would happen in my case. I mean assuming I used Rasberry Pi !!!, would it be possible to get input from 10 sensors each second and send signals to 7 motors at the same time without a big delay or junk ?

This is the most difficult question I am trying to get now.


The Spider controller will handle all your sensors (assuming 5V sensors) and drive your servos. SparkFun have this for about $50. It's equivalent to an Arduino Mega and has a 3A, 5V switchmode power supply built in. All I/O pins are terminated with 3pin servo headers as well as a female header for jumper wires.

If you need to drive high power servos directly from the battery then there is a HD servo shield available. As it does not block the Spider I/O pins you can still plug in 5V devices and servos on the main board and high power servos on the shield.

To drive your 4 motors there is a 4ch motor driver for $25 at SparkFun. It has the same footprint as the Spider controller allowing the boards to stack neatly with the brass spacers provided. Each channel is rated for 4A and includes a current monitoring circuit as well as support logic for quadrature encoders.



By the way, where can I find a battery that can supply power to motors just like these:

Since, I will use 4ch motor driver and it has one power input ?

An 11.7V (3S) LiPo is probably the best. That can easily power your motors and the Spider controller.

If you want to use HD servos that can be driven directly from a 7.4V(2S) LiPo then that will work as well but the motors will not be at full power.

Alternatively this is a rare case where I would suggest using 2 battery packs. Use the 7.4V (2S) LiPo just for powering the servos via a HD servo shield for the Spider controller. Power your motors from the 11.7V (3S) LiPo. Power your Spider controller from the 11.7V battery pack because even when it is dead flat (down to 9V) that is still higher than the 7V minimum required by the Spider controller.


thank you again

Is it a good idea to power up servos and DCs with one battery ?

Actually, I found some batteries that have several output with different voltages.

But, they are expansive. LiPo batteries are also expansive compared to others.

Also I need to know if it is important to use batteries that have high discharge rate ?

Normally I alway recommend using a single battery for everything. If you are happy with your motors running on 7.4V then that would be my first choice.

Yes it is extremly important for robots to have high discharge rates. When a motor first starts up it can draw a lot of power. If your batteries are not good enough then you will get a voltage drop that can reset your processor and affect sensor readings.This is one reason that I never use alkaline batteries.

Some people use a separate battery to prevent this problem but this adds more cost and complexity and can result in more problems.