Being alerted when a vehicle enters your driveway

click to enlarge

If I am in my house and I hear a certain chime, it tells me that a vehicle has entered the driveway.  I find this to be very convenient.  Maybe this is during the day and it lets me know that a UPS truck or Fedex truck is arriving.  Or maybe it is in the evening and it lets me know that the expected dinner guests are arriving.  Either way, I can bestir myself and head down to the front door and greet the arriving visitor with a bit of advance warning.  How does it work, you might wonder?  I will tell you.  The photograph above right helps to explain how it works. 

Or maybe the photograph above right does not really help to explain how it works!  Sorry about that.  I am feeling a bit puckish today.  It happens.

click to enlarge

The photograph above right does not really show a thing.  It shows a place where a thing is located.  If you had X-ray eyes you could look at the place shown in the photograph, and you could see a loop of electrical cable buried under this part of the driveway which is near the mouth of the driveway.  The loop has two physical turns and six electrical turns.  The loop is spliced to a buried cable having two active conductors that run from the splice location to the house itself.  Inside the house, the two conductors connect to a yellow box like the one shown at right.  The yellow box is piece of equipment called a “vehicle sensor” (Amazon page).   When the yellow box detects a vehicle, it passes a message to a first node in a home automation control system. 

Shown at right, the first node (manufacturer’s web page) receives the message from the yellow box at one of the node’s digital inputs.  This first node passes a message to a second home automation node that is elsewhere in the house.  The second home automation node is nearby to the previously mentioned chime.  When the second node receives the message, it closes a relay which sounds the chime.  One of the nodes logs the event of the vehicle having been sensed, and sends an email message to me to let me know that a vehicle has been sensed (in case I happen to be away from the house and might like to know that a vehicle had been sensed).

It is easy to think of lots of ways that one might try to sense vehicles.  You might set up a piezoelectric pressure sensor and you might try to sense the weight of the vehicle.  You might set up a beam of light and try to sense the vehicle breaking the beam of light.  You could use a microwave transmitter and pick up a Doppler shift in reflected radio energy as the vehicle approaches (much like the radar gun that a highway patroller uses to catch speeders).  You could use a passive infrared (PIR) imaging sensor to pick up a heat signature from the internal combustion engine (ICE) in the vehicle.  You might set up a mechanical sensor that is deflected or deformed by the tires passing over the trigger (for example the rubber hose of a highway traffic counter) that sends a puff of air to a sensitive pressure transducer.

But I like the approach that is described in this blog article better than any of those other ways.  There are a lot of things that I like about this way of sensing vehicles.  One thing that I like about it is “no moving parts”.  Nothing about this relies, for example, upon the presence of a vehicle tire deforming a rubber hose like those traffic counters that you sometimes see on streets or highways.

Nothing about this relies on the body of a vehicle breaking a beam of light between, say, an LED and a phototransistor.  The beam of light might get false positives, being broken by things that are not vehicles at all.  A falling leaf might break the beam of light. 

Another thing is that beam-of-light sensors can usually work okay indoors (for example at the base of your garage door opening) but it is really quite difficult to get them to work well outdoors.  When a designer tries to use this kind of sensor outdoors, the designer has no choice but to worry about bright sunlight during the day as well as darkness at night.  Stray light might come in from other directions and other sources.  The phototransistor can get blinded.  A prankster can even spoof the phototransistor with light from some other source, or can throw some duct tape over the LED.

The PIR sensing approach can work well indoors (so long as one carefully avoids aiming the sensor toward a window) but is very fiddly if you try to use it outdoors.  And anyway, some vehicles are not ICE vehicles and so would fail to provide the needed heat signature.

The beam-of-light approach requires that the vehicle be opaque.  What if the vehicle were transparent?

Some of these sensing approaches can be rather fiddly.  As for the beam of light, mud or rain or snow might obscure the LED or the phototransistor.  As for the rubber hose approach, the hose could get snagged or punctured. 

But the buried wire loop, once successfully installed using well chosen materials, is very likely to last a very long time with no failures.  This approach has virtually no false positives, since falling leaves or even passing wildlife, being nonmetallic, will not perturb the current through the loop.

Most vehicle sensing technologies reveal their existence to the observer.  The alert passer-by might notice the rubber hose, or the housings and lenses for the LED and phototransistor.  But there is nothing about the sensing-loop approach that reveals its existence to passers-by.  Hence the intentionally unhelpful photograph (sorry about that!) at the top right of this blog article.

click to enlarge

For anybody who is constructing a driveway or who is doing some remodel activity around a driveway, I suggest installing such a wire loop.  The simplest and easiest way is to bury some 14/2 UF cable (direct burial grey romex) maybe eight inches below the surface of the driveway in about two turns, bringing the ends out to one side of the driveway.  The three conductors of the romex are black, white, and ground, and you can connect them in a way that works out to be six loops, as shown in the diagram at right.  You can then lay another run of 14/2 UF cable from the driveway splice location back to the house.  I did my splicing in a box on a post, but you could do your splicing in an irrigation valve box if you use a heat-shrink UF direct-burial splice.

The nice thing about the yellow box above (the vehicle sensor) is that it absolutely does not care at all what kind of wire you use for the sensing loop, or how far away the sensing loop is, or what gauge the wire is, or how many turns are in the loop, or whether the cable is twisted pair or not, or whether the cable is shielded or not.  There are DIP switches on the yellow box that permit you to randomly try out either of two different sensing frequencies, and any of four sensing thresholds.  If you have read down this far in this blog article, then I am guessing you are the sort of person who wants to read the documentation for the vehicle sensor.  Here it is.  In my case the sensing loop is 150 feet away, the cabling is unshielded and is not twisted, and I did nothing at all to try to make the number of turns or the dimensions of the loop add up to any particular number of microHenries.  I more or less arbitrarily selected the loop dimensions to be “about the width of the driveway” and “sort of a rectangle”.  I picked the number “six” (the number of turns) more or less out of the air.  I selected the wire gauge (14) based upon two factors.  First, that 14-gauge is the least expensive UF cable that you can find in a store, and second, that I imagined that the currents flowing through the loop from the yellow box were surely so small that 14-gauge wire was overdesigning the wire cross section by probably at least one order of magnitude and maybe two orders of magnitude.

Do you have a vehicle sensor in your driveway?  If not, does this article prompt you to consider installing such a vehicle sensor in your driveway?  Please post a comment below.

4 Replies to “Being alerted when a vehicle enters your driveway”

  1. Do you know if this method would work over greater distance? Our driveway is about 1/4 mile long and I would absolutely love to put some kind of sensor on it so I know when people are on the property but haven’t come up to the house. Thoughts?

    1. It would work over whatever distance you wish. The first thing would be, of course, that while you have the trench open along this quarter-mile-long driveway, you would throw at least two heavier-gauge UF cables into the trench. Maybe one for a potential future light at the end of the driveway, and maybe one for this loop if it turns out to work. In addition, while the trench is open, you would throw at least two direct-bury category 5 cables into the trench. And I suppose some direct-bury RG9 coax just on general principles.

      Given the length of the driveway, I would actually put two sensing loops in place. One out at the mouth, and a second one at about the mid-point. Each one would get connected to its own sensor electronics. So that is yet another length of UF cable to go into the trench as well as another length of direct-bury cat 5, running to the midpoint.

      Anyway, then you do some experiments. A first experiment is whether you can put the sensor electronics in the house, and connect it to a loop that runs all the way out to the mouth. My guess is it would work fine, but you would need to try it to find out. You might find out that it does not work reliably, in which case then try putting the sensor electronics for the mouth-of-driveway loop at the mid-point in a weatherproof box. Then you can power it up and confirm that it senses reliably over the 1/8 of a mile distance.

      Or not. Maybe you will find that there is no choice but to put the sensor electronics for the mouth loop at the mouth. This is still no problem. You put the electronics out there, if you find you have no other choice. In a weatherproof box of course. Then while you are doing stuff out there, you power it and communicate to it through the cat 5 cable.

      Meanwhile you put sensor electronics on the mid-driveway loop as well. The idea being that sometimes a looky-loo might pull in the mouth of the driveway and then think better of it and back out and go away again. Which is a slightly interesting event but is not quite as interesting as the driver that persists all the way to the halfway point of the driveway.

      You could then communicate the outputs from the two sensors to one of the home automation nodes, and you could write up some business process rules. Like if the mouth loop gets triggered but not the mid-drive loop, the event gets handled one way. Maybe a low-volume chime and it gets logged. If both loops get triggered, then a full-volume chime and and email gets sent and it gets logged.

      A fun thing about having the two loops is that you can then handle entry and exit differently. If you have only one loop, you never know if it was an entry or an exit. But with two loops, you can make a good guess as to which of the two things just happened.

  2. Some thoughts … #1 This is one of the better, more practical uses of IoT that I have encountered. #2 The beam of light approach is also problematic for garage door openers; there are certain times of the day that the sun’s light hits ours and the garage door then becomes stuck. #3 I have never seen a transparent vehicle. I know that the corvette is made of some kind of plastic body. I suppose it could be a transparent plastic. I do not see that selling very well, though.

    1. Oh my comment that the beam-of-light sensor would fail to detect transparent vehicles was actually a weak attempt at humor.

      As for your garage door, I suggest swapping the positions of the two sensing modules. One is the light source and the other is the light detector. If you swap them, maybe you will get lucky and you will no longer have the problem of their getting blinded by the sunlight.

Leave a Reply

Your email address will not be published. Required fields are marked *