PIR Sensors
This isn't really a new project but, a write-up of something we have had working in our current home for a long time now. The use of a Passive Infra-Red (PIR) sensor in each room of our house provides both intrusion detection and occupancy detection to our Home Control System (HCS). We have used two types of PIR sensors in our home but they are electrically very similar:
|
The majority of the PIR sensors used in our home are Quest (Elite Security Products) devices. These are designed to work indoors with a 12V dc supply and draw 15mA. They have an internal relay which is used to switch a 12V signal and the relay contacts are normally closed. These devices are directional and need to point in the right direction.
Note that you can get these with 3 different lens types; a wide 'curtain' beam to cover a room, a narrow beam for corridors and a lens for rooms with pets in.
|
|
The other type of the PIRs used in our home are Texecom RF360 devices. These are designed to work indoors with a 12V dc supply and draw 16mA. They have an internal relay which is used to switch a 12V signal and the relay contacts are normally closed. This sensor is used in places where we want a full 360° coverage. Typically, this might be in the centre of an entrance hall or a similar large room.
|
Power & Wiring
All of the PIR sensors in our home are wired back to one single point, for connection to our Home Control System (HCS). This doesn't necessarily have to be the case but, we managed to run the wiring to do this fairly easily. In a new build, this is definitely the best way forward. If you can't do this, then all is not lost. You can run sensors to a common input board or module and use Ethernet IO capability to achieve the same result.
We are using standard 6-core alarm cable, which is ducted and always hidden out of sight. It is cheap, reliable and there are no issues with long cable runs because of the very low currents involved. Because we are using 12V signaling, noise and interference is not an issue either. The Home Control System (HCS) end of the alarm cable is terminated with a 4-pin 0.1" series socket connector (Maplin part no. HB58N). This means the sensors can be plugged into any one of our various input boards. This makes them independent of the I/O technology used and keeps our installation future proof.
|
|
The reason for passing the twilight sensor signal through to all of the PIR sensors is so that lighting controllers can sit between the sensor and the input board. These enable convenience lighting to be directly driven by these controllers.
|
This is the view inside the Quest PIR sensor. The supply to the PIR sensor is also fed in to one side of the relay and the other side is taken to the output line. Because it is a normally closed relay, this means that the signal is active low. We can easily handle this in the HCS software though.
|
Interface
Our very first attempt used our 1-Wire input board to detect changes in PIR sensor state but, this technology is not fast enough to allow many sensors to be used. We subsequently migrated the PIR sensors over to a USB I/O board and this has been working reliably for a long time. We are also now using Ethernet I/O boards.
Software
The above approach means that our Home Control System (HCS) can see changes in state from all the PIR sensors and can use this to take appropriate action. Occupancy is used to extend and control heating, lighting, etc. and the PIR sensors also serve as intrusion detection sensors for when we are away from home. All PIR sensor activity is logged, so the HCS could also make predictions on occupancy in the future.
Our PIP sensors generate a huge number of on/off events each day (as many as 4000) and our data visualisation project aims to help us infer insight and gain learning from all this data.
Conclusions
- PIR sensors are the second most important sensors in your home (after door contact sensors) and are valuable for both security and occupancy data.
- You must choose PIR sensors that are optimised for their location and application. This means wide 'curtain' lenses for room corners, 360º sensors for the centre of a large room and narrow beam lenses for corridors and walkways.
- You must set up the PIR sensitivity depending on location and application. The Quest PIR sensors we use have a 'jumper' to configure activation on 1, 2 or 3 counted pulses.
- Wired sensors are best! It can be a pain to run standard 6-core alarm cable to PIR sensors but it really is the most reliable method and enables a central power supply and 12V UPS to be used and ensure they continue to work during mains power failures. Wired sensors also give the best performance.
- We have PIR sensors in every room except our bedrooms. They do make some noise and it can be annoying. A door contact sensor should be used in bedrooms to activate convenience lighting.
Note: PIR sensors have a red LEDs in them to help you set them up. This is enabled/disabled by a little jumper in the device. The LED is not meant to be left flashing every time someone walks into the room!
