Control 5V relay from mbed LPC1768
Simple, with a standard NPN transistor. You could also use a 3.3V mosfet, but an NPN what you need.







simulate this circuit &ndash; Schematic created using CircuitLab

The Relay Module will be powered from the same USB power supply needed for the mbed board.

The Module has an optocoupler that needs to be pulled low at Relay IN to enable the relay. The transistor is enabled by a GPIO HIGH.