Electronic – How to check led current

attinycurrentlamprelay

I'd like to check if a lamp shines and if it's dead, a relay is supposed to switch.
I thought about using an attiny with a hall sensor.
There are some sites that complain about the inconcurrency about the results of it.
I've got three lamps and I need to check each. They're UVC, so I can't use a photodiode tho check for emitted light.

My idea was to use a hall sensor for each supply cable and check the analog output with an attiny.
It would make use of 3 analog inputs and 4 digital outputs. Therefore the attiny84 would work.

If anyone has a better and cheaper idea, I'd be really grateful.

Edit: Thanks for your answers so far.

It looks like the project is going in another direction after all…

I will use UV-C LED strips for the whole project, because they are much better suited for my purpose. However, I do not have the same current flow there as in an amalgam lamp. Is there possibly a possibility to switch my relay in case of x failed LED?

Let's assume that the running meter of LED produces about 9.6W at 24Vdc. I will use about two meters of LED strip. The 24V comes from a transformer. The LEDs will be switched off when not in use. So I have to do the test during the active time. In itself no problem, because I can simply use one of the digital inputs on the attiny. Now the question for me would be if the test with the Hall sensor is possible with the LEDs. The error relay should trip after about ten failed LEDs (I can measure the value for this by simply "leaving out" ten LEDs).

But the whole thing should look relatively professional if possible, because I don't want to have a mess …

Best Answer

Here's my solution for a similar application for a remotely located lamp.

enter image description here

A standard transformer, with its rated secondary current equal to the lamp current, has been used as a current transformer.

It may be adapted for your application.