I have some circuit where my board (Electric imp) can output up to 3.3v, and i need to control a relay with atleast 5v in order to effect the coil and close the circuit. i have a power supply of 5v, so i was thinking maybe using a transistor with gate connected to my 3.3v signal, and somehow to control the transistor to push the 5v power supply to the relay.
but how? the only idea i had is making an inverter, wiring 5v to pmos, pmos drain to vout, and also nmos to drain and from there to GND. and then when 3.3v -> vout = 0, and when 0v -> vout = 5v. not exactly 5v, because i i need to know Vsd