I am trying to make system where I want lights to turn off automatically. It should work like that if someone kept lights on by mistake then it should turn off automatically without any human intervention (like in IoT we can turn off with our phone ). For this I have tried thinking about putting camera in room which will detect the presence of human in room and if no human is detected then lights should turn off. But I am having difficulty to figure out how to turn off lights automatically? I mean what can be used ?
-
\$\begingroup\$ Have you googled? \$\endgroup\$– acrossCommented Mar 20, 2020 at 5:44
-
1\$\begingroup\$ just buy a light switch with a motion sensor built-in \$\endgroup\$– jsotolaCommented Mar 20, 2020 at 6:09
-
\$\begingroup\$ I had to achieve this because I have a daughter who might burn herself on a stove (she has seizures and she's profoundly autistic and sometimes will otherwise just burn herself by touching a burner.) I use a combination of ultrasound sensors and radar and use data fusion techniques for the sensor inputs to detect when human motion occurs in the room. It's quite a task, really. But it is very effective. If we leave the room and forget to return for a while, the stove is isolated from its power and a keycode is required to re-activate it. The sensing/detection algorithm was a lot of work. \$\endgroup\$– jonkCommented Mar 20, 2020 at 7:24
3 Answers
A relay lets you control AC circuits with low voltage. Do your research to find a safe one and how to use them safely. To detect human presence you could use a camera yes, but if you look into motion detectors I think you'll find them a lot easier to use. And here's a link to one example of that.
-
1\$\begingroup\$ Two things that should never touch mains power are: #1 totally inexperienced people with no skill. #2 that module. That makes this advice a miss in this context. For a relay fit for direct installation in mains, try RiB or Aube. \$\endgroup\$ Commented Mar 20, 2020 at 6:43
-
\$\begingroup\$ When you put it like that… I edited my answer to something more responsible, thank you. \$\endgroup\$– hallgrenCommented Mar 20, 2020 at 6:52
-
\$\begingroup\$ Oh yes, much betta... yeah, that particular cheap cheese board had this issue here... The relay was good (RU rated) the board wasn't... \$\endgroup\$ Commented Mar 20, 2020 at 6:57
Seriously...
They make motion sensors that plug into receptacles and can communicate with whatever IoT network you are using. They can then control the smart bulbs or whatever that you are using.
Then, on the IoT platform, you can add code to have it act like a motion sensor, turn on on motion and turn off after X minutes. You could vary X per time, so it doesn't turn the lights out on you during times you normally are sedentary.
-
\$\begingroup\$ A motion sensor to detect you watching tv? seriously? an infra red detector would be better as some people just don't move... ie couch potatoes... \$\endgroup\$ Commented Mar 20, 2020 at 6:46
-
1\$\begingroup\$ @SolarMike Yeah, that didn't come out so well.... \$\endgroup\$ Commented Mar 20, 2020 at 6:55
For your direct question : for turning a light off automatically, either you use some device done for it (ex : switch with integrated timer, motion detection switch, ...) or you use a relay (in this case, it's up to you to find provide the on/off signal, which is usually low voltage).
How exactly to proceed depends a lot on your precise needs :
- if you want the light to only be on when someone is moving (or if you are OK if the light goes out if you don't move for too long and you have to move a bit to get it on again) : just buy a motion sensor switch
- if you want to make sure the light don't stays on long if you forget to put it out, without needing to move : there are some rotary timers : depending on how much you turn it, you set the delay before it goes out (some have quite small maximum delays, others very long ones : choose as you want). If you want to distinguish the light early, just turn the timer back to 0. If you need more time, just turn it again to max delay after some time has passed (nb : some are a bit noisy)
- if you really aim for presence, maybe some form of (IR) heat detector, but this means nothing else can be warm in the room
- if you have times of the day where you know the light should be off (for example, you child lets the light on all day in a room with big windows), then you can just put a small timer plug to cut light at specific hours
For your idea of the camera, excepted for the fun of it, or for some very special purposes (example : very very huge room with old incandescent lamps you can't replace for whatever reason), I don't think it's a good idea : a camera (+micro-computer to process the images) is probably going to consume far more than a small LED light bulb that you sometimes forget to extinguish.
Globally, for all "IoT" or other automation supposed to save energy : think twice about the energy consumed by the system itself (and the pollution to manufacture it and dispose it) : very often, the balance is negative (excepted for some huge consumers like heating or air conditioning)