Production-quality 5-function Arduino autonomous robot with real-time pathfinding and sensor fusion.
Note: This project was completed in January-February 2025. The commit history reflects the original development timeline. The repository was uploaded to GitHub on January 15, 2026.
- Features
- Hardware Requirements
- Pin Connections
- Installation
- Operation Functions
- Usage
- Calibration
- Serial Commands
- Function 1: Manual forward/backward toggle
- Function 2: Programmed square path pattern
- Function 3: PID-based line following
- Function 4: IR remote control
- Function 5: Autonomous maze solving with 360-degree scanning
- Environmental scanning with servo-mounted ultrasonic sensor
- Kalman filtering for sensor noise reduction
- Dead reckoning position estimation and path history tracking
- Interrupt-driven function switching with EEPROM calibration
- Multi-level debug logging and real-time telemetry
- Arduino Uno/Nano
- 2x DC motors with L298N H-Bridge driver
- HC-SR04 ultrasonic sensor
- IR line tracker and receiver (TSOP1738)
- SG90 servo motor
- 3x LEDs and piezo speaker
- 7-12V battery pack
| Component | Arduino Pin | Description |
|---|---|---|
| Motor Left Pin 1 | 5 | Left motor H-Bridge input 1 (PWM) |
| Motor Left Pin 2 | 6 | Left motor H-Bridge input 2 (PWM) |
| Motor Right Pin 1 | 9 | Right motor H-Bridge input 1 (PWM) |
| Motor Right Pin 2 | 10 | Right motor H-Bridge input 2 (PWM) |
| Ultrasonic Trig | 11 | Trigger pin for distance sensor |
| Ultrasonic Echo | 12 | Echo pin for distance sensor |
| Line Tracker | A0 | Analog input from line sensor |
| IR Receiver | 13 | IR remote receiver data pin |
| Servo | 7 | Servo motor control (ultrasonic mount) |
| LED Green | 2 | Status: Normal operation |
| LED Yellow | 3 | Status: Warning |
| LED Red | 4 | Status: Error/Emergency |
| Speaker | 8 | Piezo buzzer/speaker |
| Function Switch | 2 | Interrupt pin (INT0) |
- Install Arduino IDE and IRremote library
- Clone repository:
git clone https://github.com/KrishP147/autonomous-maze-solving-robot.git - Open
src/main.inoin Arduino IDE - Select board and port, then upload
- Wire components per pin table above
Function 1: Manual forward/backward toggle Function 2: Pre-programmed square path pattern Function 3: PID-controlled line following Function 4: IR remote control Function 5: Autonomous maze navigation with 360-degree scanning, pathfinding, and dead-end detection
Power on robot, press function switch to cycle through functions. Open Serial Monitor at 9600 baud for telemetry and debugging output.
Send 'C' via Serial Monitor to calibrate motors. Adjust LINE_THRESHOLD in config.h for line tracker sensitivity. Update IR codes in functions.cpp for your specific remote.
| Command | Description |
|---|---|
| C | Calibrate motors |
| D | Toggle debug verbosity |
| R | Reset position and history |
| T | Test all systems |
Modular C++ design with separate files for motors, sensors, navigation, functions, and utilities. All configuration constants in config.h for easy customization.
MIT License
Krish Punjabi - @KrishP147 // Final updates