OK, I'll try to help, but with a slight change of plan: instead of a normal transistor, I've dug out this MOSFET (metal oxide silicon field effect transistor). I can't remember much about all the details of the difference, but I do know they are better at acting as switches which is what you need.
MOSFET 2N7000G should do the job - it's available at Farnell -
http://uk.farnell.com/on-semiconductor/ ... dp/1459027 or Maplins
http://www.maplin.co.uk/mos-fet-transistors-33843 - Maplin may well have a shop local to you and will sell in smaller quantities.
Here's the data sheet for this device:
http://www.farnell.com/datasheets/4586.pdf
With it's flat side facing you, connect left pin (pin 1, the source) to ground (pin 6 on the GPIO connector), the middle pin (pin 2, the gate) to the GPIO pin (11 in the example code below), and the right pin (pin 3, the drain) to one end of your fan. Connect the other end of the fan to 5v (pin 2 on the GPIO connector).
No resistor is needed - you can use the one in the GPIO hardware instead - assuming you are using python then this code should do the job, but no guarantees, it's completely untested, so on your head be it (caveat over). Rather than soldering, I'd start first with one of the many breadboard kits available - here's some and connector wire kits from Maplin again:
http://www.maplin.co.uk/productsearch?c ... readboards
Code: Select all
import RPi.GPIO as GPIO # import the GPIO python library
import time # import the time python library
GPIO.setmode(GPIO.BOARD) # set up GPIO to use GPIO plug pin numbers, not the chip pin numbers
GPIO.setup(11, GPIO.OUT, GPIO.LOW) # set up pin 11 to be an output, set low at startup (fan off)
time.sleep(1.0) # sleep for a second
GPIO.output(11, GPIO.HIGH) # turn the fan
time.sleep(10.0) # leave it on for 10s
GPIO.output(11.GPIO.LOW) # turn it off again
GPIO.cleanup() # housekeeping!
Best of luck,
Hove