Adding Power: Voltage Regulation
Dependably convert a power supply from one voltage to another using an adjustable power regulator
An LM1117 adjustable voltage regulator can be used to reduce (or regulate) a power supply to a fixed level. For example, if your board runs at 3.3V, you may be able to power your board using a USB connector. Powering your devices from USB can be a great solution in many situations, since:
- Almost everyone has access to USB on their computer
- The connectors and cables themselves are reasonably inexpensive (compared to an external regulated power supply)
- If you do need to draw power from a wall socket, USB power plugs can be purchased reasonably inexpensively, and use standard connectors/cables that most user's already own.
An LM1117 (or similar) voltage regulator works by reducing the amount of supply voltage to a fixed level. This means that if you want to supply 3.3V to your board, you can't pass a 2.5V source into the LM1117, since the regulator can't 'boost' the voltage, it can only regulate it downward. (Note: if you do need to 'boost' the current -- when using a battery, for example -- you need to use a dc-dc or 'step-up' converter.)
In order to determine the minimum voltage that you need to provide the voltage regulator, you need to know what the devices foreward-voltage drop is. The foreward-voltage drop is the amount of voltage that will be 'lost' in the conversion. For example, the LM1117 Adjustable Voltage Regulator sold in our store has a foreward-voltage drop of 1.2V. What this means is that in order to generate 3.3V power, you would need to supply as least 4.5V to the LM1117 (3.3V + 1.2V). Since this particular device can operate up to 15V, that would allow you to plug any 4.5-15V power supply into your board, and safely generate a stable 3.3V source. Since USB operates at 5V, this is a perfectly acceptable power source for the LM1117 at 3.3V (5V - 1.2V foreward-voltage drop = 3.8V or lower).
The voltage that your LM1117 generates is determined by two resistors (see R1 and R2 below). While you can arrive at the same voltage using several different resistor combinations, you might want to stick to common resistor values to avoid having to stock 30 different types. Some reasonably common examples are below. Keep in mind as well that you usually don't need to be perfect with the value -- 3.31V, for example, is more than close enough to 3.30V:
Sample LM1117 Resistor Values
| Resistor 1 | Resistor 2 | Output Voltage |
| 200 | 330 | 3.31V |
| 200 | 600 | 5.00V |
The minimum configuration for an LM1117 is pictured below.

While this configuration will produce the required voltage, it will unfortunately produce a fairly 'unstable' power supply without a few more components. It will work in a breadboard and is fine for testing purposes, but it isn't particularly useful in a real-world situation. A more appropriate 'general-purpose' LM1117 schematic can be seen below:

The schematic above is a far more robust example of how you can use an LM1117 to regulate a power supply. Aside from the two required resistors (R1 and R2), we have made the following additions:
- Added two capacitors (C1 and C2) to 'stablise' the power source if something suddenly draws a lot of power (which may cause a brown-out if no capacitors were present to smooth out the demand). Capacitors act as mini electrical reservoirs, of sorts, and when placed strategically on your board can significantly increase the stability of your device's power supply.
- Added an LED to indicate if power is available or not, as well as a current limiting resistor to prevent the LED from drawing too much current and burning out. To determine which resistor you should use with your LED, take a look at our Optimal LED Brightness Calculator.
Components Used in this Example
While all of the components mentionned above are easy to find, here is a list of the specific models we used in this example (simply because it's what we had laying around in the store):
- U1 - LM1117 Adjustable Voltage Regulator
- LED1 - LED - Red 104mcd 1206
- C1 - Tantalum Capacitor - 10µF 16V 3216
- C2 - Electrolytic Capacitor - 47µF 16V 20%
- R1 - Resistor - 200 Ohm 0805 1/8 Watt
- R2 - Resistor - 330 Ohm 0805 1/8 Watt
- R2 - Resistor - 150 Ohm 0805 1/8 Watt