Skip to content

Entry Level Line Follower Robot utilizing PID control algorithm on Arduino Nano. Features custom PCB integration, 3D-printed chassis, and advanced logic for complex tracks & dashed lines.

Notifications You must be signed in to change notification settings

bagasdanu/Line-Follower_PID_Robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PID Line Follower Robot (Arduino Nano)

Arduino C++ EasyEDA Fusion 360

This repository contains the firmware, hardware design (PCB), and mechanical files (3D) for an autonomous Line Follower Robot. The robot utilizes a PID (Proportional-Integral-Derivative) control algorithm to accurately follow tracks, including complex turns and dashed lines.

The project demonstrates a full-stack robotics implementation, encompassing custom PCB design in EasyEDA, 3D modeling in Fusion 360, and embedded C++ programming.

Project Gallery

3D Design (Fusion 360) Real Implementation
3D Render Real Robot
Designed in Fusion 360 Final Assembly with Custom PCB

Hardware Specifications

Based on the final implementation design:

Component Specification Function
Microcontroller Arduino Nano (ATmega328P) Central processing unit.
Motor Driver L293D Controls motor direction and speed via PWM.
Sensors 3x Photodiodes + LED Superbright Detects line contrast (Black/White).
Actuators 2x DC Motors N20 (60 RPM) Low RPM chosen for higher torque and stability.
Power System Li-Po Battery + Step-Down Module Regulated to 8V for safety and stability.
Interface OLED Display + Buzzer + 5 Buttons Used for debugging, PID tuning, and mode selection.
PCB Design Custom Shield (EasyEDA) Integrates driver, sensor ports, and UI buttons.

Software & Control Logic

1. PID Control Algorithm

The robot uses a closed-loop control system to correct path errors in real-time. The PID parameters were tuned specifically for the 60 RPM motors:

  • Kp (Proportional): 17.0 - Provides immediate reaction to the current error.
  • Ki (Integral): 0.4 - Corrects accumulated past errors (steady-state error).
  • Kd (Derivative): 0.3 - Dampens the oscillation to prevent overshooting.
// PID Configuration Snippet
lf.setPID(17.0, 0.4, 0.3);
lf.polaritasMotor(1, 0); // Adjust based on motor wiring direction

About

Entry Level Line Follower Robot utilizing PID control algorithm on Arduino Nano. Features custom PCB integration, 3D-printed chassis, and advanced logic for complex tracks & dashed lines.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages