Modbus RS485 implementation using UART1 and TTL module
-
Has anyone tried Modbus 485 using https://www.sparkfun.com/products/10124
this TTL module?
Need help.
TIA.
-
the RS485 converter will need 3 main connections
- Tx
- Rx
- Data Enable
you will need to set DE pin high and low based on data read write operation. To make the communication reliable you will need to use interrupts.
you can look into this product as well
RS485 UART converter
this one has an on board processor which will do all the data interpretation for you and you will communicate with this device just like a UART device and it will convert the data into RS485 and during the read operation, it will convert data from RS485 to UART.
Thanks
-
Thank you for the hardware details..but what about software integration?
In python?
-
it will connect to onion omega uart. and you will read write data on uart and it will get converted in rs485.
omega serial communication
You can use pyserial as well.
opkg python-pyserial
learn more about pyserial
-
@Tushar-Borhade said in Modbus RS485 implementation using UART1 and TTL module:
..but what about software integration?
In python?MinimalModbus is an easy-to-use Modbus RTU and Modbus ASCII implementation for Python with very good documentation.
You should install (after an
opkg update
)
opkg install python
opkg install python-pyserial
opkg install python-pip
pip install minimalmodbus
Good luck!