Item specifics
Description
AJ-SR04M Product Overview
The AJ-SR04M is an integrated transceiver waterproof ultrasonic distance measurement module featuring a 40kHz waterproof probe with a 1.2‑meter cable. It operates on DC 3.0-5.5V with <8mA current consumption. Maximum range is 600cm, minimum 20cm, with far‑field accuracy of ±1cm and 1mm resolution. The detection angle is 75°. The module supports three operating modes selected via resistor R27: Mode 1 (pulse width output, compatible with HC‑SR04 timing), Mode 2 (continuous serial output at 9600bps, 100ms interval), Mode 3 (command‑triggered serial output, send 0x55 to initiate a measurement). Dimensions are 42×29×12mm, operating temperature -20℃ to +70℃. Ideal for reverse radar, robot obstacle avoidance, liquid level detection, smart cars, and security applications.
Core Features
Integrated Waterproof Transducer: Combined emitter/receiver, IP‑rated waterproof design – suitable for outdoor or dusty environments (reverse radar, water level monitoring)
Wide Voltage Operation: DC 3.0-5.5V, compatible with both 3.3V (ESP32/STM32) and 5V (Arduino) systems – no level shifting needed
Ultra‑Low Power: Operating current <8mA – lower than traditional HC‑SR04 (≈15mA), ideal for battery‑powered devices
Long Range & High Accuracy: Max 600cm (6m), min 20cm, far‑field accuracy ±1cm, resolution 1mm – suitable for both close obstacle avoidance and long‑range level sensing
Three Switchable Operating Modes: Mode selection via resistor R27: open = pulse width mode (Trig/Echo timing); 47kΩ = continuous serial output (9600bps, 100ms period); 120kΩ = command‑triggered serial output (send 0x55, get one frame). Flexibility to match different MCUs and developer preferences
Fast Timeout Protection: Echo returns low automatically after 60ms if no obstacle is detected – prevents program hang
LED Operation Indicator: Not a power LED – lights only when a trigger is received, providing visual feedback of active measurement
Compact & Robust: 42×29×12mm, blue PCB, 1.2m cable for flexible installation
Applications
Reverse Radar / Parking Sensor: Mounted on car bumpers to detect rear obstacles and trigger alarms
Robot Obstacle Avoidance: Forward‑facing obstacle detection for smart cars or robots
Liquid / Bulk Level Detection: Non‑contact level measurement for water tanks, oil drums, silos – waterproof probe is ideal
Smart Home: Proximity sensing, automatic door triggers, bin full detection
Industrial Automation: Workpiece positioning, distance measurement, collision avoidance
Security Detection: Intrusion detection, area monitoring
Key Advantages
Waterproof Probe for Harsh Environments: Integrated waterproof design protects against rain, humidity, dust – perfect for outdoor applications (reverse radar, outdoor level sensors)
Three Modes for Ultimate Flexibility: Pulse mode compatible with existing HC‑SR04 code; continuous serial mode eliminates timing complexity; command mode allows on‑demand measurement to save power. One module serves all development stages
Wide Voltage & Low Power: 3.0-5.5V, <8mA – can be powered directly by a 3.3V MCU or battery, extending portable device runtime
Long Range & High Precision: 6m max range, ±1cm accuracy, 1mm resolution – covers everything from close obstacle detection to far liquid level monitoring
Good Noise Immunity: 40kHz ultrasonic frequency; 60ms timeout prevents MCU lock‑up if no echo is received
Long Cable for Remote Mounting: 1.2m pre‑attached cable allows sensor to be placed away from the main PCB – ideal for reverse radar installations or above‑tank placement
Mature Open Source Ecosystem: Pulse mode works with Arduino Ultrasonic/NewPing libraries; serial mode is straightforward. Extensive community examples for quick start
High Value: Cost‑effective alternative to expensive industrial ultrasonic sensors, while offering waterproofing and multiple output modes
Why Choose QIXINWEI
Years of experience in the electronics industry. Trusted by global customers.
Massive In-Stock Inventory – Ready to ship promptly
BOM Matching Service – One-stop solution, save time
PCBA Customization – Professional engineering team creates tailor-made solutions based on your needs
Cost-Effective & Efficient – Better channel, better cost
A dedicated team makes your procurement smoother.
Contact us for BOM quotes or PCBA inquiries
FAQ:
What is the AJ‑SR04M ultrasonic distance sensor and its key features?
The AJ‑SR04M is an integrated waterproof ultrasonic distance sensor module. It combines a waterproof transducer, driver, and signal processor in one compact unit. Key specifications include: operating voltage 3 V – 5.5 V, measuring range 20 cm to 600 cm, ±1 cm accuracy, and dual output modes — serial UART (9600 bps, 8N1) and pulse‑width (PWM). It is widely used for reverse parking sensors, liquid level measurement, robot obstacle avoidance, and outdoor distance monitoring.
How does the AJ‑SR04M differ from the traditional HC‑SR04 ultrasonic sensor?
While the HC‑SR04 requires separate Trig/Echo pins and manual pulse generation, the AJ‑SR04M integrates an onboard MCU that automatically performs measurements and outputs data via UART or PWM. The HC‑SR04 is not waterproof and typically works only up to 400 cm indoors; the AJ‑SR04M’s sealed transducer is fully waterproof, making it suitable for outdoor and harsh environments. Additionally, the AJ‑SR04M supports wider voltage (3–5.5 V) and delivers data continuously without the host having to trigger each measurement cycle.
How to connect the AJ‑SR04M to an Arduino or ESP32?
It is very simple. For UART mode, connect: VCC → 3.3 V or 5 V, GND → GND, TX (sensor) → RX (Arduino/ESP32). By default, the sensor outputs distance data at 9600 bps every 100 ms. For PWM mode, connect the sensor’s PWM output to a digital input pin and measure the high‑pulse width. No external trigger pin is needed — the sensor works autonomously once powered.
What is the UART serial output format of the AJ‑SR04M?
The sensor sends a 4‑byte frame at 9600 baud, 8 data bits, no parity, 1 stop bit. The frame structure is: Header (0xFF), Data_H, Data_L, Checksum. The distance in millimeters is calculated as (Data_H * 256 + Data_L). The checksum is the lower 8 bits of the sum of the first three bytes. For example, if you receive 0xFF 0x07 0xA8 0xAE, the distance is 0x07A8 = 1960 mm (196 cm). This active serial output makes it plug‑and‑play with any microcontroller that has a UART.
How does the PWM output mode work on the AJ‑SR04M?
In PWM mode, the sensor outputs a pulse where the high‑level duration is proportional to distance. The relationship is: Distance (mm) = Pulse Width (µs) / 58. For example, a 5.8 ms (5800 µs) pulse corresponds to 100 mm, and a 58 ms pulse corresponds to 1000 mm. This mode mimics the classic HC‑SR04 timing and is useful when only a digital input pin is available.
What is the maximum range and accuracy of the AJ‑SR04M?
The sensor can measure from 20 cm (blind zone) up to 600 cm (6 meters). The accuracy is typically ±1 cm under stable conditions. Performance depends on the target surface: hard, flat surfaces (e.g., a wall) return the strongest echo, while soft or angled surfaces reduce range. The beam angle is approximately 15 degrees, so the sensor should be pointed directly at the target.
Is the AJ‑SR04M truly waterproof? Can it be submerged?
The transducer head is completely sealed and waterproof (IP67 rated), meaning it can withstand rain, splashing, and even brief submersion. However, the electronics module (the black box with the cable) is not waterproof and must be placed inside a protected enclosure. This design allows the sensor to be mounted outdoors or in liquid tanks while keeping the sensitive circuitry dry.
Can I use multiple AJ‑SR04M sensors together without interference?
Yes, but crosstalk can occur if sensors operate on the same frequency and their beams overlap. To reduce interference, space the sensors at least 20 cm apart and angle them away from each other. For UART mode, each sensor outputs data autonomously; you can read them on separate UART channels or use a multiplexer. For PWM mode, trigger the sensors sequentially with a small delay. Some users also place an opaque shield between adjacent sensors to block direct ultrasonic crosstalk.
What are the most typical applications of the AJ‑SR04M?
Thanks to its waterproof design and simple output, the AJ‑SR04M is widely used in reverse parking radar, water/liquid level monitoring (tanks, wells), robot obstacle avoidance, automatic door distance sensing, trash bin fill‑level detection, and outdoor parking space management. Its 3–5.5 V supply and UART output make it very easy to integrate with microcontrollers and single‑board computers.
Why does my AJ‑SR04M sometimes give wrong readings or not respond?
Common causes include: power supply noise — add a 100 µF electrolytic capacitor near the sensor’s VCC/GND; obstructed or angled transducer — ensure the sensor is pointing directly at a flat, hard surface; target within the 20 cm blind zone; echo from soft materials (e.g., foam or cloth) that absorb ultrasound; and serial baud rate mismatch — make sure your UART is set to 9600 bps. In PWM mode, ensure the pin is configured as an input with no pull‑up or pull‑down that could distort the signal.