Skip to content

The Two-wheeled Mini-sumo Mobile Robot based on AVR

I would like to introduce a two-wheeled mobile robot for a mini-sumo competition created a few years ago. The robot is equipped with the AVR ATmega microcontroller, two small DC motors, a Li-poly battery, and proximity sensors.

Assumptions concerning the mechanical part of the robot
  • Length and height below 10 cm, mass below 500 g (minimum category requirements).
  • Set low the center of gravity of the robot.
  • Drives based on two DC motors placed in the bottom part of the construction. The robot has contact with the ground by 2 wheels and the front edge.
Assumptions concerning the electronic part of the robot
  • The control system of the robot is based on AVR microcontroller which generates two PWMs to regulate the rotational speed of the motors shafts.
  • A robot equipped with a set of sensors to detect white lines (ring contour).
  • Four sensors for enemy detection, placed at the front and sides of the robot.
  • The system for monitoring the battery charge level.
  • Measurement of robot displacement from at least two independent sources.

Mechanical construction

Casing

The casing was made of epoxy laminate covered with copper connected by soldering. It is reliable enough, cheap and easy. The robot case has proper holes for white lines sensors and IR distance sensors Sharp GP2Y0D340K.

Drive system

Wheels were made of polyurethane and hubs were made of aluminium. They have very well adhesion to the ground and low inertia.

DC motors

Two motors Pololu HP geared 30:1 were used because of the small size and significant power. The greater part of motors was placed inside of wheels what allows to use of wider wheels to receive better adhesion. Moreover, such an arrangement of motors protects gears from dust.

Sensors

White lines sensors

The robot was equipped with analog TCRT1010 sensors because of their small size and THT montage. The state of the sensors is checked by the A/D converter of the microcontroller. If the white line is below the sensor then the phototransistor is open, current flow increases and the measured voltage too is higher.

Sensors for enemy detection

It was used two infrared (IR) sensors Sharp GP2Y0D340K placed in the front part of the robot to detect an enemy located in front of the robot. Sensors have about 8 ms measurement time.

Accelerometer module

The mobile robot was equipped with analog accelerometer  MMA7361 to detect if the robot is on the ground. Moreover, the accelerometer is an additional sensor for displacement measurement (except for encoders). It was designed to separate PCB for the accelerometer and proper power supply system.

Control system

Microcontroller

The robot was equipped with a microcontroller ATmega 32A and an external quartz resonator 16 MHz. This 8bit microcontroller is very cheap and has a lot of useful integrated circuits.

Motors control

Motors are controlled by TB6612 H-bridges. Every IC has two channels but because of significant current consumption two channels of every IC control one motor. The signals which determine rotation direction and PWM duty are connected directly from the microcontroller. The scheme of the circuit as shown below.

Power supply system

Accumulator

The robot was equipped with a lithium polymer (Li-Poly) battery with a 500 mAh capacity. The battery has three cells and a nominal voltage equal to 11.1 V.
The battery protection circuit was presented in the next part.

Stabilization and filtration of power supply

It was used L1117 Low-dropout (LDO) stabilization because most of the control electronics of the robot need a 5V power supply. To filtrate the power supply it was used several electrolytic capacitors. The second stabilizer was placed in the accelerometer circuit because the accelerometer needs a 3.3 V.

Accumulator charge monitoring

The robot was equipped with a circuit to monitor the charge level of the battery. It used a voltage comparator that compares voltage from Zener diode with divided voltage from the battery. The value of R14 was calculated to current flows through the diode has about 5 mA. The voltage divider was calculated to receive a shutdown threshold of about 9.25 V.  As the comparator was used LM358 double operational amplifier.

Software

The software was written in C language.  The states of sensors are checked in interruption from a timer. In dependence on which state was detected, it is chosen properly action.  It was implemented a diagnostic mode which allows checking all robot components. Moreover, it was implemented a graphical user application in C++ with Qt library which allows to control the robot and change it settings.  The communication between PC and the robot was realized with the UART interface.

Summary

The mini-sumo mobile robot is my first designed robot. Of course, it has some drawbacks. For example, the encoders are low quality and low resolution, and finally not really usable. Moreover, the accelerometer circuit for slide detection is not very precise and noise resistant but it’s able to detect some other events, like robot falls. The weight of the robot with a battery was about 170 g, so it was necessary to weigh it with the lead weights. Two Pololu motors are not reliable in this application because of burning brushes. Besides of mentioned issues, the robot was fully operational and was used successfully in multiple mini-sumo battles. It was a great way to learn multiple stuff related to electronics and robotics.


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.