How to read the state of a 1.8v LED?

Hi,

I’m working on trying to connect my doorbell up to Home Assistant using a wireless doorbell I bought from Amazon and following this guide but cannot get the ESP8266 to read the state of the LED in the chime when it is flashing. I have tried the + and the - side of the LED and so far nothing. When I measure the voltage on the LED when flashing i’m getting roughly 1.8v max; and am beginning to think that is too low for the ESP to register as an input. Is there anything I can do?

-Cheers,
doorbell_receiver.yaml

esphome:
  name: doorbell_sensor
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: !secret wifi_network
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Doorbell Sensor Fallback Hotspot"
    password: !secret api_password

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret api_password

ota:
  password: !secret api_password
  
binary_sensor:
  - platform: gpio
    name: "Doorbell"
    pin:
      number: D0
      inverted: true
      mode: INPUT_PULLDOWN_16
  #    mode: input_pullup
    filters:
      - delayed_off: 10ms
switch:
  - platform: gpio
    pin: D1
    name: "Doorbell Chime"

Pin D0 on the esp8266 goes to the + pad on the LED. Pin D1 goes to a 2N222 transistor in-line with the speaker to control the chime. The LEDS blink when the doorbells are pressed.

I should also mention. If I physically remove the wire from D0 I can see the trigger for the binary sensor sending on/off.

I am not sure what you mean by that.

However the led should have a resistor in series with it. The voltage across the led and the resistor combined should be readable. (Make sure it isn’t too high for the esp though,)

Very likely. The minimum input high voltage for 3.3v TTL is 2.0V

There should be a current limiting resistor connected to the LED. What voltage do you measure across the LED and current limiting resistor?

single-led-resistor

1 Like

Hi,

Thank you for the help. I did some tracing on the board and found three resistors. After probing either end while on ground and pressing the chime; I found one that registered 2.4v max when the button was pressed. That seems to work now as when I press the button it is registering now no problems or false positives.

Thank you again. I needed that.