Analog read

Two resistors of 1K attached to the analogue input. The other ends go to +5V and ground. Then the input sits at 2.5V and your capacitor attaching it to the AC source can pull it up and down from this point.