Reading "ac voltage pressence" using software only.

Easy! Make the bridge rectifier out of individual small-signal diodes.

Paul