
The ComWinTop CWT-ULS is a non-contact ultrasonic level sensor that connects to TapHome via Modbus RTU over RS-485. The sensor measures distance to a liquid surface using ultrasonic pulses and calculates the liquid level based on a configurable mounting height. Two models are available: CWT-ULS-I-10M (integrated) and CWT-ULS-S-10M (split probe with cable).
The TapHome template exposes liquid level height, distance to surface, a built-in temperature sensor, and two virtual relays with configurable hysteresis thresholds. All register values use 32-bit IEEE 754 floating point encoding, each occupying two Modbus registers.
Hardware connection
Technical specifications
| Parameter | Value |
|---|---|
| Measurement range | 0.5–20 m |
| Blind area | 0.35–0.5 m |
| Accuracy | 0.5% |
| Resolution | 1 mm |
| Power supply | 12–28 VDC |
| Power consumption | < 0.6 W |
| Operating temperature | -40°C to +80°C |
| Protection rating | IP65 |
| Protocol | Modbus RTU Slave, RS-485 |
| Baud rate | 9600 (default), configurable 600–115200 |
| Thread | G2, diameter 60 mm |
RS-485 wiring
The sensor uses a 4-wire connection with color-coded cables:
| Wire color | Function | Terminal pair |
|---|---|---|
| Brown | Power + (12–28 VDC) | 05–06 |
| Black | Power - (GND) | 05–06 |
| Yellow/Green | RS-485 A+ | 01–02 |
| Blue | RS-485 B- | 01–02 |
Connect the RS-485 wires to TapHome:
- A+ (Yellow/Green) → A+/D+ on TapHome RS-485
- B- (Blue) → B-/D- on TapHome RS-485
The sensor also has two relay output terminals:
| Terminal pair | Function |
|---|---|
| 08–09 | Relay 1 output |
| 10–11 | Relay 2 output |
Blind area limitation
The sensor cannot measure distances shorter than 0.35–0.5 m from the sensor face (the blind area). Position the sensor so the maximum liquid level stays below this minimum distance.
Installation guidance
- Position the sensor away from tank inlets to avoid turbulence interference
- Avoid obstacles in the ultrasonic measurement cone
- Account for tank geometry — conical or spherical shapes may affect readings
- If the liquid surface has debris or turbulence, use a guide tube with a diameter greater than 120 mm
Configuration
Modbus RTU communication is always active on the RS-485 interface — no activation steps are required.
Slave ID and baud rate
The default Slave ID is 1 and the default baud rate is 9600 (8N1). Both can be changed via TapHome service actions on the module after the template is imported:
- Slave ID service action — writes H:20 (Float), range 1–254
- Baud rate service action — writes H:22 (Float), configurable 600–115200
The current Slave ID and baud rate are readable as module-level service attributes.
After changing the Slave ID or baud rate via service actions, the sensor will respond on the new address/speed immediately. Update the TapHome module connection settings to match.
Mounting height setup
To enable liquid level calculation, the mounting height (distance from the sensor face to the tank bottom) must be configured:
- Open the Liquid Level Height device in TapHome
- Go to service settings
- Use the Mounting height service action to set the installation height in meters (0–11 m)
Without a configured mounting height, the Liquid Level Height device displays a warning and returns 0. The Distance to Surface device continues to report the raw measured distance regardless of the mounting height setting.
Device capabilities
Level measurement
The template provides two complementary measurement devices:
Liquid Level Height (H:0 + H:10, Float) — calculated liquid level in meters. The sensor reads the display value from H:0 and the mounting height from H:10, returning the calculated level. If the mounting height is not set (H:10 = 0), a warning is generated and the value returns 0. The mounting height can be viewed as a service attribute and configured via a service action.
Distance to Surface (H:0 + H:10, Float) — distance from the sensor to the liquid surface in meters. When the mounting height is not set, this returns the raw display value. When the mounting height is set, it returns the inverse calculation (mounting height minus the display value).
Temperature sensor
- Temperature Sensor (H:2, Float) — built-in temperature sensor in °C. The sensor uses this value internally for ultrasonic sound velocity compensation, but it is also exposed as a readable temperature. Useful for monitoring the ambient temperature at the sensor location.
Relay outputs
The template exposes two virtual relays with hysteresis control:
- Relay 1 (H:0 vs H:28/H:30, Float) — activates or deactivates based on the measured distance crossing configurable ON and OFF thresholds
- Relay 2 (H:0 vs H:32/H:34, Float) — same logic as Relay 1 with independent thresholds
Hysteresis logic: The relay behavior depends on the relationship between the ON and OFF thresholds:
- If ON threshold < OFF threshold — the relay activates when the measured value drops below the ON threshold and deactivates when it rises above the OFF threshold. Use this for low-level alarms (e.g., activate pump when tank level is low).
- If ON threshold > OFF threshold — the relay activates when the measured value rises above the ON threshold and deactivates when it drops below the OFF threshold. Use this for high-level alarms (e.g., close valve when tank is nearly full).
Each relay has two service attributes showing the current ON and OFF thresholds in meters, and two service actions to configure them (range 0–10 m).
The relay thresholds operate on the raw display value (H:0), not the calculated liquid level. When configuring thresholds, consider whether the mounting height is set — the display value represents the calculated level when mounting height is configured.
Additional capabilities
The CWT-ULS sensor also exposes registers for supply voltage monitoring, cumulative operating time, liquid level vs. object level mode selection, measurement media type (Air, Water, Custom) for sound velocity calculation, measurement period, blind area configuration, and signal filtering levels (None, Rapid, Fast, Normal, Stable). The 4–20 mA analog output range can be calibrated via start/end point registers. These can be added in a future template update.
Troubleshooting
No Modbus communication
- Check RS-485 cables — verify A+ (Yellow/Green) is connected to A+/D+ on TapHome and B- (Blue) is connected to B-/D- on TapHome. Swapped wires are the most common cause of communication failure
- Verify power supply — the sensor requires 12–28 VDC on terminals 05–06
- Check Slave ID — default is 1. If changed via the sensor display or a previous Modbus write, ensure TapHome is configured with the matching address
- Confirm baud rate — default is 9600 baud, 8 data bits, no parity, 1 stop bit. Verify TapHome bus settings match
- Bus termination — for long cable runs or multiple devices, ensure proper RS-485 bus termination (120 Ω resistor at each end of the bus)
Liquid level shows 0 with warning
The mounting height has not been configured. Open the Liquid Level Height device → service settings → set the mounting height via the service action. The value must be greater than 0.
Unstable or erratic readings
- Check for obstructions — ensure the ultrasonic measurement cone is free of obstacles
- Reduce turbulence — if the liquid surface is agitated, consider using a guide tube (diameter > 120 mm) or adjusting the filtering mode via register H:70 (0=None through 4=Stable)
- Verify media type — if measuring through a medium other than air, the sound velocity setting (register H:54) may need adjustment
- Check blind area — if the target is closer than 0.35–0.5 m from the sensor face, measurements will be unreliable
