This is a lazy man project, I'm tired of being nagged when I forget to turn the light off. It should have eco benefits as the power bill should go down
The basic circuit is a 555 timer configured as a retriggerable monostable circuit. In the simple circuit I first created I also added a transistor to act as a NOT gate as the 555 is triggered by the input going low and the PIR generates a trigger by going high.
In version 2 I wanted at add a light sensor so that the lisgt would only turn on when the ambient light was low. I needed a truth table to work out how the switch should work
So by boolean algebra
A`BC` + A`BC + ABC = Q
=> BC(A + A`) + A`BC
=> BC(1) + A`BC
=> BC + A`BC
=> B(C+A`C)
=> B(C + A)
So C or A anded with B
Components
Ne555 timer
PIR (Passive Infra Red) motion sensor
http://www.robokits.co.nz/35050-pir-motion-sensor
http://nicegear.co.nz/sensors/pir-motion-sensor/
Solid state relays for control
http://newzealand.rs-online.com/web/p/pcb-solid-state-relays-ssr/6241897/