I have an EspressoBIN board, which has 1.8V GPIO pins with a max current of 8mA.
I'm attempting to drive some status LEDs from them, and a 5V fan, so I'm using 2N2222s with 220 Ohm base resistors connected to the GPIO pins, emitters on ground, and between 0 and a few hundred ohms connecting collectors, load and +5V. (220 Ohm so I'm not losing much voltage to drive the fan)
This works fine, except during boot. Turns out the EspressoBIN, by default, sets the GPIO pins to "IN". In that state they are at 1.8V with about 10kOhm internal impedance. This is enough to turn on the transistors so the LEDs and the fan come on (on half speed).
I can only turn the GPIOs to "OUT" once the board has fully booted (about 60 seconds later).
What's the simplest-possible circuit you can think of that keeps my loads off during boot, and lets me have them switch 5V on/off once the GPIO is set to "OUT"? Note that per vendor, 8mA is the max current I may draw.