HC-SR501 applies LHI778 probe design that was imported from Germany with high sensitivity, high reliability, ultra-low voltage operation mode. HC-SR501 is widely used in various self-sensing electrical equipments, especially for battery-powered automatic controlled products. It is based on infrared technology, automatic control module.
◦ Voltage: 5V - 20V
◦ Power Consumption: 65mA
◦ TTL output: 3.3 V, 0 V
◦ Lock time: 0.2 sec.
◦ Activation methods: L - disable repetition trigger, H - enable repetition trigger
◦ Sensing range: less than 120 degrees, within 7 meters
◦ Temperature: - 15 ~ +70
◦ Dimensions: 32*24 mm, screw spacing 28mm, M2, lens diameter: 23mm
HC-SR501 pin outputs and controls
The pin-outs and commands of this device are shown in the following figure and described in the following table.
◦ Automatic induction: To enter the output detection range is high, the person leaves the automatic delay detection range high, output low.
◦ Photosensitive control (optional, not factory set) can be set as photosensitive control, daylight or light intensity without induction.
◦ Temperature compensation (optional, factory reset): In summer, when the room temperature rises to 30 ° C to 32 ° C, the detection distance is slightly shorter, temperature compensation can be used for performance compensation.
◦ Activated in two ways: (jumper selectable)
◦ Non-repeatable trigger: sensor output is high, delay time is over, output is automatically changed from high to low level;
◦ Repeatable trigger: the sensor output high, the delay period, if there is human activity in its detection range, the output will always remain high until the people left after the delay will be high level goes low (sensor module detects a delay period will automatically extend each human activity, and the starting point for the delay time for the last time event).
◦ With induction blocking time (default: 2.5s blocking time): Sensor module after each sensor output (up to down), followed by a set blocking period, no sensor signal is accepted by the sensor during this period. This function can be obtained by the sensor output time "and" blocking time "interval between work can be applied to interval detection products; This function can inhibit a variety of interferences in the load switching process. (This time can be set to zero seconds - a few tens of seconds.
◦ Wide operating voltage range: default voltage DC4.5V-20V.
◦ Power Consumption: Static current <50 microamperes, particularly suitable for battery-powered products with automatic control.
◦ High output signal: easy to reach with various types of circuits.
Automatic light detection for floors, bathrooms, cellars, porches, warehouses, garages, etc., fans, alarms, etc.
◦ Adjust the distance potentiometer clockwise to increase the sensing distance (approx. 7 meters), while decreasing the sensing distance (approx. 3 meters).
◦ Adjust the clockwise delay potentiometer for the elongated delay rotation sensor (300S); shorten the induction delay potentiometer (5S).
◦ The sensor module turns on after one minute, during this initialization time interval during this module 0-3 times is output, one minute later it switches to standby state.
◦ If you try to prevent lights and other sources of interference from closing the direct surface of the lens module, in order to prevent the introduction of faulty interference signals; the environment should prevent wind flow, the wind will cause interference on the sensor.
◦ Sensor module with double probe, sensor window rectangular, double (A B) on both sides of the longitudinal direction
◦ so that when the human body from left to right or from right to left through the infrared spectrum to reach the double time, distance difference, the greater the difference, the more sensitive the sensor,
◦ when the human body from the front to the probe or from top to bottom or from bottom to top in the direction traveled, detects double variations in distance of less than infrared spectroscopy, no difference value in the sensor insensitive or does not work;
◦ The double direction of the sensor should be installed as parallel as possible to the human movement. In order to increase the angle range of the sensor, the module using a circular lens also makes the probe surrounded induction, but the left and right sides still up and down in both directions detection field, sensitivity, still need to try to install the above requirements.
The induction module takes about a minute to initialize. During the initialization time, it emits 0-3 times. A minute later he goes into standby mode.
Keep the lens surface away from light and wind to avoid interference.
The induction module has a double probe with a rectangular window. The two subprobes (A and B) are located at the two ends of the rectangle. When the human body moves from left to right, or from right to left, the IR time to reach the two subprobes differs. The greater the time difference, the more sensitive this module is. When the hum no body moves face-to-face probe, or down, or upward, there is no difference in time. So it is not working. Then install the module in the direction in which most hums do not behave, to ensure human induction by dual probes. In order to increase the induction range, this module uses round lenses that can induce IR from all directions. However, induction from the right or left is more sensitive than from above or below.
Arduino HC-SR501 Motion Sensor Guide
Connecting the Arduino to the HC-SR501
This requires only three wires.
Copy, paste and load the sketch from the Tutorial
The sketch simply lights the Your Arduino LED connected to Pin 13 whenever motion is detected.
Make sure you pay attention to and somehow manage the 1-minute initialization in any application you develop.