This is a common question….
QUESTION: “Oyvind, I need 5 volts for my circuit. How can I get 5 volts from my 9V battery?”
OYVIND: “Good question. The common way to do this, is to use a voltage regulator. It’s a component that takes one input voltage and gives a different output voltage. And it’s very easy to use.”
Usually you can see exactly how to use the voltage regulator you’ve chosen, by looking in the datasheet.
It’s a component that consists of several basic components like transistors and such to make it behave the way it does.
And you can use more than one in a circuit if you want. For example if you have a circuit that needs both 5V and 3.3V, and you want to power it with a 9V battery. Then you can use one 5V regulator and one 3.3V regulator.
I use regulators all the time. They are very useful.
If you want to get started building circuits, check out my eBook «Getting Started With Electronics»:
Keep on Soldering!