PIR vs Ultrasonic vs ToF: Choosing the Right Motion & Distance Sensor

Detecting movement and distance is at the heart of countless projects — alarms, automatic lights, robots, smart bins. But "motion sensing" isn't one thing. The three most common choices — PIR, ultrasonic, and ToF — work very differently. Here's how to pick the right one.

PIR — detects presence

A PIR (Passive Infrared) sensor detects the body heat of a person or animal moving nearby. It's cheap, low-power, and perfect for "is someone there?" questions — automatic lights, security alarms, and presence detection. What it can't do is measure distance or detect still objects.

Ultrasonic — measures distance with sound

An ultrasonic sensor (the classic HC-SR04) sends a sound pulse and times the echo to measure distance — typically 2cm to 4m. It's the go-to for obstacle-avoiding robots, water-level monitors, and parking sensors. Affordable and reliable, though soft or angled surfaces can scatter the echo.

ToF — precise distance with light

A Time-of-Flight (ToF) sensor measures distance using a laser pulse instead of sound. It's faster, more precise, and works on small or soft targets where ultrasonic struggles — ideal for gesture sensing, precise ranging, and compact robots.

Quick comparison

Sensor Measures Range Best for
PIR Presence (heat + motion) ~5–7m Lights, alarms
Ultrasonic Distance (sound) 2cm–4m Robots, level sensing
ToF Distance (laser) cm–2m, precise Gestures, fine ranging

How to choose

  • Just need to know if someone's there? → PIR.
  • Need how far away something is, on a budget? → Ultrasonic.
  • Need precise, fast distance on small targets? → ToF.

All three are in stock and Arduino/ESP32/Pi-ready in our Sensors collection — genuine, bench-tested, with fast India shipping and COD. Building something specific? Ask VoltIQ and it'll suggest the right sensor and the kit that uses it.

Back to blog