This is completely acceptable for your intended purpose.
By itself it will act as a light on/off trigger as others have noted.
An Arduino could be added if you wish to add extra features when the PIR is triggered. In it's most basic light-switching form using an Arduino is overkill.
By itself it will act as a light on/off trigger as others have noted.
An Arduino could be added if you wish to add extra features when the PIR is triggered. In it's most basic light-switching form adding an Arduino is overkill.
When it comes to playing overkill can be good :-)
To use it to provide input to an Arduino and NOT to a mains level light:
NB relay contacts may only be connected to mains for light switching OR to the Arduino. NEVER to both at the same time.
Connect it's DC supply input to your Arduino (or other) power supply.
As long as the supply can provide 40 mA when needed it will work OK.
40 mA is a power supply rating This is unrelated to the Arduino pin loading.
Connect the output to an Arduino digital pin configured as an input.
The output is a relay, activated when an object is sensed.
When inactive the centre pin is probably connected to the right pin - Check with Ohm meter.
When activated the left pin in connected to the centre pin (see their diagram)
Connect ground to right pin.
Connect Arduino digital input to centre pin.
Connect a "high" level to left hand pin.
OR as Majenko suggests, just set the pin to have pullups enabled.
If connecting to V+ as shown then V+ can be Vcc (=5V for a 5V Arduino, 3v3 for a 3V3 Arduino)
DO NOT set V+ to higher than Arduino's Vcc.
You can connect a say 1k to 10k resistor from V+ to the voltage source bur still do not set V+ above Vcc.
OK - just have pullups enabled:-)
eg (untested)
int ADCMode = 0;
int PIRPin = 6; // PIR connected to digital pin 6
void setup()
{
pinMode(PIRPin, INPUT_PULLUP); // set PIRpin as input with pullup
}
void loop()
{
...
ADCMode = digitalRead(PIRpin); // $Read PIR status
...
}
When the circuit activates digitalRead() will return a high.
When the circuit is not activated digitalRead() will return a low.
See here re Arduino pin modes