I could have bought a motion-activated light, but this was more fun. I designed this board to fit into a ceiling-mount electrical enclosure. I didn't want to deal with batteries, so I used a power supply to rectify mains power from one of the screw terminals. Multiple protection components were used in case of a power surge or other incident. A small PIR sensor from Adafruit was used and had a built in timer. I simply needed to provide a few external components to control how much time the relay was on. Connecting a light was simply a matter of connecting the fixture to the other screw terminal.