Checking status of a LED from a device

Hello,

I want to check the status of a LED from a device (washing machine) to see if it is switched on or off.

Can you please tell me, if the circuit like shown in the picture would work and is safe?

In the code I would set the input pin to Input/Pull-Up and check if the signal is "HIGH" or "LOW".

What resistor would you recommend to put between the Arduino pin and the LED?

Thank you!

ledard.png

That circuit may or may not blow up the Arduino.

You’ve not done the most important steps which are to measure the voltages present across the led in both the off and on states. Come back with that information and you can get proper help.

Three things:

First, the voltage. A normal red led just has a drop of 2V. This will not trigger the Arduino (unless it's a 3v3 version).

Seconds, this may blow things if you want to read more then a single LED. The cathode of the led might be the side that's being switched which you then all short together.

Third, on a lot of washing machines I've seen the leds are multiplexed. This makes reading them even more complex. Not only because both sides of the led are then switched, also a led that appears on for us humans isn't electrically on 100% of the time. Last is fixable in software but is something to remember.

Can you use a light sensor placed in front of the LED?
Herb

cybtrash:
In the code I would set the input pin to Input/Pull-Up and check if the signal is "HIGH" or "LOW".

If you're using an Arduino operating at 5V, you'll need to use an analog input.

What resistor would you recommend to put between the Arduino pin and the LED?

You don't need a resistor.

You also don't need to worry about how the LED is driven (PWM, multiplexed, etc) as long as the LED is off when the machine is off.

BTW, the shorter lead on an LED is the cathode; so your connections look backwards.

dl324:
You also don't need to worry about how the LED is driven (PWM, multiplexed, etc) as long as the LED is off when the machine is off.

Why you think so? A PWM driven or multiplexed LED will give a very different signal from a continuously powered LED.

If checking multiple LEDs the actual connections of those LEDs come in play - easiest and safest is to simply stick a light sensor on top of the LED. If they're PWM/multiplexed you'll have to "debounce" the signal.

wvmarle:
Why you think so? A PWM driven or multiplexed LED will give a very different signal from a continuously powered LED.

If the LED is off when the machine is off (as I inquired), it's irrelevant whether the LED is multiplexed and/or PWM driven. Any signal can be differentiated from no signal.

So you don't care if the signal is going on and off all the time?

By the way, in industrial applications the last thing you normally want to see is "no signal" as that means something is broken.

dl324:
If the LED is off when the machine is off (as I inquired), it's irrelevant whether the LED is multiplexed and/or PWM driven. Any signal can be differentiated from no signal.

Nope :wink:

Yes, for PWM (sink or source) you can compensate in software (hardware as well) if you have the reference correct when checking multiple leds as said in reply #2.

But when it's multiplexed there is not a single driving line. So when you only look at a single line that may change like crazy without lighting that led. So you have to look at it differentially and take the polarity in consideration if it's charlie / "dual sided" multiplexed. Not saying it can't be done. But it's nothing as easy as just soldering wires to some leds.

cybtrash:
Hello,

I want to check the status of a LED from a device (washing machine) to see if it is switched on or off.

Can you please tell me, if the circuit like shown in the picture would work and is safe?

Some washing machines are hot-chassis and this would potentially lethal in that case.
Washing mc/s are made to a price, and saving an isolated power supply is a big price win.

Opto-isolator in series with the LED might be wiser.

Have you measured the led voltage ?
The standard procedure is to use an opto-coupler. connect the + led pin to the anode of the opto-coupler
and the "-" pin to the cathode of the opto-coupler led. Now the opto-coupler transistor will be switched
on by the washing machine led. All you have to do is ground the emitter of the transistor, connect a 1k
ohm resistor from the collector of the transistor to +5V and connect a wire from the collector of the
transistor to an arduino digital input. (an analog input could be used but makes no sense in this context)

Thank you guys very much for your help! I measured about 2,3V on that LED.

I will try the solution posted by raschemmel with the opto-coupler, sounds most convenient for me.