motion detector hack?

Hello Hackers!

I have a question about something I would like to re-purpose to use in some other (not yet defined) project. You know I wanna hack me up a new toy...

The house I live in has an old security system in it, that is no longer in use, and looks fairly old and outdated. I have already pulled the board out of the control box for components. I have been taking apart discarded electronics for some time now, but haven't actually used something as it was built for another purpose. I have enough electronics experience to identify many of the parts, read a circuit diagram and build a circuit, but not enough to look at an existing board and make it do what I want.

There is a motion detector (which I am assuming by looking at the sensor is PIR) that I took apart today, that was mounted on the wall close to the front door. Looking at the board, it has 4 wires on it, power ground, and I am assuming in/out data lines to communicate with the control box. It also has three dip switches on it, two of which I am not sure what they do by their description on the inside of the cover. the third turns an LED on or off. It has a handful of small caps, 4 diodes, a (according to the datasheet) reed relay (part # dss41a12), transistor, and the sensor on one side. The other side has a host of SMT parts on it, two of which are ICs (LM339 and a 27L2C rail to rail output op amp).

I know, without a diagram or a good look at the board this might not be useful information, but right now I have no way to upload photos to my computer (long story). My question is, is there a way to hook this up to my arduino without running the risk of ruining it, and make use of the board as it is, or would I be better off just removing the sensor and maybe the reed relay (which I could use for another project down the road) and making use of the parts I can identify.

The sensor doesn't have any markings on it, it just has three pins and the sensor window in the case. I am not sure how to identify which pins do what on the sensor without a datasheet to identify them, and I have never used an IR sensor before to know what they would be (though I would guess they would be power ground and data pins). If I can't make use of the board as is, is there an easy way to determine which pin on the IR sensor does what, so I can hook it up to a circuit without breaking the sensor? Multimeter maybe?

I understand this is a fairly vague (even with the length of this post) question, but I have provided all the information I can gather just by looking at the parts. If anything needs clarification, please let me know and I would be happy to answer any questions to the best of my limited ability.

Any suggestions or advice would be greatly appreciated! thanks N8

Looks like you're not seeing any action from the community on this. I have played with some motion sensors that I hacked from air fresheners. I can't speak to the one that you're describing, but I can tell you that the LM339 is a quad op-amp. It is used to amplify the output from the sensor up to 5VDC. You should be able to verify this by finding the appropriate output pin on the op-amp with a volt meter. You'll have to follow the circuit traces and do some detective work for this. The output pin would pulse high for about a half-second when the sensor "sees" motion. Just check each one until you find the one that outputs the highest voltage. You could solder a wire to that circuit trace and feed it to an Arduino as an input for your new project.

LM339 datasheet can be found here:

So I'm wondering if you've had any luck with your project. Have you been able to locate the output pin from the final stage of the amplifier? Hopefully, you're on your way to using this motion sensor for your own purpose. I look forward to hearing about it.

flyboy: So I'm wondering if you've had any luck with your project. Have you been able to locate the output pin from the final stage of the amplifier? Hopefully, you're on your way to using this motion sensor for your own purpose. I look forward to hearing about it.

Hello flyboy, thanks for the response!

Sorry it took me a while to get back to you, I hadn't checked this post for a while, figuring it was dead :/

I ended up just pulling the IR sensor off the board and taking a good look at it. I found the same part online, and have been able to identify the pins. The OpAmp chip on the back of the board is SMD, and I don't have the capability to use that yet, though I have it saved for when I can use SMD parts, as I fully plan to learn how to use them :)

I have some through hole OpAmps I can use, and might just try and design my own circuit around this IR sensor and see if I can't put it to use, though that is more on the back shelf right now.

After a bit more investigation on the board this came off of, the additional two wires I assumed were data lines ended up both being for the reed switch. I am guessing one is to latch it on when the IR sensor detects motion, and the other to release it when there is no motion detected?

I have worked with reed switches quite a bit making brush-less motors and really don't know where there would be two wires to operate the reed switch, but they were both labeled under the screw terminals, so this is as near as I can figure the wires were used for. The processor on the main board in the basement might have had a latching output which needed a separate signal to turn it off? Don't really know, but I also pulled the reed switch off the board and have it saved also, which is nice, because all the other ones I have have burned out in HV experiments I have run in the past. (pulsing power through a Ford Model T ignition coil at high frequency will kill a reed switch in a hurry, if anyone was wondering :P )

If nothing else, I got a handful of useful parts off the board, which is always nice to find free components around the house in the junk we don't use anymore!

Thanks for the advice, you have pointed me in the right direction for figuring out how to wire up this IR sensor when I get around to designing a project that would use one!

Much appreciated! N8

I just left my motion sensor in-circuit and soldered a wire to the appropriate terminal on the opamp output. It was easier for me to use their circuit rather than redesign the whole circuit. As long as you know the proper input voltage, you can use their circuit and repurpose the motion sensor for yourself. Once you've done some experimenting, you can buy one from radio shack or online for around $10 US. Sounds like you're on the right track. Have fun.

Those wires are probably the N.O and N.C. terminals of the relay.

To use the PIR, you could just use those directly. The LM339 is most likely used as a comparator. A modern motion detector actually has two PIR sensors in it. They trigger on motion by sensing heat moving from one sensor to the other. The sensors output a voltage based on the amount of heat measured. The comparator is used to set a trigger point by comparing that voltage to a reference. You adjust the sensitivity by adjusting this reference. The two sensors in a modern motion detector are used in a configuration where they cancel each other out in normal ambient conditions. However, when one of the sensors reads a higher temp than the other, it detects that as motion. Such an arrangement is done to prevent false triggering.

Older motion detectors may not have had the two sensors. If it did, one of the comparators in the LM339 was likely used to balance the two sensors, and one comparator was used to trigger on a sudden change on one of the sensors.

One neat hack is that you can actually use these two sensors to detect the direction of movement. Newer modules have all the logic built in and you can't get at that information. It will simply output the resulting voltage from both sensors, which will be higher if there is a differential between them. So, it just senses motion only, not direction.