VAC binary sensor on ESP32

Hey! I´m looking the way to get two on-off 220 VAC signals into the ESP32 so i can read it as a binary_sensor.

In the image is what I´m thinking.

Any considerations on this? Capacitors, filters of any sort?
(The Hi-link is a 3.3v output, not 5v)

Thanks!!!

I don’t know what AC “signals” you have, but generally signals can’t supply power for a transformer. Relay with 220V coil side would work.
AC optocoupler module would be best option.

Your plan should work fine, if those 3.3V power supply modules are properly designed and built and isolate the input from the output.

Note that “VAC” stands for Volts, Alternating Current as in 220V AC — your use as an acroynm in the title is a bit unusual.

If the purpose is to sense for example when lights are on or off, transformer would work.
But if we are dealing with signals, I can find multiple reasons why it would not work and could easily also damage signal source.

But if it’s something like the output side of a mechanical thermostat it’ll almost certainly be fine.

You’re right, though: we need more details to be sure.

Also, this kind of transformer might stay in standby if it doesn’t sense sufficient current draw in output