# Do I need to use a voltage regulator or an overpower protection

I am designing a circuit that will run on 5 V. The input however may vary from 5-12 V. Should I use a voltage regulator or an overpower protection circuit. I have found the 7805 voltage regulator but the input voltage is between 6-30 V. I understand that when you use a voltage regulator the input voltage is has to be 1 V above the output voltage. How would I work around this to get a 5 V output from a 5-12 V input?

• Welcome! What's your max output current? Without any other details, you'd probably be best off with a buck regulator or buck-boost regulator. Commented Mar 31, 2023 at 9:20
• Classic x-y problem. What you're actually trying to do is convert 5-12 V in to 18 V out, so find a converter that will handle that range. Commented Mar 31, 2023 at 9:31
• Most likely the boost converter will like 12 V or 16 V even better for an output of 18 V: Check/quote the specification. Commented Mar 31, 2023 at 9:32
• What is the boost converter you are using? It does make no sense to decrease the voltage and then increase it again - just increase it to begin with Commented Mar 31, 2023 at 9:36
• @fKelectronicR The chip knows the output voltage because of R1, R2 and pin 5. It will automatically adjust itself to keep the output voltage how you want it - there is no problem if the input voltage changes - the output will stay the same - within reason. The limits here are: it's a boost converter so the output voltage can't go lower than the input voltage. And the chip is designed for up to 40 volts and might blow up if the input or output is higher than that. Commented Mar 31, 2023 at 9:51