Micromelon Robotics
Platform
Resources
NewsAbout UsDownload
Support
Build Your Kit

Stay in the loop

New activities, teaching guides, and product updates delivered to your inbox.

Micromelon Robotics

Australian-made educational robotics for the next generation of innovators.

contact@micromelon.com.au

Company

  • About Us
  • Privacy Policy
  • Terms and Conditions

Products

  • Micromelon Rover
  • Code Editor
  • Robot Simulator
  • Junior
  • Python Library

Support

  • Resources
  • News
  • Rover Repairs
  • Contact
  • Build Your Kit

© 2026 Micromelon Robotics Pty Ltd. All rights reserved.

ABN 56 623 302 296

← Back to Resources
3D Printing Guides

Guide to RoboRave Line-Follow

31 December 2024

Guide to RoboRave Line-Follow

The Challenge

RoboRave Line-Follow tracks for elementary, middle, and high school divisions

The goal of RoboRave Line-Follow (SPRINT) is to create a robot that can follow a black line and deliver a single ping-pong ball to a tower at the end of the track. The game lasts 3 minutes, and after scoring the first ball, robots may continue scoring balls for the duration of the match. There are three fields for elementary, middle, and high school with increasing difficulty.

The Rules

Scoring

Scores are accumulated from the following tasks:

  • Following the track to the tower
  • Delivering at least one ball
  • Returning back home
  • Delivering the highest number of bonus balls in the remaining time

General Robot Rules

  • The robot must be fully autonomous and cost $1500 USD or less.
  • The robot must fit within size constraints of 25 × 18 cm (no height restriction).
  • The weight limit is 1 kg.

For the rest of the tournament rules and specific scoring matrices for each age division, see the official Line-Follow rules.

Getting Started

Physical Build

For the line-follow aspect, the built-in colour sensors on the Micromelon Rover can be used. The main focus of the physical build is designing a system to carry and deposit the balls in the tower. The tower is an A4 mailing box, 20 cm tall and 10 cm wide, with a 10 × 10 cm hole at the top for the ping-pong balls.

The recommended technique is to build a tower on top of the Rover with a container to store the balls. The container should also have a release system (a servo, for example) to drop balls when it reaches the tower. Our 3D-printed RoboRAVE Line-Follow attachment covers these considerations, see the build guide below.

Build Guide: RoboRAVE Line FollowRelated resourceBuild Guide: RoboRAVE Line FollowPrint and assemble the RoboRAVE Line Follow attachment for your Micromelon Rover. Adds a servo-controlled barrel that aims the ultrasonic sensor for competition line following.

3D-printed line-follow attachment with ball container and servo release

3D-printed line-follow attachment with ball container and servo release

Coding

For the coding aspect, the recommended strategy is to use a basic line-following technique with some modifications to suit the challenge. The Micromelon Line Following activity is a good starting point.

Activity: Line FollowingRelated resourceActivity: Line FollowingLearn the colour sensor and simple algorithm design while following a line.

After making the basic line-following code, we need to add some conditions so the Rover knows when it’s reached an intersection, reached the tower, or returned home. Each situation is represented by a black line perpendicular to the current track, see the line-following mat examples in the RoboRave rules.

A simple way to detect these is an IF statement checking whether all three colour sensors see black. The ultrasonic sensor can also be used to detect the tower.

When these black areas are detected, the Rover must determine the area type. This can be hard-coded for the field. For example, for the MS field:

  1. Line follow until a black area is detected (intersection reached).
  2. Turn at the intersection.
  3. Follow the line until a black area is detected (tower has been reached).
  4. Deposit a ball and turn around.
  5. Follow the line until a black area is detected (intersection reached).
  6. Turn at the intersection.
  7. Follow the line until a black area is detected (home reached).

Tips and Tricks

Rover Expansion Headers

One way to make the Rover follow the line faster is to use an external colour and light sensor instead of the three on the Rover. There are several sensors with differing capabilities, one example is the QTR-8RC line sensor array, which senses reflected light intensity from 8 infrared sensors. The expansion headers on the Rover can be connected to an external microcontroller which interfaces with these sensors.

External line-sensor array

External line-sensor array

For more on using the expansion header, see the I2C and UART guides plus the Rover and Arduino Line Follow showcase.

How to use I2CRelated resourceHow to use I2CUse I2C on the Micromelon Rover to communicate with external devices like servo drivers, sensor arrays, or an Arduino.

How to Use UARTRelated resourceHow to Use UARTLearn how UART works, how it’s implemented on the Micromelon Rover, and how to connect external devices like Arduino or OpenMV to it.

Showcase: Rover and Arduino Line FollowRelated resourceShowcase: Rover and Arduino Line FollowA showcase of using I2C and an Arduino Nano to drive an 8-channel QTR line sensor array for advanced line following.

PID Line Follow

When making your own line-follow code, most simple implementations have the Rover following the line in a jerky motion. Implementing a PID (Proportional Integral Derivative) controller smooths the motion and improves the Rover’s ability to follow the line quickly and accurately. The basic idea is to use reflected light intensity from the line sensors, usually very high on white and low on black, so the goal is to follow the middle point between the two (the “grey area”).

PID line-follow target, keep the sensor reading at the grey midpoint

PID line-follow target, keep the sensor reading at the grey midpoint

The target is 50% intensity. If the reading is less than that, the Rover veers away from the line; if it’s greater than 50%, it turns towards the line. The full PID equation is excessive for the task, a simple Proportional controller should suffice in most cases.

That covers everything you need to get started with RoboRave Line-Follow. Start simple with basic line following, get your ball delivery mechanism working reliably, then iterate on speed and accuracy. Practise on different track layouts and give yourself plenty of time to tune your code before competition day. Good luck at the event!

Continue Learning

Getting Started With Proportional ControlRelated resourceGetting Started With Proportional ControlAn introduction to proportional control, what control systems are, the key components, and how to apply proportional control on the Micromelon Rover.

Activity: Line FollowingRelated resourceActivity: Line FollowingLearn the colour sensor and simple algorithm design while following a line.

How to Use UARTRelated resourceHow to Use UARTLearn how UART works, how it’s implemented on the Micromelon Rover, and how to connect external devices like Arduino or OpenMV to it.

← Return to Resources