Skip to content

The Four-wheeled Mobile Robot with Raspberry Pi

The wheeled mobile robot has been created in 2013. The main reason why I built this robot was the need to do tests of localization algorithms. The mobile robot can be used mainly in inspection tasks to keep an eye on a specific area. However, the advanced sensory system of the robot provides a significant universality. Moreover, the robot equipped with a manipulator can be used in manipulation or transportation tasks.

Design assumptions

  • Four-wheeled construction and every wheel is driven independently
  • Change the direction of the move by different side speeds of wheels, similarly to tanks
  • Construction elements with aluminium
  • Bearing wheels axes
  • Low-located center of gravity of the mobile robot
  • To improve development efficiency it should have components structure. The main modules should be the following:
    • power supply module,
    • motors control module,
    • sensor module,
    • higher-level control unit.
  • Modules communicate by I2C interface.
  • Each wheel has a corresponding magnetic incremental encoder.
  • Platform equipped with inertial sensors.
  • Raspberry Pi B with Raspbian system as a higher-level control unit..
  • Communication with the robot by Wi-Fi network.

The range of the robot depends mainly on the accumulators and implemented solutions for energy saving. Additionally, it can be loaded with 3 kg and a curb weight should be about 3.5 kg. In addition, the robot is capable to move with speed about 0.9 m/s on flat ground.

Mechanical system

The mechanical system has been designed in the student version of Autodesk Inventor 2013. The main design criterion was to obtain a compact, reliable and robust construction.


Robot visualization


Mobile robot with a cover


Mechanical parts of the robot

A robot case

The robot case was made of aluminum profiles (EN AW-6060). A floor plate was cut from an aluminum sheet having a thickness of 2 mm. Inside the robot was placed two protected chambers for batteries made of aluminum profiles 30x50x2.5. The main purpose of chamber application is protection main robot modules against lithium-polymer batteries faults.


As robot drives were used brushed DC motors Pololu 37D with hears 67:1 without integrated encoders. The motors have a torque of about 1.4 Nm and a nominal rotational speed equal to 150 RPM and it consumes about 0.3 A without load. The stall current is similar to 5 A for every motor. The described parameters can be received with a 12 V power supply. It was estimated that a robot with such drives may enter the hill with a slope of about 45 o.


The motor with a mounting


It uses Mobot MBW-120/55/4 wheels, which have hubs of plastic and rubber tread. The outside diameter of the wheel is 120 mm and the inner diameter is about 55 mm. Wheels can be used even on rugged terrain.

Koło Mobot

Power transmission

The power transmission was realized with a designed axle mounted to the wheel on one side and to the motor shaft on the other side. Every wheel has a corresponding bearing. Bearing seats were placed outside of the robot
body and were used 61901 2RS (12x24x6 mm) bearings.

Power supply system


To supply robot components like control modules or motors two lithium-polymer (li-poly) batteries were used (each has three cells). That kind of battery has very high discharge currents. The acceptable level of voltage is between 9.3 V and 12.6 V.

Power supply module

The robot is equipped with a dedicated power supply unit. It supplies other components of the robot and protects batteries. The impulse inverters were used to provide 5 V and 3.3 V for robot modules. Moreover, the power supply module has an auxiliary power line for stand-by mode and battery charging monitoring.

Control system

Hardware architecture

The hardware architecture of the robot was designed to implement localization approaches and other methods which will be developed in the future. The robot hardware consists of three parts:

  • sensors module,
  • motors control module,
  • higher-level control unit – Raspberry Pi.

Additionally, it was used encoders modules and distance sensors directly connected to the main module.

The hardware architecture

The hardware architecture of a robot

The idea behind the system is that the computer gains information about the robot’s state and environment using connected modules with sensors. The main unit process data and is responsible for localization and decision processes. Moreover, it controls robot drives through the motors module. The platform computer is connected to the ground station by Wi-Fi. On the ground, the station is running a user application where the user can control a robot and supervise its work.

Motors control module

A dedicated hardware module was designed to control motors. Therefore, this module handles four DC motors and four incremental encoders with quadruple outputs.

Sensors module

To provide the robot information about its state and environment state it was designed the sensors module. It retrieves data from sensors like an accelerometer, gyroscopes, compasses, distance sensors, and GPS module. Then it sends it to the host computer.

Raspberry Pi – a higher-level control unit

The Raspberry Pi B single board computer was used as a higher-level control unit. It is cheap and sufficient for this purpose. Moreover, Raspberry Pi has a great community. The Raspberry Pi specification:

  • processor ARM1176JZF-S, 700 MHz,
  • 512 MB RAM,
  • 8 General Purposes Input Output (GPIO),
  •  2x USB 2.0, Ethernet, UART, I2C, SPI, audio (mini-jack, HDMI), video (RCA, HDMI)
  • input for SD memory card.
  • power consumption about 700mA with 5V,
  • size 85.6 mm x 54 mm, weight about  45 g.

The computer is running wiht Raspbian system that is based on a Debian. However, it’s optimized to the Raspberry Pi platform. The software of the robot was written in C and C++. Moreover, for computer configuration was used bash scripts.

Communication between modules

All robot modules communicate with the I2C interface. The Raspberry Pi is the master device and others are slaves.

Communication with user work station

Communication with the user station was realized with wireless network card TP-Link WN725N because for this card are available drivers.  As a user computer, it was used notebook with a Windows 7  system. It was created hot-spot on the computer with tool netsh . The initialization of the connection process needs two steps. The first one is to set the parameters of connection with the following commands:

netsh wlan set hostednetwork mode=allow "ssid=robot" </em><em>"key=hasło" keyUsage=persistent

Next, the connection should be established.

netsh wlan start hostednetwork

After that, the robot can connect to Raspberry Pi for example by SSH (Secure Shell) protocol.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.