Maker Pro
Maker Pro

Finishing touches on motion alarm

Electric-T

Jun 4, 2017
212
Joined
Jun 4, 2017
Messages
212
Sorry this phone doesnt like uploading pictures i guess. I know i know its a terribly drawn schematic but this is the one i have on file. The reset button i mentioned is a NC button and is placed between the transistor and 86 peg on the relay. If its too bad ill revise the schematic later and post it
 

Electric-T

Jun 4, 2017
212
Joined
Jun 4, 2017
Messages
212
Here ya go. Just add the reset between the transistor and relay and thats my design

alarm cct.GIF

[mod note: full image added to post]
 
Last edited by a moderator:

davenn

Moderator
Sep 5, 2009
14,296
Joined
Sep 5, 2009
Messages
14,296
Just add the reset between the transistor and relay and thats my design

the alarm will only stay off as long as your "reset button" is pushed because as soon as you release the button
the slightest detection from the PIR will keep the transistor and relay turned on


you should have really continued this in your original thread on this topic
I also remember suggesting to you to put a resistor between the PIR output and the base pin of the transistor
1k to 4k7 range.


Dave
 

Electric-T

Jun 4, 2017
212
Joined
Jun 4, 2017
Messages
212
So it seems the motion alarm is triggered by nothing now. It warms up and gets set off instantly. Ive been searching and ive run out of ideas. I dont know whats causing it. Its like the PIR is on a countdown.Everytime (about 90 seconds after switching on) it goes off and resetting the relay has zero effect when in theory it should set the relay back to the nc circuit. Help!
 

Alec_t

Jul 7, 2015
3,644
Joined
Jul 7, 2015
Messages
3,644
As well as the base resistor that Dave suggested, try connecting a 10k resistor between the transistor base and ground, to ensure the transistor switches off. (It's possible the PIR output is allowing the base to 'float' when the PIR is un-triggered).
 

Electric-T

Jun 4, 2017
212
Joined
Jun 4, 2017
Messages
212
As well as the base resistor that Dave suggested, try connecting a 10k resistor between the transistor base and ground, to ensure the transistor switches off. (It's possible the PIR output is allowing the base to 'float' when the PIR is un-triggered).
This makes sense. I will add the resistors. As far as the transistor being wired right...i have the collector going to the 86 pin on the relay. The emitter is wired directly to the PS and the base is going to the output on the PIR...correct?
 

Alec_t

Jul 7, 2015
3,644
Joined
Jul 7, 2015
Messages
3,644
Correct (apart from the base should be going to the PIR via the resistor that Dave suggested).
 

Tha fios agaibh

Aug 11, 2014
2,253
Joined
Aug 11, 2014
Messages
2,253
Looks like you need a resistor from base to emitter to help switch off transistor.
Sorry, I see this was already mentioned.

(Posts didn't show on my end)
 

Electric-T

Jun 4, 2017
212
Joined
Jun 4, 2017
Messages
212
Im going to add a 1k resistor between the pir out and base. Ive heard 2 other suggestions for resistors. Between the base pin and the emitter pin and also between pir output and ground. Can someone please explain how either of those placements would help? I feel like doing either of these would create a dead short.
 

Electric-T

Jun 4, 2017
212
Joined
Jun 4, 2017
Messages
212
Ive tried my best to draw a proper schematic but somehow it still looks messy. Anyways this is how it is currently after the 3 resistors added. Instead of taking a minute to trigger, now it triggers as soon as i give it power. Im at a loss. Its getting frustrating and its about to be put on the back burner if i dont figure it out today. So what happened?
 

Attachments

  • Motion Alarm.png
    Motion Alarm.png
    20.1 KB · Views: 70

73's de Edd

Aug 21, 2015
3,636
Joined
Aug 21, 2015
Messages
3,636
Was the voltage rating on the coil of the relay such that you had to include a voltage dropping resistor in series, if so ,you might need to filter the reduced DC supply at the relay coil end with an electrolytic capacitor after that voltage dropping resistor.
Also a short leaded .1 ufd cap across the base to emitter of the relay driver transistor might be needed.
And lastly take DC DVM metering and monitor from base to emitter of that relay driver transistor for the period of time until that mysterious self triggering occurs, to evaluate the time of an arisal of an unwanted DC signal to the base from the PIR unit.

73's de Edd
 

Electric-T

Jun 4, 2017
212
Joined
Jun 4, 2017
Messages
212
Was the voltage rating on the coil of the relay such that you had to include a voltage dropping resistor in series, if so ,you might need to filter the reduced DC supply at the relay coil end with an electrolytic capacitor after that voltage dropping resistor.
Also a short leaded .1 ufd cap across the base to emitter of the relay driver transistor might be needed.
And lastly take DC DVM metering and monitor from base to emitter of that relay driver transistor for the period of time until that mysterious self triggering occurs, to evaluate the time of an arisal of an unwanted DC signal to the base from the PIR unit.

73's de Edd
Im not limiting the voltage at all at the coil. It responded well to 15 volts so i went with it. I just adjusted the delay and sensitivity from all the way clockwise to center turn on the PIR. Now it does trigger at all. Since i built this from scratch there is nothing to reference for troubleshooting. Im going to keep messing with the pots on the PIR. Maybe ill get lucky.
 

Electric-T

Jun 4, 2017
212
Joined
Jun 4, 2017
Messages
212
If its not a problem with my design. I must be the PIR thats malfunctioning. Maybe i should order a couple new ones
 

ChosunOne

Jun 20, 2010
486
Joined
Jun 20, 2010
Messages
486
I've looked at this thread a few times, but stayed off it because the OP seemed to want to re-invent the wheel for himself; and I don't want to be "that guy" who tells hobbyists that "It's already been done, and the commercial product is better than anything you can make in your garage." I have my own projects (some of which I actually finish) that I enjoy doing, even though the commercial product is better. So I kept to myself.

However, my experience with PIR "motion sensors" may provide some insight here. As Dave said earlier, Electric-T, you should have posted at the end of your original thread, because I'm missing data here that would help and I'm not inclined to make a research project out of finding it.

I would recommend that you hold off on ordering more "PIRs". Without the model number and spec sheet, I don't know exactly what your "PIR" is, but as far as I can tell from what I'm reading here, your "PIR sensor" may be working as designed, and replacing it with new sensors won't change that. Troubleshooting-by-Replacing-Parts can be an expensive and time-consuming process.

Just for fun, you might see if you can fit your device in your freezer, if you can get the door closed over the wires, and then power it up and see if it trips in an environment of extremely low ambient IR.
 

Electric-T

Jun 4, 2017
212
Joined
Jun 4, 2017
Messages
212
I've looked at this thread a few times, but stayed off it because the OP seemed to want to re-invent the wheel for himself; and I don't want to be "that guy" who tells hobbyists that "It's already been done, and the commercial product is better than anything you can make in your garage." I have my own projects (some of which I actually finish) that I enjoy doing, even though the commercial product is better. So I kept to myself.

However, my experience with PIR "motion sensors" may provide some insight here. As Dave said earlier, Electric-T, you should have posted at the end of your original thread, because I'm missing data here that would help and I'm not inclined to make a research project out of finding it.

I would recommend that you hold off on ordering more "PIRs". Without the model number and spec sheet, I don't know exactly what your "PIR" is, but as far as I can tell from what I'm reading here, your "PIR sensor" may be working as designed, and replacing it with new sensors won't change that. Troubleshooting-by-Replacing-Parts can be an expensive and time-consuming process.

Just for fun, you might see if you can fit your device in your freezer, if you can get the door closed over the wires, and then power it up and see if it trips in an environment of extremely low ambient IR.
Hey i know China does it better. But like you, i enjoy building myself. As for the missing info i apologize. The PIR is a HC-SR501. The transistor im using is a BD139. The PS is 15V 5A. When i tested the output of the sensor when first powered, it red about 6V. The datasheet said it should be 3.3V. So i changed the sensor. The new sensor(same model, i bought a 2 pack initially) jumped erratically from 0.66 volts to 4.15V is a sort of pulse motion. But 0V is supposed to be low and im reading over 0.5V.

All this leads me to believe that the sensors are malfunctioning. I dont want to scrap the project. Im so close. But im hitting dead ends left and right
 

davenn

Moderator
Sep 5, 2009
14,296
Joined
Sep 5, 2009
Messages
14,296
Ive tried my best to draw a proper schematic but somehow it still looks messy. Anyways this is how it is currently after the 3 resistors added. Instead of taking a minute to trigger, now it triggers as soon as i give it power. Im at a loss. Its getting frustrating and its about to be put on the back burner if i dont figure it out today. So what happened?

you should have taken the circuit I drew for you and added the resistors
instead you have again got a very difficult circuit to read

you need only 2 additional resistors

1) between the PIR out and the transistor base ... this limits current to the base

2) resistor between the base and emitter/negative rail ... this ensures that the transistor is turned off as Alec_t commented on in post #24


Dave
 
Top