The shipping fee depends on your address
Standard: 9-15 business days,fee is down to $3.99
Express: 4-7 business days,fee is down to $5.99
WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.
If you're looking for a custom product, we can help. Kindly contact us via email support@keszoox.com and send us the details for your need, then we'll let you know how we can deliver the right solution.We make into production usually Within 1 - 3 Bussiness Days.
Expect customization orders.For outdoor or other applications that may encounter moisture
The JSN-SR04T Waterproof Ultrasonic Range Finder uses ultrasonic waves to detect the presence of and measure the distance to objects in front of it. The V3.0 is the latest version of the module with additional measurement modes available over earlier versions.
The JSN-SR04T is very similar to the standard ultrasonic modules like the HC-SR04 with the exception that it uses a single waterproof transducer instead of two and it also provides more methods for interfacing to a microcontroller.
Because the transducer is waterproof, it can be used for indoor or outdoor sensing such as providing a car parking sensor, security alarm, obstacle avoidance or monitoring the water level is water storage tanks,
Like any ultrasonic sensor that depends on sound waves bounding off an object to detect it, it is able to detect hard objects quite well including the surface of calm water, but detection of soft fabrics or other sound absorbing material is less consistent and empirical testing may be required to determine suitability for a particular application.
Because these modules use sound waves for detection, they are not sensitive to light sources or optically reflective surfaces like IR can be. In addition, because sound travels relatively slowly it is possible to measure the time that it takes for the sound to travel to the object and be echo’d back and therefore the distance to the object can be calculated with a fair amount of accuracy which can be quite handy.
The detection and measurement range is from 23 cm up to 600 cm which is about 9″ to 20 feet with a stated accuracy of 1cm. The ultrasonic sound is pulsed at 40 kHz and is not audible to the human ear.
If an echo is not returned (no object detected), the module will timeout after a fixed delay. This is required to prevent the module from hanging if there is no return echo.
Ping mode works the same basic way as the HC-SR04, HY-SRF05, US-100 and other ultrasonic modules. The main difference is that the JSN-SR04T requires a longer 20uS TRIG pulse for stable readings. It also can run Ping mode in an automatic mode of operation where it is automatically triggered every 200mS.
The way Ping mode works is as follows:
Serial mode operates at 9600 baud and works similar to serial mode on the US-100 module. The main difference is that it also returns a start byte and checksum byte. It also can be operated in an automatic mode of operation where the module is automatically triggered every 100mS.
The way Serial mode works is as follows:
The returned value can be calculated using the formula (MSB * 256) + LSB.
The checksum byte is calculated using 0xFF + MSB + LSB. It returns the least significant byte of the calculation only.
The module can operate in 6 different modes of operation using either the Ping or Serial mode of operation. These are set by shorting the M1 or M2 pads or placing a resistor of a certain value across the MODE pads. The resistor value sets an analog voltage that is read by an ADC, so the exact value isn’t overly critical.
Mode 0 and Mode 2 are the most commonly used modes.
MODE 0: Ping Mode
Mode 0 is the default mode when there is no resistor on the MODE pads and neither M1 or M2 pads are shorted and is how the module is shipped.
In this mode, the module operates very similarly to the HC-SR04 and similar ultrasonic range finder modules and sample code for those modules can be used with this module with one exception. With the HC-SR04, the trigger pin is held high for 10uS. With the JSN-SR04T, the trigger pin must be held high longer – usually about 20uS for reliable operation. The first test program below uses this mode.
MODE 1: Automatic Serial Mode
To enter Mode 1, the M1 pads are shorted OR a resistor value of 47K is placed across the MODE pads.
In this mode the module continuously takes measurements approximately every 100mS and outputs the distance on the TX pin at 9600 baud where it can be read using a serial RX pin on an MCU.
MODE 2: MCU Controlled Serial Mode
To enter Mode 2, the M2 pads are shorted OR a resistor value of 120K is placed across the MODE pads.
This mode is the same as Mode 1 except that the module takes a measurement only when a trigger command of 0x55 is sent to the RX pin on the module. The module then takes a single measurement and outputs the distance on its TX pin.
The minimum trigger cycle time is 60mS
MODE 3: Automatic Ping mode
To enter Mode 3, a resistor value of 200K is placed across the MODE pads.
Mode 3 is similar to Mode 0 (ping mode) except that it automatically generates the ping every 200mS and outputs a pulse width high level corresponding to the distance.
MODE 4: Low power Ping mode.
To enter Mode 4, a resistor value of 360K is placed across the MODE pads.
This mode is the same as Mode 0 except that the module is set to low power in between Pings with a stated current consumption of < 70uA.
MODE 5: Threshold Switch Output
To enter Mode 5, a resistor value of 470K is placed across the MODE pads.
In this mode, the module automatically takes a reading every 200mS and checks the measurement against a factory default threshold setting of 1.5 meters. If the detected distance is less than 1.5 meters, the Echo pin is set to HIGH. If the detected distance is greater than 1.5m, the Echo pin is set to LOW. This can be handy for using the output to directly control something like a relay or LED.
There is a 4-pin header on the assembly.
1 x 4 Header
The transducer can be mounted in a hole with a diameter of approximately 23mm. The plastic housing has rubber inserts to help grip the sides of the mounting hole.
If you do a Google search, you will find a lot of hand-wringing over using this module. This is partly due to differences in how this module behaves compared to the more common ultrasonic modules as well as the fact that it is often put into situations that the other modules are unsuitable for that creates additional challenges. Having at least 3 versions on the market also leads to some confusion Here are a few key things to keep in mind when determining suitability for your application.
These modules work well if the limitations noted above are taken into consideration. The most common issue is that the wide viewing cone picking up unintended targets.
The modules have a large adjustable transformer which is the metal can with a screw adjustment on top. That adjustment should not be messed with or the unit may stop working correctly.
Note that the optional HC-SR04 Ultrasonic Distance Measurement Control module (MOD-113) will not work with the JSN-SR04T because it uses a shorter trigger of about 14uS.
The first program below implements the default Ping (Mode 0) mode of operation. The second program implements the MCU controlled serial output (Mode 2) mode of operation.
This program uses the default Ping mode of operation (Mode 0) where the measured range is displayed in centimeters, inches and feet. This is the mode the module is in when it first comes out of the bag. Since the speed of sound varies with the temperature, for maximum accuracy the temperature can be measured and used in the calculation, so this is broken out in the code below but defaults to 20C.
/* * JSN-SR04T Ultrasonic Range Finder Ping Mode Test * * Exercises the ultrasonic range finder module and prints out measured distance * 5V - connect to 5V * GND - connect to ground * RX/TRIG - connect to digital pin 12. Can be any digital pin * TX/ECHO - connect to digital pin 13. Can be any digital pin */ const int TRIG_PIN = 12; const int ECHO_PIN = 13; float temp_In_C = 20.0; // Can enter actual air temp here for maximum accuracy float speed_Of_Sound; // Calculated speed of sound based on air temp float distance_Per_uSec; // Distance sound travels in one microsecond //=============================================================================== // Initialization //=============================================================================== void setup() { pinMode(TRIG_PIN,OUTPUT); pinMode(ECHO_PIN,INPUT); // Formula to calculate speed of sound in meters/sec based on temp speed_Of_Sound = 331.1 +(0.606 * temp_In_C); // Calculate the distance that sound travels in one microsecond in centimeters distance_Per_uSec = speed_Of_Sound / 10000.0; Serial.begin(9600); } //=============================================================================== // Main //=============================================================================== void loop() { float duration, distanceCm, distanceIn, distanceFt; digitalWrite(TRIG_PIN, HIGH); // Set trigger pin HIGH delayMicroseconds(20); // Hold pin HIGH for 20 uSec digitalWrite(TRIG_PIN, LOW); // Return trigger pin back to LOW again. duration = pulseIn(ECHO_PIN,HIGH); // Measure time in uSec for echo to come back. // convert the time data into a distance in centimeters, inches and feet duration = duration / 2.0; // Divide echo time by 2 to get time in one direction distanceCm = duration * distance_Per_uSec; distanceIn = distanceCm / 2.54; distanceFt = distanceIn / 12.0; if (distanceCm <= 0){ Serial.println("Out of range"); } else { Serial.print(duration, 0); Serial.print("uSec, "); Serial.print(distanceCm, 0); Serial.print("cm, "); Serial.print(distanceIn,0); Serial.print("in, "); Serial.print(distanceFt,1); Serial.print("ft, "); Serial.println(); } delay(1000); // Delay between readings }
The program below implements the Mode 2 – MCU controlled serial output.
A softserial port is used for maximum flexibility so that any two pins can be used, but a hardware serial port can also be used.
For this mode to work, the M2 pads should be shorted with solder or a 120K resistor can be soldered across the MODE pads.
/* * JSN_SR04T Ver 3.0 Ultrasonic Test - Serial Interface Mode * * Exercises the ultrasonic range finder module in serial mode * and print out the current measured distance * This uses 'softserial' to communicate with the module to avoid any conflict * with the HW serial port if using an UNO. * VCC - connect to 5V * GND - connect to ground. * Serial pins are cross connected RX to TX and TX to RX * TRIG/TX pin - connect to digital pin 11 (RX) * ECHO/RX - connect to digital pin 10 (TX) * * For Serial mode of operation, ensure the M2 location is shorted */ #include <SoftwareSerial.h>; const int TX_PIN = 10; // Pin for Soft Serial TX const int RX_PIN = 11; // Pin for Soft Serial RX // Create instance of soft serial port for comm with module SoftwareSerial JSN_SR04T(RX_PIN, TX_PIN); byte StartByte = 0; // 0xFF signifies a new packet of info coming in byte MSByte = 0; // Most Significant Byte of distance measurement byte LSByte = 0; // Least Significant Byte of distance measurement byte CheckSum = 0; // CheckSum = 0xFF + MSByte + LSByte unsigned int mmDist = 0; // Returned distance in millimeters //=============================================================================== // Initialization //=============================================================================== void setup() { Serial.begin(9600); JSN_SR04T.begin(9600); // Initialize the software serial port } //=============================================================================== // Main //=============================================================================== void loop() { JSN_SR04T.flush(); // Clear the serial port buffer JSN_SR04T.write(0x55); // Request distance measurement delay(100); // Give sensor time to make the measurement (>60mSec) if(JSN_SR04T.available() >= 4){ // Looking for 4 bytes to be returned StartByte = JSN_SR04T.read(); // Read first byte if (StartByte == 0xFF){ // 1st byte is 0xFF for new measurement MSByte = JSN_SR04T.read(); // Read in the MSB (Most Significant Byte) LSByte = JSN_SR04T.read(); // Read in the LSB (Least Significant Byte) CheckSum = JSN_SR04T.read(); // Read the checksum byte mmDist = MSByte * 256 + LSByte;// Calculate the distance from the two bytes Serial.print("Distance: "); Serial.print(mmDist); // Print in millimeters Serial.print("mm / "); Serial.print(mmDist/25.4, 2); // Print in inches Serial.println("in"); } else{ JSN_SR04T.flush(); // Flush the buffer until valid start byte } } }
The board has a four M3 holes that can be used for mounting.
David Pilling has a nice writeup with scope captures of the board waveforms for anyone wanting to learn more about the inner workings of the device. https://www.davidpilling.com/wiki/index.php/JSN
Notes:
Maximum Ratings | ||
Vcc | 3.0 – 5.5V (5V recommended) | |
IMax | Maximum Current Draw | 5mA static, 30 mA during measurement |
Operating Ratings | ||
Frequency | Detector Center Frequency | 40 kHz |
Trigger | Pulse Width | >= 20uSec |
Detection Distance | 23 cm – 600 cm (max depends on object being detected | |
Measurement Accuracy | 1cm (typical) | |
Detection Angle | ± 37.5 degrees (stated) | |
Dimensions | L x W x H (PCB) | 41 x 28 x 20mm (1.61 x 1.1 x 0.79″) |
Dia body x L (Ultrasonic Sensor) | 21.5 x 19 mm (0.85 x 0.75″) | |
Dia outer ring (Ultrasonic Sensor) | 25mm (0.98″) | |
Mounting hole (Ultrasonic Sensor) | 23mm (0.9″) | |
Cable Length (Ultrasonic Sensor) | 2.5 meters (~8ft) | |
Country of Origin | China |
WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.
All orders are dispatched from our warehouse. The shipments are fully tracked—from our door to yours. Please allow 3-5 business days for your order to be processed in addition to the shipping times below.
Standard: 9-15 business days. Express: 4-7 business days.
Please note that shipping providers are extremely busy during this time, and some orders might experience a delay on top of usual delivery times. If your order is late, please allow 5-10 days more than indicated in standard shipping times before contacting our customer service. Thank you for your understanding.
All orders are 100% tracked. You’ll receive an email with a tracking number and a link to track your parcel once your order leaves our warehouse. Please allow 24-48 hours for the tracking link to start showing shipping information.
Receive our latest updates about our products & promotions.
Thanks for subscribing!
This email has been registered!