# Understanding hFE values in a datasheet to choose a proper BJT base resistor

I already read the post Which resistor for NPN transistor base? But I still cannot understand the base resistor calculation.

I need the transistor to be a switch to 5V 200mA relay. The base will get its power from the AVR, which will give it 5V.

I am using 2N2222, and I understood it is related to the $h_{FE}$ value.

On the datasheet I can find the $h_{FE}$, but it has a lot of values.

Do someone have simple tutorial for the calculation ans explanation of the BJT values? I tried to Google a lot of stuff and read a lot of articles, but none of them was simple enough.