Monitoring 24V LED stack tower lights status

Hello everyone,
I am working on a project based on Arduino, but currently stuck.
I have three 24V lights to monitor, sent by a tower wired to a machine. My idea is to use a relay to convert first 24 voltage to 5V, so I can then work with Arduino, reading realy status.

I know how to let Arduino do the processing, but the problem is how I can get the data from the three patrol lights.

I thought of wiring 4Pin DC Power Relay with each 24V signal the following way

  • Relay coil with tower wires (VCC and GND)
  • Relay contacts with Arduino Pins (NO, COM, NC)

Still don't know if I made the right choice choosing a relay or not. I'll be grateful if you help me on this point.

24VDC ?
I’d use a resistor and opto to isolate the 24 from the Arduino input.
.
Or a voltage divider with common 0V if you’re not worried about isolation.

1 Like

Draw a schematic of what you have and what you want

What's the difference between an opto and a relay ?
And how can I wire it to my tower light in this case? and how many opto do I need ?
Is there a specific optocoupler to use ?

Thank you for your guidance.

With a relay you need to have a board that includes an opto isolator anyway if you want to isolate your uC from the relay coil

I alrealy mentioned it.
For what I want, is just to track data from a tower light. I thought of using a relay but @lastchancename suggests an optocoupler.

I see now. And what about current ? I think an opto needs low current to perform correctly, no ?

If I want to use a relay with a free wheel diode ? How the circuit would be ?

What happens if the lightbulb is burned out?

What kind of data does this tower light produce?

a7

1 Like

A relay is one solution and it might be the best & easiest solution if the 24V is AC. You can use the built-in pull-up resistors and then wire the relay contacts to ground the input when the relay is activated (or you can use the NC contacts to reverse the logic).

A regular electro-mechanical relay is pretty foolproof because it's just an electrically-isolated and electrically operated switch. (Solid state relays are something like a high-power optical isolator and they don't always work in place of a regular switch.)

An opto-isolator (obviously) provides isolation, as does a relay, so you don't need a common ground between the lighting and the Arduino. Most other solutions require a common ground, which probably

If it's 24VDC and well regulated a Voltage Divider (2 resistors) is the cheapest and easiest solution. It's the ratio of the resistors that's important but resistors that sum-up to about 10K is a good start.

If the voltage is not "solid" you can use an over voltage protection circuit (a resistor and diode). But increase the resistor to about 10K). With lower resistance you get more current and you have to start calculating the power dissipated by the resistor, etc.

...I use the resistor & diode method in 12V automotive applications because the 12V varies.

There is three light layers : Green when machine is working, red when it's off and Yellow for loading etc.

Thank you for this detailed answer. I'm a little bit afraid to ruin Arduino card or to cause the tower light dysfonction.

I will try to build a voltage divider. It's easy as it seems and will do the work.

Thank you @DVDdoug

OIC THX.

What about @cedarlakeinstruments's point - do you need to know there is light or ony that there would be light if the bulb(s) are good?

a7

No just if there's a signal or not.

Which Arduino, 5 volt or 3.3?

It's a 5V

I'm thinkg of building a voltage divider and I don't know if there is some conditions about current/resistors ...

For all the concerns you listed, and good reasons in addition, you are probably better off with optoisolators.

As @DVDdoug mentions in #11 above. One way to do it. IMO for you and this, the best optoin.

The tower side is just like running an LED off the 24 volts that the lamps take. A suitable series current limiting resistor is all you need to add. A reasonably wide variation of the 24 volts will be well tolerated.

The Arduino side is equally simple, no more than (and maybe not even) a single resistor to add.

There will be no electrical connection between the tower and the Arduino, unless you want to make one. Not necessary.

The only component this arrangement puts at any real risk of damages is the optoisolator.

a7

1 Like

I will try both methodes. Thank you.