I'm thinking about automating the lighting system in my bathroom. I made up a 5V and 12V power supply from a transformer I salvaged from some old circuits. I need to turn on the lights when I'm going inside if the ambient light is below a certain limit and I think I can use a LDR as a sensor here and turn it off when I'm walking out side.

Why I posted this here is I need to know a method which consumes less power that can detect movement across a door. So I can use a relay to turn the lights on and off. Thanks :)

Edit: I was thinking about using a sonar sensor and a microcontroller but that is a little complicated right?

  • 2
    \$\begingroup\$ PIR sensors are commonly used to sense a human presence. \$\endgroup\$ Jan 10, 2016 at 9:34
  • \$\begingroup\$ Yea I went through PIR, but as a bathroom is a smaller area, will it trigger for unwanted detection? Or else I can set the sensor inside the bathroom and keep it sense body heat while there's a person inside and keep the lights on :) \$\endgroup\$
    – Padmal
    Jan 10, 2016 at 9:37
  • 1
    \$\begingroup\$ They're quite good at rejecting unwanted detection by detecting only a change. If you sit still in front of a PIR it won't detect you. They're very good at picking up people walking past, perpendicular to the sensor. \$\endgroup\$
    – pjc50
    Jan 10, 2016 at 10:29

1 Answer 1


As was mentioned above, PIR would be the way to go. It consumes VERY little power and, as was mentioned detects change rather than static IR density. This method, I believe uses a device called a pyrometer, which is (somewhat) similar to an IR phototransistor, but is FAR more sensitive and only reacts to change. Plus, it should be easy to interface with, and the sensors are relatively cheap.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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