Introduction: Xanboo/Homesite Laser Break Beam Sensor

I want a Hollywood style laser beam sensor to play with. The problem is that I have a pile of Motorola Homesight cameras and sensor, but none of them have lasers! This project documents my trials, failures, and successes in building a laser sensor out of spare parts I wasn't going to use while getting the Motorola Homesight software to recognize the homemade sensor. The Motorola Homesight consumer home security products are a rebranded version of the Xanboo products. They are virtually identical.

I will be gutting the camera and using the plastic housing to mount the laser. Since I'll be destroying the camera, I decided to use one of the "wired" cameras. The wireless cameras are still quite useful to me, so I've put them off limits for my projects...for now. The water sensor will be used as a contact/no contact interface into the Homesight system. I used a water sensor rather than a door or temperature sensor because I won't really lose anything if I fry it during my experimentation. I still find the door and temperature sensors useful. The challenge is to build a small circuit that can open or close the sensor's contacts based on presence/absence of the laser light and squeeze that circuit into the battery compartment of the mean, laser sensor.

I should mention that I will be using a laser ripped out of a really cheap laser level that I found on clearance for ~$0.50. Cheap. You get what you pay for when dealing with lasers. In this case, that's a good thing. If you hook up a really powerful laser to this, you'll burn through your sensor, your house, your neighbors house, potentially setting fire to your sensor, your house, your neighbor's house. Heck, you might get lucky enough to blind your intruder or slice his legs off at the knee, or burn the hair off the neighbor's cat, etc. The risks outweigh the rewards though, so just go with your typical laser pointer style laser. K?

Step 1: Gutting the Camera, Mounting the Laser

Not sure that I need to go into how to take the plastics apart on the camera. It's pretty straight forward. The camera case does have a lot of potential that I won't be taking advantage of right away.

The lens hole is perfect for mounting a laser harvested from a laser pointer, laser level, or laser whatever. There are many cheap sources of red lasers, so I won't go into that, but that lens hole is where the laser is going to shoot from.

The white section below the lens hole is an infrared transparent lens for the camera's passive infrared motion sensor. I ripped it out before I realized how useful this could be in the future. (Thinking invisible infrared lasers...eye safety could be an issue though...)

So, anyway, take out the camera, being sure to not damage the plastic case. Then, hot glue the laser in place. Solder some longer leads onto the laser, wrap the solder joints in electrical tape or heatshrink tubing, and then feed the wires through the hole provided and down the neck of the camera case.

Incidentally, the camera circuit board itself is pretty neat. The connector makes one think that its a s-video connection, but its not. The pins on the connector are for the composite video, analog mono audio, and the motion sensor trigger (oh, and power and ground too). Very useful, so I've bagged it, tagged it, and thrown it into the closet for some other project, later on, in the future, at some point...honest...would you believe that my wife is rolling her eyes at me right now?

Okay, back on track. How to power the laser? Read on.

Step 2: Powering the Laser and the Other Stuff

Well, the one problem with the wired cameras is that they don't have any convenient mechanism for applying power. Luckily, there's a detachable stand that comes with the wireless camera modules that has a power jack, a power switch, and a power LED.

If you rip open the bottom, its pretty easy to modify this base to power the laser. The problem, though, is that the wall warts that come with the Homesight equipment are 9V and 12V. Since the laser runs on roughly 3.3V (3 x button cells), I'm going to have to do something about that lest I burn out the laser before my intruder comes a knocking.

So, how do you step down a 9VDC source to ~3.3V? Well, you use a Voltage Regulator circuit, of course. Doing a bit of Googling, I found a tutorial on on how to build a breadboard power supply. Perfect for my needs. I adapted it somewhat to reduce the components, etched my own PCB (tutorials abound on this topic), and, VOILA! a regulated 3.3VDC source.

Step 3: The Mean, the Laser Sensor

How do you turn a water sensor into a laser sensor? Well, the underlying technology is the same. It is a simple "contact closure" sensor whereby the sensor is triggered when the circuit between two contacts is closed. For a water sensor, the conductivity of the water closes the circuit between the two probes and triggers the sensor. For a laser sensor, we have to figure out how to close the contacts with a beam of red light.

Here's where you're going to have to really pay attention to the pictures. I'm not a terribly descriptive person, so work with me here...

Figure 1 shows a ripped open water sensor. Actually, the large majority of the sensors of this form factor in the Motorola line are virtually identical to this. The difference is that the sensing technology is populated differently.

So, here's the cool thing. See those door sensor pads? If you connect them together with a wire, the sensor triggers, you disconnect them, they reset. See how it's a contact closure type system?

So, how do you get a laser to bridge that gap? With a light sensor. Read on, and I'll show you how to build one.

Step 4: Building the Laser Sensor

So, there's these nifty things I found at Radio Shack called Photoresistors. Sometimes they're called Light Sensitive Resistors (or LSR). They change resistance based on the amount of light they see. Different photoresistors have different values, so unless you are lucky enough to be using the exact same ones as me, I'd suggest you measure their high and low resistance. I'll tell you how in a second, but first things first. Let's use one of these guys to make a sensor.

First, find a ball point pen. You know, the kind you steal from hotel rooms? The kind you used for spit wads in elementary school? Yeah, those. Disassemble the pen and throw away the cap and the ink cartridge. This leaves you with the tube and the little plug at the end. Take the plug out because this is where the photoresistor is going.

Straighten the legs of the photoresistor and slide it into the tube about 1/2 inch or so. Bend the leads of the photoresistor around the edge of the tube. Jam the plug back into its place, pinning the two leads between the side of the tube and the plug.

Congratulations! You've just made a photosensor.

A few notes... First, the pen doesn't need to be black, but if it is not, then wind a bit of electrical tape around the tube. In fact, even if its black, wind some electrical tape around the tube. The idea is that only light that comes in from the end of the tube will reach the photoresistor. White pens, in particular, bleed light through the sides of the tube. Gotta put a stop to that because it'll cause false readings later on. Also, this is where if you have a laser that is too powerful, it'll burn out your photoresistor. Stick to cheap laser pointers and you'll be fine. Once this thing works reliably, I'm planning on experimenting with shorter tube lengths. Having a 5" tube as a sensor isn't terribly flexible. With some tweaking, I'd like to get it under 1" and in the head.

Now, this next part is important and I hope you have an ohm-meter handy.

Grab your ohm-meter and hook it up to the leads of the photocell. We're going to take readings on the resistance of the photoresistor in complete darkness and in laser lit conditions.

First, darkness. Rather than put your finger over the end of the sensor (your skin actually bleeds a crazy amount of light), tape it up and throw it in a drawer. Take your ohm-meter reading. It should be a very high number, so make sure your meter is set correctly. My photocell exceeded 2,000,000 Ohms in complete darkness, which topped out my meter, so I just called it 2MOhms. Write it down! Rdark = 2MOhms

Next, grab your laser camera and shine the laser into the open end of the sensor. Take your reading as the lowest resistance measured. Its going to be pretty darned low, so just get close. My reading was around 100Ohms. Write it down! Rlaser = 100Ohms

Why am I doing this? Good question, but I can't tell you yet, you're going to have to read the next step. I'll give you a hint, voltage divider.

Step 5: Building the Contact Closure

Here's where I'm not terribly sure I've done this correctly. All I know is that it works and that must mean my math is at least close. I welcome comments on this part, well really I welcome comments on any part, but this one in particular.

Remember the water closure circuit board? Well, I decided to use the door sensor pads to connect my sensor. So, here's what we're dealing with:

One of the pads is connected directly to ground. The other pad is connected to pin 19 on the PIC down on the skinny part of the board on the underside. That pin is a digital input/output pin. Now here's where I'm a bit confused, but I didn't let it stop me. Measuring the voltage on that pad, I get 0.85V. That's quite a bit lower than I expected. However, even with the lower than expected voltage, if I ground that pad, it activates the trigger. So, I just need to devise a circuit that will open and close this connection. A perfect task for a transistor.

I don't know much about transistors other than they are, at my most simple understanding, an electrically controlled on/off switch. You put enough voltage on the base and that causes electricity to flow between the collector and the emitter. That's all I know, and its projects like these that will help me learn more.

Now, we could just hook the photosensor up to the transistor, but we wouldn't get the effect we are going for, resistors limit current, not voltage. We want on and off states, black and white, not shades of gray and we want to control it with voltage. For photoresistors, a typical "on when dark" circuit uses what's called a voltage divider. It uses two resistors in series (one of them being the photoresistor) and the load of the circuit, a light in most cases, is connected to the point between the resistors. The voltage at that point is a fraction of the original voltage based on the proportion of R1/R2. Simple, right? I don't think so. I still can't get my head around why this even works, but it does.

Anyway, the base of the transistor is connected to the point in between the resistors. I learned this (and many other things) at Society of Robots website, specifically Check it out. Good stuff. Not just for robot stuff, which is excellent, but for many things electrical, mechanical, and softwarical.

So, take a look at my schematic and try not to laugh. I'm learning, okay?

I have to power the sensor circuit from a power supply rather than just from the door sensor pad because there simply isn't enough voltage/current on that pad to trigger the transistor. I tried, oh, I tried and I couldn't get it to work. So, VCC and GND are connected to the battery terminals inside the water sensor module. SIG is connected to one of the door sensor pads. Make sure you connect it to the one that goes to the PIC, not the one that goes to GND.

To figure out what resistor you need for R2, grab the paper that you wrote Rdark and Rlaser on in the last step. Do this calculation:

R2 = sqrt(Rdark * Rlaser), then pick the closest resistor you have to that value.

The capacitor at C1 is optional. I added it to my board in case I wanted to adjust the reaction time of the trigger. This capacitor will cause the trigger to delay slightly. This is both good and bad. The good is that it protects you from false alarms when, lets say, the garbage man comes and creates vibrations in the air and ground that could misalign your laser for a split second. The capacitor will keep the sensor from tripping. The bad thing is that if you use too large a capacitor, your intruder could actually run right through your sensor without setting it off. I found that a 1uF capacitor worked pretty well. I could still pass through the sensor with a pencil without triggering it, but I doubt any intruder could even if they were aware of the laser (they'd just step over it. DOH!)

So, take a look at my circuit board, burned to a crisp and dripping with flux from all the iterations of...on the breadboard it works, on the circuit board it doesn't, back and forth, back and forth. Finally it works. Finally. Again, try not to laugh, but if you do, I understand. I'll laugh about it someday...when the psychological pain starts to fade.

Anywhoo, so it works. I've got it set up to protect my Girl Scout Cookies from my wife and daughters. Yeah, they're thin you even have to ask... ;-)

Update: For some reason the first circuit isn't working reliably. I am testing a second circuit that uses a 3V relay. A picture of the circuit has been uploaded, so check it out. I haven't built it yet, so stay tuned to see what happens.

More on how I have it set up in the next section.

Step 6: Setting It Up.

Okay, this is what all of you have been waiting for. Except for you, I saw you skip to the end.

There are two ways you can connect this. Laser and sensor on the same side, or laser on one side and sensor on the other. Either way works. Let's talk about the pros and cons of each approach.

Laser and Sensor on the same side:

Pros: Laser camera and Laser Sensor can be powered from the same supply. Simply put both near an outlet and you're good to go. Power switch on the laser can power off the sensor too. Nice. This enables you to do advanced things like using a Power Module to only power up the laser sensor if one of the wireless cameras sees movement with its Infrared sensor. Being an intruder, how would you like to walk up to a house only to see a laser detection system arm itself as you approach. Too cool.

Cons: You need a mirror to bounce the laser back to the sensor. No big deal, but the mechanics of such a thing are a bit tricky. Also, the mirror can, and probably will, distort the laser beam. This is because most mirrors are rear reflective, meaning the laser has to pass through a layer of glass before being reflected. Also, as a more practical matter, the mirror could just get dirty. I'm using a mirror that I "borrowed" from my wife and it seems to be fine so far. I'll likely replace it with something less likely to get me in trouble.

Laser and Sensor on opposite sides:

Pros: No mirrors to worry about, less distance traveled for the laser.

Cons: Need a power supply on both sides. You could power the sensor module with the AAA batteries as designed, but I haven't tested/calculated the current draw of my modifications so it could potentially go through batteries like crazy.

In the Motorola Homesight software, the Water Module is discovered and works as expected. In this case, the module shows "Dry" when normal, and "Wet" when the laser has been interrupted. Sweet!


sanosuke_kursch (author)2011-08-13

Actually it's LDR (light dependent resistor), and I think a photo-diode would've been better in this case, the LDR is quite slower than the photo-diode (or even a photo-transistor).

RetroPlayer (author)2008-03-28

If you use a phototransistor instead of a CDS sensor, you can eliminate most of the parts in your circuit. The best way to do this (with either the CDS or phototransistor) is to use a comparator like the LM339. You set the negative input for what voltage you want to trigger on, and connect your sensor to the other. The phototransistor changes in voltage (actually a voltage drop across it) and the CDS changes resistance, which changes current. A second resistor in series with the CDS is used to pick off the voltage level. BTW, if this system is like the older Xanboo system that I had (the camera is almost identical) then you really didn't need to use the water sensor at all. The "signal" is just a switch closure and the circuit in the water sensor (or the motion sensor in the camera) just translates the sensor into a switch closure using a comparator like I mentioned above. Also, IIRC, the cable is the same as a PS2 keyboard or mouse. So, you should be able to tear an old KB apart and snag the cable for your project. My camera had the power come in on this cable, though, so there is a 6 or 12V power signal on these wires. Maybe your camera just required more power? Anyway, let me know if you need any help finishing this up.

RetroPlayer (author)RetroPlayer2008-03-28

This explains how to use a phototransistor as a simple switch.

A comparator, however, will allow you to adjust sensitivity so it doesn't trigger on bright light alone.

krich (author)RetroPlayer2008-03-28

Thanks RetroPlayer. I am seriously considering the phototransistor route if my second try using the relay doesn't work well. My goal was to only use parts that I have on hand. Unfortunately all the phototransistors and photodiodes I have in my tacklebox have those visible light filters integrated into the package. I'm going to have to buy the ones I need. I've got a shopping list, so once it gets big enough, I'll be rectifying that situation. I'm out on business for the next two weeks, but I'll be picking this project back up again when I get back in mid-April. Thanks again!

RetroPlayer (author)krich2008-03-28

Alright, just PM me if you need some help.

sarbot (author)RetroPlayer2010-03-31

I have found this circuit at:

For a science fair project, I have to activate a 26 LED array to show the power of a magnet array from 4 feet away.

I discovered that my magnet array can bounce a simple compass needle from 4 feet  - -  so why not use a laser diode hacked from like a CD player, with a pinhole cover to give a nice tight beam to shine up through the plexiglass onto the underside of the 3/32nd's compass needle, then have the phototransistor above to catch the laser beam (when the judges show up at the table) and I point the magnet array at the hidden sensor behind a rock and "bounce ithe needle" back and forth midair . . . .

Not looking forward to having to orient, pinout and deal with a LM339 or equiv.

Can't I just use a phototransistor and a micro relay ?

Is there a simplier way to do this with photodetection means ?

My LED array appears to draw about 200 millamps at about 4.5V from three AAA cells  - - that's almost 1 full watt  - -  pretty close to the max limits of a LM 339  - - - maybe I would need a micro relay thrown in anyway ?

RetroPlayer (author)RetroPlayer2008-03-28

Actually, the LM393 would probably be more suited for your purposes. Though Rat Shack usually carries the LM339. Take a look at the datasheet for the "typical applications" to see how to use it.

One reason your circuit may be finicky is that you must completely "saturate" the transistor for it to act like a switch. This means that the base current should be maxed out when you want it to switch. If you are in the linear range, it may trigger just from electrical noise or it might not trigger at all.

PKM (author)2008-03-28

Phew.. I thought this was going to be another of those spam advertising 'Ibles about how great this particular home security kit was. By the way, the first sentence of your intro step makes it sound a wee bit like a sales pitch, and that's all you see in the preview so you may want to consider shuffling that around a bit. Anyway, it's a well detailed write up, seems to be fairly practical and informative, and you spell voila correctly so I'm happy :) +

krich (author)PKM2008-03-28

Excellent feedback. I'll make the change to the beginning. Thanks!