You are currently viewing How to Interface Relay with MSP430F5529 MSP430 Development Board

How to Interface Relay with MSP430F5529 MSP430 Development Board

Spread the love

PS Development MSP430 kit

The MSP430 Development kit is specifically designed to help students to master the required skills in the area of embedded systems. The kit is designed in such way that all the possible features of the microcontroller will be easily used by the students. The kit supports with Code Composer Studio v4 and later through USB port.

Texas Instrument MicrocontrollerMSP430 Development kit is proposed to smooth the progress of developing and debugging of various designs encompassing of speed 16-bit Microcontrollers. It integrates on board PS2UARTADCPWMTemperature SensorRelayBuzzerI2c Seven Segment, I2C Serial EEPROMTemperature Sensor LM35Matrix KeypadSwitchLEDStepper Motor DriverTraffic Light ControllerI2C RTCLCD & GLCD Display to create a stand-alone versatile test platform. User can easily engage in Development in this platform, or use it as reference to application Development.


Relays are devices which allow low power circuits to switch a relatively high Current/Voltage ON/OFF. A relay circuit is typically a smaller switch or device which drives (opens/closes) an electric switch that is capable of carrying much larger current amounts.

Interfacing Relay with MSP430F5529

Fig. 1 shows how to interface the Relay to microcontroller. There are 2 input channels. Each input is connected to the triggering coil of the respective relay. There are 2 output channels that each correspond to an input. When the input is energized, the relay turns on and the ‘+’ output is connected to +12v. When the relay is off, the ‘+’ output is connected to Ground. The ‘-‘ output is permanently wired to Ground.

Interfacing Relay with MSP430F5529

We now want to control the relay operations by using MSP430F5529 Development Board. Here we are using two Relays. The relay consists of a coil and a switch. When the coil is energized, the switch closes, connecting the two contacts together. ULN2803 is used as a driver for port I/O lines, drivers output connected to relay modules. Connector provided for external power supply if needed.

Relay Module : Port P1 pins (Realy1 – P3.2) and Relay2-P3.5) for relay module, make port pins to high, relay will activated.

Pin Assignment with MSP430F5529

For Motor/relay section obtain power from on-board (internal) or external supply through jumper JP8.

Circuit Diagram to Interface Relay with MSP430F5529

Relay2 Schematics:

C Program to control Relay in MSP430F5529


Title : Program to control Relay


void Delay();
#define RLY1 2
//RLY1 (P1.20) AS output
#define RLY2 5
//RLY2 (P1.21) AS output
void main(void)
unsigned int i;
// Stop watchdog timer P3DIR |= 0x24;

// Set P3.2-P3.5 to O/P direction RLY1, RLY2, Stepper i=5;
//loop for 5 times { P3OUT |= 0x1 << RLY1;
P3OUT &= ~0x1 << RLY1; Delay();
P3OUT |= 0x1 << RLY2; Delay();
P3OUT &= ~0x1 << RLY2;

void Delay()
unsigned int i,j;

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.