2WD MultiRole L298N & MuliroleRobot L298N


The Multirole 2WD Robot Kit can be configured and programmed as either a line tracing/line follower, a sumobot, or an obstacle avoidance robot among other applications. This robot is based on the Saleng/Arduino Uno as its microcontroller but is also compatible with the Arduino Mega. Basic example programs are also available as a working template.


  • General purpose kit for line tracing/follower, sumobot, obstacle avoidance among others
  • Simplified wiring
  • Minimal soldering
  • 2x line sensors (optionally 3 IR sensors) with non-inverted and inverted signals plus analog output
  • Example programs available


The kit contains the following parts:

Part DescriptionQuantity
Saleng Uno OR Arduino Uno OR Compatible board1 pc
Acrylic base board with attachments for the wheels/motors1 set
USB Cable1 pc
3-9V geared DC motors2 pcs
65mm Plastic-Rubber Wheels2 pcs
Caster wheel1 pc
2×18650 Li Ion Battery Holder – color may vary1pc
Lithium Ion 18650 Batteries2 pcs
Single 18650 Battery Charger1 pc
L298N module1 pc
Kimat IR sensors OR Saleng Trackers3 pcs
HC-SR04 Ultrasonic sensor1 pc
Male-Female Connecting Wires19 pcs
Set of wires for motors1 set
DC Plug adapter or similar1 pc


The following are suggested on the assembly of the robot. This may be customized based on your application needs.

Tools and other materials required:

  • Long nose / small pliers
  • Phillip  or narrow flat screw driver
  • Soldering Iron for the Motor wires
  • Solder wire
  • Double sided tape or glue stick or other adhesives
  • Optional: extra nuts and bolts
  • Optional: extra casing material for sumobot protection e.g. thick plastic sheets, aluminum sheets, ply wood

Before Assembly:

Prepare the base board.

Before proceeding, you may choose to peel off the protective cover on both sides of the acrylic base board. This will reveal the acrylic plastic underneath the cover. Do the same for the small motor brackets. Other users leave this on.

Solder the motor wires.

Insert the wires into the holes in the motor terminals and then solder the wires. Avoid overheating to prevent damage to the plastic or rubber materials used in the motor.

Wheel, Motor and Chassis Assembly:

Use the acrylic brackets to install the motor into the base board. Use the long bolt and its nuts to hold the motor in place. To facilitate neat wiring, the motor terminals face inward. The wheels may then be installed into the motor shaft. The optional encoder disc goes into the other side of the shaft if you will be using them.

The caster wheel is installed with the brass stand offs.

Electronics Installation:

Find a spot on the acrylic base board for the Saleng/Arduino Uno board, L298N module and the battery holder to sit on. Double sided, glue stick, cable ties or nuts and bolts may be used to keep them in place. Connect the battery pack and DC plug in parallel. Watch out for the polarities.

Electrical Connections

Refer to the diagram below for the suggested wiring. Customization is encouraged by omitting or adding sensors, communication modules, motors and other external devices

Notes on Line Tracing

  • At a minimum, use the 2 line tracing sensors. Add more sensors for faster response or smoother performance
  • Adjust the speed. This depends on several factors including the line thickness, print material, battery charge level among others. Decrease speed if robot overshoots the track often. Adjust the speed using the function

speedSetting(255); where the input value has a range of 0-255, zero is a complete stop and 255 is at the maximum speed.

Notes on Sumobot

  • Use 2 line tracing sensors, one installed at the front and the other at the rear side of the robot. These 2 are used to detect the limits of the playing area.
  • Install the ultrasonic sensor for detecting opponents. The threshold distance for this need to be tuned according to rules or preferences. The value is in cm and indicates at which  distance the robot should consider the opponent as in front of it:
  • The speed may also be adjusted in the following line:


  • Additional enclosure may be implemented to protect the robot
  • There are several algorithms for a Sumobot, the example programs a few of them

Notes on obstacle avoidance robot

  • At a minimum, this robot need only the ultrasonic sensor
  • Adjust the detection threshold for obstacles in the program to properly detect obstacles
  • The speed may also be adjusted in the following line:


Limitation of ultrasonic and IR sensors

  • IR sensors are sensitive to strong infrared sources such as sunlight, hence, it is not recommended to use them  where sunlight is strong
  • Ultrasonic sensors work best when the obstacle is perpendicular to the face of the sensor. Inclined and irregular surfaces that bounce off ultrasonic waves may affect their performance. Other sources of ultrasonic waves may also affect distance readings.  One sensing cycle of ultrasonic sensors is also limited by the travel time. Hence, each cycle must be done at periodic intervals.

Upgrades and Improvements

  • Need more from this kit? Here are some customization suggestions
    • Add 2 more ultrasonic sensors for a left-center-right detection of obstacles or opponents in sumobot mode
    • Or add 3 more Saleng Trackers for PID algorithm in Line Tracing mode
    • Add 2 more motors and wheels to make 4 wheel drive
    • Add an SG90 (assigned to pin D9) on the SRV header for rotating ultrasonic sensor
    • Add HC-05 bluetooth module to allow Bluetooth contro

Add an ESP8266 or ESP32 for WiFI control