🚀 Elevate Your Sensing Game!
The Ultrasonic Distance Sensor is a robust, UART-controlled range detector with a measurement range of 3 to 450 cm. Its IP67 waterproof design ensures functionality in harsh environments, while its low power consumption makes it ideal for various applications, including robotics and smart home systems.
I**R
No Datasheet and no way to use prodcut without it
Item arrived without any datasheet. This leaves buyer with no way of interacting with product. Similair item searches show half a dozen different interfaces with various pinouts. After several hours of trying, no definitive answers with what an appropriate output of this product is.
D**K
No Datasheet or Pin-Out
Looks like a solid unit but I have no way of knowing if it even works. It doesn't come with a data-sheet or even and explanation of the pin-out. And since the listed manufacturer is just a fake name, there is no way to find one online.
P**R
What the pins are & how it works
It arrived quickly and worked as advertised! It did not come with instructions or a datasheet and I couldn't find anything online for the model number. I'm leaving a comment to help hobbyists. I tested it with an ESP32 on a breadboard and all of these comments are ONLY for the "UART Controlled" model numbered AO221AT. Here's what I found, be warned your mileage may vary:First the pins... the wires are color-coded:Red: VCC, Black: GND, Yellow: RX, White: TXThe selling page says the voltage range is 3.1 to 5V and averages 8 mA. It definitely was not more than 40 mA as that's all the ESP32 can source.The only clue to how it worked was "controlled", so was pretty sure auto output, pwm output, switch output, and RS485 output that you'd find in the AO2 family weren't going to work. Fortunately, as advertised, "controlled output" worked just fine with:UART: 8 data bits, 1 stop bit, no parity, 9600 bpsAs a regular AO2 response can take around 60 ms, I figured the polling period should be > 70 ms. But for my testing rather than asynchronous went with synchronous. Usually you have to leave some delay for the receiver to stop "ringing".In controlled output, when the RX pin sees a falling edge it triggers an ultrasonic pulse. So, you can transmit any byte to the RX pin and it should fire up.Four bytes were returned and it worked as you'd expect from the AO2 family: start bit (e.g., 0xff), Data High (e.g., 0x07), Data Low (e.g., 0xa1), CheckSum (e.g., 0xA7)Check Sum = (start bit + data high + data low) & 0xffRaw Distance = 256 * Data High + Data Low = 1953 mmNote: Raw distance is approximate and probably good enough as the unit has temperature compensation (not tested by me). But to get repeatable super-precise distances you’d probably need a function that included temperature, barometric pressure, and humidity as they all impact the speed of sound; but probably not by much so minimal gains.In my testing, the system used 3.3V and a "\n" was sent (TX to RX). uart_read_bytes was programmed to wait 100 ms for the test to complete and the data to arrive. My non-precision testing consisted of me moving my hand over it and verifying the range went up with my hand moving away and going down as my hand moved down. Except for initially picking the ESP's uart1's default pin 18 (it startled me as it was also the PWM pin for the board's ultrabright LED and I quickly switched to another pin ; -) the programming went smoothly with no issues.
"**"
This is Target Mode UART not "Automatic UART"
This is Target Mode UART not "Automatic UART", this should have been more clearly stated in the description. I should have read the previously comments before buying.
I**A
Works with Tasmota!
Very clean connection with AtomS3 Lite flashed with Tasmota through existing groove connectors.Just swipe the female side of the connector to match the male side of the AtomS3 Lite: Black wire to G, Red wire to 5V, Yellow wire to G2 and White wire to G1. In the Tasmota Configuration Module select SR04 Ech/RX for GPIO1 and SR04 Tri/TX for GPIO2. That's it, enjoy!
ترست بايلوت
منذ أسبوع
منذ 5 أيام