NPN transistor on the other side with "C" (Collector) connected to the coil and "E" (Emitter) connected to ground. 5V output signal connected to resistor connected to "B" (Base). If using an N-channel FET instead of the NPN, resplace labels "C", "B", and "E" with "D" (Drain), "G" (Gate), "S" (Source) and you don't need the resistor (just connect output signal directly to "G").
When output signal is at 0V, transistor is off, no current flow through coil, relay is off.
When output signal is at 5V, transistor is on, "shorting" one side of the coil to ground (current flow is limited by resistance of the coil), relay is on.
-- ...The Bit Eimer [remove keinewurst to email me]
"My goal in life is to be the kind of person my cat thinks he is"
--------------------------------------------------------------
tips
issue.