Line-Following Electronic Board for Robotics Applications

E.S.N. Korrani*

Department of Electrical Engineering, Sirjan University of Technology, Sirjan, Iran

Submitted on 21 March 2025; Accepted on 21 April 2025; Published on 09 May 2025

To cite this article: E.S.N. Korrani, “Line-Following Electronic Board for Robotics Applications,” Insight. Electr. Electron. Eng., vol. 2, no. 1, pp. 1-5, 2025.

Copyright: 

Abstract

Existing line-following robotic systems, such as Pololu boards, are constrained by static thresholding algorithms, limited adaptability to dynamic environments, and high costs. To address these limitations, this paper proposes a compact, low-cost printed circuit board (PCB) designed for robust line tracking in educational and industrial applications.
The system integrates an array of QRE1113GR infrared (IR) sensors, an adaptive threshold-based signal processing algorithm, and an Arduino Nano microcontroller to achieve stability under variable lighting (100–500 lux) and uneven terrain. Key hardware innovations include a two-layer PCB layout with segregated analog and digital components to minimize noise, MOSFET-based motor drivers for efficient power distribution, and a voltage regulation circuit using AMS1117 and decoupling capacitors.
Experimental validation demonstrates a 95%-line detection accuracy on white surfaces, a 50 ms sensor-to-motor response latency, and a 50% reduction in power consumption (120 mA at 5V) compared to commercial alternatives. The design achieves a material cost of USD 18 and dimensions of 60.2 mm × 24.7 mm, enabling portability for small-scale robotics. The primary contributions of this work are: 1) a dynamic thresholding algorithm empirically optimized for environmental adaptability, 2) a modular, open-source hardware architecture, and 3) a comparative analysis quantifying performance improvement over a fixed-threshold system. Future research will focus on integrating machine learning for real-time terrain classification and expanding wireless communication capabilities.

Keywords: PCB design; line-following robot; infrared sensors; adaptive control; educational robotics; cost-effective automation

Abbreviations: PCB: printed circuit board; IR: infrared; EMI: electromagnetic interference; AGVs: automated guided vehicles; CNNs: convolutional neural networks; RL: reinforcement learning; BLE: Bluetooth low energy

1. Introduction

Line-following robots are integral to applications ranging from educational robotics to industrial automation, yet existing solutions face three persistent challenges: 1) high costs of commercial sensor arrays, 2) inflexibility of fixed-threshold algorithms in dynamic environments, and 3) limited hardware integration in academic prototypes. Commercial systems, such as Pololu QTR-8RC, utilize static thresholding for sensor signal processing, rendering them unsuitable for environments with fluctuating ambient light or uneven terrain. While academic efforts have explored adaptive algorithms, these often neglect cost-effective hardware design, resulting in impractical or expensive implementations [1–3].

This paper addresses these limitations by introducing a low-cost, adaptive line-following printed circuit board (PCB) optimized for stability and affordability. The proposed design achieves a material cost of USD 18, a 45% reduction compared to the Pololu QTR-8RC (USD 35), through strategic component selection, including QRE1113GR infrared (IR) sensors (unit cost: USD 0.227) and open-source microcontroller integration. These digital-output sensors enhance noise immunity and simplify signal processing, enabling robust performance at a fraction of the cost of commercial alternatives. This affordability broadens accessibility for educational institutions and small-scale industrial applications [1–6].

The novelty of this work lies in three key innovations:

  1. Dynamic thresholding algorithm: A real-time adaptive formula adjusts sensor thresholds based on ambient conditions, addressing the rigidity of commercial systems.
  2. Modular hardware architecture: A two-layer PCB segregates analog and digital components to minimize noise while maintaining a compact footprint (60.2 mm × 24.7 mm).
  3. Power optimization: MOSFET-based motor drivers and voltage regulation circuitry reduce power consumption by 50% compared to existing solutions.

2. Methodology

2.1. Component selection and hardware design

The PCB schematic (Figure 1) comprises five subsystems:

2.1.1 Infrared sensors:

  • QRE1113GR reflective sensors (Part: QRE1113GR, Quantity: 8): These digital-output sensors provide binary detection (line vs. background) with built-in Schmitt triggers for noise immunity. Their compact SMD package (3 mm × 2.5 mm) and low unit cost (USD 0.227) enable scalable deployment.

2.1.2. Signal conditioning:

  • Photodiodes (Part: 1541201EEA400, Quantity: 8): 1206 SMD photodiodes paired with QRE1113GR sensors enhance ambient light rejection.

2.1.3. Resistors:

  • 47Ω resistors (Part: ERJ-S08F47R0V, Quantity: 6): Current-limiting resistors for MOSFET gate protection.
  • 47kΩ resistors (Part: ERJ-U08F4702V, Quantity: 2): Pull-down resistors for sensor signal stabilization.

2.1.4. Capacitors:

  • 0.1 µF ceramic capacitors (Part: CL21B104KBCNNNC, Quantity: 2): Decoupling capacitors for high-frequency noise filtering.
  • 1 µF MLCC capacitors (Part: C1206X105K5RAC, Quantity: 2): Bulk decoupling for voltage regulator stability.

2.1.5. Motor control:

  • N-Channel MOSFETs (Part: MMFTN3402, Quantity: 1): SOT-23 packaged MOSFETs with 30V/4A rating drive DC motors efficiently. A 150Ω resistor (Part: ERJ-8ENF1500V, Quantity: 1) ensures safe gate voltage levels.

2.2. PCB layout and noise mitigation

The two-layer PCB (60.2 mm × 24.7 mm) minimizes electromagnetic interference (EMI) through (Figures 2 and 3):

  • Analog-digital separation: Sensor circuits (analog) are isolated from motor drivers (digital) on separate layers.
  • Ground plane: A continuous ground plane on the bottom layer reduces loop inductance.
  • SMD components: 1206/0805 packages minimize parasitic inductance and board footprint.


FIGURE 1: Schematic diagram of the line-following PCB including IR sensors and voltage regulation circuitry.


FIGURE 2: PCB layout includes the top layer, which connects elements on top of the board, and the bottom layer, which connects elements on the bottom.


FIGURE 3: Line following PCB prototype (unassembled).

3. Mathematical Notation in Adaptive Control Algorithm

The dynamic threshold T is computed recursively to adapt to variable lighting and terrain conditions. The equation governing T is:

3.2. Command execution

  • Left turn: Right motor receives full power (PWM = 255), left motor stops (PWM = 0).
  • Right turn: Left motor receives full power, right motor stops.
  • Forward: Both motors operate at 75% duty cycle (PWM = 191) to maintain steady motion.

3.3. Parameter justification

3.3.1. Smoothing factor

  1. Smoothing factor (α): α was empirically tuned through iterative testing under ambient light levels ranging from 100–1000 lux and surfaces of varying reflectivity
  2. A value of α = 0.8 optimally balances noise suppression (weighting past thresholds) and adaptability (weighting current sensor data). Lower values, α < 0.7, caused oversensitivity to transient noise, while higher values, α > 0.9, delayed adaptation to rapid light changes.

3.3.2. Offset (β)

  1. β was calibrated using grayscale test patterns (10–90% reflectivity).
  2. A fixed offset of β = 10 ensures reliable line detection even under suboptimal conditions (e.g., shadows or glare), reducing false negatives by 22% in validation trials.

4. Results

4.1. Performance under variable conditions

The proposed PCB was tested under diverse lighting and terrain conditions to validate its adaptability (Table 1):

  • Adaptive thresholding: The dynamic algorithm maintained > 80% accuracy even under extreme lighting (50–1000 lux), outperforming fixed-threshold systems like Pololu QTR-8RC, which dropped to < 60% accuracy in low/high light.
  • Terrain robustness: The PCB achieved 80–85% accuracy on uneven surfaces (gravel, carpet) due to noise-resistant signal processing and MOSFET-driven motor control.
  • Power efficiency: Despite environmental stressors, power consumption remained 40–50% lower than commercial alternatives (Pololu: 240 mA at 5V).

TABLE 1: System performance (accuracy, response time, power) across lighting conditions (optimal, low, high).

Condition

Accuracy

Response time

Power consumption

Optimal (White surface, 500 lux)

95%

50 ms

120 mA

Low Light (50 lux)

88%

55 ms

125 mA

High Light (1000 lux)

82%

60 ms

130 mA

4.2. Comparative analysis with Pololu QTR-8RC

The proposed design outperforms Pololu QTR-8RC [3] in critical aspects beyond cost and power (Table 2):

TABLE 2: Proposed system vs. Pololu QTR-8RC. Improvements in adaptability, latency, and cost.

Metric

This work

Pololu QTR-8RC [3]

Improvement

Adaptive thresholding

Yes

No

30% higher accuracy in dynamic environments

Latency consistency

≤70 ms across conditions

100–150 ms

2x faster response under stress

Cost per unit

$18 USD

$35 USD

48% cost reduction

5. Applications

  • Education: Affordable platform for robotics competitions and STEM workshops.
  • Industry: Guidance system for automated guided vehicles (AGVs) in warehouses.
  • Research: Baseline for developing low-cost, adaptive sensor arrays.

6. Conclusion

This work demonstrates a cost-effective, adaptive line-following PCB that addresses critical limitations of commercial solutions like the Pololu QTR-8RC. By integrating QRE1113GR IR sensors, a dynamic thresholding algorithm, and a modular two-layer PCB design, the system achieves 95% accuracy under optimal conditions (500 lux) and maintains > 80% accuracy under extreme lighting (50–1000 lux). Key contributions include:

  1. Dynamic thresholding algorithm: A recursive formula
  2. Adapts to environmental changes in real time, outperforming fixed-threshold systems by 30% in dynamic environments.
  3. Noise-resistant hardware: Segregated analog/digital PCB layers and MOSFET-based motor drivers reduce power consumption by 50% (120 mA at 5V) and ensure stable operation.
  4. Cost efficiency: At USD 18, the design offers a 48% cost reduction over commercial alternatives while maintaining open-source accessibility for educational and industrial applications.

7. Future Work

To advance adaptability and functionality, future efforts will focus on:

1. Machine learning integration:

  • Convolutional neural networks (CNNs) for real-time classification of environmental conditions.
  • Reinforcement learning (RL) to optimize motor control policies for complex scenarios.

2. Wireless connectivity: Integration of Bluetooth low energy (BLE) for remote monitoring and control.

These enhancements aim to bridge the gap between low-cost hardware and intelligent autonomy, enabling broader applications in robotics education and industrial automation.

References

  1. Pololu Corporation, “QTR-8RC Reflectance Sensor Array,” 2022.
  2. V. Kumar, H. R. Bhat, and T. C. Ninan, “System, method, and unit for controlling charging of a line follower robot,” U.S. Patent 11,362,546 B2, Jun. 14, 2022.
  3. Chatzopoulos, M. Papoutsidakis, M. Kalogiannakis, and S. Psycharis, “Action Research Implementation in Developing an Open Source and Low Cost Robotic Platform for STEM Education,” International Journal of Computer Applications, vol. 178, no. 24, pp. 33–46, Jun. 2019.
  4. L. Wang, B. Vermulst, J. Duarte, and H. Huisman, “Thermal Stress Reduction of Power MOSFET in Electric Drive Application with Dynamic Gate Driving Strategy,” in Proc. IEEE Applied Power Electronics Conf. and Exposition (APEC), Phoenix, AZ, USA, 2021, pp. 720–727.
  5. S. Glowinski, S. Pecolt, A. Błażejewski, and M. Sobieraj, “Design of a Low-Cost Measurement Module for the Acquisition of Analogue Voltage Signals,” Electronics, vol. 12, no. 3, p. 610, 2023.
  6. M. M. A. Alwan, A. A. Green, A. S. Noori, and A. A. Aldair, “Design and Implementation of Line Follower Arduino Mobile Robot Using Matlab Simulink Toolbox,” Iraqi Journal for Electrical and Electronic Engineering, vol. 17, no. 2, pp. 11–16, Dec. 2021.