Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use JSN-SR04T Ultrasonic Sensor: Examples, Pinouts, and Specs

Image of JSN-SR04T Ultrasonic Sensor
Cirkit Designer LogoDesign with JSN-SR04T Ultrasonic Sensor in Cirkit Designer

Introduction

The JSN-SR04T Ultrasonic Sensor is a versatile and waterproof distance measuring module that utilizes ultrasonic waves to determine the distance to an object. It is widely used in various applications such as robotics, automation, vehicle parking sensors, obstacle avoidance systems, and IoT projects. The sensor is designed to be robust and reliable, making it suitable for outdoor environments and harsh conditions.

Explore Projects Built with JSN-SR04T Ultrasonic Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO Based Ultrasonic Distance Measurement with TM1637 Display
Image of UNDERWATER SENSOR: A project utilizing JSN-SR04T Ultrasonic Sensor in a practical application
This circuit is designed to measure distance using the JSN-SR04T ultrasonic sensor and display the measured value on a TM1637 4-digit 7-segment display. The Arduino UNO serves as the central controller, running code to operate the sensor, calculate the distance, and update the display. The sensor's TRIG and ECHO pins are connected to digital pins D12 and D11 of the Arduino, respectively, while the display's CLK and DIO pins are connected to digital pins D3 and D4, with both the sensor and display sharing power and ground connections with the Arduino.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 4B and JSN-SR04T Ultrasonic Sensor Distance Measurement System
Image of sub sistem embeded: A project utilizing JSN-SR04T Ultrasonic Sensor in a practical application
This circuit connects a JSN-SR04T Ultrasonic Sensor to a Raspberry Pi 4B, enabling the Raspberry Pi to measure distance by sending and receiving ultrasonic pulses. The sensor's power and ground pins are connected to the Raspberry Pi's 5V and GND pins, while the Trig and Echo pins are connected to GPIO10 and GPIO11, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based Ultrasonic Distance Sensor with OLED Display and SIM900A Communication
Image of SENSOR: A project utilizing JSN-SR04T Ultrasonic Sensor in a practical application
This circuit is a distance measurement and communication system using an Arduino UNO, an ultrasonic sensor, an OLED display, and a SIM900A module. The ultrasonic sensor measures the distance to an object, which is then displayed on the OLED screen and transmitted via the SIM900A module. The system is powered by a 18650 Li-ion battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano and NRF24L01 Based Ultrasonic Distance Measurement System
Image of transmitter_circuit: A project utilizing JSN-SR04T Ultrasonic Sensor in a practical application
This circuit is designed to measure distances using an HC-SR04 Ultrasonic Sensor and transmit the measured data wirelessly via an NRF24L01 module. An Arduino Nano serves as the central controller, interfacing with the ultrasonic sensor to trigger distance measurements and with the NRF24L01 to send the results to a remote receiver. The code provided for the Arduino Nano manages the measurement process, calculates the distance, and handles the wireless communication.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with JSN-SR04T Ultrasonic Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of UNDERWATER SENSOR: A project utilizing JSN-SR04T Ultrasonic Sensor in a practical application
Arduino UNO Based Ultrasonic Distance Measurement with TM1637 Display
This circuit is designed to measure distance using the JSN-SR04T ultrasonic sensor and display the measured value on a TM1637 4-digit 7-segment display. The Arduino UNO serves as the central controller, running code to operate the sensor, calculate the distance, and update the display. The sensor's TRIG and ECHO pins are connected to digital pins D12 and D11 of the Arduino, respectively, while the display's CLK and DIO pins are connected to digital pins D3 and D4, with both the sensor and display sharing power and ground connections with the Arduino.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of sub sistem embeded: A project utilizing JSN-SR04T Ultrasonic Sensor in a practical application
Raspberry Pi 4B and JSN-SR04T Ultrasonic Sensor Distance Measurement System
This circuit connects a JSN-SR04T Ultrasonic Sensor to a Raspberry Pi 4B, enabling the Raspberry Pi to measure distance by sending and receiving ultrasonic pulses. The sensor's power and ground pins are connected to the Raspberry Pi's 5V and GND pins, while the Trig and Echo pins are connected to GPIO10 and GPIO11, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of SENSOR: A project utilizing JSN-SR04T Ultrasonic Sensor in a practical application
Arduino UNO-Based Ultrasonic Distance Sensor with OLED Display and SIM900A Communication
This circuit is a distance measurement and communication system using an Arduino UNO, an ultrasonic sensor, an OLED display, and a SIM900A module. The ultrasonic sensor measures the distance to an object, which is then displayed on the OLED screen and transmitted via the SIM900A module. The system is powered by a 18650 Li-ion battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of transmitter_circuit: A project utilizing JSN-SR04T Ultrasonic Sensor in a practical application
Arduino Nano and NRF24L01 Based Ultrasonic Distance Measurement System
This circuit is designed to measure distances using an HC-SR04 Ultrasonic Sensor and transmit the measured data wirelessly via an NRF24L01 module. An Arduino Nano serves as the central controller, interfacing with the ultrasonic sensor to trigger distance measurements and with the NRF24L01 to send the results to a remote receiver. The code provided for the Arduino Nano manages the measurement process, calculates the distance, and handles the wireless communication.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

  • Operating Voltage: 5V DC
  • Quiescent Current: <5mA
  • Total Current Work: 30mA
  • Acoustic Emission Frequency: 40kHz
  • Max Range: 4.5m
  • Min Range: 25cm
  • Resolution: 1cm
  • Measuring Angle: 75 degrees
  • Working Temperature: -20°C to +70°C

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 VCC Power supply (5V DC)
2 Trig Trigger input (TTL pulse)
3 Echo Echo output (TTL level signal)
4 GND Ground

Usage Instructions

Connecting to a Circuit

  1. Connect the VCC pin to the 5V output on the Arduino UNO.
  2. Connect the GND pin to one of the GND pins on the Arduino UNO.
  3. Connect the Trig pin to a digital I/O pin on the Arduino UNO.
  4. Connect the Echo pin to another digital I/O pin on the Arduino UNO.

Important Considerations and Best Practices

  • Ensure that the power supply is stable and does not exceed 5V.
  • Avoid placing the sensor in a location where it can be exposed to direct sunlight, which may interfere with the sensor's operation.
  • Keep the sensor away from acoustic noise and surfaces that may absorb or deflect ultrasonic waves irregularly.
  • Use a pull-up resistor if the Echo pin is experiencing erratic readings.

Sample Arduino Code

#include <NewPing.h>

#define TRIGGER_PIN  12  // Arduino pin tied to trigger pin on the sensor.
#define ECHO_PIN     11  // Arduino pin tied to echo pin on the sensor.
#define MAX_DISTANCE 450 // Maximum distance we want to ping for (in centimeters).

NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.

void setup() {
  Serial.begin(9600); // Open serial monitor at 9600 baud to see ping results.
}

void loop() {
  delay(50); // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
  unsigned int uS = sonar.ping(); // Send ping, get ping time in microseconds (uS).
  Serial.print("Ping: ");
  Serial.print(uS / US_ROUNDTRIP_CM); // Convert time into distance and print result (in cm).
  Serial.println("cm");
}

Troubleshooting and FAQs

Common Issues

  • Inaccurate Readings: Ensure that the sensor is not facing any soft materials that can absorb the ultrasonic waves. Also, check for any obstacles within the range that might cause multiple reflections.
  • No Readings: Verify that all connections are secure and the sensor is powered correctly. Check the Arduino code for correct pin assignments.

Solutions and Tips for Troubleshooting

  • If the readings are sporadic, try adding a delay between measurements to allow the sensor to stabilize.
  • Ensure that the sensor is mounted firmly and is not vibrating, as this can cause false readings.
  • Use averaging or median filtering in your code to smooth out the sensor readings.

FAQs

Q: Can the JSN-SR04T sensor be used underwater? A: No, the JSN-SR04T is waterproof but not designed for underwater use.

Q: What is the maximum reliable range of the sensor? A: The maximum reliable range is up to 4.5 meters, but optimal performance is achieved within 25cm to 4m.

Q: How can I extend the sensor's wires? A: You can extend the wires using shielded cables to minimize interference. Keep the extension as short as possible to maintain signal integrity.