Gpio circuit esphome binary sensor

Hello All,

I know enough about this to know it should be possible, but don’t know enough on how to realise it.

I am trying to trigger a wemos d1 mini from another device. I have located the switch, there is a voltage across the switch of 1.97v. One side of the switch goes to Gnd.

The d1 mini has a common gnd too.

With the current config (I’m using denounce tome of 10ms too) if I apply voltage to pin D2 the ha sensor comes on and when I put D2 to gnd it goes off.

I have done a sketch of where I am up too. If anyone has the knowledge of how I could do this it would be greatly appreciated.

Thanks in advance

Rob

The minimum voltage to guarantee a logic high level for 3.3V TTL is 2.0V.

Your 1.97V could cause issues, So I suggest you use the following circuit with any general purpose NPN transistor:

If you software enable the pull-up resistor for the D2 pin you can omit the 10K resistor:

2 Likes

Tom you sir are a gent and a scholar. Thank you

I will post the results on here once I integrate this to my xsh doorbell.

Thanks again

Rob