Output voltage of USB FAN
As a follow up to my earlier comment, if the fan draws a current of 400 mA when it is ON, and you use \$\beta_{sat}=10\$ for the BJT's saturation beta, then

$$
I_{B(sat)}=I_{C_{sat}}/\beta_{sat} = 400\,mA/10 = 40\,mA
$$

The ATmega328P's data sheet permits a maximum current of 40 mA per digital input/output (DIO) pin, so with \$I_{B(sat)}=40\,mA\$ you are at that maximum. (n.b. Based on the calculation above for \$I_B\$, when the DIO pin is logic HIGH, the DIO pin must supply (a.k.a., "source") a current of 40 mA into the BJT's base to properly saturate&mdash;to fully turn ON&mdash;the BJT.)

The "Electrical Characteristics" section of the ATmega328P's datasheet doesn't show (from what I could find) the value of \$V_{OH}\$ (logic HIGH output voltage) for an output current of 40 mA. But given the information in Fig. 33-34 "I/O Pin Output Voltage vs. Source Current (VCC=5V)" in the datasheet I'd estimate \$V_{OH}\approx4\,V\,@\,I_{OH}=40\,mA\$.

You can calculate the value of the BJT's base current limiting resistor as follows:

$$
R_B = \frac{V_{R_B}}{I_{R_B}} = \frac {V_{OH}-V_{BE(sat)}}{I_{B(sat)}} = \frac {(4\,V)-V_{BE(sat)}}{(40\,mA)}
$$

where \$V_{BE(sat)}\$ is the BJT's base-emitter voltage when the BJT is operating in saturation mode with a collector current of \$I_{C_{sat}}=400\,mA\$.  You can likely determine the value of \$V_{BE(sat)}\$ from the saturation mode information provided in the BJT's datasheet.

The real (physical) resistor value does not need to be exactly equal to the calculated value \$R_B\$, but its value should be close to \$R_B\$.  For example, if the calculated \$R_B\$ value is 1234, you could use a 1.2 kohm 5% resistor, or a 1.24 kohm 1% resistor.

When the DIO pin is logic HIGH, the power dissipated by the base current limiting resistor \$R_B\$ is given by:

$$
P_{R_B}=I_{B(sat)}^2 \cdot R_B = (40\,mA)^2 \cdot R_B
$$

Select a resistor whose power rating is \$2 \cdot P_{R_B}\$ or higher. For example, if \$R_B\$ dissipates 122 mW, then use a resistor whose power dissipation rating is 244 mW or higher&mdash;e.g., you could use a 1/4 Watt (250 mW) resistor or a 1/2 Watt (500 mW) resistor, but you should not use a 1/8 Watt (125 mW) resistor.