How to Make a Robot - Lesson 6: Controlling Your Robot

Posted on 17/09/2018 by cbenson in How to Make a Robot
Modified on: 22/03/2023
Steps completed / 5
Press to mark a step as
completed or click here to complete all

Welcome to the RobotShop Grand Tutorial: How to Make a Robot, a series of 10 lessons that will teach you the principles behind making your own custom robot. A "robot" does not necessarily need to be fully autonomous, and having some human input, or providing a human with output is often very beneficial, and this lessons covers various ways of communicating with your robotic creation. Once completed, you can move on to the next tutorial - Using Sensors.

The definition we have chosen for a “robot” requires the device to obtain data about its environment, make a decision, and then take action accordingly. This does not exclude the option of a robot being semi-autonomous (having aspects that are controlled by a human and others that it does on its own). A good example of this is a sophisticated underwater robot; a human controls the basic movements of the robot while an onboard processor measures and reacts to underwater currents in order to keep the robot in the same position without drifting. A camera onboard the robot sends video back to the human while onboard sensors may track the water temperature, pressure, and more. If the robot loses communication with the surface, an autonomous program may kick in causing it to surface. If you want to be able to send and/or receive commands from your robot, you will need to determine its level of autonomy and if you want it to be tethered, wireless, or fully autonomous.

Direct Wired Control

OWI-535 Robotic Arm Edge

The easiest way to control a vehicle is with a handheld controller physically connected to the vehicle using a cable (i.e. a tether). Toggle switches, knobs, levers, joysticks, and buttons on this controller allow the user to control the vehicle without the need to incorporate complex electronics. In this situation, the motors and a power source can be connected directly with a switch in order to control its forward/backward rotation. Such vehicles usually have no intelligence and are considered to be more “remote-controlled machines” than “robots”.


  • The robot is not limited to an operating time since it can be connected directly to the mains
  • There is no worry about loss of signal
  • Minimal electronics and minimal complexity
  • The robot itself can be lightweight or have added payload capacity
  • The robot can be physically retrieved if something goes wrong (very important for underwater robots)


  • The tether can get caught or snagged (and potentially cut)
  • Distance is limited by the length of the tether
  • Dragging a long tether adds friction and can slow or even stop the robot from moving

Wired Computer Control

Wired control using microcontroller

The next step is to incorporate a microcontroller into the vehicle but continue to use a tether. Connecting the microcontroller to one of your computer’s I/O ports (e.g. a USB port) allows you to control its actions using a keyboard (or keypad), joystick, or another peripheral device. Adding a microcontroller to a project also may require you to program how the robot reacts to the input. Instead of using a laptop or desktop computer, netbooks are often a desirable choice because of their low price, small size, and low weight.


  • Same advantages as with direct wired control
  • More complex behaviors can be programmed or mapped to single buttons or commands.
  • Larger controller choice (mouse, keyboard, joystick, etc.)
  • Added onboard intelligence means it can interface with sensors and make certain decisions on its own


  • Cost is higher than a purely tethered robot because of the added electronics
  • Same disadvantages as with direct wired control


Ethernet cable

A variation on computer control would be to use an Ethernet interface. A robot that is physically connected to a router (so it could be controlled via the Internet) is also possible (though not very practical) for mobile robots. Setting up a robot that can communicate using the internet can be fairly complex, and more often than not, a WiFi (wireless internet) connection is preferable. A wired and wireless combination is also an option, where there is a transceiver (transmit and receive) connected physically to the internet, and data received via the internet is then sent wirelessly to the robot.


  • Robot can be controlled through the Internet from anywhere in the world
  • The robot is not limited to an operating time since it could use Power over Ethernet (PoE).
  • Using Internet Protocol (IP) can simplify and improve the communication scheme.
  • Same advantages as with direct wired computer control


  • Programming involved is more complex
  • The tether can get caught or snagged (and potentially cut)
  • Distance is limited by the length of the tether
  • Dragging a long tether adds friction and can slow or even stop the robot from moving


Remote control

Source: Raimond Spekking - Wikipedia

Infrared transmitters and receivers cut the cables connecting the robot to the operator. This is usually a milestone for beginners. Infrared control requires "line of sight" in order to function; the receiver must be able to “see” the transmitter at all times in order to receive data. Infrared remote controls (such as universal remote controls for televisions) are used to send commands to an infrared receiver connected to a microcontroller which then interprets these signals and controls the robot’s actions.


  • Low cost
  • Simple TV remote controls can be used as controllers


  • Needs to be line of sight
  • Distance is limited
  • Very low data rate (simple commands only)

Radio Frequency

Pair of XBee Series 2s with Whip Antennas by Mark Fickett licensed under CC BY 3.0

Source: Mark Fickett - Wikipedia

RF communication requires either a transmitter matched/paired with a receiver, or a transceiver (which can both send and receive data). RF does not require line of sight and can also offer a significant range (transmission distance). Standard radio frequency devices can allow for data transfer between devices as far away as several kilometers and there is seemingly no limit to the range for more professional RF units. XBee and Zigbee modules use RF for communication, but allow the user to vary many of the communication parameters involved. These modules have a specific footprint (layout) and are only produced by certain companies. Their main advantage is that they provide a very robust easy to set-up link and take care of all of the communication protocol details. Many robot builders choose to make semi-autonomous robots with RF capability since it allows the robot to be as autonomous as possible, provide feedback to a user and still give the user some control over some of its functions should the need arise.



  • Considerable distances possible
  • Setup can be straightforward
  • Omni directional (impeded but not entirely blocked by walls and obstructions)


  • Pay attention to the transmission frequencies – they can be shared


Bluetooth dongle

Bluetooth is a form of RF and follows specific protocols for sending and receiving data. Normal Bluetooth range is often limited to about 10m though it does have the advantage of allowing users to control their robot via Bluetooth-enabled devices such as cell phones, PDAs, and laptops (though custom programming may be required to create an interface). Just like RF, Bluetooth offers two-way communication.


  • Controllable from any Bluetooth-enabled device (usually additional programming is necessary) such as a Smartphone, laptop, desktop etc.
  • Higher data rates are possible
  • Omnidirectional (does not need line of sight and can travel a little through walls)


  • Devices need to be “paired”
  • Distance is usually about 10m (without obstructions)

GPRS / Cellular


Source: Drahtlos - Wikipedia

Another wireless technology that was originally developed for human-to-human communication, the cell phone, is now being used to control robots. Since cellular frequencies are regulated, incorporating a cellular module on a robot usually requires added patience for programming as well as an understanding of the cellular network system and the regulations.


  • Robot can be controlled anywhere it has a cellular signal
  • Direct satellite connection is possible


  • Setup and configuration can be complex – NOT for beginners
  • Each network has its own requirements/restrictions
  • Cellular service is not free; usually, the more data you transmit/receive the more money you will need to pay.
  • System is not (yet) well setup for robotics use


WiFi Logo

WiFi is now an option for robots; being able to control a robot wirelessly via the internet presents some significant advantages (and some drawbacks) to wireless control. In order to set up a WiFi robot, you need a wireless router connected to the internet and a WiFi unit on the robot itself. For the robot, you can also use a device that is TCP/IP enabled with a wireless router.


  • Controllable from anywhere in the world so long as it is within range of a wireless router
  • High data rates possible


  • Added programming required
  • Maximum range is usually determined by the choice of wireless router


The next step is to use the microcontroller in your robot to its full potential and program it to react to input from its sensors. Autonomous control can come in various forms: pre-programmed with no feedback from the environment, limited sensor feedback and finally complex sensor feedback. True "autonomous control" involves a variety of sensors and codes to allow the robot to determine by itself the best action to be taken in any given situation. The most complex methods of control currently implemented on autonomous robots are visual and auditory commands. For visual control, a robot looks to a human or an object in order to get its commands. Getting a robot to turn to the left by showing a piece of paper with the arrow pointing left is a lot harder to accomplish than one might initially suspect. An auditory command such as “turn left” also requires quite a bit of programming. Programming a variety of complex commands like “get me a drink from the fridge” or “get my shoes, they’re near the front door” is no longer a fantasy but requires a very high level of programming and a lot of time.


  • This is “real” robotics
  • Tasks can be as simple as blinking a light based on one sensor's readings to landing a spacecraft on a distant planet.


  • It’s only as good as the programmer; if it’s doing something you don’t want it to do, the only option you have is to check your code, modify it and upload the changes to the robot.

For our project, the goal is to create an autonomous rover capable of making a decision based on external input from sensors. Should the robot “misbehave” it will be physically closed and shutting it off will not be an issue. However, having the option of semi-autonomous (wireless) control to allow us the option of making a remote-controlled vehicle is also attractive. We will not have the need for tethered control.

The microcontroller chosen in the previous lesson uses what are called “shields” which are essentially add-on boards specific to the Arduino’s pin layout. There are many shields, including ones that allow for Ethernet, Xbee, or Bluetooth communication. There is even a shield that allows for GPRS (i.e. cellular) communications. The basic robot will therefore have no additional modules, though it is important to note that it does have wireless communication capability.

Arduino Shields

Source: RedRem & Mhassanu5050 - Wikipedia

For further information on learning how to make a robot, please visit the RobotShop Learning Center. Visit the RobotShop Community Forum in order to seek assistance in building robots, showcase your projects or simply hang out with other fellow roboticists.

LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!

Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post