How to read Short Circuit on 12V PIR

Hi All,

I’m trying to do an alarm project using this PIR

https://productimages.hepsiburada.net/s/10/431/8840793522226.jpg

There are 4 ports on this PIR, 1-2 is 12V power supply, i’m powering up the PIR with 12V external power supply, 3-4 ports are for alarm.

There is no any volt on 3-4 ports, when i switch to buzzer mode on my multimeter i just realised 3-4 ports are shorted.

I mean if PIR not detecting any movement buzzer of the multimeter is beeping, but if PIR detects movement then buzzer of the multimeter is not beeping until PIR returns to idle mode.

As far as i understand if there is no movement 3. & 4. ports are shorting and if there is any movement then 3. & 4. ports are not shorting.

What i want to do is use these 3-4 ports as trigger, but i couldn’t find any method to read short-unshort status of the PIR.

I’ve found some topics in the forum but didn’t fit to my situation.

What i’ve tried is :

connected 3. port to 5V - 4. port to Ground and A0 on arduino tried to read from analog – no luck.

connected 3. port to 5V - 4. port to Ground and 2 on arduino tried to read from digital – no luck

Reversed polarity – no luck.

Do you guys have any ideas how to use 3-4 port as trigger on arduino ?

You can connect either of the pins 3 or 4 to a digital input, and the other to GND.

Use pinmode() to set the Arduino pin to INPUT_PULLUP.

The pin will be low with no movement detected, and go high when a target is detected.

JohnLincoln: You can connect either of the pins 3 or 4 to a digital input, and the other to GND.

Use pinmode() to set the Arduino pin to INPUT_PULLUP.

The pin will be low with no movement detected, and go high when a target is detected.

Thanks for your reply,

  1. port is connected to : digital 7
  2. port is connected to : GND

here is my code

int tetik=7; 
void setup() 
{
Serial.begin(9600);
pinMode(tetik, INPUT_PULLUP);
}
void loop() 
{
if (tetik==LOW)  
{
Serial.print("IDLE");  
Serial.println("");
}
else
{
Serial.print("ALERT");  
Serial.println("");
}
}

when i open the serial terminal (ctrl+shift+M) it's always says ALERT, PIR is active when i wave my hand front of it red light is turns on but in the terminal it says ALERT all the time, what am i missing ?

ok found the problem :)

first of all thanks to JohnLincoln for mentioning "INPUT_PULLUP" mode, i've searched "INPUT_PULLUP" mode and found an example in arduino's official examples https://www.arduino.cc/en/Tutorial/InputPullupSerial

so i've edited my code as below and it works like a charm.

  1. port is connected to : digital 7
  2. port is connected to : GND
int tetik=7; 
void setup() 
{
Serial.begin(9600);
pinMode(tetik, INPUT_PULLUP);
}
void loop() 
{
int tetikDurum=digitalRead(7);  ;
if (tetikDurum==HIGH)  
{
Serial.print("ALERT");  
Serial.println("");
}
else
{
Serial.print("IDLE");  
Serial.println("");
}
}