Introduction
This manual provides detailed instructions for the Gauselink GL-A02 Ultrasonic Sensor Module. This versatile sensor is designed for accurate distance, water level, and flow measurement in various applications, including industrial automation, robotics, and DIY projects. It features multiple output types (UART, PWM, RS485, Switch) and robust IP67 protection for reliable performance in challenging environments.

Specifications
The GL-A02 Ultrasonic Sensor Module offers robust performance with the following key parameters:
| Parameter | Value |
|---|---|
| Serial No. | GL-A02 |
| Product Name | Ultrasonic Sensor Module with 2 probes (1 emitter and 1 receiver) |
| Detecting Range | 3~450cm, 1.2"~177" (Flat Object) |
| Blind Zone | 0 ~ 3cm (0~1.2") |
| Measurable Angle | Around 60° |
| Output Types | UART Automatic, UART Controlled, PWM Controlled, Switch, RS485 |
| Type of Output Connector | HY2.0-4P |
| Working Temperature | -15℃~60℃ |
| Working Humidity | Max. 80% RH |
| Working Voltage | 5~24V DC (RS485 version), 3.3~5V DC (others) |
| Working Current | <=15mA (RS485 version), <=8mA (others) |
| Standby Current | <5uA |
| Baud Rate | 9600 bits/second |
| Protection Level of Housing | IP67 |
| Certifications | CE (EMC Directive EN61000-6-1, IEC61000-4-2 standard) |

Features
- Strong Anti-interference: Designed for reliable operation in noisy environments.
- Fast Response: Provides quick and timely measurement data.
- Stable Output Data: Ensures consistent and dependable readings.
- Precise Measurement: High accuracy due to intelligent algorithms.
- Low Power Consumption: Efficient operation for extended use.
- Wide Operating Temperature: Functions reliably from -15℃ to 60℃.
- Small Blind Zone: Detects objects as close as 3cm (1.2 inches).
- IP67 Protection: Air-tightly sealed housing protects internal circuits from water and dust (for models with housing).
- Quality Manufacturing: Produced in an ISO9001 certified factory with strict testing and traceability codes.


Product Dimensions
The GL-A02 sensor module is compact and designed for easy integration. The connector type is HY2.0 that has 4 Pins.


Setup & Installation
Interface Definition
The HY2.0-4P connector has the following pin assignments:
| Pin # | Pin Name | Pin Description |
|---|---|---|
| 1 | VCC | Power Input |
| 2 | GND | Ground |
| 3 | RX / B | Receive Data / RS485 B-line |
| 4 | TX / A | Transmit Data / RS485 A-line |

Wiring for UART Automatic Output
For UART Automatic mode, connect VCC, GND, and TX. The RX pin is typically left idle. The TX terminal outputs distance data around every 100ms.

Wiring for UART Controlled Output
For UART Controlled mode, connect VCC, GND, RX, and TX. The RX pin receives a trigger pulse (falling edge) to initiate a measurement. The TX pin outputs the measurement data.

Wiring for RS485 Output
For RS485 output, connect VCC, GND, B, and A. Multiple RS485 sensors can be connected to a single host controller.

Operating Instructions
UART Automatic Output
In this mode, the sensor continuously measures and outputs distance data without requiring an external trigger. Connect the sensor's TX pin to the RX pin of your Micro-Controller Unit (MCU) or a serial port converter. The data is output approximately every 100ms.
Data Format:
| Frame data | Description | Byte |
|---|---|---|
| Frame header | Fixed to 0xFF | 1 byte |
| Data_H | High 8 bits of distance data | 1 byte |
| Data_L | Low 8 bits of distance data | 1 byte |
| SUM | Communication checksum | 1 byte |
Example: If Data_H = 0x07 and Data_L = 0x5F, the distance is calculated as (0x07 * 256) + 0x5F = (7 * 256) + 95 = 1792 + 95 = 1887mm.

UART Controlled Output
To trigger a measurement, send a falling edge pulse (or any serial port data) to the sensor's RX pin. The sensor will then perform one measurement and output the data via its TX pin. The trigger cycle must be greater than 70ms.
PWM Controlled Output
Send a falling edge pulse (0.1~10ms) to the RX pin to trigger a measurement. The TX pin will output a TTL level PWM high-level pulse width signal. The cycle period must be greater than 70ms. If no object is detected, the TX pin outputs a fixed pulse width of approximately 35ms.
Distance Calculation:
Formula: S = T₂ * V / 2
- S = Distance value (cm)
- T₂ = PWM high-level pulse width time (μs)
- V = Sound propagation speed in air (approx. 348m/s at room temperature)
Simplified formula: S ≈ T₂ / 57.5 (where S is in cm and T₂ is in μs).
Example: If T₂ = 10000μs, then S = 10000 / 57.5 ≈ 173.9cm.

Switch Output
The module measures distance every 100ms and compares it to a preset threshold (default 1.5 meters). The TX and RX pins output high or low TTL levels based on this comparison.
- If detected distance > threshold: TX outputs low level (VOL), RX outputs high level (VOH).
- If detected distance < threshold: TX outputs high level (VOH), RX outputs low level (VOL).
For stability, a change in state is confirmed after 3 consecutive readings below the threshold or 5 consecutive readings above the threshold.

The TX and RX leads provide signal levels only and do not have drive capability. For controlling external equipment, a relay module is required.

RS485 Output
The RS485 version uses the Modbus-RTU protocol with CRC-16 verification. The default Baud Rate is 9600bps, and the default sensor address is 0x01.
Communication Parameters:
- Data bit: 8
- Stop bit: 1
- Parity Check: None
- Default Baud Rate: 9600bps
Modbus Register Information:
| Status | Register Address | Function of Register | Data Type | Explanation |
|---|---|---|---|---|
| Read Only | 0x0100 | Processed Value | Unsigned Int, 16 bits | Measurement launched, distance value output (mm). Response time: 520ms. |
| Read Only | 0x0101 | Read-Time Value | Unsigned Int, 16 bits | Measurement launched, real distance value output (mm). Response time: 120ms. |
| Read Only | 0x0102 | Temperature | Signed Int, 16 bits | Unit: °C, resolution: 0.5°C, response time: 120ms. |
| Read & Write | 0x0200 | Client Address | Unsigned Int, 16 bits | Range: 0x00~0xFE, default 0x01, 0xFF is broadcast address. |
For detailed Modbus protocol format and communication examples (read/write values, change address, set baud rate), please refer to the provided documentation or contact Gauselink support.

Maintenance
The GL-A02 sensor module is designed for durability and requires minimal maintenance. For models with housing, the IP67 rating ensures protection against dust and water. Keep the sensor probes clean and free from obstructions to ensure accurate readings. Avoid exposing the sensor to extreme physical shock or corrosive chemicals.
Troubleshooting
- Q: How long can the sensor cable be extended?
- A: The maximum cable length depends on the output type:
- UART, IIC: Max. 3 meters
- PWM, Switch: Max. 5 meters
- RS485: Max. 50 meters
- Always allow for sufficient margin in your application.
- Q: What is the difference between UART Automatic and UART Controlled output?
- A: UART Automatic means the sensor automatically performs measurements and outputs data after power-on. UART Controlled means the sensor requires a trigger signal (falling edge) from a controller to perform each measurement. This allows for more precise control over when measurements occur.
- Q: How can I physically tell if the sensor is performing a measurement?
- A: In a quiet environment, if you place your ear close to the sensor, you may hear a faint "dick..." sound when it performs a measurement.
User Tips
- When using the Switch output version, if a specific threshold value other than the default 1.5 meters is needed, ensure to specify it during purchase or contact customer support for customization.
- For RS485 output, if you are using a USB converter, you might need to install a driver (e.g., for CH340 chip) on your computer. These drivers are typically available online.
- Consider using the sensor with a protective hood in environments with water condensation, spraying, or rain, as this enhances durability, though it may affect the detectable range and angle.
- The sensor's internal temperature reading is for reference in distance calculation, not for ambient air temperature measurement.
- The GL-A02 sensor supports development with micro-controller units (MCUs), Arduino, and Raspberry Pi. Look for community examples or Gauselink resources for integration.
Warranty & Support
Gauselink products are manufactured under ISO9001 certified processes, ensuring high quality and reliability. Each product undergoes strict testing and carries a unique traceability code.
For technical support, customization requests, or further inquiries, please contact Gauselink Official Store customer service. Our R&D team is available to assist with customization projects.
