Robotics sensors help a robot detect distance, obstacles, surfaces, and motion in its environment. This cheat sheet covers three common sensing methods: LiDAR, ultrasonic, and infrared sensing. Students need these ideas to choose the right sensor, calculate distance, and understand why readings change in real robot systems.
It is designed as a quick classroom reference for building, testing, and troubleshooting robots.
Key Facts
- Time of flight distance is calculated with d = v t / 2 when a signal travels to an object and reflects back.
- For ultrasonic sensors in air, use the speed of sound v ≈ 343 m/s at 20°C, so d = 343 t / 2 in meters when t is in seconds.
- LiDAR usually uses light pulses, so its signal speed is approximately c = 3.00 x 10^8 m/s.
- Infrared distance sensors often estimate distance from reflected IR intensity or angle, so their output may be nonlinear.
- Sensor resolution is the smallest change in distance or signal that the sensor can reliably detect.
- Sensor range is the minimum to maximum distance over which the sensor gives useful readings.
- A narrow field of view gives more precise direction information, while a wide field of view detects objects over a larger area.
- Sensor fusion combines readings from multiple sensors to improve reliability, such as using LiDAR for mapping and ultrasonic sensing for close obstacles.
Vocabulary
- LiDAR
- LiDAR is a sensing method that uses laser light to measure distance and often creates maps of surrounding objects.
- Ultrasonic sensor
- An ultrasonic sensor measures distance by sending high-frequency sound waves and timing the returning echo.
- Infrared sensor
- An infrared sensor detects infrared light, often to sense nearby objects, lines, edges, or reflected light intensity.
- Time of flight
- Time of flight is the time a signal takes to travel from a sensor to a target and back or to another receiver.
- Field of view
- Field of view is the angular area a sensor can detect at one time.
- Calibration
- Calibration is the process of comparing sensor readings with known values and adjusting the system to improve accuracy.
Common Mistakes to Avoid
- Forgetting to divide by 2 in echo distance calculations is wrong because the measured time includes the trip to the object and the return trip.
- Using the speed of light for an ultrasonic sensor is wrong because ultrasonic sensors use sound waves, not light waves.
- Assuming IR sensors give perfectly linear distance readings is wrong because reflected infrared intensity depends on distance, surface color, angle, and sensor design.
- Ignoring surface material is a mistake because shiny, dark, soft, transparent, or angled surfaces can reflect or absorb signals differently.
- Trusting one noisy reading is a mistake because real sensors have random noise, so robots should filter, average, or confirm important measurements.
Practice Questions
- 1 An ultrasonic sensor measures an echo time of 0.020 s. Using v = 343 m/s, how far away is the object?
- 2 A LiDAR pulse returns after 40 ns. Using c = 3.00 x 10^8 m/s, calculate the distance to the object.
- 3 An IR sensor gives voltage readings of 2.8 V at 10 cm and 1.1 V at 30 cm. What does this suggest about how reflected IR changes with distance?
- 4 A robot must detect glass walls, dark furniture, and close obstacles in a hallway. Explain which sensor or sensor combination would be most reliable and why.
Understanding LiDAR, Ultrasonic & IR Sensing
The three sensor types work because a robot sends out energy or observes returned energy. An ultrasonic module sends a short burst of high frequency sound, then measures the echo. LiDAR sends a tightly directed beam of light and times its return, often many times each second.
Infrared sensors may measure how much invisible light returns from a surface. Some use the position of reflected light on a detector instead.
This difference matters because a reading is not simply a property of the object. It depends on the signal, the target surface, the angle, and the surroundings.
Time of flight systems need to measure extremely short intervals. The signal travels from the sensor to the object, then back to the sensor. Distance equals signal speed times travel time divided by two.
The division by two is essential because the measured time covers both parts of the trip. Sound travels much more slowly than light, so ultrasonic timing is easier for simple classroom electronics.
Its speed changes with air temperature and can change slightly with humidity. A robot that needs accurate ultrasonic measurements should account for temperature or accept a small distance error.
Surface type creates many surprising errors. A soft curtain, carpet, or thick clothing can absorb ultrasonic sound, producing a weak echo. A smooth wall at a steep angle can reflect sound away from the receiver.
LiDAR can struggle with dark, transparent, shiny, or highly reflective materials. A glass door may give a return from the glass, an object behind it, or neither one consistently.
Infrared sensors are strongly affected by surface color and by bright sunlight, which contains infrared energy. Students should test sensors against several materials instead of trusting a result from one flat white wall.
Real robots rarely use one raw reading as a final decision. A program may take several samples, discard impossible values, then use an average or median value. This reduces random noise, though it can make the response slower.
The field of view matters during testing. A wide ultrasonic beam may detect a chair leg that is not directly in front of the robot. A narrow LiDAR beam can miss an object between scans.
In a hallway robot, LiDAR can help build a map while ultrasonic sensing provides a close range safety check. Good designs include a stopping distance, a backup sensor, and careful tests at the speeds the robot will actually use.