Automatically turning off lights - Page 1
Forum section: electronics / beginners

author: isambard
author_rank: Newbie
timestamp: January 05, 2022, 03:44:04 pm
content: Funny that I joined the forum to ask this question and saw a long thread on turning off the lights. Anyway this is not to debate whether it is good or not, but ask what options are to do it.For some lights, I just installed a ceiling mounted PIR sensor so they turn on and off automatically. The problem is I have teenagers that turn on lights everywhere and never bother to turn them off. Some in the garage or basement can be left for days before I find them turned on.So for free standing lamps, I wanted to know if there is a circuit I could use to replace the inline switch on the lamp (the one like this:)I was thinking something that you press which would then turn on the lamp for 5 minutes and it would turn itself off again. Or even something that you have to toggle on and off to reset would be fine.I found one 555 based circuit here:https://www.circuitstune.com/2015/09/auto-power-off-circuit-diagram.htmlBut I wondered if there were better options. I'm OK with microcontrollers, but wasn't sure if it made sense to have to have a power converter circuitry to bring 230v down to, say, 3.3v for the uC control).I also wasn't sure whether the circuits might anyway leak more electricity than they would save...

author: Terry Bites
author_rank: Super Contributor
timestamp: January 05, 2022, 05:20:18 pm
content: How much power is actually being wasted? Is it worth the expense of timer switches.Be more assertive with your teens.

author: BeBuLamar
author_rank: Super Contributor
timestamp: January 05, 2022, 05:44:54 pm
content: So far I have not found any device that does the jog satisfactorily. PIR drives me nuts for shutting the light off when I am in the room.

author: Kim Christensen
author_rank: Super Contributor
timestamp: January 05, 2022, 06:40:12 pm
content: QuoteThese areas are probably worth tackling by replacing your standard light switch with one that has a timer on it. Even if it has a long timeout, to avoid it being annoying, it'll still save you from a light being left on for days.More frequented areas are probably better served by you finding them and cussing at the teens.QuoteWell, a 555 timer will also need a power supply of some sort. A simple capacitive dropper can work for both a 555 or MCU based solution. The problem with DIY is if there is a fire and it's caused by your DIY solution, then your insurance company will pounce on it and use it to deny your claim.

author: Zero999
author_rank: Super Contributor
timestamp: January 05, 2022, 07:06:51 pm
content: Quote from: Kim Christensen on January 05, 2022, 06:40:12 pmThe 555 timer is relatively power hungry. A CD4060, or MCU, would be better for such a long delay and use less power.Design it properly, keeping a record of the parts used, which must be from decent distributors, as well as the schematic and follow the local wiring regulations and insurance needn't be a concern. If you go for a capacitive dropper use a fuseable resistor, or separate fuse and an X-rated capacitor, which is nothing about porno, but a type of capacitor designed to fail safe, without bursting into flames. An off the shelf switched more power supply is even better, but choose one with a low stand-by current.

author: Kim Christensen
author_rank: Super Contributor
timestamp: January 05, 2022, 07:35:02 pm
content: Quote from: Zero999 on January 05, 2022, 07:06:51 pmI agree. The CD4060 would be better than a 555 especially for longer times. Personally, I haven't used a 555 in years, even for simple timing circuits, because I have plenty of 8pin MCUs in the parts bin. I only mentioned it because the OP's wording implied that powering a 555 was somehow easier than powering a MCU.QuoteNot knowing the OP's skills, I defaulted to a cautionary approach.

author: Vovk_Z
author_rank: Super Contributor
timestamp: January 06, 2022, 01:24:32 am
content: Quote from: isambard on January 05, 2022, 03:44:04 pmThere are PIR sensors with this exact functionality. You set turn-off timeout (up to 5-10-15 minutes) since there is no movement.Something like:

author: ledtester
author_rank: Super Contributor
timestamp: January 06, 2022, 01:47:56 am
content: It's more costly but also consider going the "smart home" route...There are stand-alone PIR sensors which interface to various smart home networks and also get a controller for your light. Then you can tweak the logic of when the PIR turns on the light and for how long to your heart's content. It would also give you the ability to turn the light on and off remotely -- like when you are on vacation and want to make it look like someone's home.

author: jbeng
author_rank: Regular Contributor
timestamp: January 06, 2022, 05:24:38 am
content: Or you could use one of these mechanical timers, this 60-minute one is 15 USD on Amazon. They also make ones in 15- and 30-minutes duration.I used the search term "heat lamp timer"

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: January 06, 2022, 05:59:36 am
content: Quote from: Vovk_Z on January 06, 2022, 01:24:32 amWhat I've done in a few places at home and in the workshop is install a PIRs and an emergency LED lights tied to the same power circuit. No need for light switches. No need for torches.

author: jonovid
author_rank: Super Contributor
timestamp: January 06, 2022, 06:33:01 am
content: if you can get your working circuit inbetween the light socket & the bulb outlet plug.pvc pipe reducing coupling connectors can hold in outlet plug on one end and a light socket the other.still need to power your circuit off the AC , if your seeking to build from scratch

author: rpiloverbd
author_rank: Regular Contributor
timestamp: January 06, 2022, 11:08:07 am
content: As for the microcontroller-based solution that you're talking about, a power converter is not needed. Just use an opto- isolated relay module.That will be enough to separate the 230V part of the circuit from the microcontroller.

author: madires
author_rank: Super Contributor
timestamp: January 06, 2022, 11:50:07 am
content: LED bulbs and consequences for leaving the lights on. Any technical solution would acknowledge the kid's behaviour and create a positive feedback.

author: themadhippy
author_rank: Super Contributor
timestamp: January 06, 2022, 01:13:00 pm
content: Quotereduce there pocket money by 50% and link future increases/reductions to the monthly electricity bill

author: Zero999
author_rank: Super Contributor
timestamp: January 06, 2022, 09:47:09 pm
content: The problem with the timer switches I've seen is, they can't be just flipped on and off, like an ordinary toggle switch.This might be more difficult than I originally thought. If there are only two wires, i.e. no neutral, then the timer will have to be powered, using a capacitor, whilst the switch is on.Here's a timer switch I designed awhile ago, for 12VDC. It will need to be heavily modified to work on 230VAC, which might not even be possible, due to the lack of parts, with sufficient voltage rating. It will have to be connected to a fullwave bridge rectifier. Tr1 will need to be changed for a part, rated to at least 400V, with a 470k resistor between the gate and source. The problem is Tr2: do 400V J-FETs exist?https://www.eevblog.com/forum/projects/onoff-switch-with-timer/msg825310/I suppose the same principle, as the above could be used with an MCU, run off a micropower shunt regulator.One problem with this topology is the leakage current will be high enough to cause an LED to glow very dimly, which might not be a bad thing.

author: sairfan1
author_rank: Frequent Contributor
timestamp: January 11, 2022, 11:27:55 pm
content: You can replace switches/sockets with Tuya Smart wifi switches/sockets,You can monitor which switch is ON and turn it OFFI set particular lights to turn ON with sun set and then turn OFF everyday at 10PMI also set a condition to turn OFF lights in particular area at 12am so that if I forget it turn OFF automatically in the night, (i disable condition when i dont need)There is also an option to turn OFF when you are not at home.