⚠️ Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through our links, we may earn a small commission at no extra cost to you. We only recommend sensors we have researched and whose listings we checked live on Amazon. Prices change frequently, so we don’t list them here. Tap through and confirm the current price on Amazon before buying.
Ultimate Buying Guide
🚶 Best PIR Motion Sensors for Arduino, ESP32 & Raspberry Pi
7 motion sensors ranked for makers and embedded engineers: HC-SR501, AM312, HC-SR505, plus RCWL-0516 microwave and LD2410C mmWave radar alternatives, with real specs, honest verdicts and direct Amazon links.
✅ 7 Motion Sensors Reviewed
✅ Verified Amazon ASINs
✅ PIR, Microwave & mmWave Picks
✅ Honest Pros & Cons
A PIR (passive infrared) motion sensor is the cheapest, lowest-power way to make a project react to people. It watches for the change in infrared heat as a warm body crosses its field of view and flips a single digital pin HIGH. Wire that pin to an Arduino, ESP32, STM32 or Raspberry Pi Pico and you have the core of a security alarm, an automatic light, a wake-on-approach display or a deep-sleep IoT node that only wakes when someone walks by.
The trouble is that “PIR sensor” covers several very different modules. The classic HC-SR501 has adjustable range and timing, the thumbnail-sized AM312 runs from 3.3V on micro-amps, the HC-SR505 trades adjustability for size, and radar modules like the RCWL-0516 and LD2410C solve problems PIR can’t, such as sensing through a plastic case or detecting a person who is sitting still. This guide ranks 7 motion sensors on the specs that matter in real embedded work: supply voltage, idle current, range, field of view, timing control and output type.
💡 Reality check before you buy: Almost every budget PIR on Amazon is the same generic design sold under many brand names, so a few duds per pack is normal and buying a multi-pack is the smart move. A PIR only detects moving heat: a person sitting perfectly still will eventually “disappear”, and sunlight, heaters and air vents can cause false triggers. PIRs also cannot see through glass or plastic, so they must sit behind their own Fresnel lens. Expect a 30 to 60 second warm-up after power-on during which the output is unreliable. If you need to detect stationary people or hide the sensor inside an enclosure, look at the radar picks (RCWL-0516 or LD2410C) instead.
🚶 Quick Comparison: All 7 Motion Sensors
| Sensor | Technology | Supply | Range | Best For | Buy |
|---|
| 🥇 DIYmall HC-SR501 (5-Pack) | PIR · adjustable | 4.5–20V | 3–7 m | Best Overall | Buy Here → |
| 🏅 HiLetgo AM312 (3-Pack) | Mini PIR · fixed | 2.7–12V | 3–5 m | Best for Battery & 3.3V | Buy Here → |
| 🧍 XIITIA LD2410C (3-Pack) | 24GHz mmWave radar | 5V | Up to ~5–6 m | Best Presence Detection | Buy Here → |
| 📡 HiLetgo RCWL-0516 (5-Pack) | Microwave Doppler | 4–28V | ~5–7 m | Best Hidden / In-Enclosure | Buy Here → |
| 🏠 Stemedu HC-SR501 Wide-Voltage (3-Pack) | PIR · adjustable | 4.8–20V | 3–7 m | Best for 12V Systems | Buy Here → |
| 📦 WWZMDiB HC-SR501 + 2 Cases (5-Pack) | PIR · adjustable | 4.5–20V | 3–7 m | Best with Enclosures | Buy Here → |
| 🔹 Stemedu HC-SR505 (5-Pack) | Mini PIR · fixed | 4.5–20V | ~3 m | Best Compact 5V PIR | Buy Here → |
Ranges are typical figures from the listings and datasheets; real-world range depends on mounting height, lens and temperature contrast. Prices change often, so tap “Buy Here” to see the current price on Amazon.
🔍 What to Look for in a PIR Motion Sensor
🔋
Supply Voltage & Idle Current
The HC-SR501 and HC-SR505 have an onboard regulator and want about 5V or more. The AM312 runs straight from 3.3V and idles in the micro-amp range, which matters for coin-cell and deep-sleep nodes. Radar modules draw milliamps, not micro-amps.
📏
Range & Field of View
The large 23mm dome on an HC-SR501 covers roughly 3–7 m in a wide cone. Mini PIRs like the AM312 and HC-SR505 reach about 3 m. Pick the shortest range that covers your area to cut false triggers.
⏱️
Adjustable Timing
The HC-SR501 has two potentiometers (sensitivity and hold time) plus a single/repeat trigger jumper. Mini modules have a fixed hold time, which is fine when your firmware handles timing anyway.
🔌
Output Type & Logic Level
PIR and RCWL-0516 modules give a simple 3.3V-high digital output, safe for ESP32, Pico and Raspberry Pi GPIO without a level shifter. The LD2410C adds a UART stream with distance and moving/still target data.
📡
PIR vs Radar
PIR is cheap, frugal and ignores anything that isn’t warm. Microwave radar sees through plastic and wood but also through thin walls. mmWave presence radar detects breathing-level micro-motion, so it knows a still person is still there.
🏆 Detailed Reviews: All 7 Motion Sensors
🥇 BEST OVERALL
DIYmall HC-SR501 PIR Motion Sensor (5-Pack)
⭐ 4.6/5 · The Classic Adjustable PIR
Buy on Amazon →

The HC-SR501 is the PIR sensor almost every Arduino and ESP32 tutorial uses, and this DIYmall five-pack is the best-reviewed way to buy it on Amazon. Each module pairs a pyroelectric element and BISS0001 controller with a 23mm Fresnel dome, so it covers a whole room. Two trim pots set the sensitivity (roughly 3 to 7 m) and the output hold time (about 0.5 to 200 s), and the trigger setting chooses between single-shot and retriggering while motion continues. The output is a clean 3.3V HIGH, so it connects straight to an ESP32, Raspberry Pi Pico or Raspberry Pi GPIO, while the onboard regulator accepts anything from 5V to around 20V. Quiescent current sits in the tens of micro-amps, low enough for many battery projects.
✅ Pros- Adjustable range and hold time
- Wide 4.5–20V supply, 3.3V output
- Huge tutorial and library support
- Five modules covers spares and duds
❌ Cons- Listing notes the retrigger setting is a solder jumper on this version
- Bulky dome for small enclosures
- Won’t run reliably from 3.3V
🎯 Verdict: The default choice for alarms, automatic lights and learning projects. If you only buy one PIR, buy this pack.
👉 Check Price on Amazon →
🏅 BEST FOR BATTERY & 3.3V PROJECTS
HiLetgo AM312 Mini PIR Sensor (3-Pack)
⭐ 4.4/5 · Tiny, Micro-Power PIR
Buy on Amazon →

The AM312 packs a complete PIR detector, digital processing and lens into a module about the size of a fingertip. Its big advantage over the HC-SR501 is the 2.7–12V supply range: it runs directly from the 3.3V rail of an ESP32, ESP8266, nRF52 or Raspberry Pi Pico, with no regulator losses. Idle current is in the micro-amp range (retailers commonly quote around 8 µA), which makes it ideal as a wake-up source for deep-sleep battery nodes. The trade-off is that there are no adjustment pots: range is about 3–5 m and the output hold time is fixed at a few seconds, so you handle longer timeouts in firmware.
✅ Pros- Runs natively from 3.3V
- Micro-amp idle current
- Fits inside tiny enclosures
- No tuning needed
❌ Cons- No sensitivity or delay adjustment
- Shorter range than HC-SR501
- Some reviewers report occasional false triggers
🎯 Verdict: The best PIR for ESP32 deep-sleep nodes, wearables and anything running on batteries or 3.3V.
👉 Check Price on Amazon →
🧍 BEST PRESENCE DETECTION · ⭐ 4.5/53. XIITIA HLK-LD2410C 24GHz mmWave Presence Sensor (3-Pack)
5V · 24GHz FMCW · up to ~5–6 m · ±60° · UART + OUT pin · Bluetooth configuration
Buy Here →

Not a PIR, but the answer to PIR’s biggest weakness. The LD2410C is a 24GHz FMCW radar that picks up the micro-motion of breathing, so it keeps reporting a person sitting at a desk or lying in bed long after a PIR would have timed out. You get a simple presence output pin plus a UART stream (256000 baud by default) with separate moving and stationary target states and approximate distance, and you can tune per-distance-gate sensitivity over Bluetooth with the HLKRadarTool app. It is well supported by the ESPHome LD2410 component and Arduino libraries, which makes it a favourite for Home Assistant room-occupancy sensors.
✅ Pros: Detects still people; distance and target data over UART; Bluetooth tuning; strong ESPHome support.
❌ Cons: Draws tens of milliamps, so not for coin cells; needs 5V; can sense through thin walls if not tuned.
🎯 Verdict: The best upgrade when “is someone in the room?” matters more than “did someone walk past?”.
👉 Check Price on Amazon →
📡 BEST HIDDEN / IN-ENCLOSURE · ⭐ 4.1/54. HiLetgo RCWL-0516 Microwave Radar Sensor (5-Pack)
4–28V · ~5–7 m · RCWL-9196 chip · 3.3V output · onboard 3.3V regulator output · sees through plastic
Buy Here →

The RCWL-0516 is a microwave Doppler motion sensor that wires up exactly like a PIR (VIN, GND, OUT) but works in a completely different way. Because it doesn’t need a line of sight for infrared, it detects through plastic, wood and glass, so you can hide it inside a sealed project box with no lens hole. It accepts a very wide 4–28V input, outputs a 3.3V logic HIGH, draws only a few milliamps and even provides a regulated 3.3V output pin for small loads. A CDS pad lets you add a light sensor so it only triggers in the dark. We have full guides for using it with the ESP32 and ESP8266.
✅ Pros: Works behind plastic; very wide 4–28V input; tiny board; ignores heat sources that fool PIRs.
❌ Cons: Can see through thin walls and trigger on fans or moving foliage; no onboard range adjustment; sensitive to nearby Wi-Fi noise if mounted too close to an antenna.
🎯 Verdict: The best choice when the sensor must be invisible inside an enclosure, or when heat sources keep fooling your PIR.
👉 Check Price on Amazon →
🏠 BEST FOR 12V SYSTEMS · ⭐ 4.3/55. Stemedu HC-SR501 Wide-Voltage PIR Sensor (3-Pack)
4.8–20V · H/L trigger modes · 0.5–200 s delay · 100° cone · 23mm Fresnel lens
Buy Here →

Stemedu’s listing focuses on the HC-SR501’s 4.8–20V wide input, which means you can power it directly from the 12V rail of an LED strip controller, alarm panel or automotive project without a separate 5V regulator. It exposes both trigger modes through a jumper (repeat trigger is the default), adjustable delay of roughly 0.5–200 s and a separate block time, plus a 100° cone through the standard 23mm lens. Stemedu also links to MySensors documentation from the listing, which is handy if you’re building a home-automation node.
✅ Pros: Runs straight from 12V; jumper-selectable trigger mode; full HC-SR501 adjustability.
❌ Cons: Only three modules per pack; same bulky dome; smaller review base than the DIYmall pack.
🎯 Verdict: The best HC-SR501 listing for 12V lighting, alarm and smart-home builds.
👉 Check Price on Amazon →
📦 BEST WITH ENCLOSURES · ⭐ 4.2/56. WWZMDiB HC-SR501 PIR Sensor with 2 Cases (5-Pack)
4.5–20V · 3–7 m adjustable · <110° cone · H/L trigger modes · 2 dedicated cases included
Buy Here →

A bare HC-SR501 dangling from jumper wires looks unfinished and is easy to knock out of alignment. WWZMDiB’s five-pack is the same adjustable 4.5–20V PIR with a 3–7 m range and both H (retrigger) and L (single trigger) modes, but it adds two dedicated cases so you can wall- or ceiling-mount a couple of sensors neatly. That makes it a good fit for a hallway light, a doorway counter or a garage alert where the sensor will stay in place for years.
✅ Pros: Two mounting cases included; five modules; both trigger modes documented on the listing.
❌ Cons: Only two cases for five sensors; slightly lower rating than the DIYmall pack; cases are basic plastic.
🎯 Verdict: The best pick when you want a permanent, tidy installation without 3D printing a housing.
👉 Check Price on Amazon →
🔹 BEST COMPACT 5V PIR · ⭐ 3.9/57. Stemedu HC-SR505 Mini PIR Sensor (5-Pack)
4.5–20V · ~3 m · fixed hold time · single trigger mode · 3-pin, 10mm-diameter module
Buy Here →

The HC-SR505 is a pencil-thin, cylindrical PIR that drops into a small hole in a panel or 3D-printed housing. Like the HC-SR501 it uses a regulator, so it is happiest on 5V or higher (the listing quotes 4.5–20V), and it outputs a 3.3V HIGH when it sees motion. There are no pots: range is roughly 3 m and the hold time is fixed, so it suits simple “turn on when someone approaches” jobs like cabinet lights or a desk display wake-up. We’re including it because so many readers ask about it, but note its 3.9-star Amazon rating is the lowest in this guide; buy a multi-pack and test each unit.
✅ Pros: Very small, panel-mountable body; wide supply range; zero configuration.
❌ Cons: Not adjustable; short range; mixed reviews on unit-to-unit consistency; AM312 is better for 3.3V.
🎯 Verdict: A tidy, fixed-function PIR for 5V builds where the HC-SR501 dome is simply too big.
👉 Check Price on Amazon →
🛒 How to Choose the Right Motion Sensor
🚨
Building an alarm or automatic light?
Start with the DIYmall HC-SR501 5-pack: adjustable range and hold time, and plenty of spares.
🔋
Running on batteries or 3.3V?
Use the HiLetgo AM312 as a deep-sleep wake source on ESP32, nRF52 or Pico.
🛋️
Need to know someone is still in the room?
Choose the LD2410C mmWave radar. It detects seated and sleeping people that PIRs miss.
📦
Sensor must hide inside a sealed box?
The RCWL-0516 microwave sensor works through plastic with no lens hole.
💡
Powering from a 12V LED or alarm rail?
Go for the Stemedu wide-voltage HC-SR501, or the WWZMDiB pack if you want cases too.
📐
Panel-mounting in a small 5V device?
The slim HC-SR505 fits through a small hole and needs no configuration.
⚙️ Key Specs Compared: Side by Side
| Spec | HC-SR501 (DIYmall) | AM312 (HiLetgo) | HC-SR505 | RCWL-0516 | LD2410C |
|---|
| Technology | Passive infrared | Passive infrared | Passive infrared | Microwave Doppler | 24GHz FMCW radar ⭐ |
| Supply Voltage | 4.5–20V | 2.7–12V (3.3V OK) ⭐ | 4.5–20V | 4–28V | 5V |
| Idle Current | Tens of µA | Single-digit to low tens of µA ⭐ | Tens of µA | ~3 mA | ~79 mA |
| Typical Range | 3–7 m (adjustable) ⭐ | 3–5 m | ~3 m | ~5–7 m | Up to ~5–6 m (configurable) |
| Adjustability | 2 pots + trigger mode | None | None | Via solder pads only | Per-gate via Bluetooth/UART ⭐ |
| Detects Still People | No | No | No | No | Yes ⭐ |
| Works Behind Plastic | No | No | No | Yes ⭐ | Yes |
| Output | 3.3V digital | 3.3V digital | 3.3V digital | 3.3V digital | 3.3V digital + UART data ⭐ |
Specs are drawn from the Amazon listings and common module datasheets and vary slightly between manufacturers. ⭐ marks the strongest value in each row. Always confirm details on the live Amazon listing.
❓ Frequently Asked Questions
What is the difference between the HC-SR501, AM312 and HC-SR505?
All three are passive infrared sensors with a 3.3V digital output. The HC-SR501 is the largest, with a big dome lens, about 3–7 m range and potentiometers for sensitivity and hold time; it needs roughly 5V or more. The AM312 is a tiny module that runs directly from 3.3V with micro-amp idle current but has fixed settings and about 3–5 m range. The HC-SR505 is a slim cylindrical version with fixed settings and roughly 3 m range that, like the SR501, prefers 5V or higher.
Can I connect a PIR sensor directly to an ESP32 or Raspberry Pi?
Yes. The output of these modules swings to about 3.3V, which is safe for ESP32, ESP8266, Raspberry Pi Pico and Raspberry Pi GPIO pins without a level shifter. Power the HC-SR501 or HC-SR505 from the 5V pin and the AM312 from 3.3V, connect grounds together and read the OUT pin as a digital input or interrupt. See our ESP32 PIR interrupt tutorial and PIR with Raspberry Pi Pico guide for wiring and code.
Why does my PIR sensor trigger randomly or stay HIGH?
The most common causes are the power-on warm-up (ignore the output for the first 30–60 seconds), sensitivity set too high, a long hold time that makes it look stuck, heat sources such as sunlight, heaters or air vents in the field of view, and electrical noise. Noise from a nearby Wi-Fi antenna or a weak supply is a frequent culprit on ESP32 builds: add a 100 µF capacitor across the sensor’s supply pins, keep the sensor a few centimetres from the antenna and turn the sensitivity pot down.
Should I use a PIR or a radar sensor like the RCWL-0516 or LD2410C?
Use a PIR when you want the lowest cost and power and only need to detect people moving through a space. Use an RCWL-0516 when the sensor must be hidden behind plastic or when heat sources fool your PIR, accepting that it can also see through thin walls. Use an LD2410C when you need true occupancy, meaning it should keep reporting someone who is sitting or sleeping. Many smart-home builders combine a PIR for fast trigger with an LD2410C for reliable hold-on.
Can a PIR sensor wake an ESP32 from deep sleep?
Yes, and it is one of the best uses for one. Connect the PIR output to an RTC-capable GPIO and configure it as an external wake-up source (ext0 or ext1). The ESP32 sleeps at micro-amp current until motion is detected, does its work (send a notification, take a photo) and goes back to sleep. An AM312 is ideal here because it runs from 3.3V and adds almost nothing to the sleep current. Our ESP32 deep sleep wake-up sources tutorial shows how.
🏁 Final Verdict: Best Motion Sensor for Every Project
The right motion sensor for every build and budget:
🥇 Best Overall: DIYmall HC-SR501 5-pack with adjustable range, hold time and a 4.5–20V supply
Buy Here →🏅 Best for Battery & 3.3V: HiLetgo AM312 mini PIR with micro-amp idle current
Buy Here →🧍 Best Presence Detection: LD2410C 24GHz radar that detects people sitting still
Buy Here →📡 Best Hidden / In-Enclosure: HiLetgo RCWL-0516 microwave sensor that works behind plastic
Buy Here →🏠 Best for 12V Systems: Stemedu wide-voltage HC-SR501 that runs straight from a 12V rail
Buy Here →📦 Best with Enclosures: WWZMDiB HC-SR501 5-pack with two mounting cases
Buy Here →🔹 Best Compact 5V PIR: Stemedu HC-SR505, a slim fixed-function PIR for panel mounting
Buy Here →For most projects the DIYmall HC-SR501 5-pack is the motion sensor to buy: it is adjustable, well documented and cheap enough to keep spares. Battery and 3.3V builds should use the AM312, rooms where people sit still need the LD2410C mmWave radar, and sensors that must hide inside an enclosure belong on an RCWL-0516. Ready to wire one up? Follow our ESP32 PIR interrupt tutorial, the MicroPython PIR interrupt example, build an ESP32 motion-detection web server with email alerts, and explore more Arduino, ESP32, STM32 and Raspberry Pi tutorials on Microcontrollers Lab.
💬 Not sure which motion sensor fits your project? Tell us what you’re building (a security alarm, a smart light, a battery doorbell or a room-occupancy sensor) in the comments below, and we’ll point you to the right pick.
All Amazon links above use our affiliate tag (microlab05-20). Purchasing through them supports microcontrollerslab.com at no extra cost to you. Prices and availability change frequently, so always confirm the current price on Amazon before buying.
| Arduino Components | Amazon Links |
|---|
| Arduino Starter Kit | Buy Now |
| Arduino Development Kit | Buy Now |
| Arduino Smart Robot Car Kit V4 | Buy Now |
| Arduino Sensors Kit | Buy Now |