"Maybe use a Galvanically Isolated Current Sensor IC at the front end like ones from Allegro.
The MCU reads the output of sensor and determines the state of the connection based on the expected voltage drop across the sensor."
If you use a current sensor, you could use an MCU pin to read the sensor output voltage.
If the sensor output voltage is above VCC/2 then its DC. if it is AC, it will be biased at VCC/2. You could use the MCU to calculate the AC value.
The MCU reads the output of sensor and determines the state of the connection based on the expected voltage drop across the sensor."
If you use a current sensor, you could use an MCU pin to read the sensor output voltage.
If the sensor output voltage is above VCC/2 then its DC. if it is AC, it will be biased at VCC/2. You could use the MCU to calculate the AC value.