Line Detecting Sensors for Line-Following Robots (AGV)
To make the robot follow the line from track, we have to use sensors to help
it detect the black line on the white background. There are some common
sensors/tool can be used.
1. Camera (Vision system)
Figure 1: Industrial Camera
Principles: A camera will extract the black line from the recorded frames
while robot is moving. Image processing (OpenCV, AI) finds the black line vs
white background and computes the robot’s position relative to it.
Figure 2: Camera line detecting principle
Pros:
- Versatile, high accuracy
- Can detect obstacles at the same time.
Cons:
- High power source required.
- Complex image processing skills.
- Higher cost, processing time.
2. IR Sensor (Reflectance sensor)
Figure 3: IR sensors
Principles: The emitter is an IR LED and the detector is an IR photodiode. The
IR photodiode is sensitive to the IR light emitted by an IR LED. The photo-
diode’s resistance and output voltage change in proportion to the IR light
received. This is the underlying working principle of the IR sensor.
Figure 4: IR sensor principle
Pros:
- Cheap, small, easy to interface.
- Fast response, good for simple black-white tracks.
Cons:
- Sensitive to ambient light.
- Struggles with glossy or low-contrast surfaces.
- Needs multiple sensors for accuracy.
3. Phototransistor
Principles: Works like a normal transistor, but instead of using a base current
to switch it on, it is activated by incident light (visible or infrared). When
photons strike the semiconductor material, they generate electron–hole
pairs, which increase the base current and allow a larger current to flow
between the collector and emitter.
Figure 5: Phototransistor's principles
Pros:
- Very cheap and simple.
- High processing speed.
Cons:
- Less reliability than dedicated reflectance sensors.
- Strongly affected by ambient light.
4. Color Sensor
Principles: Measures RGB light reflected from the surface. Can distinguish
between multiple line colors (red, blue, green, black).
Pros:
- Detects more than just black/white.
- Useful if different colored paths represent different routes.
Cons:
- More expensive than IR reflectance.
- Slower response.
- Sensitive to lighting conditions.
5. Magnetic Sensor
Figure 6: Application of magnetic sensor in AGV
Principles: A magnetic sensor detects magnetic tape embedded on the floor.
The robot follows the magnetic path instead of an optical line.
Pros:
- Not affected by lighting, dust, or floor color.
- Very reliable in industrial AGVs.
- Can work in warehouses with poor visibility.
Cons:
- Requires magnetic tape installation → adds cost.
- Not as flexible (path fixed by tape).
- Higher sensor cost than simple IR.
Force Sensor
Choosing suitable sensor for product distinguish.
1. Load cell
A sensor that converts mechanical force (weight) into an electrical signal.
The most common type is the strain gauge load cell. The principle
depends on electric resistance, when weight is applied, the load cell body
deforms slightly. Then it lead to the change in electrical resistance. Greater
deformation (compression) leads to a higher decrease in resistance, which
can be measured. The output is in the millivolt range and must be amplified
before being read by a microcontroller.
Figure 7: Load cell's structure and principles
Pros:
High accuracy and repeatability.
Wide measurement range (grams to tons).
Reliable for long-term use.
Cons:
Requires external amplifier (HX711).
Sensitive to mounting and mechanical alignment.
More expensive than simple pressure or force film sensors.
2. Force-Sensing Resistor (FSR)
A thin, flexible film sensor that changes its electrical resistance when a force
or pressure is applied. It consists of a pressure-sensitive resistive layer
placed over conductive traces. When no force is applied, the resistance is
very high. As force increases, the resistance decreases because more
conductive particles make contact. This resistance change can be measured
using a voltage divider and read by a microcontroller’s ADC pin.
Figure 8: Relationship between force and resistance
Pros:
• Thin, lightweight, and easy to integrate.
• Simple to interface (just a resistor divider).
• Low cost for basic force detection.
Cons:
• Non-linear response, not suitable for precise measurements.
• Limited repeatability and drift over time.
• Less accurate compared to load cells.
References:
Raspberry Pi Foundation. (n.d.). Build a line-following robot with Python. Raspberry Pi Projects.
Retrieved September 12, 2025, from https://projects.raspberrypi.org/en/projects/rpi-python-line-
following/2
Circuit Digest. (n.d.). Arduino Uno line follower robot. Circuit Digest. Retrieved September 12,
2025, from https://circuitdigest.com/microcontroller-projects/arduino-uno-line-follower-robot
Instructables. (n.d.). Line following robot. Instructables. Retrieved September 12, 2025, from
https://www.instructables.com/Line-Following-Robot/
AUMI. (n.d.). Magnetic line-based navigation solutions for AGV line detector sensor from MLS
SICK. AUMI. Retrieved September 12, 2025, from https://aumi.com.vn/en/magnetic-line-based-
navigation-solutions-for-agv-line-detector-sensor-from-mls-sick/#:~:text=Built%2Din
%2010%20markers%20(Makers,CANopen%2C%20Modbus%20RTU%20RS%2D485
Robu. (n.d.). IR sensor working. Robu. Retrieved September 12, 2025, from https://robu.in/ir-
sensor-working/
NShopVN. (n.d.). Nguyên lý hoạt động của cảm biến cân nặng Loadcell: Cách sử dụng cảm
biến với Arduino để làm một cân điện tử đơn giản. NShopVN Blog. Retrieved September 12,
2025, from https://nshopvn.com/blog/nguyen-ly-hoat-dong-cua-cam-bien-can-nang-loadcell-
cach-su-dung-cam-bien-voi-arduino-de-lam-mot-can-dien-tu-don-gian/