0
\$\begingroup\$

I have an appliance that has a blinking LED when turned on. I want to detect this blinking LED using an ESP microcontroller.

The digital input of the ESP should be HIGH (or LOW) when the LED is blinking.

The appliance is running on 4.5V while the ESP is running on 3.3V. The LED is receiving 4.5V (measured between LED and GND) while turned off, when blinking I measure values between 2V and 4V (it's quickly changing within a few milliseconds, it goes like 2.9V, 2.4V, 2.1V, and up again).

I've tried to detect the blinking using a transistor switch, but it doesn't seem to work. I've attached (what I thought) the right resistors to the transistor but of what I can measure only 0.5V when off and 0.1V when on are going into the ESP.

Is using the transistor switch a good choice or is there another, easier option without having to alter the original appliance too much?

Thanks

\$\endgroup\$
2
  • 4
    \$\begingroup\$ Show a schematic of what you're doing with the switch. \$\endgroup\$
    – Hearth
    Commented Feb 1, 2022 at 13:53
  • 1
    \$\begingroup\$ Yep. Does the LED turn on with GPIO of appliance is LOW? Where is the LED resistor? above LED in circuit, below? Where do you want ESP attached? I'm pretty sure there are ways, but word description of any circuit always sounds vague and/or difficult to imagine. \$\endgroup\$
    – Ilya
    Commented Feb 1, 2022 at 14:09

1 Answer 1

4
\$\begingroup\$

You could replace the LED with an Opto-Isolator.

The appliance would still be driving an LED and your circuit would be electrically isolated from the appliance.

\$\endgroup\$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.