Hi, I have a line voltage that fluctuates from 20-80V...I want to put a 5V regulator on there...most only accept voltages up to 12V. How can I get the regulator to work on that line? I was thinking to charge a cap off the line though a diode, but it could still drop out if the voltage is low enough for long enough...maybe there's an OP AMP answer?
Thanks!
My first reaction is "why would you want to do this?"
I do not have the "big picture" of what you are trying to do, but it sounds like you are doing it the hard way.
I would investigate the possibility of using a separate supply.
The welding supply is going to be electromagnetically "dirty", which will give many possibilities for the PIC to not work correctly.