Connecting HC-SR505 (PIR) to relay module

Thread Starter

wodrith

Joined May 5, 2011
18
I am using a HC-SR505 PIR module [link]
I am attempting to have it drive the trigger signal on a timer relay module I picked up on ebay [link]

I am running the PIR and Relay Module on a 9V 2A AC wall adapter. When I connected the PIR output signal to the timer relay module trigger signal, I got no triggers. I measured the voltage at the relay module, and measured 2.65V (3v and above needed to trigger). Not connected, the PIR measures 3.3V. I assume this must be due to an IC the PIR is using that has too low of current then the timer module needs.

The amazon link of the PIR has this image:


I am assuming the third portion gets me to what I need. For the S8050... is there a specific model I need? Does [this] one work? Once I get that on the board, does the PIR output now connect directly to the trigger input of the relay module I linked and I am done? Is there a better way to connect this PIR sensor to this relay module?
 

Thread Starter

wodrith

Joined May 5, 2011
18
AC-DC wall adapter that outputs 9V and rated for 2A

Following is the circuit:
IMG_7124.jpg

I found the PIR schematics :


Vout of the sensor comes out of EG4001 and through a 1k current limiting resistor. I started playing around with the resistor to see if I could get enough current coming out that would trigger the relay. I found that if I put a 100 ohm resistor instead of a 1k ohm, it reliably trigger. Is this change OK for the circuit and the EG4001 part?
 

Thread Starter

wodrith

Joined May 5, 2011
18
I broke the circuit between PIR out and Trig_in to measure current. With the 100 ohm resistor instead of 1k ohm I measure 1.1 mA. The EG4001 data sheet says max current at 3V is 10ma... so I should be fine going down this path?
 

dendad

Joined Feb 20, 2016
3,566
If you connect an LED from the PIR out to 0V, does it operate when the PIR is triggered?
If so, you could use an opto isolater to level shift the signal.
Or, a transistor switch.
 

eetech00

Joined Jun 8, 2013
1,940
I am using a HC-SR505 PIR module [link]
I am attempting to have it drive the trigger signal on a timer relay module I picked up on ebay [link]

I am running the PIR and Relay Module on a 9V 2A AC wall adapter. When I connected the PIR output signal to the timer relay module trigger signal, I got no triggers. I measured the voltage at the relay module, and measured 2.65V (3v and above needed to trigger). Not connected, the PIR measures 3.3V. I assume this must be due to an IC the PIR is using that has too low of current then the timer module needs.

The amazon link of the PIR has this image:


I am assuming the third portion gets me to what I need. For the S8050... is there a specific model I need? Does [this] one work? Once I get that on the board, does the PIR output now connect directly to the trigger input of the relay module I linked and I am done? Is there a better way to connect this PIR sensor to this relay module?
That looks to be the right transistor, or just add an external transistor driver (with a base resistor and base pulldown resistor) similar to that shown in option 1.
 

Thread Starter

wodrith

Joined May 5, 2011
18
Could anyone take how I connected it here:

1593205111258.png

And show me a schematic of how I should of connected it instead? PIR_out does not have the drive strength to drive Relay trig_in. Relay Trig in triggers on 3v+. I'm just confused on how to hook this PIR module and this replay board module.
 
Last edited:

dendad

Joined Feb 20, 2016
3,566
You said it works with the 100R resistor, so if that is so, and you have it connected as above, then it is correct.
If it is not reliable, see what the series resistor for the opto isolator on the relay board (R3) is and change that to 100R as well.
 

Thread Starter

wodrith

Joined May 5, 2011
18
I tested this circuit just now. The PIR triggers the relay, that’s fine. When the relay resets, it immediately triggers again. I checked the voltage at the trigger of the relay. It goes to 3.3v when the PIR detects motion and the relay triggers. The PIR stops detecting motion and it goes to 0v. The relay is on a timer that keeps it active for 20s. When the relay resets, I measure 3.3v on the trigger as if the PIR is detecting motion, and the relay triggers. This cycle continues.

what could be the cause of this? And how could I prevent it?
 

ericgibbs

Joined Jan 29, 2010
10,205
hi w,
Do you have any electrical noise suppression components across the relay coil.? eg: diode or Res/Cap snubber.
What is the power supply of the relay.?
E
 

Thread Starter

wodrith

Joined May 5, 2011
18
I just have connections shown above for the relay module board.

The PIR board and relay board share the same power supply of 9VDC
 

Thread Starter

wodrith

Joined May 5, 2011
18
I would need it to be the same 9v source.

I’m looking for any circuit that could connect these two. Is the PIR option two in my original post the best? If it is, I don’t quite understand the connection. Would that make PIR out the input to the trigger? Is that diagram also indicating a diode between the relay Vin and the relay trig_in?
 

ericgibbs

Joined Jan 29, 2010
10,205
hi w,
OK, I have been looking thru those two links you posted.
I see that PIR module has its own built in 3v3 regulator.
How have you set the P1 Work options on the relay.?
I assume that the relay trigger is et for +3V or higher.?
Do you have access to an kaleidoscope.?

E
 

Thread Starter

wodrith

Joined May 5, 2011
18
Edit for questions:
How have you set the P1 Work options on the relay.? I am unsure what this is?
I assume that the relay trigger is et for +3V or higher.? There isnt a setting for the relay module board I can see, other then it is listed 3-24V for trigger. I attached the image for easier discussion
Do you have access to an kaleidoscope.? I am unsure what this is




I drew the diagram so it is easier to talk to, are these connections correct? This is using the PIR sensor with the S8050 NPN transistor soldered to the board.

IMG_7125.jpg

PIR out is no longer the 3.3V output of the EG4001 PIR controller, but now the collector of a S8050 NPN transistor. A diode is between the voltage source and the trigger
 

ericgibbs

Joined Jan 29, 2010
10,205
hi w,
Why have you added that diode on Out to +9V.??
Please post the circuit showing the NPN transistor.

Copied the specification of the relay module from your link, refer the attached text file.

How is is set up.?

E
 

Attachments

Thread Starter

wodrith

Joined May 5, 2011
18
I’m following the PIR documentation for the NPN transistor. I don’t know what that circuit looks like. I’m trying to follow the option 2 where it looks like with soldering the NPN transistor to the board and removing that one resistor, you have just the collector coming out of PIR out. They have a diode between what looks like Vin of the relay and the trigger signal.

it’s in p1 mode. Trigger the relay when trigger signal is received for OP time. Then reset the relay. Ignore triggers until OP time is finished
 

ericgibbs

Joined Jan 29, 2010
10,205
hi,
If you add that S8050, you will invert the signal from the PIR to the Relay module.!

The PIR output will go High ~+3v when activated and be 0V when inactive.

I am pleased to help, but I must see your PIR to Relay PCB connections.

I guess you know that if the PIR sensitivity is set high it will detect ambient IR radiation.

E
 
Top