I require additional digital input pins for 5 PIR sensors. Can I use the shift register (74HC165) to read these input? And will I be able obtain real time values from all the 5 sensors?

  • Did you know you can use the Ax (A0, A1, A2, etc.) pins as digital inputs also? Or have you already used all of them? – per1234 Dec 15 '17 at 6:49
  • Yes I have used all if them – 0x000005A Dec 15 '17 at 6:49
  • 1
    Yes, a shift register will work fine if "real time" is on the milli-seconds level. Calculate the time to access the shift register input. – Mikael Patel Dec 15 '17 at 9:02
  • 1
    If you don't care about which sensor triggered, you could use an OR-gate. – Gerben Dec 15 '17 at 14:57

You could use a GPIO expander (MCP23017 or similar) which could give you 14 extra pins (16-2 for I2C bus), but this is putting extra load on the microprocessor. (you haven't said which one by the way).

Or another option might be to revisit you design and see if you can split it out to multiple processors. This is effectively the same as a GPIO Expander, just using an Uno or ESP8266 as the expander.

  • I will look into the GPIO expander. – 0x000005A Dec 15 '17 at 8:35
  • I am using an arduino uno by the way. Sorry didn't mention it. Thank you:) – 0x000005A Dec 15 '17 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.