I have to admit, I just tried to post this and my internet crashed so forgive me if its a double post and for the extreme lack of detail due to my frustration at having just spent 20 min typing it then losing it.
I have a remote activated relay and PIR motion sensor.
I want to wire the motion sensor (through Arduino) into the relay receiver so that motion will activate it. ("trick" it into thinking its getting an activate signal)
The motion detector puts out high pulses every few seconds to signal its still activated, how can I code around that?
The relay needs and on and off signal. How can I code that (keep in mind the pulses) to avoid the relay activating every few seconds instead of only when there's motion?
Again, I can provide a lot more of detail so tell me if you need more info.
Don't feel obligated to answer all of it, if you have a solution to any piece, let me know.
Thanks for the support and patience!
Again, I can provide a lot more of detail so tell me if you need more info.
I would start with links to the hardware you used (both relay and PIR sensor). I drawing of your setup also might help us not to misinterpret your description.
The motion detector puts out high pulses every few seconds to signal its still activated, how can I code around that?
Then you don't have a HC-SR501 PIR module, at least the datasheet is telling something different. Please provide a link to the site you bought it.
To answer you question: a sensor that is acting like that is unusable because you cannot differentiate between a detected motion and the frequent "activated" signals. What are your jumper settings?
How do you plan to activate your relay? It's not designed to be activated by a sensor or anything like that but only by the provided keys. Do you plan to open them and "hit" the button with a relay? Or do you want to hit the button with a Servo? For the first you don't need an Arduino and the later will probably never be stable.
Maybe it's better you describe what you want to achieve and we give you hints what you might have to buy for it.
How do you get the impression that this module should output some kind of signal that it's still active? The datasheet I found on the internet say something different. What's the source of your information?
Do you have a version with a jumper or one without? From the reviews it seems that different versions of this product with different features are being sent to customers, so we first have to figure out what exactly you got. Can you post a picture of your module?
Does the activity output signal has a clear timing? If yes, please post your measurements. We might be able to filter the activity signal out on the Arduino but only if it has a clear timing that is different from a motion action. Some of the reviewers write about modules which do act more or less randomly in this regard making unusable.
Actually, I just plugged it back in and did another serial read and there is no activation signal anymore...
Is it possible that the potentiometers on the side were set to be overly sensitive and they were just throwing random signals at an interval that happened be almost exactly the same every time?
I believe I read somewhere that they can be very finicky and inaccurate...
Is it possible that the potentiometers on the side were set to be overly sensitive and they were just throwing random signals at an interval that happened be almost exactly the same every time?
From what I read about them, this is perfectly possible, even probable.
What exactly do you mean by a jumper?
A jumper is a multi-pin male header with a metal-plastic combo that connects a few (usually two) of them. This is what it usually looks like: Steckbrücke (Jumper) 2.54mm 20 Stk..
That PIR-sensor is easy to sonnect to arduino. Sensivitiy and 'alarm signal' can be tuned to suit your needs.
The most difficult will be to access the remote trigger (key). If it can be easily opened, then I guess some wireing can be done to give full "Arduino control"
pylon:
A jumper is a multi-pin male header with a metal-plastic combo that connects a few (usually two) of them. This is what it usually looks like: Steckbrücke (Jumper) 2.54mm 20 Stk..
No there are none of them on it. I think I'm just going to try some stuff out and see what works haha
Thank you everybody for all the assistance!