PIR sensor using interupts.

I plan on using 6 PIR sensors on an Uno R3. I will be using 2 of the interupts on the board to "wake" the board from sleep. But that leaves the other 4 with out interupts.

Is there some way to make another 4 non-hardware interupt pins on an Uno into hardware interupts just like digital pins 2 and 3? That way each PIR can wake the board and I can know which PIR(s) are HIGH.

Thank you.

Sam

You could connect all those sensors to a port expander such as the MCP23008 or PCF8574, then use the interrupt line of that chip to wake up the Arduino. When awake, just check which of the six triggered the interrupt.

Other solution would be to use an ESP8266 based board (such as NodeMCU or WeMOS) as that chip has interrupts on all digital pins.

SamBrownADK: I plan on using 6 PIR sensors on an Uno R3. I will be using 2 of the interupts on the board to "wake" the board from sleep. But that leaves the other 4 with out interupts.

Is there some way to make another 4 non-hardware interupt pins on an Uno into hardware interupts just like digital pins 2 and 3? That way each PIR can wake the board and I can know which PIR(s) are HIGH.

Thank you.

Sam

This may be doable with pin change interrupts (I presume they can wake the chip).

Pin change interrupts work on any pin on the Uno, but are a little more complex to set up than the direct interrupts on pins 2 and 3.

You could diode "OR" all the sensors outputs onto one digital interrupt pin ( with a pull down resistor) and connect each individual sensor ( upstream of the diode to other individual digital inputs . Then in the interrupt routine check to see which sensor had operated by seeing which of the other digital Pins had gone hi.

Google " diode or gate"

hammy: You could diode "OR" all the sensors outputs onto one digital interrupt pin...

Basic idea is ok, but it might not work on a 5volt Arduino. A PIR output (3.3volt) minus diode drop might not lift the Arduino pin reliable above the minimum 0.6*VCC HIGH threshold of an Arduino pin.

Not sure why OP tries to sleep an Uno. Many parts on that board can't be put to sleep. Leo..