Continue to Site

90VAC to input microcontroller PIC

tony abs

Newbie
Newbie level 1
Joined
Mar 26, 2025
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
18
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):

  • 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.
Can u guys give me somes suggestions for component values (e.g., resistor ratios) or circuit protection (like a Zener diode) if thats in case?
 
Hi,

how many components?
How accurate?
How clean is the output signal?

****
I have some experience in designing measurement equippment.
How I´d use it:
* 1 capacitor - 3 resistors (as voltage divider + biasing) --> ADC (microcontroller).
The rest is microcontroller software.

Low part count, highest precision ad accuracy, timing adjustable by softwaer, without soldering.

Klaus
 
Note also that many PICs have a built in fixed voltage reference "FVR" and comparators, even some of the cheap 8 pin ones. It could save you some components. Configure the FVR as a reference to the comparator or the ADC then all you need is the resistive divider.

Brian.
 
You might want to add R / diode clamps to input signal path in case
input is dirty/transients. The in code just sample R divider to find max
average value for your test purposes.

1743072115388.png


Consult processor datasheet for input considerations, eg. R1 effect on sampling, if any.
 
Tony -

If the AC is 50/60 Hz AND the trigger voltage doesn't need to be "tight tolerance" around 90VAC, I would use a 1N4004 to half wave rectify the AC and use 2 zener diodes in series to conduct at your desired trigger voltage into a current limiting resistor and the input of an opto-isolatpr. Use a pullup resistor on the isolator output to the PIC Vcc and feed that pulsing signal to a digital input. The isolator keeps unpleasant voltages far away from sensitive inputs. If the AC is much higher frequency, the 1N4004 might not be the best choice. The 2 zeners should be selected for the trigger point on the rectified sine wave (it's not 90V!) and should be similar in voltage so that one doesn't dissipate most of the power.

Retired PE -
 


Write your reply...

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top