Modbus Relay Card Overview

As one of my personal projects, I created a four channel relay card with a Modbus interface.  The card uses Modbus RTU to control and monitor the relays.  There is a manual override on the device so the relays can be operated by hand.  Because there is only one serial port, a jumper is used to place the relay card into configuration mode.  When in configuration mode, various settings can be changed.  The firmware is modular and the base state machine is designed to be used for any Modbus slave device.  The state machine relies on callback functions to perform specific tasks on individual devices.


Modbus Relay Card Pictures

Modbus Relay Card Top View

Modbus Relay Card Top View

Modbus Relay Card Bottom View

Modbus Relay Card Bottom View


Modbus Relay Card Schematic

Modbus Relay Card Schematic

Modbus Relay Card Schematic


Modbus Relay Card PCB Design

Modbus Relay Card PCB Top Layer

Modbus Relay Card PCB Top Layer

Modbus Relay Card PCB Bottom Layer

Modbus Relay Card PCB Bottom Layer

 
Modbus Relay Card PCB Top, Bottom and Silkscreen Layers

Modbus Relay Card PCB Top, Bottom and Silkscreen Layers

 

Modbus Relay Card Source Code

The source code for this project was developed using Atmel Studios and was designed to be modular for future modbus products.

Board_IO.h    Modbus_Relay_Board_V_2.h    Modbus_Relay_Board_V_2.c    Modbus.h    Modbus.c

Helper.h    Helper.c    USART_Control.h    USART_Control.c    EEPROM.h    EEPROM.c