A Motion Sensing Light For Your Entrance Hallway

Arriving home to a dark house with an armful of anything is usually an exercise in fumbling confusion until someone manages to turn on a light. [Pavel Gesyuk] has circumvented this problem entirely by building and installing a motion detecting entrance light!

[Gesyuk] is using an Arduino clone by the name of  Funduino Mini Pro, a 2-channel, 2-way relay, — he only needed one, but you use what you have on hand — a recycled power supply to convert 220V AC to 5V DC, and an infrared sensor.

The project’s goal — in excess of a lighting solution for an entrance hallway — was the learn the ins and outs of the Arduino and motion sensors. After some initial hurdles familiarizing himself with the Arduino, [Gesyuk] wired everything together on a protoboard and stuck it in a plastic case — loose wires in a high traffic area doesn’t a safe home make.

Although the light is set to time out and turn off after a while, the configuration of [Gesyuk]’s home meant that he had to deliberately position the infrared sensor so that only movement in the entrance would trigger it — although that would be great fodder for messing with house guests! Still, it’s nice to not have to worry about flicking on the light whenever you get home.

We’ve previously featured [Gesyuk]’s Raspberry Pi-powered weather station, and can’t wait to see how else he’s turned his home into a maker’s wonderland.

25 thoughts on “A Motion Sensing Light For Your Entrance Hallway

  1. D-did he put the breadboard in the ceiling? I’m also working on an entrance light, but mine is battery powered and uses one of those Doppler modules from Aliexpress for the sensor, they detect movement even if you’re behind a wall, so when I open the front door the light is already on. They use 2.7mA, much more than the PIR sensors, but according to my calculations I would only need to charge them around once a month.
    Aliexpress also sells lighbulbs with PIR and Doppler sensors in them, so if you’re not a diy person you can just buy one of those.

    1. it would be interesting to see how you interconnect all… why do you use batteries? is it not annoying when you enter the house and your batteries are not charged? I was building on the idea, that you have 220 in place and you controlling the lamp which was already there, so you can always conver 220AC to 5VDC and then control 220 with 5V circuit… What is your complete solution? Did you describe it somewhere? Can I see?

    2. By the way… in my solution light turns on immediately… Door is opening into the house so until door opens so I can step into, light is on for already few seconds… In any rate any slightest movement in hallway is detected by this specific sensor, so even if the door was opening out or aside, I suppose there would be no problem. So, in my eyes, this is a matter of preference which sensor to use.

  2. I have mixed feelings about this.

    Kudos for [Gesyuk] for taking the initiative to learn about Arduinos and motion sensors. But…

    Line voltage is nothing to sneeze at. I don’t know about the part of Russia where he’s from, but the US has a national electric code. It’s got its share of problems, one of which is that it’s a commercial product masquerading as legal code, but most everything in it has a reason for being there.

    A beginner in electronics needs to have a healthy respect for line voltage. I highly recommend that respect be learned through education, not through experience; it’s the kind of experience that can be fatal.

    The other thing to consider is what happens to a home project like this when the home is no longer yours. Apartment tenants have their landlord and security deposits to consider, as well as ensuring their project doesn’t burn down the entire MUD. Home owners still need to consider what happens when they sell or meet an untimely fate. Also, if a fire can be traced back to an unapproved electrical modification, good luck collecting on your fire insurance..

    There are CE and UL approved devices for the simple task demonstrated here. While I understand that’s not the point (and not a hack), there are other safer ways to learn about Arduinos and motion sensors. I worry about HAD encouraging this type of project; it’s not a project newbies should be tackling.

    1. Here in Europe DIY stores have a range of electical goods such as cables, switches, lighting sockets, power sockets, circuit breakers, timers, conduit, etc and a selection of books and demo wiring layouts so that modifications to house wiring up to complete rewiring is possible. The work should be signed of by a qualified electrician before use but the idea is that you are free to work on your own property, and anyone who wants to does.
      So far it hasn’t caused a noticeable degree of chaos. It helps that national wiring regulations are national not local and that they are clear enoughto be encapsulated in small, easily understood books for the general public.

    2. First of all, thanks for giving your opinion… Probably, you guys at US are very frightened by your strict policies and rules… I do not know… Your comment makes me feeling that you are… I didn’t experience such restrictions not in Belarus where I was born and was taught by my father to make everything with my two arms and using my head, not in Israel where I’m living now for already more than 20 years. In this specific case I felt, that my school physics and my engineering education (BSUIR, Computer Systems & Networking Faculty where I was studying also electronics ~20 years ago) were enough to approach this pretty small, but funny project. Most of my daily work is related to software, so I “kind of” was missing touching such stuff again. uCs much evolved since I was dealing with it last time in my university labs and became much more available and cheap…

      The fact that at my 43 I’m still alive while still be playing with different voltages makes me thinking I’ll continue to be fine if not any other health problems :) Though, I do not encourage everyone playing 220V/110V AC without studying the matter… Also, I assume the readers of this site are kind of “first think then do” people and this is the whole point of this space to LEARN from others and save on your own mistakes…The main point of this project was most practicing of controlling HIGH-voltage circuits using LOW-voltage circuits, not what you said… as if you didn’t put and effort to give a read to my blog post… So with all yoir respect to line voltage, you kind of disrespect the people, I feel…

      About the REAL-ESTATE issues… let’s talk about this at another occasion/forum? According to my site statistics, this site’s articles are viewed by people from more than 10 counties… Not only US… In counties I lived in and visited, people are used to fix their homes and bring it to standardized condition before they sell it… So I do not see ANY reason to not break the walls and do whatever you want with your house as soon as it is yours… And here I’d ENCOURAGE EVERYONE doing this to enjoy the process and the results.

      Good luck you, people with doubts and fears

  3. I’m pretty sure those motion sensors have a pot to allow you to set the on time – so the output could have simply been wired to the relay direct, no arduino required.

    1. The sensor has two potentiometers, one for sensitivity and one for the “ON” time. The time can be adjusted between around 3 seconds and “very long” (I was never patient enough to wait and see ;)
      Since a few years I have similar circuits in the staircase. A HC-SR501 sensor driving the enable pin of a LED driver, everything running from my 24VDC I have everywhere in the house.The only problem is that when it is hot the sensor detects almost nothing anymore.

      1. Thanks for disclosing me that potentiometer. “Time Delay Adjust: Sets how long the output remains high after detecting motion…. Anywhere from 5 seconds to 5 minutes.” Here: http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/arduino-hc-sr501-motion-sensor-tutorial/.

        The project is almost 2 yer old… I’m pretty sure I seen that pin in spec and played with it, but I needed more control RF transceiver so, I already put the control in one place and completely erased an awareness to that pin existence from my memory.

        How hot it should be to make this sensor failing? In Israel we have pretty hot temperatures at summer… Never had sensor failing?

    2. hi, guys! I was using Arduino as I planned to send motion trigger alarm to my central controller using RF tranceiver. Here are my experiments with that: http://pagealh.com/2015/04/25/raspberry-pi-experiment-17-rf-433mhz-with-smakn-txrx-kit/
      The problem, that I faced though, that the RF transmissions themselves triggered motion-detection sensor and then the lamp went on. Example: trigger “ON” detected – sent “ON” to the server -> all is fine, switch off detected/initiated sending “OFF” message triggers the sensor and light is going back NO :) I didn’t have time to solve this as my wife wanted all closed beautifully… So the solution now is a bit of overkill for what it gives :)

    3. Also, I think you are wrong about this sensor capabilities… That type of sensor I used is a SENSOR… means stupid thing, that is sensing whatever it is designed to sense and that’s it. No controller inside to program it for some time or whatever. Look on the sensor’s spec and you will see that. Guys, why you are commenting w/o reading related blog-post(s) to details? Just to argue?

      1. Ups… My bad… Your win… Looks like being focused on expanded solution with uC I didn’t notice or disregarded that “Time Delay Adjust” pin “Time Delay Adjust: Sets how long the output remains high after detecting motion…. Anywhere from 5 seconds to 5 minutes.” Here: http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/arduino-hc-sr501-motion-sensor-tutorial/. So, yes, next time, if I’ll use this sensor I’ll remember this fact. THanks for your comment and BEG YOUR PARDON for may note above… Yours. Pavel

    4. FYI, added the below note to that post: http://pagealh.com/wp-admin/post.php?post=984&action=edit
      Hope this will not make people doing same overkill, that I have in my hallway, except the cases where they will go few steps forward in connecting these motion detection sensors (controlling lamps) also to centralized IOT-server.
      Really appreciate you taught me something today. Thanks to all in this discussion branch

      The post’s new note:
      “Note: As a result of this post being reviewed and discussed at Hackaday, I’d like to note (thanks the reviewers) that using Arduino in this experiment is NOT necessary, as the project was not finally extended with RF transceiver as planned. RF transmission of “LAMP-IS-OF” activated IR sensor and turned the lamp back ON, and lack of time were making me finishing this experiment in the middle. Thus, the not is as following, again:  for just lamp switch on-off solution Arduino is actually not necessary. The reason is a presence of “Time Delay Adjust potentiometer at HC-SR501 Motion Detection sensor used here, which sets how long the output remains high after detecting motion (anywhere from 5 seconds to 5 minutes) so that it may be used for driving of the enable pin at the relay. “

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.