The AJ-SR04M (New Version) is a robust, industrial-grade waterproof ultrasonic distance sensor module designed for harsh environments where standard sensors would fail. Unlike conventional ultrasonic sensors with exposed transducers, the AJ-SR04M features a completely sealed, waterproof probe connected via a generous 2.5-meter cable to a dedicated control board. This allows the sensing head to be mounted in damp, humid, or dusty areas — such as rainwater tanks, outdoor robotic platforms, or automated parking systems — while keeping the control circuit safely housed in a dry location.
The New Version builds on the proven AJ-SR04M platform with refinements to the control board layout and component selection, offering improved stability and consistency across production batches. It maintains full backward compatibility with existing code and wiring for Mode 1 (HC-SR04-compatible) operation.
Utilizing non-contact ultrasonic detection technology operating at 40kHz, the module provides stable and accurate readings. It reliably detects planar objects from as close as 20cm up to 800cm (8 meters) under optimal conditions, with a precision resolution down to 1mm to 3mm. The module’s wide operating voltage of 3V to 5.5V DC makes it compatible with both 3.3V (ESP32, Raspberry Pi) and 5V (Arduino) microcontrollers, eliminating the need for level shifters in most cases.
One of the AJ-SR04M’s most distinctive features is its versatile operation with 5 different modes, configurable via the ‘R19’ resistor pads on the control board:
-
Mode 1 (R19 Open): Default factory mode. Operates identically to the classic HC-SR04 using standard Trigger (10µs pulse) and Echo pulses.
-
Mode 2 (R19 = 300kΩ): Low Power Mode. Ideal for battery-operated devices needing minimal current draw.
-
Mode 3 (R19 = 120kΩ): Automatic Serial Port Mode. Board continuously outputs measured distance over the TX pin at 9600 baud.
-
Mode 4 (R19 = 47kΩ): Low Power Serial Port Mode. Module sleeps until it receives a trigger byte, measures, reports distance, and returns to sleep.
-
Mode 5 (R19 = 0Ω / Bridged): Computer Printing Mode / Continuous Serial output mode.
The ultra-low standby current of under 2mA (and as low as 20µA in certain low-power modes) makes it an excellent choice for battery-powered and energy-conscious applications. The single fully enclosed transducer handles both sending and receiving, simplifying installation and protecting the sensor from water and dust ingress.
The AJ-SR04M is widely used in rainwater harvesting systems, water tank level monitoring, outdoor robotic obstacle avoidance, automated irrigation, smart parking management, and industrial control applications. Its robust design and reliable performance make it a superior alternative to the standard HC-SR04 for any project that requires durability and weather resistance.
Features
-
Industrial-grade waterproof probe — Sealed transducer and cable designed for wet, humid, and harsh environments
-
2.5-meter cable length — Allows the sensing head to be mounted remotely from the control board
-
Wide 8-meter detection range — Measures from 20cm up to 800cm (8m) under optimal conditions
-
High accuracy and resolution — 1mm to 3mm precision for reliable distance measurement
-
Wide operating voltage — 3V to 5.5V DC, compatible with 3.3V and 5V microcontrollers
-
Five selectable operating modes — Configurable via the R19 resistor pads for GPIO, UART, and low-power applications
-
Ultra-low standby current — Under 2mA standby, with low-power modes down to 20µA
-
Integrated waterproof transducer — Single enclosed probe handles both transmission and reception
-
No level shifting required — Works directly with both 3.3V and 5V logic systems
-
New Version refinements — Improved control board stability and consistency
Technical Specifications
Usage
Getting Started
-
Connect power — Supply 3V to 5.5V DC to the VCC pin and GND to ground. The module is compatible with both 3.3V and 5V systems.
-
Select operating mode — Configure the R19 resistor pads on the control board to select your desired mode (1–5). Mode 1 (R19 open) is the default HC-SR04-compatible mode.
-
Connect trigger and echo (Mode 1/2) — In GPIO modes, connect the Trig pin to a digital output and the Echo pin to a digital input on your microcontroller.
-
Connect UART (Mode 3/4/5) — In serial modes, connect the module’s RX (Trig) to your microcontroller’s TX and TX (Echo) to your microcontroller’s RX. Configure the UART at 9600 baud, 8-N-1.
-
Send a trigger pulse (Mode 1/2) — Set the Trig pin HIGH for at least 10µs to initiate a measurement.
-
Read the echo pulse (Mode 1/2) — Measure the duration of the HIGH pulse on the Echo pin. The distance is calculated as: Distance (cm) = Echo pulse duration (µs) / 58.
Operating Modes (R19 Resistor Configuration)
Pin Connections
Example Arduino Code (Mode 1 — GPIO)
#define TRIG_PIN 9
#define ECHO_PIN 8
void setup() {
Serial.begin(9600);
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
}
void loop() {
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
long duration = pulseIn(ECHO_PIN, HIGH);
float distance = duration / 58.0;
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
delay(100);
}
Typical Applications
-
Rainwater harvesting systems — Water tank level monitoring in damp environments
-
Outdoor robotics — Obstacle avoidance in wet, dusty, or harsh conditions
-
Automated irrigation — Soil or water level detection for smart farming
-
Smart parking systems — Vehicle proximity detection for parking management
-
Industrial control — Reliable distance sensing in demanding environments
-
Human height measurement — Accurate detection of human presence (20cm–250cm range)
Notes for Business Buyers
-
Industrial-grade construction — Waterproof probe and 2.5m cable suitable for demanding environments
-
Five operating modes — One module adapts to GPIO, UART, and low-power applications, reducing inventory SKUs
-
Wide voltage compatibility — Works with both 3.3V and 5V systems without level shifting
-
New Version refinements — Improved control board stability and batch consistency
-
Suitable for bulk purchasing — Ideal for water management system manufacturers, outdoor robotics integrators, and educational institutions
Q: What is the AJ-SR04M Waterproof Ultrasonic Sensor used for?
It is a robust, waterproof distance sensor designed for harsh environments, used in rainwater harvesting systems, outdoor robotics, automated irrigation, smart parking, and industrial control applications.
Q: What is the difference between the AJ-SR04M and HC-SR04?
The AJ-SR04M has a waterproof, enclosed probe connected via a 2.5m cable, operates on 3V–5.5V, and supports 5 selectable operating modes including UART. The HC-SR04 has an exposed transducer, operates only on 5V, and supports only basic trigger/echo.
Q: What is the difference between the New Version and the standard AJ-SR04M?
The New Version features an improved control board layout and refined component selection for better stability and batch consistency. It maintains full backward compatibility with existing code and wiring.
Q: What is the detection range and accuracy?
The detection range is 20cm to 800cm (8 meters) with a resolution of approximately 1mm to 3mm under optimal conditions.
Q: How do I switch between the different operating modes?
The module uses the R19 resistor pads on the control board. Solder the appropriate resistor value (or leave open) to select Mode 1–5. The mode selected must match the configuration in your software.
Q: What voltage does the module require?
The AJ-SR04M operates from 3V to 5.5V DC, making it compatible with both 3.3V and 5V microcontrollers without level shifting.
Q: Is the module truly waterproof?
The probe and cable are waterproof and suitable for damp or wet environments. However, the control board is not waterproof and must be kept in a dry location.
Q: Can I use this module with an ESP32?
Yes. The AJ-SR04M works directly with 3.3V logic, and there are dedicated ESP-IDF driver components available for easy integration.
Q: What is the minimum detection distance?
The blind zone (dead zone) is less than 20cm. Objects closer than 20cm may not be reliably detected.
Q: Can I purchase in bulk for a product development project?
Yes. This module is suitable for both individual users and business purchasing, including water management system manufacturers, outdoor robotics integrators, and educational institutions.