I am using a PIR Sensor of Sparkfun(Model 8630) to detect human's presence in washroom. If there is no human presence in an interval of 30 minutes, the Solenoid Valve connected to pipe line in the area has to be closed. How can I make it possible with the help of this sensor? Will a microcontroller unit is needed? I have to use this same sytem in 120 rooms of a building. Please Advice
A micro-controller and associated power source and interface circuitry to hook up to the sensor and the solenoid valve driver would certainly be one way to go with this project that you have outlined. On the other hand you may simply be able to use a time delay relay to control the valve from the sensor directly.
There are various types of time delay relays. The one you want would be one that has provisions for re-triggering its time delay as long as the sensor input is active. After the sensor quiets down the time delay would be allowed to time out and trigger the solenoid. In such setup the solenoid would likely be held in this state until the sensor output became active again.
There is a nice write up regarding the types of things that time delay relays can be used for at this link. The operating mode that may be applicable for your application may be: