This design allows the robot to navigate in an unknown environment by avoiding collisions, which is a primary requirement for any autonomous mobile robot. Once the wiring is completed and the code is uploaded to the Arduino, you can proceed with testing the functionality of the waterproof ultrasonic sensor (JSN-SR04T or AJ-SR04M) with the OLED display.Obstacle Avoiding Robot is an intelligent device that can automatically sense the obstacle in front of it and avoid them by turning itself in another direction. The OLED display then shows the distance that is measured. To calculate distance, we divide the measured time by two and multiply it by the speed of sound (approximately 0.034 cm/µs). The ultrasonic sensor operates by emitting a sound wave at a specific frequency and measuring the time it takes for the echo of the sound wave to return. This code enables the interface between an Arduino board, an ultrasonic sensor (like the JSN-SR04T or AJ-SR04M), and an OLED display. These qualities make it a reliable choice for various applications.Īdafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET) ĭisplay.begin(SSD1306_SWITCHCAPVCC, 0x3C) It offers an impressive range of 25cm to 450cm and achieves high accuracy with a precision of up to 2mm. The JSN-SR04T/AJ-SR04M is a waterproof ultrasonic sensor module known for its versatility and durability in non-contact distance measurement. JSN-SR04T/AJ-SR04M Waterproof Ultrasonic Sensor: Ultrasonic sensors find applications in various fields, including robotics (for obstacle detection and avoidance), liquid level sensing (for measuring tank levels), and even in certain car parking assist technologies, among others. The division by 2 accounts for the round trip of the sound wave. The distance is determined using the formula: Distance = (Time of Flight x Speed of Sound) / 2. Distance Calculation: Using the speed of sound through air, which is approximately 343 meters per second at sea level under normal conditions, the sensor calculates the distance to the object.Time Calculation: The sensor measures the time taken for the sound waves to travel to the object and back, known as “ Time of Flight.”.Receiving the Echo: The ultrasonic receiver detects the reflected sound waves, also known as echoes.Travel and Reflection of Waves: These sound waves propagate through the air until they reach an object, where they rebound back toward the sensor.Emitting Ultrasonic Waves: The sensor activates the ultrasonic transmitter, which emits a burst of ultrasonic sound waves.These sensors can measure distances from 25 to 450 cm and work well with Arduino boards. However, there are alternatives like the JSN-SR04T and AJ-SR04M waterproof ultrasonic sensors, which are durable and perfect for outdoor applications. When working on distance measurement or object detection projects in outdoor environments, the HC-SR04 ultrasonic sensor may not be suitable due to its fragility and lack of waterproofing. This tutorial covers the Waterproof Ultrasonic Sensor JSN-SR04T/AJ-SR04M interface with Arduino and SSD1306 OLED Display. This project is perfect for applications such as monitoring water tanks, pools, or even rainwater harvesting systems. Today, we’re going to explore an exciting project: where we will interface a Waterproof Ultrasonic Sensor with Arduino to Measure Water Level accurately on SSD1306 OLED Display.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |