Laser Trip Sensor

Hey all,

I was thinking about making something like a laser trip sensor for work that automatically alt-tabs me or something when someone walks by my cube. I’m just a bit stuck on where to begin with this one, or what the best way to approach it would be.

The main concern I have is what I should use for the motion detection? It probably shouldn’t be just a wide range motion sensor, since it would have to be mounted near someone’s cube. So I’d probably need some form of a trip sensor? I could use just a IR receiver and have an IR led sent at it, but that would require placement of two different components. Perhaps a distance sensor would work, and I could just detect when there is a substantial voltage change?

It would also be great if it were wireless, because then I could just put a wireless receiver near my computer and hook it up to a parallel port or something. Running a wire would work as well I guess, and would probably be cheaper, more reliable and powered easier. I think I should go with the wired option unless anyone has any suggestions about how to implement a wireless one effectively and cheaply?

Any suggestions you might have would be much appreciated. Links to schematics or partial schematics would be sweet as well. Thanks :slight_smile:

LASER?

You probably need something like a motion sensor. I’ve seen simple kits for them. Two ultrasonic transducers, a disturbance in the standing waves (or something like that) triggers them. Read the voltage level output (has an LED).

Alan KM6VV

Yeah, the problem with generic motion sensors is that it picks up movement in a wider range. I’d be specifically looking for a specific area to be crossed, since tripping due to movement of people sitting at their desk isn’t a desirable response.

Otherwise, yeah, I could just use an IR emitter and receiver or something. Perhaps if I could direct the emitter in a specific direction and somehow filter our IR light at other frequencies or something, but not too sure how to do that yet.

You can “filter” the range of response with code. An SRF-08 rangefinder module or two and a BB2 with a BasicAtom (or pro) could do the job nicely.

Or are you wanting them to interrupt a “beam”? a simple focused IR LED and IR detector pair(s) could do the job.

Alan KM6VV

Maybe just roll a tube or cone of paper and have the motion sensor look down the tube/cone so it only sees motion in one area.

Yeah, perhaps just an IR led and a IR detector would work. The only issue I suppose is that I would need to wire them up separately and place them in two different places precisely. Also, how would I focus the LED? Just put a cone of paper around it or something?

Maybe some sort of rangefinder would be better, although I’d prefer to be able to drive it with just circuitry and not a microprocessor. Would ultrasonic rangefinders be better than something like this? (robotshop.ca/sharp-gp2y0a02y … sor-1.html)

And out of curiousity (for a separate project), how exactly can you filter the range of an ultrasonic rangefinder on a basic atom microprocessor through code?

Use a distance sensor.

When someone walks through it, the distance will drop.

IR or ultrasonic will work.
Just combine that, with a basic atom nano 18, and an RF transmitter and you’re set.
Use a RF receiver on the PC end with a TTL/RS-232 converter. You don’t need a very high baud rate.

A you can probably write a program in flowstone pretty quickly.

Should the PC receive a distance lower than the width of the walkway, for more than 10ms, have it emulate some key-presses.

RF TX
sparkfun.com/products/8945

RF RX
sparkfun.com/products/8947

Hmm, good point.

Does anyone have any examples of controlling an IR sensor from a circuit (without a m/c)? I suppose I can try to synthesize one.

Depends on the IR sensor and the device you use to transmit.
But you’ll still need a micro controller on the receiving end.

Using those RF links, you might be able to transmit directly if it’s digital sensor, otherwise you can use an analog to digital converter.
I’ve seen this done to cut cost in security systems. The nodes throughout the building transmit simple data using channel based RF transmitters.
But this is all dependent on the Sensor.

If you need a cheap MCU, a $4 PICAxe will do the job. Using the 8pin dip, and some good soldering skills to mount an IC socket, you could probably fit an MCU, Sensor, regulator and RF transmitter, along with a 9V Battery and 500mA 5v regulator, inside a 2"x2" enclosure.
If using IR you can hotglue a strong magnet to the bottom, and fit the whole thing in a novelty item like a stuff animal, and have it sit on the metal edge of the cubicle wall.
You just need to place it high enough that the mass of the body can trip it long enough.

Once finished, test it a few dozen times by tripping it at different walk, and possibly run speeds.

Hmm, I definitely would need a microcontroller for the receiving end?

What would be a good microcontroller for it then? I suppose if I’m buying one I might as well buy two, but it would be more interesting to do it without a microcontroller. I was looking at the picaxe 08m, although I’m not too sure I’d have enough memory or processing power to do something like this efficiently. I still don’t understand why the programming cable is USB to 3.5mm, since I suppose I would then need a 3.5mm adapter which can be connected to a breadboard to program the chip? Are there any cheaper options? I was hoping to not go over about $40-$50.

Perhaps just a basic atom nano would be cheaper, since it could be programmed from a basic serial cable.

Thanks for the input guys, really appreciate it.

Sadly there aren’t a lot of options for that budget.

RF devices will set you back $10 for a pair, the range sensor $13-15 for IR, $15-$25 for ultrasound.
PICAXE-08’s are only about $3.
I’ve not used the PICAXE so i don’t know about programming it sorry. But i believe it uses 3 wire-RS-232 level serial. Serial in, serial out, and 0v.
You can get pretty much everything you need for this at sparkfun.
Keep in mind the distances you need to sense. as well as the sensor intervals.
IR might be the better choice, because of it’s speed and lower cost, but it’ll all come down to your programming. You need it to detect the person long enough to trigger, and a slower ultrasound transmitter might not be able to relay the info quick enough, or the ping intervals might be to far apart, IE someone could slip through between intervals if they are moving quickly.

What SParkfun doesn’t have, you can get at radioshack like resistors and protoboards.
I like these protoboards personally radioshack.com/product/index … Id=2104052
Just to right size, good quality. A bit expensive though.
Even if you try to drop the cost as much as possible, you’ll probably still need a micro controller. Some sort of bridge between the range sensor and the PC.

There is 1 way i can think of doing it even cheaper.
A webcam and roborealm. Just put a usb webcam looking at a wall, and use roborealm to detect any major movements, then program it to emulate keystrokes.
May it be Alt+tab or Windows Key + M to minimize all windows. Or have it auto run the “Show Desktop” icon.
Using this, you can cut the cost down to <$10 for a cheap webcam, and using an early free version of roborealm.

I hope i’ve helped.

Awesome, thanks mate. Good ideas :slight_smile:

1 more important detail.
If you’re doing this to look at “stuff” on the internet with a work computer, keep in mind that many business can track your online activities and by using VNC type programs, they can even see what’s displayed on your screen.

They do that at one of the places i work, I can get past the website block by using a personal-proxy and my boss doesn’t care, as long as it isn’t age 18+ stuff.

Hey, we’re all thinking it, and i don’t care what your reason for this is, i’ll help you the best i can.
The webcam + roborealm is probably the easiest and cheapest way.
You can put the webcam directly above your cubicle and just have it focused on a small area of wall, so it’ll ignore all movements outside of the selected area.

A couple tips.
Try adding a tiny buzzer or something that’ll give you a 10ms beep, or set the roborealm to play a short sound if possible.
Instead of minimizing if using a tabbed browser, have it auto switch tabs, and have it repeat the switch hot-key.
IE keep google as your first tab, and use a hotkey to switch to the first tab, and have it repeat that hotkey… 10x maybe.

A coworker got caught looking at Xrated stuff, AND playing games. Was playing solitaire, and another coworker walked up and he minimized the solitaire, only to have an xrated video playing behind it. He wasn’t fired, but now all the PC’s here are monitored.
Was still funny.