sensor
HC-SR501 PIR motion sensor
HC-SR501 PIR motion sensor (sensor) from the electronics library of @openav/hw: its pins, the voltages it takes and gives, its current, each number from its datasheet. Hw.check() reads the same entry when it checks a wiring.
Also called: HC-SR501 人體紅外線感測 · sensor
- electronics library
- not checked on a unit yet
- Kind
- sensor
- Licence
- MIT
- Verified
- not checked on a unit yet
Facts
What HC-SR501 PIR motion sensor is
Every number is read from the datasheets and product pages listed under Sources. A value nobody could confirm says so (待查) and is listed under “To be confirmed”, not guessed.
- Supply
- 4.5–20 V (nominal 5 V)
- Logic level
- 3.3 V (high at least to be confirmed (待查) V)
- 5 V tolerant
- to be confirmed (待查)
- Current
- typical 0.05 mA, max to be confirmed (待查) mA
- Size
- 32 × 24 × to be confirmed (待查) mm
Pins
Every pin of HC-SR501 PIR motion sensor
| Pin | Kind | Label | Volts | Current | Also called | Note |
|---|---|---|---|---|---|---|
VCC | power in | VCC | ||||
OUT | data out | OUT | ||||
GND | ground | GND |
Notes
The library writes its notes in Chinese; they are shown as written.
- 輸出高電位 3.3 V。通電後約一分鐘在暖機,這段時間會亂觸發 0–3 次。
- 延遲 5–300 秒、靈敏度 3–7 m 用板上兩顆旋鈕調;跳線 H=可重複觸發。
Use it
HC-SR501 PIR motion sensor in your code
Paste it into a <script type="module"> on any page: it loads @openav/devices from this site and prints the library entry Hw.check() reads.
import { device } from 'https://openaudiovisual.com/packages/devices/index.js';
const part = await device('pir-hc-sr501'); // HC-SR501 PIR motion sensor
console.log(JSON.stringify(part.part.supply), Object.keys(part.part.pins).join(' '));
// → {"min":4.5,"max":20,"nominal":5} VCC OUT GNDWhat reaches it
@openav/hw·HwHw.check({ board, parts: { x: { part: 'pir-hc-sr501' } }, wires })Listed in a spec's parts, it is checked with the rest of the wiring: voltages, pins, current.
Files
Take it with you
The part as JSON: the library entry (pins, supply, logic levels, current, notes) and its record, as Hw.check() and device() read them.
Status
How sure this page is
Not checked on a unit yet: every value is as its source says. Only a person with the unit can change that.
To be confirmed
- 供電下限:同一份規格書寫 4.5 V 也寫 5 V。
- 耗電:同一份規格書寫 <50 µA 也寫 65 mA。
- 排針規格與腳位順序。
Sources
GitHub
Wrong data?
Every value on this page comes from one file in the repository. Open an issue that says which value and where you read the right one, or change the file in a pull request.