Hello, I'm working on a project where I need a microcontroller to detect a couple of 24 VRMS AC inputs from a thermostat. The inputs only need to be read as high or low. It also needs to be physically as small as possible as the circuit board has to fit in a small space.
I've come up with a design but I'm not sure if it would work. It uses a feature of the microcontroller called Analog-to-Digital Converter (ADC) and 113k ohm resisters between the input source and microcontroller pins.
I'm a little new to this stuff so any feedback is greatly appreciated. Here is the schematic:

I've come up with a design but I'm not sure if it would work. It uses a feature of the microcontroller called Analog-to-Digital Converter (ADC) and 113k ohm resisters between the input source and microcontroller pins.
I'm a little new to this stuff so any feedback is greatly appreciated. Here is the schematic:
