if You want to drive a relay this schematic might help you:
http://www.wam.umd.edu/~toh/ElectroSim/Relay.GIFif you only want to have an inverted signal, then this are the calcs:
condition to saturate the transistor ic>>ib, do ic>=10 x ib. so:
rc = Vcc-Vce
(sat) ---------------------------
ic
rb = VCC-Vbe
---------
ib
so choose your Ic, calc rc,
then ib=ic/10
and then calc rb
whis is an example with 5v & 12v for vcc
http://www.mayothi.com/images/transistor3.gifyou shuld take the signal from the colector
I hope it helps
greetings