AC supply to digital output
No. You definitely can not use LM7805 regulators for this task.


They are low-voltage DC regulators. They expect, typically, 8 - 20 V DC in.
YOU NEED ELECTRICAL ISOLATION between the mains and your Arduino. The isolation should be rated to at least 1,000 V.


You need to either use a 230 V relay to monitor each switch or use an opto-isolator with mains dropping resistors. The relay is the safer option in your case. Mount the relays securely and keep all mains wiring away from the Arduino wiring.







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Relay signalling of mains voltage.

In this configuration inputs are pulled 'low'. You need to configure internal pull-up resistors in the Arduino.

Judging by your question you have limited knowledge about electricity so I urge extreme caution.