V
10  
Tags
Attachments
Dobrica Pavlinušić's random unstructured stuff
PIR
pir-pinout.jpg

BISS001 module

BISS001 - Micro Power PIR Motion Detector IC

  • Input voltage: 3-5 V
  • Hi: 0.7*Vdd = 0.7 * 5 V = 3.5 V
  • Lo: 0.3*Vdd = 0.3 * 5 V = 1.5 V

HC-SR501 module

Technical data of the HC-SR501 Motion and Sensor Modules:

Input voltage: 4.5 V - 20 V
Digital output when motion is detected: 3.3 V (high)
Digital output with no movement on the HC-SR501: 0 V (low)
Working temperature in the environment: -15 � C to 70 � C
Delay Time 0.5 to 200 seconds
Angle of coverage: 100 �
Reach 5m - 7m
Size of the HC-SR501 motion:

Sensor Lens diameter: 23mm
Length: 24.03mm
Width: 32.34mm
Height (with lens): 24.66mm
Center screw hole spacing: 28 mm
Screw hole diameter: 2mm (M2)

Collect pir data using Linux gpio and send it to mqtt

both pots are all the way to the left (if jumper is on the left toword edge of board) to make minimal timeout

pir.sh

gpio-utils

gpio-utils exists on Raspberry Pi

#!/bin/sh -e

led=/sys/devices/platform/rpi_control_board/leds/d1/brightness

# pir sensor connceted to 5V, GPIO12, GND
sudo stdbuf -oL -eL gpio-event-mon -n gpiochip0 -o 12 -r -f | while read gpio event time dir edge ; do
	case $dir in
		rising)
			echo -n "^"
			echo 1 > $led
			;;
		falling)
			echo -n "_"
			echo 0 > $led
			;;
		*)
			echo -n "?"
			;;
	esac
done

gpiod

alternative version using gpiod package available on sunxi

#!/bin/sh -e

led=/sys/class/leds/orangepi:red:status/brightness

# pir sensor connceted to 5V, PA6, GND
sudo stdbuf -oL -eL gpiomon 0 6 | while read event dir edge time ; do
	echo "# $dir"
	case $dir in
		RISING)
			echo -n "^"
			echo 1 > $led
			;;
		FALLING)
			echo -n "_"
			echo 0 > $led
			;;
		*)
			echo -n "?"
			;;
	esac
done

 

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: