Voltage regulator circuit


Component list:
R1=270 ohm 0.25 w carbon film resistor
R2=820 ohm 0.25 w carbon film resistor
R3=150 ohm 0.25 w carbon film resistor
LED (light emitting diode)
Zener diode 22 volts 2V2
2 x diodes 4n
Voltage regulator LM317T
2 x Electrolytic capasitors 25 volts 33 mF

Calculation:
Vref=1.25 volts
Vout=5 volts
Vout=Vref(1+R3/R2)
 5=1.25(1+R3/R2),   5/1.25=1+R3/R2,  4-1=R3/R2,  3=R3/R2,  R3=3*R2 
 So resistor R3 three times bigger that R2 and resistor R2 must be bigger then 100 ohms and resistor R3 must be smaller then 1000 ohms.
From internet i have found calculator to calculate resistors, here is a link: http://www.reuk.co.uk/LM317-Voltage-Calculator.htm.
If we use resistor R2 270 ohms, resistor R3=3*270=810 ohm and we can use 820 ohm resistor for R3 as 810 does not exist.
R2=270 ohm, R3=820 ohm
Now we calculate resistor R1 for LED:
(5volts-1.8volts)/20mAmps=3.2/0.02=160 ohm as no such thing as 160 ohm resistor we can use 150 ohm resistor for LED.

Problems:
 When build this circuit i haven made any mistakes, compare to the first circuit, as i was more accurate and check everything before connecting to power supply.

Explanation:
This circuit is a voltage regulator circuit, voltage regulator LM317T acts as as a two things, its regulating output voltage  to 5 volts and making from 1 positive input 2 positive inputs. One is 12 volts constant power supply and second 5 volts constant power supply. So it can be connected to any 12 volts power source and still give us 5 volt for our auxiliary equipment which require 5 volts.

Test procedure:
Voltage drop at LED 1.87 volts, it shows how much volts it need to work.
Capacitor C16 5.06 volts 
Capacitor C15 11.29 volts
Diode2 6.23 volts, shows that on one side of diode is 11.3 volts pressure and on the other is 5.06 volts pressure so difference in pressure is 6.23 volts.
Zener diode 11.29 volts, means that zener diode in open circuit.
Diode1 0.73 volts that means how much voltage diode use to work, as it takes that voltage from available voltage and let the rest through.
Voltage at 5 volts channel is 5.06 volts.

Reflection:
This circuit i designed and done without making any mistakes and it worked 100% from first go! This was a second circuit so it game me more knowledge and time to do it.  I know everything can be improved, but i cant think of anything now.