XTension Logo

Better intruder and vehicle sensors.

In the previous tutorial, we learned how to take control of the garage door opener with a universal module, and saw some new scripting tricks.

We still have a bit of a bother with the PR511 motion sensors which are monitoring the driveway. They do have a nasty habit of triggering with every cat or dog, and sometimes when the wind blows the shrubbery.

Even though we can position these things better, and avoid the shrubbery etc, it's pretty difficult to create a very reliable driveway system without at least one very reliable sensor to support the PR511s, or replace them.

Laser Beam Motion Sensors

These units create an invisible beam across your driveway (or anywhere). If they are mounted so that the 'beam' is horizontal, and about 'hip high', they will not be triggered but by a person or a vehicle 'breaking' the beam.

These units often use a 'dual-beam' where both beams must be broken at the same time before the unit announces an alarm. Some offer settings for sensitivity where at its most critical, a bird flying could trigger it, and at its least sensitive, only a 'slow walker' or a vehicle would set it off.

Magnetic Vehicle Sensors

One of these sensors buried beneath your driveway, or along side it, will actually detect the disturbance in the electrical field whenever a large metal object moves near the sensor.

This sensor is specially good for detecting anything from a bicycle to golf carts and of course any car or truck.

Typical vehicle sensor and control unit.
laser beams
Typical laser beam transmitter and receiver.

Ok, what are the pro's and con's of each ?

With each technology, there are trade-offs, and these two sensors are no different. Like our "Door Open" unit that monitors the garage door, it is possible that the wind could blow the door enough to trip the switch and thus "false trigger", and sometimes can fail to align and thus indicate "door closed".

One 'problem' with the laser beam technique is that it requires two 'units', one on each side of the driveway (or walk). This in itself presents problems with getting 'power' to both units, in places where you have power on one side of the driveway, but not the other. This means that you must run wire under the driveway, or perhaps seek a unit which employs a passive 'mirror' on one side and both the transmitter and receiver on the other.

Laser beams are very reliable, but they must be carefully aligned. If you have mounted them on wooden supports, the wood can warp enough to cause a mis-alignment of the laser beams.

Thus, as with all of your sensors, you must check them periodically.

The laser beam unit used here is fairly easy to align, but it requires that you stoop down and peer with one eye into a tiny little mirror which to be 'aligned', must show a reflection of the other unit. (Mount the units on metal 'fence poles', and they will be more stable.)

Remember also that someone may park a car or a tree can move a branch which can completely block the beams. XTension may get the first 'ON', but it won't detect motion again until the blockage is removed. A vehicle parked there will certainly be noticed ?

The magnetic vehicle sensors are very good at detecting a moving metal object, but it can also be 'triggered' by lightning storms ! This can be a bother, or it can be useful.

Although the magnetic sensors cannot (will not) trigger when a person walks nearby, if the sensor can be physically moved, like someone stepping directly on it, then it will trigger.

A little bother about the magnetic unit is that it has a small but considerable 'settling-time', and is not a good way of 'counting' vehicles by ON/OFF counts, but the same thing is true about most all sensors. Is it multiple people/cars, or is it one very long limo ?

Another 'downside' to both of these sensors is that they do not provide direct X-10 signals. The 'contact' outputs of each must be connected to the inputs of a PowerFlash module, and they both require a low-voltage transformer for power.

The wires can be easily run and hidden, but ultimately you have both a powerflash module and the low voltage transformer plugged into a power socket, and this 'eats' sockets.

One little thing about all sensors, is that they can be 'fooled'. Both by 'false' alarms, and by deliberate perpetrators..!

Someone can 'limbo' under the beams, and possibly drive their car on your lawn to avoid both......Manuel Noriega had lots of sensors, and lots of live guards.....Wells Fargo certainly had lots of sensors and live guards. Maybe we got a problem with the 'live guards' ?!

Keep your mouth shut, there is no reason to brag.
If someone 'needs to know' where your sensors are,
that person is suspect when a robbery occurs.
Limit this number.

Oh yes, if someone 'parks' a vehicle near the magnetic sensor, the unit will not signify "OFF" for a short period, but later when the vehicle is again moved, the sensor will again detect the 'movement'.

By combining sensors, with good scripts in XTension, you can create a much more 'intelligent' system that will at least deter all but the most persistent or 'stupid' thief.

Another little-known thing is that the magnetic vehicle sensor can be placed in a location where it cannot possibly be triggered by a vehicle and still be useful as a lightning sensor ! Its sensitivity can be set to detect lightning from 1/4 mile to about a mile away (just some simple tests here in the lightning capital of the world).

How to make it easy:

There is no real reason for a plug-in for this tutorial, because the scripts from the previous tutorial don't need to be changed. We show the scripts below, with changes only to the 'write log' entries.

Before we put it all together:

The previous tutorials gave some idea of how to coordinate two sensors, and the same logic will be used here. Basically, we use time as the way to determine whether there might be a relationship between the 'trigger' of two driveway sensors.

Because these two sensors are much more reliable than the PIR type, let's use both of them!

Although you might choose to use only one of these and one or more PR511s, (grow into it), the scripts here should be applicable regardless of the combination.

Don't forget also that you can use all three types of motion sensor (and more) together, making both a more secure and a more complex system.

The thing to remember here is that you don't want to create a monster. All of these devices are really very good, and it is ok to have a few false alarms. It is much better than missing the big one.....a careful balance will make a system which is vigilant but not a bother !

Basics about installation :

We have already used the PowerFlash module with the "Door Open" sensor for the garage door. Both the vehicle sensor and the laser beams 'open or close' a contact to signify the 'alarm' state.

The contacts of the sensor must be connected by two wires to the screw down contacts of the Powerflash. The length of this pair of wires can be fairly long. I have two which are more than 50 feet long, and have not given me a problem. I do expect that there is some reasonable 'limit' to this. You will have to experiment.

The magnetic sensor offers the ability of putting the sensor hundreds of feet from the 'control unit', and thus is not much of a bother.

The laser beams however are another matter in that they require low voltage power. It is certainly possible to deliver this power (and the 'alarm' wires) in a very long cable, and I have heard many clever solutions for delivering power to these units in some very 'interesting' situations !


The Powerflash modules and the power transformers for the laser beam and the vehicle sensor are located in one place, perhaps on a single "power strip"?

Here, the Laser beam transmitter can possibly get its power from the walkway or maybe through the wall from the 'Master' bedroom.

The vehicle sensor actually has a small 'control box' that goes between the sensor and the Powerflash.

In our example, we're going to assume that power is available in the 'garage', and we will run wires from there to the laser beam sensor. The magnetic sensor uses a 'shielded' cable to the 'control unit', but comes in lengths of 300 feet and more.

Let's put the control unit for the vehicle sensor, the power transformers and the PowerFlash modules on a 'power strip' on the wall of the garage, thus we take up only one of the few wall sockets that are found in garages.

The vehicle sensor signifies 'alarm' by closing the contact, and the laser beam 'opens' the contact when the beam is 'interrupted'.

This means that the Powerflash for the vehicle sensor will send an "ON" command to signify an alarm, and "OFF" to signify 'relaxed'.

The Powerflash for the laser beam however is going to send an "OFF" to signify a 'beam break', and thus 'alarm'.

So what does ON mean !?

XTension to the rescue here with an option in the "Edit Unit" setup dialog. We need only check the box "Use Reverse Logic", for the "Front Walk Motion", and now whenever the laser beam 'breaks', we will see the event as an "ON". Thus ON means the same for both the laser beam and the vehicle sensor. ON means ALARM. OFF means that the sensor is 'relaxing' from the alarm state.

This may not seem like a big deal, but with many sensors in your system, it can become a real bother to remember which state means what. By always making the ON state mean "true" or "alarm", then your scripting efforts will be much easier.

Starting with the outermost driveway sensor:

We're going to put the magnetic vehicle sensor at the front of the driveway, and the laser beam closer in, but you might find that reversing the order is better for your situation. The logic of the scripts should be transferrable. We are going to use the same two database units that we used in the previous tutorials, just changing the scripts.

If you have imported the 'plug-in' from the last tutorial, you will already have these scripts, but here's what we have to do for the new "Front Driveway Motion" unit :

Front Drive Motion ON

--This script monitors the front driveway sensor
-- If it goes ON, something is moving there.
-- If it's status is true, there may yet be motion?

if time delta of "Front Walk Motion" is less than 30 then
turn off "Driveway Floods" in 20
write log "Possible vehicle leaving"
turn on "Foyer Chime"
turn on "Driveway Floods" for 2 * minutes
write log "Vehicle entering driveway"
end if
Front Drive Motion OFF

--when the motion sensor 'relaxes', we get an OFF
-- this means 'no motion seen for a while'.
-- We need to make sure we didn't miss the ON !

if status of "Front Drive Motion" is false then

if time delta of "Front Walk Motion" is less than 30 then
turn off "Driveway Floods" in 20
turn on "Foyer Chime"
turn on "Driveway Floods" for 2 * minutes
write log "Vehicle entering driveway - missed the ON"
end if
end if

This is intentionally simple in order to demonstrate how different types of sensor can be swapped out and really not require any change to your XTension database. See that only the log messages are different !

In keeping with this, let's look at the ON and OFF scripts for the "Front Walk Motion" which is now our 'laser beam', and not the PR511 it was in the previous tutorials.

Front Walk Motion ON

--If motion is sensed at the front walkway

turn on "Front Walk Light"

--maybe someone's driving in?
if time delta of "Front Drive Motion" is greater than 30 then
turn on "Foyer Chime"
write log "Movement on the front walkway"
write log "A vehicle has arrived"
end if

Front Walk Motion OFF

--things get still again, we get an OFF
-- this is a backup, did we miss the ON ?
if status of "Front Walk Motion" = false then
turn on "Front Walk Light"

--maybe someone's coming in?
if time delta of "Front Drive Motion" is greater than 30 then
turn on "Foyer Chime"
write log "Movement on front walk, missed the ON"
write log "A vehicle has arrived, missed the ON"
end if
end if

So what's the difference ? : COST and RELIABILITY

The PR511 costs about $50 or so, and each of the sensors here will cost you close to $200. For that much, you can buy 4 PR511s, and simply put more of them on the driveway. But you are going to have a much more difficult time coordinating your scripts.

Having one or more 'solid' sensors, can make it a lot more certain with much less 'fuzzy logic'.
(also, the prices quoted are 'high' and you can often find great bargains)

Cost is often offset by the reduction of 'bother', and this is no exception. If you're expecting visitors on a windy night, these two sensors will give you far fewer 'false' alarms. When the 'Front Walk Motion' sensor says that someone has arrived, you can greet them at the door with a smile instead of a 'peering scowl' for just another false alarm.

Again: this is all Modular !.......In other words : Maintainable !

Do a little at a time. Start with the PR511s on the driveway. When you can, replace one with the vehicle sensor, and move that PR511 to the 'back porch' and so forth.

If for some reason the vehicle sensor 'breaks', simply return the 'back porch' PR511 to the front driveway until you can get a replacement.

Which of course brings up a subject for another tutorial: Spares and Troubleshooting

Back to Home Page
Tutor Index
Two-Button dimmer

Copyright 2007, Sand Hill Engineering All rights reserved.

Mac Made

Last modified: May 8, 2002
Michael Ferguson, webmaster@shed.com