First thing i need to do is to find R1 knowing Vcc is 9V and LED current is 20mA.
So i am calculating R1= 9V-3.3V/20mA = 285 ohms, i will choose 330 ohm resistor.
Transistor beta gain is 100
Second task is to find R2 size, which would be in saturation for 3.3V input signal.
So i need to calculate Ic (collector current) Ic= Vcc-Vce/R = 9V-3.3V/330 = 17mA (0.017A)
Then i need base current. Ib = Ic/B(beta) = 0.017A/100 = 0.00017A
And then finally Rb =Vin-Vbe/Ib = 3.3-0.7V/0.00017A =~15k ohms.
Are my calculations for finding Rb right?
Help will be appriciated, thanks!