Just a blocking occilstor based on a 2N3904. I later found that adding a capacitor across the coil connected to the transistors emiter and operating it at resonance, greatly improves the power consumption. (30mA to 1mA)
Doing some quick math, the transistor will have a base current of 5 milliamps, which a Pi should be able to supply. At a fairly typical beta of 100, the transistor could drive the fan at up to .5 amps, which is plenty for a small fan. A MOSFET transistor is generally better suited for switching high current loads, but for this a BJT (as drawn) should be fine.
In my experience a large 1.5v D cell works best, as the limiting factor is generally current not coil resistance, unless you wind thousands of turns of fine wire.
This is minor one, but annoys me how comnmon this is: light is made out of litle packets of energy called photons.
Here is a good video on the topic: youtube.com/watch?v=SDtAh9IwG-I (Too lazy didn’t watch: Light is an electromagnetc wave and is is not quantized. Only the interactions between atoms and light are quantized)