Controller
uni-PRO LF (Luckfox)| This page describes where to find the connections of the uni-PRO LF (Luckfox) controller and how to connect the serial interface RS485 and the RS232. The display and the relays are operated by the function block uni-PRO LF (Luckfox). |
Important: Work on mains voltage only by qualified personnel. Observe the safety instructions and the legal notices. The labels on the device and the data sheet of the delivered version take precedence over this description.
On the side with the two network sockets and the USB-A socket, the green 11-pole screw terminal for serial communication and the CAN bus is located below them. The terminals are numbered 1 to 11, terminal 1 is on the left.
| 1 – RS232 TX | Transmit line of the RS232 (output of the controller). |
| 2 – RS232 RX | Receive line of the RS232 (input of the controller). |
| 3 – SGND | Signal ground (SGND), next to the RS232 terminals. Reference ground for RS232 and CAN. |
| 4 – CAN L | CAN bus, line Low. |
| 5 – CAN H | CAN bus, line High. |
| 6 – SGND | Signal ground (SGND), next to the RS485/RS422 terminals. Reference ground for RS485/RS422 and CAN. |
| 7 – RS422 RB 8 – RS422 RA |
Receive pair of the RS422 (four-wire operation). With RS485 in two-wire operation, connect to terminals 9 and 10: 7 to 9 and 8 to 10, see Connecting RS485. |
| 9 – RS485 B (RS422 TB) 10 – RS485 A (RS422 TA) |
Data pair of the RS485 in two-wire operation. With RS422 it is the transmit pair. RS485 and RS422 share these terminals, the function results from the wiring. For RS485 the receive pair (terminals 7 and 8) is bridged in addition. |
| 11 – PE | Protective earth or connection for the cable shield. |
The RS485 works in two-wire operation: all participants are connected in parallel to the same line, only one transmits at a time. Example with a Modbus participant:
Note: The designations A and B are not used consistently by the manufacturers. If no connection is established although baud rate, parity and address are correct, swap A and B.
RS422: For four-wire operation, terminals 9 and 10 are wired as transmit pair and terminals 7 and 8 as receive pair, without the bridges. The description on this page applies to RS485.
The RS232 is a point-to-point connection. The lines are crossed: the output of the controller goes to the input of the remote station and vice versa.
| Terminal 1 (TX) | to RX of the remote station |
| Terminal 2 (RX) | to TX of the remote station |
| Terminal 3 (SGND) | to GND of the remote station |
The cable length is limited to a few meters. For an M-BUS, a level converter is required between the RS232 and the M-BUS line.
When the controller starts, the runtime sets up two accesses that the other controllers also have. Blocks with the selection Onboard therefore find the interface:
| RS485 | Modbus master and Modbus slave with connection Onboard. In the Lua script /dev/ttyONBOARD-485. |
| RS232 | M-BUS with connection Onboard. In the Lua script /dev/ttyONBOARD-232, for example sys_comm_open("/dev/ttyONBOARD-232","115200","8","1","N"). |
| Relays and supply | A second 11-pole terminal contains the two relays (one normally open and one normally closed contact each) and the voltage input 7 to 24 V DC. The assignment is printed on the device. The relays are switched by the function block uni-PRO LF (Luckfox). Switching capacity according to the manufacturer up to 10 A at 250 V AC or 30 V DC. |
| Network | Two network sockets with 10/100 Mbit/s. The setting Network settings in the Studio applies to the LAN port, the second port stays on DHCP, see uni-PRO LF (Luckfox). |
| USB | One USB-A socket for USB devices. A USB-C connection serves for the 5 V power supply and for installing the firmware. |
| USER and RESET | The USER button starts the mode for installing new firmware when switched on. RESET restarts the device; it can only be reached with a thin tool. |