Project Description 📄
Meet Jerry, the Line Follower robot with a great personality. Designed to follow dark lines, this robot combines coding with a great sense of adventure. Jerry possesses a brain (powered by a nano Arduino board), a heart (a trusty battery), and two legs (equipped with motors and wheels). Just like any dedicated racer, it takes a few moments to prepare before starting its line-following journey, after which it run the path with speed and precision.
Components 🔧
- 1 ball caster
- Cardboard for the chassis
- 2 Wheels
- Bolts & nuts
- Zip ties (for keeping the components in place)
- Arduino Nano
- Mini Breadboard
- Infrared (IR) Sensors for Line Detection
- 1 LiPo Battery for Power
- L293D motor driver
- 2 DC Motors
- Wires and Connectors
Design Description ✏️
The main body was designed for a lightweight machine. The two motors with wheels are attached to the bottom of the body, while the Arduino, the breadboard and the battery are placed on top. The IR sensor is placed at the front of the car. This structure allows the cables and the connectors to be easyly organized. In the middle of the car is the a 3rd ball which is used for stability and smoothness of the movement.The Arduino board is programmed to receive the signals from the IR sensors and adjust the speed and direction of the motors accordingly. All these components are building Jerry, the line follower.
PID Controller 📏
Jerry uses a PID (Proportional-Integral_Derivate) controller to adjust the speed of its motors. It is based on the error between the current position and the ideal position. The PID is calculted with the following constants:kp, ki and kd.
It is used to adjust the speed of the motors based on the error. The higher the kp, the faster the robot will react to the error.
It is used to adjust the speed of the motors based on the sum of the errors. The higher the ki, the faster the robot will react to the sum of the errors.
This is used to adjust the speed of the motors based on the difference between the current error and the previous error. The higher the kd, the faster the robot will react to the difference between the current error and the previous error.
motorSpeed = kp * p + ki * i + kd * d;
Our initial values for the PID are:
kp = 5; ki = 0; kd = 120; where p is the current error, i is the sum of the errors and d is the difference between the current error and the previous error.
Functionality ⚙️
"Jerry" employs infrared (IR) sensors to detect and follow dark lines on a contrasting surface. The line-following algorithm ensures smooth navigation, allowing the robot to stay on course with precision.
The two motors with wheels provide motion control. The speed and direction of the motors are adjusted based on the input from the IR sensors, enabling the robot to maintain its path and follow the line at an optimal speed.
Upon activation, "Jerry" fires up a great start-up sequence, preparing itself for the line-following adventure. This adds a touch of personality to the robot's behavior.
Best time 17.59 ⏱️
Watch Jerry in action here.
Operation and Customization 💻
-
Power On:
- Turn on the robot by connecting the battery.
-
Start-up Sequence:
- Observe the beautiful start-up sequence as Jerry prepares for its journey.
-
Line Following:
- Place the robot on a surface with a visible dark line.
- Admire "Jerry" follows the line with agility and precision.
-
Speed Adjustment:
- The robot dynamically adjusts its speed based on the complexity of the line-following task.
Feel free to customize Jerry by adjusting the line-following algorithm parameters, tweaking motor speeds, or even adding additional features to enhance its personality.



