How to choose a brain for your robot?

In my previous posts, I have discussed the basics of robotics, and how to choose the right sensors and actuators for your robot. In this post, I will discuss, how to choose the right brain for your robot.

1. The ‘Brain’ of the robot.

Just recollecting the concepts I have discussed in the last post about ‘Brain’ or the ‘Think’ section of the robot.

Fig (a): Block diagram of a typical robot

The ‘brain’ of the robot is connected with different sensors and actuators of the robot. The sensors are the input to the brain and the output of the robot is executed using actuators. The brain of the robot is responsible for reading the data from sensors, perform different computations on the sensor data, and make a decision based on the data. The decisions made by the robot brain can be executed using different actuators

So I hope you understand that the brain of the robot is some kind of computational device. You may be aware of different computation devices. In the upcoming section, we can see details of different computation devices, and see in which robot that you can use those devices.

1.1 Microcontroller

A microcontroller is a microcomputer, integrated into a single chip that will have a microprocessor (C.P.U), RAM, ROM, etc. You can write a program in a microcontroller. The microcontroller will execute the program whenever the controller turns ON.

Here is an example of microcontroller from Atmel/Microchip.

Fig (b): Example of microcontroller: ATMega 328P & ATMega 32A-AU-TQFF

Similar to your laptop/mobile specifications, the microcontroller also has specifications. We can discuss the above microcontroller specification after going through the important specifications of a microcontroller.

1.2 Specifications of a microcontroller

  1. Size of data bus: According to the data bus size of the microcontroller, the controllers are categorized as 8-bit, 16-bit, 32-bit, 64-bit, etc. For example, the CPU inside an 8-bit microcontroller can process 8-bit of data at a time. The more the data bus size, the better will be the precision.
  2. Maximum Clock Frequency: This is the maximum speed of the CPU inside the microcontroller. The more the speed value is, the better will be the controller. The unit of the speed of the controller is commonly mentioned using MegaHertz (MHz). Commonly, the speed of microcontrollers ranges from 8MHz – Up to 700MHz.
  3. Program Memory Size/Flash memory: This is the storage capacity of the microcontroller to store a program. If the controller is having more space, you can store big programs. Normally sizes of storage are expressed in KiloBytes. Normally, the range of flash memory is from 4k bytes to 2M byte.
  4. Size of RAM: This is the size of the RAM inside the microcontroller. The range of RAM size will be from 1k to 1M Bytes.
  5. Number of I/O pins: The pins in a microcontroller can be configured for different purposes. One of the main purposes of pins is to act as an Input/Output pin meaning the controller can detect whether the pin received a digital pulse (HIGH/LOW) or not. It can also act as output meaning you can set the voltage of the pin to LOW or HIGH. Normally we can use most of the pins of the microcontroller as I/O pins. If you go through the datasheet of each microcontroller, you can find this specification.
  6. Operating Voltage: Most of the microcontroller can only accept a range of voltage as a power supply. The voltage less or above the operating voltage can damage the controller.
  7. Interface type: These are the different communication protocols that you can use to interface the microcontroller to other peripherals. Some of the popular communication protocols are I2C, SPI, USART.
  8. Mounting Style: There are different ways of mounting microcontrollers in the PCB. The DIP and SMD are commonly available mounting packages. The DIP is a rectangular package mounted on a socket in the PCB whereas the SMD package can directly mount on PCB.

Let’s have a look at the specifications of two microcontrollers mentioned in Fig (b).

1.2.1 Specification of ATMega 328P & ATMega 32A-AU microcontroller
SpecificationATMega 328-P DIPATMega 32A-AU
Size of data bus8-bit8-bit
Maximum Clock Frequency20 MHz16 MHz
Flash Memory32 kB32 kB
RAM2 kB2 kB
Number of I/O pins2332
Operating voltage1.8 V to 5.5 V2.7 V to 5.5 V
Interface typeI2C, SPI, USARTI2C, SPI, USART
Mounting styleDIPSMD
Download DatasheetATMega 328-P DIPATmega 32A
Specifications of ATMega 328-P and ATMega 32A-AU

1.3 Popular microcontrollers and boards used in robot

There are many manufacturers of microcontrollers that are used for different applications. Let’s see some of the popular microcontrollers and microcontroller boards in robotics.

1.3.1 Atmel & Microchip Technology:

In 2016, the popular semiconductor company, Atmel being acquired by Microchip Technology. The AVR series microcontrollers from Atmel and PIC series microcontrollers from Microchip are commonly using for robotics applications. Some of the specific series from AVR and PIC used in robotics are given below. Atmel: One of the famous microcontroller series from Atmel is the ATMega series. This series so popular because the ATMega chips used in famous open-source microcontroller boards called Arduino boards.

The Arduino Board

The Arduino boards are very popular in D.I.Y and Robotics community. The easiness of programming of Arduino boards is one of the reasons why developers prefer Arduino for their projects.

Here is one of the popular Arduino board called Arduino UNO with ATMega 328P-DIP chip on it. You can see the pinout of the board in the following image.

Fig (c): Arduino UNO board

Learning about Arduino boards will be very helpful while building robots. You can easily prototype your robot using this board. I am mentioning some of the free tutorials videos from YouTube to learn about Arduino programming.

Here is a series of video tutorials for Arduino board programming.

Here are best books for learning Arduino. Microchip: The PIC (Programmable Intelligent Computer) microcontrollers is a family of microcontrollers from the microchip. The most commonly used PIC series for robotics are the following.

  1. PIC 16F8 series
  2. PIC 18F series
  3. PIC 32MK Family

1.3.2 STMicroelectronics

This is a famous semiconductor company from Europe, Switzerland. The STM32 is a family of 32-bit microcontrollers from ST. These are used in robot prototypes and products.

Here is an example of the use of STM32 and STM8 microcontrollers in a commercial robotic product. This is PCB of iRobot Roomba 980 vacuum cleaner.

Fig(d): Roomba 980 Teardown

The STM32 and STM8 are also used in robot prototyping. Here are famous microcontroller boards from STM used in robots.

Fig (e): STM32F4-DISCOVERY & STM32 NUCLEO board

The STM32 discovery boards come with different series of microcontrollers of stm32. Here is the datasheet of the STM32 discovery board and here is the datasheet of one of the NUCLEO boards called NUCLEO-F401RE.

Here are some introductory video of STM32 discovery and nucleo board

The STM32 board can program using famous programming IDEs like

1.3.3 Parallax

Parallax is a microcontroller company from the USA, which is popular for its BASIC Stamp microcontroller and Parallax Propeller.

The popularity of these microcontrollers is because of the easiness of programming. This can be programmed using a variant of BASIC language.

Here are the basic stamp controller breakout, kit, and propeller breakout board mainly for educational robotics.

Fig (f): Basic Stamp kit & Propeller Activity board

Here are some tutorials to learn about basic stamp controller.

The basic stamp can be programmed basic stamp editor.

1.3.6 Texas Instruments:

TI is another famous semiconductor manufacturing company from the USA, which is popular for Tiva C and MSP 430 series microcontrollers. These families of microcontrollers are used in the robotic products and robot prototyping.

Here are a popular evaluation kit of Tiva C and MSP430 series microcontrollers from TI.

Fig (g) Tiva C Launchpad and MSP 430 Launchpad

The Tiva C Launchpad and MSP 430 Launchpad are mainly using for robot product prototyping. The highlights of these controllers are high performance with less cost.

Here is a Free course from edx to learn about the embedded systems using Tiva C Launchpad.

You can program the Tiva C and MSP 430 boards using following software

1.3.2 NXP Semiconductors:

NXP is an American dutch semiconductor manufacturer that is famous for the LPC series of microcontrollers. The LPC from NXP is a family of 32-bit microcontrollers. In robotics, LPC series microcontrollers are using products and prototypes. In Fig(d), from the Roomba PCB, you can find an LPC based controller. NXP is providing solutions for vacuum clean robots.

Here is a link from NXP regarding their solutions for the Vacuum cleaning robot.

Here are some of the evaluation boards based on the LPC series from NXP: LPCXpresso boards.

Fig (h): LPCXpresso54628 board

Other than LPC series, here are two other MCU series from NXP

1.3.4 Renesas Electronics:

Renesas is a Japanese semiconductor manufacturer headquartered in Tokyo. They also provide solutions in robotics such as Sensing, Control, Drive, Functional safety, etc. They also provide support to robotics software frameworks such as ROS.

You can read more about robotic solutions from Renesas from this link. The RX72M 32-bit microcontroller from Renesas is used for industrial robotics.

Here are some of the popular series of microcontroller from Renesas

[RX63N RX631 group of microcontrollers]

Lentin Joseph

View posts by Lentin Joseph
Roboticist | Author of 8 robotics books | TEDx speaker

Leave a Reply