Bosch DS940 PIR Sensor Connection

I am trying to work out how to connect a Bosch DS940 PIR sensor to my Arduino board to trigger my path lights.

The sensor takes a 12 volt DC input from an external power supply. There are two alarm contact pins where the Alarm Contact is in a state of "Normally Closed" however when motion is detected the contact opens.

When measuring the voltage of the contact when open, an output voltage of 0.23 AC volts is recorded.

My question is: Should this be connected as an analogue input or a digital input? and how how should I wire the connection to my Arduino Board so I don't blow it up.

Thankyou in advance.

Treat it just like a button. Use either the internal or an external pullup.

In the program you then look for a LOW rather than a HIGH since the input will be high all the time because the switch is closed. When it turns low you then have your program do something else.

This is a modified version of the button code, check it for my errors. :wink:

The unit wants:“9 to 15 VDC, 17 mA @ 12 VDC” for it’s power.

The output relay on it can take: “Normally closed reed relay with contacts
rated at 125 mA @ 28 VDC, maximum;
18 VAC, maximum resistive load only. The
relay opens on an alarm condition.”
The arduino will send +5 volts at really low current so that’s not a problem.

You can run it’s power from the arduino’s raw power but I recommend getting a cheap wall wart from goodwill or other thrift.

int lightPin = 13; // choose the pin for the Light
int inPin = 2; // choose the input pin (for a pushbutton)
int val = 0; // variable for reading the pin status

void setup() {
pinMode(lightPin, OUTPUT); // declare Light pin as output
pinMode(inPin, INPUT); // declare sensor pin as input

void loop(){
val = digitalRead(inPin); // read input value
if (val == LOW) { // check if the input is HIGH (I see you)
digitalWrite(lightPin, HIGH); // turn pin that activates lights on
} else {
digitalWrite(lightPin, LOW); // turn pin that activates lights off


You have made my day. I connected the Bosch PIR using a 2.2k external pullup resistor as you suggested and all is working perfectly.

Your code was also spot on!!

I am now experimenting with turning on a variety of superflux LED light zones, along with halogen lights in sequence once the path lights are triggered by the PIR. As they are externally powered I will be playing around with some relays to switch the lights. :)

Thankyou again for your time to reply to me. I am most grateful.