# Need help modifying a motion detector circuit

I'm working with my son on a 4-H project, and we have great ambitions, but very limited knowledge.

We're looking to use a motion detector to switch off the current to electromagnets that will hold the doggie door closed.

We found a Motion Triggered Room Light Kit at Jameco, and it looks like it would do the trick for us except that it's designed to turn power on when motion is detected - we need it to cut the power to the magnets so the door will swing.

The other thing we'd like to be able to do is modify it to use 2 motion detectors instead of one - one on each side of the door so it unlocks no matter which way the dog is coming through.

We'd also like to eliminate the light sensor portion, as we want it to work day and night. It looks like replacing the CDS photo resistor with a regular resister of the appropriate resistance (it looks like 100KΩ should do the trick, but I'm not 100% sure). We can simply leave the light sensor inside the box so it always thinks it's night if need be.

Here is the schematic provided with the kit:

Sorry it's not particularly good quality, I simply pulled the image from the PDF of the instructions I downloaded from Jameco

We can do the soldering and follow the very detailed instructions in the kit, but neither of us have enough electronics knowledge to be able to modify the circuit to do what we need.

This modification consists of two parts: an easy part and a slightly harder part :) You'll need a:

• 74HC32 OR gate IC in a DIP package
• Another PIR sensor, identical to that in the kit
• A scrap of perfboard/veroboard/...
• More of the phone wire called for by the kit
• And a 200kΩ, 1/4W resistor (Radded in the schematic below)

The first step is to enable the circuit to work with an ORed set of PIR sensors, while disabling the light sensor function. For this, you'll need parts listed above.

Make up two PIR sensors according to the kit instructions, but do not include the CdS photoresistor or R1, and do not connect them to the kit. You can then make up the OR gate perfboard according to the following schematic, with R1 being the 10kΩ resistor the kit has you install in the sensor enclosure:

simulate this circuit – Schematic created using CircuitLab

Once this is made up, the +5V, OPTO, MOTION, and GND leads from the perfboard can be wired to the mainboard in place of the original sensor, while the two modified sensors can be connected to +5V1/MOTION1/GND1 and +5V2/MOTION2/GND2 respectively. This hardwires the system in "dark" mode, and means that either or both motion sensors active will activate the relay.

Now, to the easy part of the modification, and that's changing it to turn OFF the device it's controlling when it's triggered. That's simply a matter of taking the wire from the relay to the HOT side of the output and wiring it to the normally closed contact of the relay (the currently-unused pin on the 2-pin end of the relay) instead of the normally open contact of the relay (the center pin on the 3 pin end of the relay).

• This looks fantastic, thank you! Parts are already in the shopping cart. Quick question - the new resistor is 200kΩ and you have it labeled Radded. What does that mean? Is it a specific type of resistor, or is that just the label you gave it? – FreeMan Jun 26 '15 at 3:56
• Also, can you confirm that this OR gate IC will work? And will this or this or this work for the resistor? If so, which would be preferable? – FreeMan Jun 26 '15 at 4:15
• Instead of using an OR IC, you could simply construct the two kits with the photosensor modification, and wire the normally closed contacts of the two relays in series. When either relay energises, the circuit is broken. – Nick Johnson Jun 26 '15 at 6:53
• Thanks for the suggestion @NickJohnson. As I said in OP: we have great ambitions, but very limited knowledge. Would you make an answer out of that comment and include a schematic? I can follow instructions, but I have very little idea of how to get there myself. – FreeMan Jun 26 '15 at 13:43
• @FreeMan -- use an OR gate IC in DIP instead, and you want a fixed resistor, not a variable one. (The 220k&Omega; resistor will do in a pinch -- Jameco only sells 200k&Omega; resistors in packs of 100 for some bloody reason...) – ThreePhaseEel Jun 26 '15 at 22:13

An even simpler solution than ThreePhaseEel's is to build two of the kits, with the CDS substituted with a resistor as you suggest. Additionally, modify the connection to the relay, so that power flows via the normally closed contact rather than the normally open contact.

Finally, plug the first kit into the power, and the second kit into the first kit. The output socket of the second kit will be on except when either kit detects motion.

• Thanks, Nick, that makes a lot of sense. Unfortunately, it's a bit pricey to use 2 complete kits, so I'm going to run with ThreePhaseEel's suggestion to just add one sensor. – FreeMan Jun 26 '15 at 23:11
• Fair enough! Different people have different tolerances for complexity and cost. You'll learn more with ThreePhaseEel's solution, too. – Nick Johnson Jun 27 '15 at 7:40