Twilight switch with latching relay operated lights

Thread Starter

zouloufr

Joined Jan 24, 2022
9
Hello,
In a small building I have lights (220v) controlled by a latching relay operated by several push buttons located at the entrances.
Usually people turn on the light in the morning but never turn it off during the day when there is enough natural light.

I would like a circuit to turn off the latching relay when there is sufficient light but still be able to turn on manually the light at any time, so triggering only when natural light is going high but not when it is already high.
I have looked at off the shelf twilight switch, they use a 555 and operates a relay above or below a light threshold.
I was thinking of a circuit powered by the lights circuit (so only on when the lights are lit up) and that would detect going down a threshold of a LDR (light dependent resistor) but I don't know how not to trigger it if the LDR is already low at power on (to be able to manually power on the light).
Thanks for your suggestions
 

sghioto

Joined Dec 31, 2017
5,388
In a small building I have lights (220v) controlled by a latching relay operated by several push buttons located at the entrances.
Possibly it can be accomplished using the twilight switch mentioned above but would need to see a schematic or wiring diagram for those switches and latching relays?
 
Last edited:

eetech00

Joined Jun 8, 2013
3,949
Hello,
In a small building I have lights (220v) controlled by a latching relay operated by several push buttons located at the entrances.
Usually people turn on the light in the morning but never turn it off during the day when there is enough natural light.

I would like a circuit to turn off the latching relay when there is sufficient light but still be able to turn on manually the light at any time, so triggering only when natural light is going high but not when it is already high.
I have looked at off the shelf twilight switch, they use a 555 and operates a relay above or below a light threshold.
I was thinking of a circuit powered by the lights circuit (so only on when the lights are lit up) and that would detect going down a threshold of a LDR (light dependent resistor) but I don't know how not to trigger it if the LDR is already low at power on (to be able to manually power on the light).
Thanks for your suggestions
Replace the buttons with smart switches (z-wave), then you could not only turn them off manually, but remotely with a smart phone as well. The switches are simply to install...
 

ThePanMan

Joined Mar 13, 2020
793
First - Weclome to AAC.

If I understand what you're asking for - - - you want to be able to turn the lights on from any of the entrances in the morning. You want the lights to go off when there's sufficient natural light. But you also want to be able to turn them on at will; day or night.

What I'm wondering is if it's deep in the darkest time of winter (around December 22 / 25th) there may be days that are dark, and the days are short. So in the morning you turn the lights on. The day never gets light enough - and the lights remain on. But at the end of the shift you want the lights to go off because the last person to leave doesn't shut the lights off.

If this is the case then two systems should work well enough. First, regardless of the time of the year you can turn the lights on in the morning and have them go off when there is sufficient natural light, but you don't want the lights coming back on when it gets dark again. So you set up a timer to act like one of those entrance switches that turns the lights off.

The two systems: A light sensor to shut the lights off and a timer to ensure the lights are not on all night.

Using a programmable timer, you can command the lights to go off at set hours of the day. Assuming the shop operates from 6:00 AM to 6:00 PM, the light sensor shuts the lights off when there is sufficient light but turns them back on when it grows dark. Right there I see a problem. What if the day is on the cusp of being light enough and a cloud floats by? Your lights are going on and off with each passing cloud. Nevertheless, assuming you've found the light sensor you want to use - the timer can command an "OFF" signal at 6:30 PM, again at 7:00 PM and again at 7:30 PM (assuming those are the hours you want). With the lights on all day, even when there is sufficient light, the extra light can not be harmful to anything but your wallet. But I'm sure you don't care for the last person leaving the lights on all night. That's where the timer comes in.

As for the light sensor - you can build a hysteresis circuit so that when the light level rises above a threshold the lights wait an additional 5 minutes before shutting off. That way if it's just a cloud you don't have lights going on and off all day.

I've sort of answered your question, but that's on the premises I've laid out. Please confirm if this is the case.
 

MisterBill2

Joined Jan 23, 2018
18,483
To switch the lights off when there arrives enough light and the lights are on, a simple system to produce a "switch off" pulse when the light level increases is needed. To asure that the lights are not left on at night, a timer to produce pulses for the "switch off" action a few times during the night will be adequate.
 

Thread Starter

zouloufr

Joined Jan 24, 2022
9
First thanks all to have taken a look at my question. So to complete following your inputs :
- I don't have concerns with turning off the light at night, the last person who closes takes care of turning off the light before leaving. As with have translucent ceiling, my problem is really turning off the light when there is sunlight which people do not do, they don't care or they might not even notice the lamps are on.
Also if it gets cloudy during the day, people will naturally turn the light back on if they feel it's too dark.
- z wave kind of switch should work and i think i can take care of the logic with software and connected sensor, if i don't find an easy solution i will go down that road. I am also concerned with the range of the radio, I have more than 30 meters with walls between switch and receiver.

Here is the schematic ( made it from pictures, so not sure about it, I don't have any in hands) of an off the shelf twilight sensor. It turns on and off a relay based on light condition.
1.jpg

And here is a schematic of my current light set up :
2.jpg
I could use the twilight sensor, power by the lamp circuit, to trigger my latching relay but I would like it not to trigger if the light was already low at power up. I would like to kind of arm the ne555, or maybe find a way to keep the the 555 reset.
 

Thread Starter

zouloufr

Joined Jan 24, 2022
9
Isn't there another set of switches to turn OFF the latching relay?
The push buttons toggles the relay, if you push once it turns on, if you push again it turns off. I call this a "latching" relay but that might not be the correct name for it.
 

sghioto

Joined Dec 31, 2017
5,388
if you push once it turns on, if you push again it turns off
In that case I would use the relay contacts on the twilight sensor to turn OFF the lights as in this setup.
R1 and C1 form a delay circuit to keep the relay OFF when power is first applied.
Also suggest using a small 5 volt USB charger for the power supply.
1643155027748.png
 

ThePanMan

Joined Mar 13, 2020
793
the timer can command an "OFF" signal at 6:30 PM, again at 7:00 PM and again at 7:30 PM (assuming those are the hours you want).
To switch the lights off when there arrives enough light and the lights are on, a simple system to produce a "switch off" pulse when the light level increases is needed. To asure that the lights are not left on at night, a timer to produce pulses for the "switch off" action a few times during the night will be adequate.
"/
 

Thread Starter

zouloufr

Joined Jan 24, 2022
9
Yes, but the R1 C1 will just delay a little bit the relay being turned on, if the light is low when the lamps are turned on, the relay will still trigger after R1C1 delay and turn off the light, won't it ?
I would need a circuit to trigger on "falling edge" of light sensor, not high or low condition of light sensor. Or enable that same circuit only after light sensor is high.
 

sghioto

Joined Dec 31, 2017
5,388
if the light is low when the lamps are turned on, the relay will still trigger after R1C1 delay and turn off the light, won't it ?
No. If the light is low the LDR resistance is high so pin 2 should be above the trigger voltage of 1.67 volts.
 
Last edited:

Thread Starter

zouloufr

Joined Jan 24, 2022
9
No. If the light is low the LDR resistance is high so pin 2 should be above the 1/3 volt trigger voltage of 1.67 volts.
sorry my mistake, I wanted to say "if light is already high when lamps are turned on, the relay will shut off the light after R1C1 delay". This is to be able to manually light up even if it's sunny. And I also meant rising edge on light sensor and so falling edge of LDR resistance.
 

ThePanMan

Joined Mar 13, 2020
793
Also - if the triggering relay is held in a steady closed state won't that block any and all other input commands from the switches?

[edit] I'm slipping in my older days. I didn't realize the circuit was only powered when the lights were on. Pretty good design now that I fully comprehend the approach.
 

sghioto

Joined Dec 31, 2017
5,388
This is to be able to manually light up even if it's sunny.
That would be true and if that is allowed then the twilight sensor serves no purpose in my opinion.
In that case a timer circuit or module activated when the light is on may be a better solution.
 

Tonyr1084

Joined Sep 24, 2015
7,899
Hey: What happens in the following?

6:00 AM unlock the doors and turn on the lights.
9:30 AM sufficient ambient light to turn the lights off.
4:30 PM ambient light is low or there's heavy clouds. Someone has to turn the lights on again?
6:00 PM people lock up and go home, leaving the lights on?
 

sghioto

Joined Dec 31, 2017
5,388
My setup on using a timer module.
When the light is ON the timer will power up and after the set delay time will activate the on board relay turning OFF light day or night.
Basically an auto shutoff if someone leaves the light ON.
1643162152980.png
 

Thread Starter

zouloufr

Joined Jan 24, 2022
9
Thanks but i am not looking for a time based solution, on a rainy day it might be ok to leave lights on all day. I really want something to turn off the light where there is lot of sun but still be able to operate it manually, else people would find it odd to see the light turns off after they push the switch or think the switch is not working.
After thinking, I think I can not get away with at least two comparator or two ne555.
I think that might work but i am not sure about it :
3.jpg
 
Top