In my plant-watering project, I need to control a relay switch to turn a water pump on and off. I chose this nice, inexpensive relay to do the job, and confirmed that 3V does indeed close the switch in the relay. If I connect the coil to the output of the MSP430 and set a high value on the pin, however, nothing happens.
The reason is that the MSP430 GPIO pins are limited in the amount of current they can source/sink. According to the G2x11 datasheet, the total output for P1 should not exceed +/- 48 mA. (This is also true for any of the Value Line devices.) Omron's datasheet for the G5LE shows that the power consumption of its coil is 400 mW, which means at 3.6 V provided by the LaunchPad, it draws 111 mA, well above what the MSP430 can do!
excellent write up on transistor switches that includes an example for a relay switch. I've borrowed his schematic image and changed the values to what I've used for my relay. Some external parts won't need the diode, but it's cheap insurance for any inductive circuits like a mechanical relay. I'm using the same power source as for the chip (from the USB port via the LaunchPad for testing, but eventually a couple of AA batteries), but it's also possible to use a different supply, and even (with some careful design) use a different voltage. Just be certain that your current draw from the MSP430 does not exceed its limits.
One thing to keep in mind with this circuit is that rather than the switch being on with logic high, it's on with logic low. Since I want the switch off by default, I need to be sure that I've initialized the output pin to a high value before setting it as an output.
(Thanks N1HFX, de KE7BFA!)