I tried with a lower current than 50mA but I didnt get the 500mA I wanted.That's why I'm aiming for 50mA. I didn't see the Ib of 6mA when Ic =500mA.
50mA is the current required to guarantee full saturation, with a collector current of 500mA, but it's overkill. Lower currents will ensure a low enough voltage drop, for most applications. See page 3 of the data sheet. Figure 3 states an Hfe of 90, when V
CE = 1V and I
C = 500mA, which would mean an I
B of 500/60 = 5.56mA. This agrees with figure 4, which shows V
C = 1V, when I
B = 6mA and I
C = 500mA.
https://www.onsemi.com/pub/Collateral/BC337-D.PDFIf you make I
B more than 6mA, but less, than 50mA, V
CE, should still be acceptable, hence why I suggested 25mA.
The other resistors are part of the switching of the inductor.The inductor a solenoid actuator actually I'm trying to switch that actuator. The other other diodes are protection. What can I use for the input for Q2 ?
The input to Q2 is the 3.3V logic signal. Q2's base current will be tiny, on the order of 100µA and is self-limiting: no additional base resistor required.