Thank you for the reply. I should have mentioned this is a simplification of the circuit - the base of the transistor is actually being driven by a 5V logic high or low, rather than being strapped to the positive permanently, hence the transistor in the circuit.
Can you clarify a couple of points for me?
Why is it preferred to put the LED/resistor on the collector?
What calculations need to be done done to calculate the resistor at the base? It what circumstances can it be excluded?
Why is the Hfe assumed to be 10 or 20 - the datasheet gives a higher value than this?
Thanks