tony abs
Newbie

Hello everyone,
I have a question related to an AC/DC circuit and a microcontroller. The idea is that my PIC microcontroller can detect when the input voltage exceeds 90V. So, I'm thinking of using a bridge rectifier to convert AC to DC, then a voltage divider to step down the voltage, and finally, a comparator (like the LM393) to compare it with a reference voltage.
Has anyone here had experience with this kind of circuit? Could you give me some advice? Thank you all for reading!
Additional Notes (if needed for clarity):
I have a question related to an AC/DC circuit and a microcontroller. The idea is that my PIC microcontroller can detect when the input voltage exceeds 90V. So, I'm thinking of using a bridge rectifier to convert AC to DC, then a voltage divider to step down the voltage, and finally, a comparator (like the LM393) to compare it with a reference voltage.
Has anyone here had experience with this kind of circuit? Could you give me some advice? Thank you all for reading!
Additional Notes (if needed for clarity):
- Bridge rectifier (GBU406)→ Converts AC to pulsating DC.
- Voltage divider → Reduces high voltage to a safe level for the microcontroller.
- Comparator (LM393) → Compares the scaled-down voltage to a reference (e.g., 2.5V) to trigger the PIC when input > 90V.