CM3-Home

RS-485 interface

The RS485 is commonly used to connect DMX512, Modbus or generic RS485 serial devices.

What is a RS485 ? What is a DMX512 ? What is a Modbus ?

Two RS485 lines are available on CM3-Home model Full and one on the model Basic. The lines are opto-isolated from the CPU and available on screw terminals as shown below.

How to use the RS485 ports

The ports are visible by Linux on /dev/ttyUSB0 (left port) and /dev/ttyUSB2 (right port) and can be managed by software like any other serial line. The DE signals required to get the bus are managed by the hardware on FTDI FT4232 chip.

Python example

Send and receive chars on the right RS485 port. To do the same on the left port change /dev/ttyUSB2 with /dev/ttyUSB0.

#!/usr/bin/python
import serial
import time

ser = serial.Serial(
    port='/dev/ttyUSB2',
    baudrate=115200,
    timeout=1,
    parity=serial.PARITY_NONE,
    stopbits=serial.STOPBITS_ONE,
    bytesize=serial.EIGHTBITS
)
ser.flushOutput()
ser.flushInput()

rx_counter=0
tx_counter=0
while True:
    tx_counter=tx_counter+1
    ser.write("Tx counter = %d | Rx counter = %d\n\r" % (tx_counter,rx_counter))
    print("Tx counter = %d | Rx counter = %d" % (tx_counter,rx_counter))

    a=ser.read(1)

    if a:
        rx_counter=rx_counter+1
        ser.write("Tx counter = %d | Rx counter = %d | Received: %s %02x\n\r" % (tx_counter,rx_counter,a,ord(a)))
        print("Tx counter = %d | Rx counter = %d | Received: %s %02x" % (tx_counter,rx_counter,a,ord(a)))

eShop

EUR 130.00


CM3-HOME-B - CM3-Home board basic (only mother board)

CM3-Home is a Raspberry Pi Compute Module 3 motherboard designed to provide a reliable Home Automation hardware equipped with a wide range of electrical interfaces

  • NOT INCLUDED:
    • TP-BUS, LIGHT-BUS, RS485 (one instead of two), Yarm 868 MHz radio module (available on CM3-HOME-F)
    • Wifi module (Product # WIFI-2) amd antenna (Product # AN-WIFI-01)
    • The Raspberry Compute Module 3 or 3L (Product # CM3L)
    • MicroSD (Product # MICROSD8G-E)
    • Case (Product # CM3-HOME-CASE)
| Product description || CM3-Home catalog |

EUR 290.00


CM3-HOME-F - CM3-Home board full (only mother board)

CM3-Home is a Raspberry Pi Compute Module 3 motherboard designed to provide a reliable Home Automation hardware equipped with a wide range of electrical interfaces

  • NOT INCLUDED:
    • Raspberry Compute Module 3 or 3L (Product # CM3L)
    • Yarm antenna (Product # YARM-ANT-01)
    • Case (Product # CM3-HOME-CASE)
    • MicroSD (Product # MICROSD8G-E)
  • Included:
    • WiFi module (Product # WIFI-2)
    • WiFi antenna (Product # AN-WIFI-01)

For more info please visit the product description page

| Product description || CM3-Home catalog |

Author: Sergio Tanzilli - tanzilli@acmesystems.it
System designer and CEO of Acme Systems srl
Web master of: https://www.acmesystems.it and http://www.tanzolab.it
Software developer on: https://github.com/tanzilli and https://github.com/acmesystemsss