User avatar
adrianTNT
Posts: 23
Joined: Mon Nov 10, 2014 1:08 pm
Location: The Internet
Contact: Website

A relay turns a light on/off, how to detect a burnt light ? [solved]

Thu Oct 10, 2019 8:03 am

Hello.
I am kind of new to this ...

I have a simple relay that turns a light on/off.

How can I detect if the light bulb is bad ? Is there a special relay that can do this ? Or a sensor that I mount on the circuit to detect the current draw ? How is this done in general ?

User avatar
neilgl
Posts: 1103
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 8:47 am

You could use an LDR (light dependent resistor) or photodiode to detect if the light is on.

User avatar
adrianTNT
Posts: 23
Joined: Mon Nov 10, 2014 1:08 pm
Location: The Internet
Contact: Website

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 9:00 am

Yes, I was thinking about that solution but I thought it would be very unconventional, normally this would be used for small region public street lighting and if there is a more reliable way to do it, then I would like to know :)

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 9:12 am

You could use an inductive clamp type sensor.
https://www.poweruc.pl/blogs/news/non-i ... eKEALw_wcB

https://www.seeedstudio.com/Non-invasiv ... -2054.html

https://www.amazon.com/HiLetgo-Current- ... lp_pl_dp_4

You could also look at Hall Effect current sensors.
Match the sensor to the normal current through the bulb.
Many of these sensors are analogue and produce a voltage proportional to current so would not be suitable for direct connection to RPi gpio input. You could use a comparator, a simple transistor or an analog to digital convertor to detect the state.

As always with mains voltages be very careful to ensure the Pi is isolated from mains voltages and all mains circuits have adequate insulation.

An advantage with the current transformers is that they don't connect to mains voltage, they only detect the magnetic field around the insulated wire.

User avatar
davidcoton
Posts: 4182
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 9:19 am

LDR or photodiode has the advantage of being separate from the supply circuit, therefore faults in the monitor will not affect the light.

If the street lighting uses a mains AC supply, you could use a current transformer. Not necessarily easy to interface with a Pi.

The above methods will only work when the lamp is on. I remember elaborate schemes for monitoring low voltage DC indicators on fire alarm panels, we needed to detect faults when the light was off. Power on indicators used three separate lamps on two independent driver circuits.

You need to assess the benefit of monitoring against the cost. For example:
  1. What is the harm done if the lamp fails?
  2. How often do lamps fail anyway?
  3. How quickly will people report a failed light?
  4. Is the area inspected or patrolled regularly?
  5. How quickly will detected or reported faults be repaired?
Signature retired

LTolledo
Posts: 2009
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 10:05 am

(relay on) and (lamp voltage sensor = lamp voltage) and (current sensor == 0.00A)
then "burnt light"
else "light ok"



---- or ----



(relay ON) and (lamp voltage sensor = lamp voltage) and (LDR = OFF)
then "burnt light"
else "light ok"
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
B.Goode
Posts: 8849
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 10:17 am

( Contribution removed retrospectively. )
Last edited by B.Goode on Sun Oct 13, 2019 3:18 pm, edited 1 time in total.

User avatar
davidcoton
Posts: 4182
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 10:50 am

B.Goode wrote:
Thu Oct 10, 2019 10:17 am
On a different scale, don't up-market automobiles have built-in indication of lamp failure? Won't the monitoring and reporting technology be similar?
The monitoring is different for automobile DC (usually 12V) against mains AC (120 or 230V). Reporting is whatever you want it to be....
Signature retired

User avatar
adrianTNT
Posts: 23
Joined: Mon Nov 10, 2014 1:08 pm
Location: The Internet
Contact: Website

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 11:27 am

PiGraham wrote:
Thu Oct 10, 2019 9:12 am
You could use an inductive clamp type sensor. [...]https://www.amazon.com/HiLetgo-Current- ... lp_pl_dp_4[...]
wire_sensors.jpg
wire_sensors.jpg (38.43 KiB) Viewed 1096 times
That looks like a good solution, I will look more into this.
davidcoton wrote:
Thu Oct 10, 2019 9:19 am
[...]You need to assess the benefit of monitoring against the cost. For example:
  1. What is the harm done if the lamp fails?
  2. How often do lamps fail anyway?
  3. How quickly will people report a failed light?
  4. Is the area inspected or patrolled regularly?
  5. How quickly will detected or reported faults be repaired?
These are estimates that are not very accurate but: out of 500 lamps maybe 10-20 can fail over a year, not inspected regularly but people report them to city hall if nearby light doesn't work for 3-5 days, and fixed in 3-7 days after reported in a way.
So sensors would help, the above solution seems to be the one to use.

I plan to make a web server that will control lamps on/off or set schedules, and the individual lamps will be with relays, nRF24L01 or similar wireless transceiver, and GPS sensor so the bad lamps can be seen on map.
If it starts to get shape, I will make a separate forum thread for this project.

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 12:31 pm

adrianTNT wrote:
Thu Oct 10, 2019 11:27 am

These are estimates that are not very accurate but: out of 500 lamps maybe 10-20 can fail over a year, not inspected regularly but people report them to city hall if nearby light doesn't work for 3-5 days, and fixed in 3-7 days after reported in a way.
So sensors would help, the above solution seems to be the one to use.

I plan to make a web server that will control lamps on/off or set schedules, and the individual lamps will be with relays, nRF24L01 or similar wireless transceiver, and GPS sensor so the bad lamps can be seen on map.
If it starts to get shape, I will make a separate forum thread for this project.
Is this a real thing to actually put something into civic street lighting?

I don't think that is a job for Raspberry Pi and hobby electronics sensors.

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 1:24 pm

adrianTNT wrote:
Thu Oct 10, 2019 11:27 am

I plan to make a web server that will control lamps on/off or set schedules, and the individual lamps will be with relays, nRF24L01 or similar wireless transceiver, and GPS sensor so the bad lamps can be seen on map.

You really don't need to have a GPS in each lamp since they never move. Put a unique ID code on each one and stand with your phone by each lamp post in turn and drop a pin on Google maps named by that ID. The installer can easily do that as part of the job.

User avatar
adrianTNT
Posts: 23
Joined: Mon Nov 10, 2014 1:08 pm
Location: The Internet
Contact: Website

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 1:43 pm

PiGraham wrote:
Thu Oct 10, 2019 12:31 pm
Is this a real thing to actually put something into civic street lighting?
I don't think that is a job for Raspberry Pi and hobby electronics sensors.
It might work, the ideea is to make a cost effective solution, the current alternative is a solution using PHILIPS City Touch that costs over 500 EUR per lamp.
PiGraham wrote:
Thu Oct 10, 2019 1:24 pm
You really don't need to have a GPS in each lamp since they never move. Put a unique ID code on each one and stand with your phone by each lamp post in turn and drop a pin on Google maps named by that ID. The installer can easily do that as part of the job.
Yes, that would work, but the competitor's solution has a GPS sensor and it should also have some practical advantages (e.g not needing to add each one manually) and I will try to make each of them use same identical software config, without individual configuration, maybe just an unique string id in a text file at most.
Cheapest GPS module I found is ~$10, since lamps will not move, a cheap GPS might work well.

User avatar
DougieLawson
Posts: 36308
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 1:54 pm

PiGraham wrote:
Thu Oct 10, 2019 1:24 pm
You really don't need to have a GPS in each lamp since they never move. Put a unique ID code on each one and stand with your phone by each lamp post in turn and drop a pin on Google maps named by that ID. The installer can easily do that as part of the job.
Your county council (and mine) already has a database of lamp posts done by street name and a lamp number (which is a big bold sticker on the post).

They're using your's and my Mark I eyeballs and their website at: https://www.hants.gov.uk/transport/road ... treetlight
to let SSE know when a lamp goes out and needs to be replaced.

They even have a free telephone number for the lost, dark and disconnected folks.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: A relay turns a light on/off, how to detect a burnt light ?

Thu Oct 10, 2019 2:28 pm

DougieLawson wrote:
Thu Oct 10, 2019 1:54 pm
PiGraham wrote:
Thu Oct 10, 2019 1:24 pm
You really don't need to have a GPS in each lamp since they never move. Put a unique ID code on each one and stand with your phone by each lamp post in turn and drop a pin on Google maps named by that ID. The installer can easily do that as part of the job.
Your county council (and mine) already has a database of lamp posts done by street name and a lamp number (which is a big bold sticker on the post).

They're using your's and my Mark I eyeballs and their website at: https://www.hants.gov.uk/transport/road ... treetlight
to let SSE know when a lamp goes out and needs to be replaced.

They even have a free telephone number for the lost, dark and disconnected folks.
Good point. All of this sees very much the domain of council departments rather than a topic in 'Beginners'.

boyoh
Posts: 1341
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: A relay turns a light on/off, how to detect a burnt light ?

Sat Oct 12, 2019 3:56 pm

This project as a lot of draw backs to Compleat
Due to the different types of lamps in use
I think light detections is the best ( LDR)
Current and voltage sensing might not be the
Answerer due to some lights employ ballast
Units and different controls , the current
Could still be flowing, but the lamp as failed

Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 7:28 am

LDR could be a problem to install. Ideally it would be inside the lamp housing to protect it from dirt, weather and extraneous light. That would presumably require an elevated platform to fit it

A current measuring option could be installed at ground level.
I don't think it would be difficult to determine normal lamp function from various failure modes

User avatar
adrianTNT
Posts: 23
Joined: Mon Nov 10, 2014 1:08 pm
Location: The Internet
Contact: Website

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 7:48 am

The goal is to incorporate the solution in a new lamp (not the existent different models), so they should be all the same.

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 8:34 am

adrianTNT wrote:
Sun Oct 13, 2019 7:48 am
The goal is to incorporate the solution in a new lamp (not the existent different models), so they should be all the same.
In that case why not use lamps which have this monitoring function integrated ?
Are you working for a streetlamp manufacturer?
Last edited by PiGraham on Sun Oct 13, 2019 10:16 am, edited 1 time in total.

User avatar
adrianTNT
Posts: 23
Joined: Mon Nov 10, 2014 1:08 pm
Location: The Internet
Contact: Website

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 8:56 am

It is for a reseller that makes them by custom parts (e.g not actually manufacturing their own leds);
The lamps that come with some kind of malfunction detection are usually more expensive because it has more functions besides this.

boyoh
Posts: 1341
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 9:55 am

You are using the forum to do the research for you
I hope you will donate your fee to charity, You should
Have said in the first place you are doing it for a
Re-seller, be fair give us the name of the re-seller
You are working for, so we can tell them It is not.
Your idea
Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

User avatar
adrianTNT
Posts: 23
Joined: Mon Nov 10, 2014 1:08 pm
Location: The Internet
Contact: Website

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 12:35 pm

boyoh wrote:
Sun Oct 13, 2019 9:55 am
You are using the forum to do the research for you
I hope you will donate your fee to charity, You should
Have said in the first place you are doing it for a
Re-seller, be fair give us the name of the re-seller
You are working for, so we can tell them It is not.
Your idea
Regards BoyOh
Anyone else things the same ? ^

I just asked what sensors can be used to detect a bad light in a more complex system, I don't see anything wrong with that.
What exactly was not my "idea" ? The information that a wire sensor like the above exists ? This is ridiculous.
I didn't get the raspberry and parts for free. I asked a question, nobody is obligated to answer if he has a problem with that.
There is no stolen idea involved.

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 3:09 pm

adrianTNT wrote:
Sun Oct 13, 2019 12:35 pm
boyoh wrote:
Sun Oct 13, 2019 9:55 am
You are using the forum to do the research for you
I hope you will donate your fee to charity, You should
Have said in the first place you are doing it for a
Re-seller, be fair give us the name of the re-seller
You are working for, so we can tell them It is not.
Your idea
Regards BoyOh
Anyone else things the same ? ^

I just asked what sensors can be used to detect a bad light in a more complex system, I don't see anything wrong with that.
What exactly was not my "idea" ? The information that a wire sensor like the above exists ? This is ridiculous.
I didn't get the raspberry and parts for free. I asked a question, nobody is obligated to answer if he has a problem with that.
There is no stolen idea involved.
I can't speak for boyoh, but when someone posts in the beginners section of a forum of an educational foundation and asks:
adrianTNT wrote:
Thu Oct 10, 2019 8:03 am
Hello.
I am kind of new to this ...

I have a simple relay that turns a light on/off.

How can I detect if the light bulb is bad ?
It looks perhaps like a youngster asking about a hobby or educational project, which many of us are keen to help with.. When people learn that you really asking about a commercial street lighting venture it makes the original post look a bit deceptive. It was certainly not descriptive of the actual situation. Many may feel that supplying street lighting to councils is far outside the scope of this forum and for multiple reasons you should be seeking professional paid advice.

It's not as if you asked about anything directly relevant to Raspberry Pi

User avatar
B.Goode
Posts: 8849
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 3:37 pm

adrianTNT wrote:
Sun Oct 13, 2019 12:35 pm
I asked a question, nobody is obligated to answer if he has a problem with that.


Absolutely correct.

Thank you for the reminder.

User avatar
scruss
Posts: 2544
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 3:49 pm

PiGraham wrote:
Thu Oct 10, 2019 1:24 pm
You really don't need to have a GPS in each lamp since they never move.
You'd be surprised … not that they move, but a whole lot of fixed lighting infrastructure has a GPS in every unit:
  • a GPS + a simple microcontroller gives you exact civil twilight times. Some places have legal requirements that lighting up time corresponds to twilight, and it's cheaper and more reliable than any network
  • for flashing air hazard lights, GPS's PPS signal is used to coordinate flashing to minimize impact to neighbours and improve visual recognition for pilots. Really clever projects only turn on air hazard lights when aircraft are detected.
For burnt light detection, working lights for any currently available technology generate heat, so a temperature sensor inside the fitting that's registering less than x degrees above ambient isn't working. Similarly, a light fitting at very much more than x degrees above ambient is either broken or is about to fail.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: A relay turns a light on/off, how to detect a burnt light ?

Sun Oct 13, 2019 7:48 pm

scruss wrote:
Sun Oct 13, 2019 3:49 pm
PiGraham wrote:
Thu Oct 10, 2019 1:24 pm
You really don't need to have a GPS in each lamp since they never move.
You'd be surprised … not that they move, but a whole lot of fixed lighting infrastructure has a GPS in every unit:
  • a GPS + a simple microcontroller gives you exact civil twilight times. Some places have legal requirements that lighting up time corresponds to twilight, and it's cheaper and more reliable than any network
  • for flashing air hazard lights, GPS's PPS signal is used to coordinate flashing to minimize impact to neighbours and improve visual recognition for pilots. Really clever projects only turn on air hazard lights when aircraft are detected.
For burnt light detection, working lights for any currently available technology generate heat, so a temperature sensor inside the fitting that's registering less than x degrees above ambient isn't working. Similarly, a light fitting at very much more than x degrees above ambient is either broken or is about to fail.
Good point, GPS is good for more that just position.

Return to “Beginners”