logo


Waterproof Ultrasonic Module JSN-SR04T-3.0 JSN-SR04T Distance Measuring Transducer Sensor for Arduino DIY Electronic Kit


 


Introduction


The JSN-SR04T-3.0 JSN-SR04T Waterproof Ultrasonic Module is a great option for measuring distance in Arduino projects. It is accurate, reliable, and easy to use. In this article, we will take a closer look at this module and see how it can be used in your projects.


Features


  • Measuring range: 2cm to 450cm
  • Accuracy: ±3mm
  • Waterproof
  • Easy to use

How to Use


The JSN-SR04T-3.0 JSN-SR04T Waterproof Ultrasonic Module is easy to use. It has four pins: VCC, GND, Trig, and Echo. VCC and GND are the power pins, and Trig and Echo are the signal pins. To use the module, simply connect the VCC pin to 5V, the GND pin to ground, the Trig pin to a digital output pin on your Arduino, and the Echo pin to a digital input pin on your Arduino.


Once the module is connected, you can use the following code to measure distance:



// Define the Trig and Echo pins
const int trigPin = 12;
const int echoPin = 13;

// Set up the Trig and Echo pins
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);

// Trigger the sensor
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

// Measure the time it takes for the signal to return
long duration = pulseIn(echoPin, HIGH);

// Calculate the distance
float distance = duration * 0.034 / 2;

// Print the distance
Serial.println(distance);


Applications


The JSN-SR04T-3.0 JSN-SR04T Waterproof Ultrasonic Module can be used in a variety of applications, including:


  • Measuring the distance to objects
  • Detecting obstacles
  • Measuring the level of liquids
  • Creating interactive installations


The JSN-SR04T-3.0 JSN-SR04T Waterproof Ultrasonic Module is a versatile and easy-to-use sensor that can be used in a variety of applications. It is accurate, reliable, and waterproof, making it a great choice for both indoor and outdoor projects.