How to connect a sensor to Raspberry Pi

1.Step – Configuration GPIO Pins.
  • Log-in to your R PIHome+
  • Go to the Settings tab =>GPIO Input/Output settings
  • Select a free GPIO pin, set:
    • function = Digital Input
    • home = select if you wish to display the input on home page
    • name

and Save settings.

connect pir, light sensor to raspberry pi, Input Settings R PiHome+
Input Settings R PiHome+

 

2.Step – Connect sensor to Raspberry Pi.
  • Connect GND pin of the Sensor with GND pin of the Raspberry PI
  • Connect VCC pin of the Sensor with 5V/3.3V  pin of the Raspberry PI (see sensor documentation)
  • Connect DO pin with GPIO pins, which you set in GPIO configuration page of the R PIHome.

WARNING: GPIO pins use a 3V3 logic level and are not tolerant of 5V levels. Check whether the digital output (DO) value is 3.3V, otherwise, you may permanently damage your Raspberry PI

connect sensor to raspberry pi
Sensors & Raspberry Pi – Connecting diagrem

PIR SENSORpir sensor raspberry pi

The potentiometer labelled “Sensitivity” allows you to select the distance that the sensor will work over. It can varied from approximately 3m to 7m.

The potentiometer labelled “Output timing” adjust how long the output is held  “High” after the sensor is trigerred. This can be varied from approximately 5 seconds to 300 seconds

Leave a Reply