News Center
—— NEWS CENTER ——
Xi'an Shenghongchuang Instrument Co., Ltd.
Contact: Mr. Zhang
Mobile: 15529283736
Email: shc-sensor@qq.com
Address: Fortune Building, Sanqiao Street, Xixian New Area, Xi'an, Shaanxi Province
Mastering RS232 level sensor wiring methods is key to ensuring stable upload of level data and reliable operation of automated control. RS232 communication is commonly used for data transmission between small storage tanks, equipment water tanks, test devices, dosing systems, field instruments, and host computers. It features intuitive interfaces, convenient commissioning, and relatively low maintenance costs.
Xi'an Shenghongchuang Instruments Co., Ltd., supported by the production base of Shaanxi Qinkong Sensor Technology Co., Ltd., provides products such as level transmitters, pressure transmitters, flow meters, and intelligent digital display control instruments for industrial automation applications. For level sensors with RS232 output, correctly identifying power wires, signal wires, and communication parameters is more important than simply connecting the wires.
Before actual wiring, first verify the product nameplate, wiring definition diagram, and ordering technical agreement. The cable colors of level sensors with different measuring ranges, power supply methods, and enclosure interfaces may not be completely consistent. On site, do not directly connect red, black, or other colored wires to the equipment terminal based solely on experience.
RS232 is a serial communication interface. Common core terminals are TXD, RXD, and GND. TXD is the sensor data transmission terminal, RXD is the sensor command reception terminal, and GND is the communication reference ground. If the sensor supports only one-way data upload, some models may provide only TXD and GND.
When connecting to a computer, PLC serial port module, or serial device server, follow the “cross connection” principle: connect the sensor TXD to the RXD of the host device, the sensor RXD to the TXD of the host device, and reliably connect the GND of both sides. Directly connecting terminals with the same names, such as TXD to TXD and RXD to RXD, will usually prevent data reception.
RS232 signals generally operate at voltage levels of ±3V to ±15V, which differ from TTL levels. If the controller provides a 3.3V or 5V UART interface, it cannot be directly connected to an RS232 level sensor. An RS232-TTL level conversion module should be added to avoid communication abnormalities or interface damage.
The communication distance is generally recommended to be kept within 15m. In industrial sites, if the cable length exceeds 10m and there are variable frequency drives, motors, or high-power contactors nearby, shielded twisted-pair cable is recommended, and the communication cable should avoid areas where it is laid parallel to power cables.
Common power supply specifications for level sensors are DC 12V and DC 24V, while wide-voltage models may support DC 9V to 36V. The supply voltage should comply with the product specifications. Voltage fluctuation of a DC 24V industrial power supply is recommended to be controlled within ±10% of the rated value to reduce the likelihood of sampling drift and communication interruption.
Four-wire or five-wire products usually separate power supply and RS232 communication, with four basic connection points such as V+, GND, TXD, and RXD. Some products also include a shielding layer, programming wire, or backup analog output. Installation personnel should follow terminal markings rather than infer functions from the number of wire cores.
The sensor power negative terminal and communication ground can be shared in most products, but complex systems should be checked for isolation design. For non-isolated RS232 interfaces, poor common grounding among multiple devices may introduce ground-loop interference, resulting in garbled data, intermittent disconnection, or fluctuating level readings.
After wiring is complete, power on for inspection. Use a multimeter to confirm that the voltage between V+ and GND is normal, and ensure there is no reverse connection, short circuit, or accidental connection of the shielding layer to the power supply. It is recommended to first complete no-load power-on and serial data testing before formally putting the sensor into liquid measurement service.
Step 1: Switch off the power supply and confirm that the storage tank, vessel, or installation location meets safe working conditions. If the measured medium is corrosive liquid, high-temperature liquid, or flammable media, first follow site safety procedures and avoid installing or removing the sensor under pressure, while energized, or where leakage risks exist.
Step 2: Connect the sensor V+ to the positive terminal of a stable DC power supply and connect GND to the negative terminal of the power supply. Step 3: Connect the sensor TXD to the RXD terminal of the computer serial port, USB-to-RS232 module, or PLC serial port module, and then connect the sensor RXD to the corresponding TXD terminal.
Step 4: Connect the communication ground to the GND terminal of the host device. For DB9 interfaces, in the common PC-side DB9 female connector pin definition, pin 2 is RXD, pin 3 is TXD, and pin 5 is GND. When using a USB-to-serial device, first check the converter manual to confirm the port definition.
Step 5: Check whether terminal crimps are secure and whether adequate slack is reserved at cable outlets. When installed on vibrating equipment, mobile equipment, or in outdoor environments, connectors with locking structures are recommended, along with waterproofing and pull-out protection at the sensor cable entry point.
When connecting a level sensor to a PLC, prioritize a communication module with a true RS232 interface. The PLC program should configure the read cycle according to the sensor communication protocol, for example, reading once every 500ms or 1s. For tanks with slow level changes, an excessively high sampling frequency will not significantly improve control performance.
When connecting a level sensor to an industrial computer, serial port debugging software can be used first to verify raw data. After confirming that the data format, address code, level value, unit, and check bits are correct, connecting it to configuration software, an MES system, or a remote monitoring platform can reduce subsequent troubleshooting workload.
For applications involving centralized acquisition from multiple sensors, RS232 is not suitable for directly forming a multipoint bus. If 8, 16, or more field instruments need to be managed simultaneously, a multi-port serial server, RS232-to-RS485 device, or level transmitter supporting a bus protocol should generally be selected according to the project architecture.
The shielding layer is generally recommended to be grounded at one end only, preferably at the functional ground terminal on the control cabinet side, to prevent an interference loop caused by grounding both ends. The actual grounding method should also be determined based on the site electromagnetic environment, sensor isolation structure, and control system grounding specifications.
After completing the hardware connection, communication parameters need to be set in the host computer or PLC. A common configuration includes a baud rate of 9600bps, 8 data bits, 1 stop bit, and no parity, namely “9600, 8, N, 1”. However, these are only common parameters; the specific settings should still be based on the technical documentation for the corresponding Shenghongchuang model.
Some level sensors can be set to 4800bps, 19200bps, or 115200bps, and may also use even parity, odd parity, or a fixed device address. If any one of the baud rate, parity method, or stop bit settings does not match, the receiving end may display garbled characters or no data at all.
A data frame generally consists of a start bit, address, function code, measured value, and check field. Some models actively upload level data periodically, while others require the host computer to send a read command. During commissioning, confirm whether the product uses an “active reporting” or “query-response” mode to avoid misjudging equipment faults.
For initial verification, place the level sensor at a known level position, such as an empty tank, half-full tank, or standard level point, and compare the displayed value with the actual height. If the measuring range is 0m to 5m and the actual level is 2.50m, the communication data should basically match the converted measured value, and the allowable error should comply with the accuracy grade of the model.
First, check whether the power supply is normal. Measure the voltage at the sensor wiring terminals with a multimeter rather than only checking the power indicator light. With long-distance wiring or poor terminal contact, a normal display at the power supply terminal does not mean that the actual voltage at the sensor terminal meets the startup requirement.
Next, check whether TXD and RXD are cross-wired. When RS232 communication has no data, wiring sequence issues occur frequently. After powering off, recheck the terminal numbers and confirm that the USB-to-RS232 module is not a TTL serial port module; they look similar but have different electrical standards.
Then check whether the COM port selected in the serial port software is correct. When multiple USB devices are connected to a computer, the system may assign different ports such as COM3, COM5, or COM8. Confirm the actual port number in Device Manager and close any configuration software or background programs that may be occupying the serial port.
If all the above items are normal, confirm whether the sensor requires an external query command. For response-type products, simply opening the serial port monitoring window will not automatically display data. The corresponding read command must be sent according to the communication protocol, and the device address and checksum in the command must be checked.
Garbled characters are usually related to inconsistent baud rate or parity settings. Parameters such as 9600bps and 19200bps should be checked one by one rather than repeatedly changing only one setting. After communication parameters are confirmed, the impact of long-distance interference can be eliminated by shortening the test cable.
When level readings fluctuate frequently, check the sensor installation condition in addition to the communication circuit. Submersible level sensors should avoid having the probe close to the tank bottom or suspended in areas of strong liquid flow or pump outlet impact. Non-contact products such as ultrasonic sensors should avoid agitator blades, foam, and areas with obvious echo interference.
If data is stable but the deviation is large, the investigation should generally begin with measuring range settings, zero reference, medium density, and installation height. When measuring oil level, oil density differs from water; when measuring the level in a sealed vessel, consideration should also be given to whether pressure conditions require a differential-pressure level measurement solution.
For high-temperature, high-pressure, corrosive, or strong electromagnetic interference conditions, the medium, temperature, pressure, measuring range, installation method, and output protocol should be clearly defined during the selection stage. Shenghongchuang can provide level transmitters, matching display control instruments, and non-standard customized solutions based on on-site measurement point requirements, reducing subsequent wiring and compatibility risks.
Before formal commissioning, record the sensor model, serial number, measuring range, supply voltage, serial port parameters, installation location, and initial calibration data. For a level measurement point with a 0m to 10m range, at least 3 data points near empty level, 50% of range, and full scale can be recorded for subsequent maintenance comparison.
The control system should set reasonable data refresh, abnormality judgment, and alarm thresholds. For example, if the tank level is not updated continuously for 5s, the value exceeds the upper measuring range limit, or communication verification fails 3 consecutive times, a communication abnormality alert can be triggered to avoid directly using distorted data for interlock control.
Wiring terminals, shielding layers, and power modules should be included in regular inspections. For sites with humidity, heavy dust, or significant vibration, it is recommended to inspect cable fastening and connector sealing every 3 months; for critical process level points, periodic calibration should be arranged in accordance with the production schedule.
If you need to confirm the terminal definition, communication protocol, measuring range configuration, or on-site anti-interference solution for a specific RS232 level sensor, you may provide the actual medium, tank height, power supply conditions, control equipment model, and installation photos. Shenghongchuang technical personnel can assist with targeted product selection and wiring confirmation.
Related Recommendations