4 Channel Relay board for M1S

4 channel relay board will provide the ability to control high voltage and high current external devices through GPIO pins easily.

  • Add-on board for ODROID-M1S only.
  • 4-channel relay control via GPIO pins.
  • GPIO isolation using PC817 photocoupler to prevent interference from high voltage circuit.
  • Single RS232 serial port.
  • Board reset and power button pins (Optional)

Form Factor Board dimension : 90 (L) x 65 (W) x 28 (H) mm
1x RS232

* Schematic

RELAY CH0 13 GPIO0C.1 17
CH1 11 GPIO0C.0 16
CH2 35 GPIO2A.5 69
CH3 33 GPIO0B.5 13
RS232 TX 8 GPIO2A.4 68
RX 10 GPIO2A.3 67
RTS 31 GPIO2B.7 79
CTS 29 GPIO2C.0 80

In case you need to use RS232 port on this board, you need to add uart0 to the line start with overlays in /boot/config.ini. So UART port on ODROID-M1S will be enabled and create /dev/ttyS0 for the port. If you do not need to use RS232 port, you will not add anything to /boot/config.ini.


connect serial cable(usb to rs232) with cross-cable
cross-cable is a cable that connects tx and rx and cts and rts of the DB connector.

pc side
$ sudo stty -F /dev/ttyUSB0 9600 -cstopb -parenb
# receive
$ cat /dev/ttyUSB0
# transmit
$ echo "123" > /dev/ttyUSB0
m1s side
$ sudo stty -F /dev/ttyS0 9600 -cstopb -parenb
# receive
$ cat /dev/ttyS0
# transmit
$ echo "123" > /dev/ttyS0

In order to control the relay on the board, you will need to manage the GPIO pins assigned to each relay module. This is the minimal commands in order to control the relays, where <EXPORT#> is the dedicated GPIO number with the relays as listed in GPIO pinout

odroid@server:~$ echo <EXPORT#> | sudo tee /sys/class/gpio/export
odroid@server:~$ echo out | sudo tee /sys/class/gpio/gpio<EXPORT#>/direction
odroid@server:~$ echo <0|1> | sudo tee /sys/class/gpio/gpio<EXPORT#>/value
  • accessory/add-on_boards/relayboard.txt
  • Last modified: 2023/11/27 14:44
  • by tobetter