# Total Newbie with some Questions



## Kiisuke (Jul 29, 2011)

Hi everyone!

I'm a total newbie when it comes to electronics. I mean, I use them every day in my life but have never actually tried to understand how they work. Well, that's starting to change. I've been reading a bit about electronics and have been trying to understand enough to make a very, very simple halloween decoration. Essentially I just want to make a decoration that lights up when someone walks by. Probably easy for those out there who have been messing with electronics for a while but for me.. eh, I'm kind of stuck.

I understand how the breadboard works and have bought one to play with. I understand how LEDs work with resistors in parallel. I have those working on the breadboard just fine. The problem I'm running into is with the PIR motion sensor.

The PIR sensor I have is this one:
http://i56.tinypic.com/14wggms.jpg

As you can see, it's just three little pins and they're all too close together to actually put into the breadboard. I have the jumper wires, but I have no idea how to make these wires stay on those pins. I have no idea how to solder and right now I don't really _want_ to solder as I'm still playing with everything and learning (and not ready to fully commit).

I'm also now 100% sure in which way this thing is supposed to be hooked up.

Without being able to actually hook it up in its current condition, I don't really know if it'll work like I have drawn it. I would assume it would, but it might need a positive input as well. In that case, it would probably go something like this:

It obviously has three pins: +, -, and an output. To complicate matters I have an on/off switch already hooked up and working.

Do I hook the PIR sensor up like this?

+ side of the battery terminal to the on/off switch. The second on/off switch output would go to the PIR sensor + input. Negative terminal of the battery would go to the negative input on the PIR sensor. The output of the PIR sensor would go to the negative side of the breadboard/project; the resistors.

Is there something I can buy to hook into the three pins to allow me to connect standard sized jumper wire to it direct (instead of having to solder)? If so, what's it called?

Thanks for any help in this matter. I'm hoping with this small project I'll learn enough so that I can go on to bigger and better things.


----------



## Otaku (Dec 3, 2004)

I think those pins won't fit the standard breadboard spacing of .010", but a servo motor connector will do the job. You'll find these at hobby and R/C stores. Be careful to not over-power the PIR, 5VDC is the stated max voltage. Use a 3AA battery pack (4.5VDC) for power and you'll be OK.
The PIR has an output voltage around +3.3VDC. It MAY power a 5VDC relay coil, but you'd be better off sending the output to a transistor or MOSFET to switch power to your circuit.
The way you describe your wiring sounds OK, +voltage switched to the + input on the PIR and negative to ground. Be aware that this PIR may output more than one high signal when it sees a heat source. If your circuit can't ignore multiple triggers you may need to use a one-shot timer and use the PIR to trigger it.


----------



## imax (May 22, 2006)

Do you know if that PIR drives it's output high or low when it detects motion? That will affect how you wire your LED. Do you have the datasheet for it? 

Also, make sure you know what voltage the output is driven at. I've seen PIR's that need 12vdc to operate, but drive the output at TTL levels (5 volts). That will affect the size of the resistor you need for your LED(s). Again, the datasheet can answer that question.

Can't help ya with the pin socket, but I'm willing to bet that Otaku is right - find a servo motor harness. Or learn to solder. It's easy and you shouldn't be scared of it.

-- Ian


----------



## halstaff (Nov 18, 2009)

That looks like the Parallax PIR that I use.
Check out this thread started by Darklore detailing the circuit Otaku designed. I've used it with the audio boards from electronics123 and it works great but they do have the ability to ignore multiple triggers.
http://www.hauntforum.com/showthread.php?t=22839


----------



## Otaku (Dec 3, 2004)

Yep, that's the one. I see that Parallax has a rev. B PIR for sale now.

http://www.parallax.com/Store/Senso...SortField/0/Level/a/ProductID/83/Default.aspx


----------



## Kiisuke (Jul 29, 2011)

The Sensor is #555-28027. According to the info, output goes to HIGH from LOW when triggered. I'm not.. really sure what that means. 

I am planning on using a 9v battery and already have all the LEDs and resistors set up to use that battery. I didn't even notice that the sensor itself says to use 3.3V to 5V. I'm guessing if I use the 9V directly it'll burn out the sensor?

The servo motor connector looks exactly like what I need (from looking at pictures). Now the hard part of finding one (there's no local RC/hobby shops here. In fact, the only place that really sells electronic parts is RadioShack and I don't need to tell anyone how much they can suck sometimes).


----------



## Otaku (Dec 3, 2004)

Yes, a 9VDC source will cook the sensor. You can use a 5 volt regulator on your LED board for powering the PIR, or use two supplies (4.5 for the PIR and 9 for the LEDs). The servo cables are available online at places like All Electronics:
http://www.allelectronics.com/index.php?page=seek&id[m]=pattern&id[q]=servo+cable
And you really should learn soldering, it's a very useful skill and essential to electronic assembly. There are lots of online tutorials that can help you get started.


----------



## imax (May 22, 2006)

While you could use a regulator (like an LM7805) to reduce your battery voltage down to something that the PIR can deal with, you are *much* better off getting a AA battery holder to hold 3 batteries - giving you 4.5vdc. The voltage regulator will lose a ton in heat, killing your battery faster, and batteries are expensive. Fixing the resistors for the lower voltage is a bit more economical of a solution over the long run.

Alternately, if you have the capability to plug this device into the wall with a wall-wart, you can avoid the battery thing all together...

The HIGH from LOW basically means that when the PIR does NOT sense activity, the output line is held LOW (to ground). When activity is sensed, the PIR drives that line HIGH (likely either 3.3v or 5v). The length of time it's held high should also be defined in your datasheet, as well as the drive characteristics... 

If you plan on driving the LED's directly off this line, make sure you don't have more LED's hanging there than it's capable of driving. If there's any doubt, find yourself a transistor to handle the switching load. If you drive a lot of LED's with it, you may wish to consider something like a ULN2803A, which can sink a lot of juice.

If you need more details, let me know.

-- I


----------

