Have a PIR operate on within certain hours daily

Thread Starter

Trapbarn

Joined Aug 6, 2022
8
My first post to the form, so my apologies if this request does not fit with the subjects covered.

I'm looking to set up an external infrared PIR with a 24 hour timer so that it will operate an alarm between the hours of midnight and 4am each day. The alarm will be powered through a relay connected to the PIR. The idea of the relay is to set a time limit for the duration that the alarm will produce noise.

One problem I have is that if I put the mains driven timer at the the beginning of the chain it will power up PIR and this will make it activate its output briefly and so set of the alarm. It seems that every PIR send power to its output side whenever it is first powered up. With the timer powering up the PIR every night at midnight , this means the PIR will kick in briefly and trigger the relay which will trigger the alarm sounder.

I'm very much a an amateur DIY'er so would appreciate suggestions on how best to go about designing the system.
 

dl324

Joined Mar 30, 2015
16,943
Welcome to AAC!

Use a power on circuit to disable the relay/trigger briefly when power is first applied. If you give more complete information, you'll get better suggestions.
 

Reloadron

Joined Jan 15, 2015
7,523
Another option might be to let the PIR sense 24/7 but only allow the output to be passed on to the relay alarm circuitry between your designated hours. Also:
Welcome to AAC!

Use a power on circuit to disable the relay/trigger briefly when power is first applied. If you give more complete information, you'll get better suggestions.
The more information you provide the better the help suggestions get.

Ron
 

Thread Starter

Trapbarn

Joined Aug 6, 2022
8
Another option might be to let the PIR sense 24/7 but only allow the output to be passed on to the relay alarm circuitry between your designated hours.

That makes sense, but I'd like to know how to do that - given that the 24 hour timer would have to run 24/7.

So if the PIR activates between midnight and 4am, what do I need so that the timer to passes on power (or signal) to the relay for the relay to trigger the alarm sounder for the prescribed time.

Please forgive me but I'm not an professional on electrics.
 

Reloadron

Joined Jan 15, 2015
7,523
Well alrighty then I can simplify my post. We or actually you have a PIR sensor. When powered up it momentarily triggers.
One problem I have is that if I put the mains driven timer at the the beginning of the chain it will power up PIR and this will make it activate its output briefly and so set of the alarm.
OK so like you mentioned "at the beginning of the chain". So looking at things as a chain we have the PIR sensor followed by an alarm. My suggestion is break the chain and insert your timer where we broke the chain. Now you have PIR sensor, timer, alarm rather than timer at the start of the chain. Most timers have a relay out allowing switching. We have PIR > Timer Relay > Alarm so while the PIR will run 24/7 the alarm will only be active during the hours you select.

Ron
 

Thread Starter

Trapbarn

Joined Aug 6, 2022
8
Well alrighty then I can simplify my post. We or actually you have a PIR sensor. When powered up it momentarily triggers.

OK so like you mentioned "at the beginning of the chain". So looking at things as a chain we have the PIR sensor followed by an alarm. My suggestion is break the chain and insert your timer where we broke the chain. Now you have PIR sensor, timer, alarm rather than timer at the start of the chain. Most timers have a relay out allowing switching. We have PIR > Timer Relay > Alarm so while the PIR will run 24/7 the alarm will only be active during the hours you select.

Ron
OK, I see the logic in that and I've racked my aged brains all last night to figure out the "timer relay" bit.
I have a few circuits for other purposes that use relays that close or open contacts after delayed start ie so many seconds or minutes. So far I have not come across a relay which runs 24/7 that is awaiting an input signal so that it closes a normally open (NO) set of contacts. Because I couldnt find such a relay, I was trying to figure out how to use a 13 amp plugin timer somehow. What I couldnt figure out was how to get a relay to close "NO" contacts only when current was flowing from two different sources.
Ie source one would be the PIR and source two would be the plugin time between the hours of midnight and four am.
In "logic" terms I see this as an "AND" gate. in the chain just before the alarm.

I hope i have explained myself adequately.
 

Thread Starter

Trapbarn

Joined Aug 6, 2022
8
Well alrighty then I can simplify my post. We or actually you have a PIR sensor. When powered up it momentarily triggers.

OK so like you mentioned "at the beginning of the chain". So looking at things as a chain we have the PIR sensor followed by an alarm. My suggestion is break the chain and insert your timer where we broke the chain. Now you have PIR sensor, timer, alarm rather than timer at the start of the chain. Most timers have a relay out allowing switching. We have PIR > Timer Relay > Alarm so while the PIR will run 24/7 the alarm will only be active during the hours you select.

Ron
Hi Ron, I think I have it now!!
I use the output from the PIR to be the signal (trigger) to the relay. The output from the timer is then switched after the relay get the signal. I just have to find a relay that will run for a set duration eg 10 seconds.
I have minature 12v relays that can be programmed to do that so I will now look for one that will do it for mains voltage - unless I put in a transformer after the first relay and then use a 12v second relay?
 

BobTPH

Joined Jun 5, 2013
8,998
No, you still don’t have it.

Your original idea was to power the sensor and the alarm through a relay triggered by tje tiner.

Ron’s suggestion was to power the sensor always, and power only the alarm from the timer relay. This way, the alarm dies not sound during the day because it is not powered, and it does not sound at midnight because the sensor was already powered.
 

MisterBill2

Joined Jan 23, 2018
18,582
I have had a similar setup for over 20 years. Now I have added a second system for another area. In the older system the timer simply enabled the power feed to the alarm, while the PIR motion sensor switches on a light any time it is triggered. For the newer system, only a year old, the timer switches on the 24 volt transformer power to operate the alarm when the relay operates.
So what the TS can do is to have the PIR system operate a relay, and then the timer controls the power for the alarm triggering relay. And for the ten second time limit, set the mode for the PIR to "test", which has a very short on time.
 

Reloadron

Joined Jan 15, 2015
7,523
Here is a basic block diagram.
PIR TIMER BLOCK.png

You want a timer which has usable relay contacts and can be programmed. The timer normally open contacts will close when the relay is active at other times the alarm is disconnected by the relay N/O contacts. Make sense now? :) This or as suggested above.

Ron
 

bertus

Joined Apr 5, 2008
22,278
Hello,

Depending on the needed input signal of the alarm, you might need to add a pull-up or pull-down resistor after the relay contact that @Reloadron mentioned.

Bertus
 

MisterBill2

Joined Jan 23, 2018
18,582
Indeed, the unanswered question is the alarm device. One device I used for a while was a 12 volt DC powered Sonalert I powered that with a small 12 volt output wall-wart supply that was plugged into an outlet inside, fed from a security motion sensor outside. (It is very handy to be able and qualified to do my own residential wiring.) With the Sonalert sitting between the inner and outer window glass anybody approaching is notified that we also are notified of their approach. The sound is not loud enough for the neighbors to notice, but just enough to announce arrivals. It also awakens the dogs, who then announce anyone they see approaching.
 

Thread Starter

Trapbarn

Joined Aug 6, 2022
8
I'm not too bothered about the alarm device. I have some 12volt DC types and a mains powered one. The 12v ones vary in terms of decibels and I'm not looking for a massive sound - just enough to let an intruder feel unsettled and best not to progress further. It will only run for 10 seconds and I may connect it to a strobe. I'm quite amenable to have a 12v device switched by the relay.
As for the relay, I thought this might be suitable if it takes a 220v input to trigger it.
AC 220V 230V 240V Trigger Delay Timing Timer Relay Switch Delay Turn Off 0~5min | eBay
 

MisterBill2

Joined Jan 23, 2018
18,582
Consider my suggestion that many PIR sensors have, as a selectable function, a test mode which is for checking the area of coverage, That might be a satisfactory amount of time for your application with no extra parts at all. Worth reading the instructions to see if it has that mode. Cheap and easy.
 

Reloadron

Joined Jan 15, 2015
7,523
I'm looking to set up an external infrared PIR with a 24 hour timer so that it will operate an alarm between the hours of midnight and 4am each day.
I thought you wanted to specifically have the alarm function only operate between set hours? Like only on HH:MM:SS? The timer you linked to won't do that. Similar to for example a lawn sprinkler timer where it turns on at midnight and off at 4:00 AM? The timer you linked to won't do that. You want a timer which becomes active during your preset times.

Yes, if you want to link to your PIR sensor it will help. The more anyone knows as to your voltages will help.

Ron
 

panic mode

Joined Oct 10, 2011
2,758
professional solution to do something like this is to use programmable controller with clock, PIR sensor and suitable output (relay or buzzer).

so why not follow the same path and get a small programmable device like Arduino or whatever, along with PIR sensor? then you can do anything you like...

There are many kits that contain all needed parts along with very detailed instructions. You can buy them on Amazon or electronics store near you (ELEGOO, Freenove etc.).

Or .... you don't even need to buy the kit, just get the free instructions, read through, and only buy individual parts you actually need.

Example
https://freenove.com/tutorial.html

each kit has Tutorial.pdf that is in the ZIP file or on Github. it is free...

and FNK00017 is one of larger kits:
https://github.com/Freenove/Freenove_Ultimate_Starter_Kit/blob/master/Tutorial.pdf

Instructions are very detailed, they are geared for complete noobs and include explanation, circuit diagrams and programs for bunch of projects (clock, using PIR sensor etc).
 

MisterBill2

Joined Jan 23, 2018
18,582
The trick will be to change the sequence of items. You may be able to do it with what you have, so that the PIR sensor switches on the power source for the alarm, but only when the time switch powers the power supply.

Presently we have no information about the PIR device, we have no information about the time switch, and we have not much information about the alarm device. That lack of information makes it hard to provide a useful suggestion.
EXCEPT for ONE THING!!!! NO ARDUINO!! a micro in this application would be a waste of nearly everything.
 

panic mode

Joined Oct 10, 2011
2,758
i agree with everything except that last line. what exactly would be wasted if nothing is selected?
and i do not see why any perfectly viable option should be ignored? one nice things with programmable device is flexibility when it comes to timing. it would be trivial to implement any logic, including something to deal with startup glitch for example.
 

BobTPH

Joined Jun 5, 2013
8,998
Really? An Arduino could replace the timer and also handle not triggering on power up. So why is that a waste, when it could do exactly what he needs with nothing but a relay added? And it could be in sleep mode nearly all the time making power draw almost nothing.
 
Top