0
\$\begingroup\$

Intermediate DIY-er needs advice.

I'm trying to detect if my Air Conditioner power indicator LED is on from ESP8266 microcontroller (Wemos D1 Mini).

The indicator LED is on a small PCB module with a header, through which it is connected to the unit's controller. So injecting a couple of wires will not be a problem.

Here's a simplified schematics of the module connected to the controller:

enter image description here

The LED is switched on by the controller by pulling it to the ground. I have measured voltage between GND and LED1 when LED is on and it was approximately 2V.

I want to connect the ESP8266 like on the schematics below to detect if LED is on (using pin D5 with INPUT_PULLUP):

enter image description here

D5 would output 3.3V.

The questions that I have:

  1. Will this approach work to detect if LED is on?
  2. Am I risking damaging the controller by feeding it 3.3V via LED1 connection?

UPDATE: Another approach that I considered was using an optocoupler connected in series between the LED and the board:

enter image description here

asked Jul 13, 2021 at 3:04
\$\endgroup\$
1
  • 1
    \$\begingroup\$ The opto-coupler option is the way to go as it provides electrical isolation between the two circuits. You won't need additional series resistance. If anything you would reduce R8 somewhat but with a 13 V output it will make little difference. \$\endgroup\$ Commented Jul 14, 2021 at 6:27

1 Answer 1

4
\$\begingroup\$

That won't work, and could damage the board.

Suggest adding a 2N7000 MOSFET as follows:

schematic

simulate this circuit – Schematic created using CircuitLab

The output will be "high" when the LED is "on".

The resistors are optional but I would suggest using them. They may cause the LED to slightly glow 'on'. You can parallel the LED with 10K if that is objectionable.

answered Jul 13, 2021 at 3:17
\$\endgroup\$
1
  • \$\begingroup\$ Thanks for your input. Would using an optocoupler be ok too? E.g as on the schematics added to the bottom the original post. This way the LED should not glow 'on' when off. \$\endgroup\$ Commented Jul 14, 2021 at 6:16

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.