PIR Motion Sensor Project

Discussion in 'The Projects Forum' started by ImmortalPr1nce, Jun 26, 2013.

  1. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    Ok so this is my first post. I layout circuit boards for a living but im a complete noob when it comes to making schematics so i thought maybe some of you pros could help. Basicly i want to make a motion detector using a PIR sensor. when tripped i want it to sound an alarm until reset. i would also like a low battery light and maybe a remote controlled on and off. Any and all help would be greatly appreciated.
  2. Dodgydave

    Dodgydave Well-Known Member

    Joined:
    Jun 22, 2012
    Messages:
    1,816
    Location:
    Liverpool,UK. GMT
    You can buy a ready made pir sensor , and attach a timer/tone generator (555) to the output, as for remote control again ready made modules are available what is your price range?
    ImmortalPr1nce likes this.
  3. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    I really want it all to be on one board/ schematic (obviously remote would be its own). i would prefer to stay away from ready made if possible.
  4. Dodgydave

    Dodgydave Well-Known Member

    Joined:
    Jun 22, 2012
    Messages:
    1,816
    Location:
    Liverpool,UK. GMT
    Your better getting the module sensor ready made rather than building your own, costs are far lower, as for all on one pcb its easy,
    ImmortalPr1nce likes this.
  5. elec_mech

    elec_mech Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,300
    Location:
    Virginia, USA
    Welcome to AAC.

    While I'm not overly familiar with PIR options, I can't recall seeing PIR sensors by themselves. More often than not, they come on a small board with basic circuitry to allow you use them right away. They're often so cheap, I won't think it would be worthwhile to attempt to get the sensor alone and design a driver circuit for it.

    That said, you can add a set of female headers to your board and just plug the sensor into it. I've helped others use the Parallax PIR sensor which you can pick up at RadioShack if you're in the U.S. If space is an absolute premium, you could buy the PIR sensor, reverse engineer the small board, buy the components and desolder the PIR sensor itself to use on your custom board.

    You can take a look at this thread to get you started on hooking up a PIR sensor. You can use a flip-flop to keep the alarm going once PIR sensor is tripped and until someone presses a reset button.

    I haven't done a low battery indicator before, but I'm sure we can help you find something.

    When you say remote control are you referring to a wired or wireless remote? If the latter, you can use a children's RC toy. Will depend on the range you want though.
    ImmortalPr1nce likes this.
  6. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    digikey has some of the PIR sensors by them selves. but yes you both are right the pir with the board would probably be the best option. yes i was thinking flip flop for the alarm but am unsure on how to hook up the reset. as for the remote i was thinking almost like a car alarm key fob you point it at the unit push the button and it turns it on and off. again was thinking flip flop for this to would that work?
  7. elec_mech

    elec_mech Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,300
    Location:
    Virginia, USA
    For the remote, another member recently found this. If we understand it correctly, you can set each channel to act as a momentary or latch switch. You could set up one channel as a latch to turn the circuit on and off and another as a momentary for the reset portion. If you want to keep it dirt simple, the on/off can be reset - turn the power off then on again to reset the circuit.

    The simplest approach that comes to mind is an SCR. Once the PIR sensor trips, it will turn on the SCR which would be connected to your alarm. The SCR then remains on (and thus the alarm) until power is removed. I haven't used one of these myself, so perhaps someone else can suggest a part, but if not, I can research something for you.
    ImmortalPr1nce and djsfantasi like this.
  8. JohnInTX

    JohnInTX Well-Known Member

    Joined:
    Jun 26, 2012
    Messages:
    1,001
    Location:
    Texas GMT-5
    This is from an old project. The PIR detector P/N is lost to history but it was a raw PIR in a TO-5 can with a window on top. Anyway, similar devices are likely available still.

    These generate a SLOWLY changing, HiZ output with changes to detected body heat.

    The circuit comprises a 2 stage AC coupled amplifier. The output (U3-7) swings slowly around in response to sensed heat. In this circuit, the output is fed into a window discriminator (HISENSE/ and LOSENSE/) which went to a microcontroller. The SENSITIVITY pot moved the high and low thresholds apart to set where the movement was enough to signal the code that motion was happening. Motion was defined as a voltage excursion in the high or low direction.

    I don't remember much else about it except that I got stiffed on the project so quickly lost interest in archiving it - hence no BOM. :mad:.

    EDIT:
    I think the sensor was something like the Murata IRA-E700ST0 (Digikey) The circuit looks familiar..
    All said, I agree with the others that an integrated sensor, off the shelf setup is pretty attractive..

    Attached Files:

    • PIR.jpg
      PIR.jpg
      File size:
      127.6 KB
      Views:
      43
    Last edited: Jun 28, 2013
    ImmortalPr1nce likes this.
  9. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    Thanks everyone for the help so far. looking at that last schematic I realize this project is a bit above me. so the question is what would someone charge to make me a schematic? well 2, 1 for the main board and one for the remote (preferable in diptrace) that does what I want it to do? with little to no coding.
  10. elec_mech

    elec_mech Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,300
    Location:
    Virginia, USA
    If you're okay using a ready-made PIR module, you won't need anything quite as involved as John's schematic - he's, in effect, showing you what is on the boards of the ready-made PIR sensors - hence the advice of the rest of us to stick with ready-made.

    Are you trying to put this into a tiny-as-possible package or would a small package work? If the latter, use a ready-made PIR module and we can help you design the schematics to do what you want. This becomes dirt simple using a PIR module with an SCR and an alarm - three parts and a few passive components.

    The battery indicator will add some parts, but I don't foresee that being complicated either. How do you want that to function? Green LED when battery is good, yellow for low, red for dead? Or just a red LED to indicate when the battery is low (thereby prolonging the battery life)?

    Remote module will probably be the biggest item if you go with something simple and cheap. Even then, I'd guess you could fit everything into something the size of soup can (maybe a little bigger). Would this work?
    ImmortalPr1nce likes this.
  11. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    No it does not need to be tiny. the battery indicator just red when it gets low or maybe even a beep like a smoke detector when it gets low. soup can? you mean the remote itself or what? i would like the remote to be able to go on a keyring if possible if not thats ok to. i appreciate all the help so far.
  12. elec_mech

    elec_mech Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,300
    Location:
    Virginia, USA
    The remote would be handheld like the link I posted earlier. We can do some searching and see if there is an inexpensive remote in a smaller size if you'd like.

    I meant the motion sensor and all related circuitry and the batteries could be put in a package about the size of a soup can. If you were trying to put everything into something the size of, say, a pill bottle, things would be challenging.

    Now if you can put it into a shoebox, we can also have it make coffee <kidding>. :D
    ImmortalPr1nce likes this.
  13. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    If only i drank coffee lol. No the smaller we can get it the better but no does not have to be tiny.
  14. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    Any ideas or someone come up with a price for the schematic?
  15. elec_mech

    elec_mech Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,300
    Location:
    Virginia, USA
    I did a quick look up and found some suitable circuits then went ahead and tested. Attached is a working schematic.

    One major note - the PIR sensor takes 5-7 seconds to warm up. This means when power is first applied, the output of the PIR will be high and the circuit will trip. If you use one of the relay-type remote modules, I suggest putting the output of the PIR through a N.O. relay, waiting ten seconds after power is applied (through another relay, not shown on the schematic) then turning on the relay connected to the PIR output.

    I tried playing with a time delay RC circuit and a diode AND gate, but the circuit tripped every time.

    Attached Files:

    ImmortalPr1nce likes this.
  16. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    Awesome Thank you very much.
  17. elec_mech

    elec_mech Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,300
    Location:
    Virginia, USA
    On hindsight, you could add a 555 in monostable mode with a power on trigger connected to a PNP transistor. At power up, the 555 would start a 7 second timer and disable the connection between the PIR and the alarm circuit to allow the needed warm-up time. If this interests you, let me know and I'll see if I can put something together.

    Using the relay option on a remote would be add an extra step, but your circuit would be kept simple. Also, the PIR sensor has a red LED inside it that comes on when motion is detected, so going with the relay would also allow you to play with the position of the device without having the alarm constantly going off.
    ImmortalPr1nce likes this.
  18. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    yes the 555 would be great if that would work and after giving this some thought a battery and low indicator light might not be the best idea. would it be terribly hard to convert the 110vac from a wall outlet to dc to power this? i know you can buy wall converter boxes but i would like to just add a circuit to the board to do it.
  19. elec_mech

    elec_mech Senior Member

    Joined:
    Nov 12, 2008
    Messages:
    1,300
    Location:
    Virginia, USA
    Alrighty, attached is a schematic using a 555 in monostable mode. Instead of the PNP transistor I proposed earlier, I used an earlier design I came up with for the PIR sensor.

    When power is first applied, C2 slowly charges to 6V (from 0V) through R5. The 555 is effectively off until C2 gets close to 6V. Now, when I designed this circuit, it was for use with about 12VDC, so you may find you need to tweak the value of R5 and/or C2. This keeps the 555 off for about 7 seconds to allow the PIR to warm up without tripping the alarm circuit.

    Note the circuit will need to be off for about one minute or more to allow C2 to fully discharge. If power is removed and re-applied quickly, C2 will still be charged and the alarm will trip almost instantly.

    Once C2 is charged, the 555 reset pin is high and the 555 is ready. When the PIR is tripped, it will send a high signal to Q3 which in turn pulls pin 2 low, tripping the 555. The output of the 555, pin 3, then goes high and trips the alarm circuit which then latches on until power is removed from the circuit.

    VR1 is used to adjust the timing of the 555 (length of time pin 3 stays high once tripped). If you plan to stick with the latching alarm circuit, you can leave VR1 off and just connect R9 to 6VDC.

    If, however, you'd like the alarm to only go off for a certain amount of time then turn off, you can keep VR1 and skip the alarm circuit. Instead, connect the positive lead of the LS1 (buzzer) to pin 3 of the 555 (so long as it does not require more than 200mA). With the values shown, the 555 can be on for up to nearly two minutes.

    The battery low indicator can be left off if not desired.

    Attached Files:

    ImmortalPr1nce likes this.
  20. ImmortalPr1nce

    ImmortalPr1nce Thread Starter New Member

    Joined:
    May 17, 2013
    Messages:
    13
    Awesome thank you so very much. 2 questions if I was to use a standard 6v wall plug what is the standard female adapter needed for that? 2nd question if the alarm isn't loud enough after testing how hard would it be to increase the volume?
Similar Threads
Forum Title Date
The Projects Forum Motion Sensor With LDR Wednesday at 9:53 AM
The Projects Forum Custom Lighting project (LED Strips / motion sensor / PWM) May 5, 2014
The Projects Forum Modify Motion Sensor Time Jan 14, 2014
The Projects Forum PIR motion sensor circuit help Dec 17, 2013
The Projects Forum Adding motion sensor to pet water system Dec 16, 2013

Share This Page