2

As per title I'm, looking a way to detect the press of a button powered at 220v ac through a gpio pin of the ESP32.

The simplest solution found seems to be an octocoupler, but are there devices that support such a high voltage difference? What could be a connection scheme?

anonymous2
  • 4,902
  • 3
  • 22
  • 49
Stefano
  • 23
  • 4

1 Answers1

1

I would recommending just getting a small normally open (NO) relay with 230V AC coil and then run your ESP32 Vcc (3.3V) to one relay contact and back from the other contact to a GPIO pin.

Alternatively check out AC main detector module for schematics on how to do it with an optocoupler.

Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
vaizki
  • 126
  • 1