A power supply is something every electronics project needs. To save time on prototyping a ready to go power supply is ideal. I wanted a supply that fits the breadboard nicely and can supply 3.3v or 5v. In this project a few things went wrong.
I wanted to have a on/off switch, selectable 5V and 3.3V and wanted the PCB such that it wouldn’t cover any of the breadboard area. I also wanted a probe point for checking current consumption (AOUT). LM317t regulator is adjustable between a wide voltage range.
The datasheet recommends 240 ohm for R1 however different resistances can work too. R1 should be chosen such that it can handle the minimum load requirement between 3.5 mA and 10 mA to maintain regulation if there is a no load situation. In the case of this project there is always a load, the resistor and LED that meet the minimum load requirement. Secondly R1 should be chosen so that in conjunction with R2 (in my schematic R2 + R3 for 3.3v and R2+R3+R4+R5 for 5v) the expected Vout can be achieved.
Vout is given by:
\(Vout = 1.25 (1 + R2 / R1)\)
\(1.25(1+ 363/220) = 3.3125V\) (When JP1 is connected)
\(1.25(1+666/220) = 5.034V\) (when JP1 is open)
I didn’t have resistors on hand with nice values for the R2/R1 ratio so a couple extra 33 ohm resistors came into play there.