-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SR04 Ultrasonic sensor support? #113
Comments
The SR04 needs 5V. Sonoff can only supply 3V3. Do you expect the SR04 to work reliably on 3V3? |
Sonoff basic - use 2 power |
I will actually be using it with a Wemos D Mini and can take the 5V right off the VCC pin. I have a mock up working with 3.9.21 and just threw the sonar code in the void loop and sent the output to serial. I started to dig into an "easy" way to publish the distance into MQTT but that's when I thought I would reach out and see if anybody has any plan/code on it. I had to put a little millis delay in to get it to read correctly and only report out if the distant changes by more than 10 inches but it works reliably, I just have to figure out hot to make it pretty for the web interface and MQTT output. My use case is a garage door control with open/closed (distance) indicator and a sump pump monitor/override with water level (distance) logging. Here is my simple loop code in case you are interested:
} |
Thats a cool idea. Id like to use the sonoff dual for my garage door control but id like to know if it is open or closed too... |
Wish SR04/05 will support in sonoff, power should not be the reason make SR04 not add as SR501 also use 5V |
Great idea. Did you get it to work? |
The sonoff dev board has 5v |
You can also use this sensor https://www.bananarobotics.com/shop/US-100-Ultrasonic-Distance-Sensor-Module as it runs on 3.3v |
Hi Guys, Jason |
I'm going to throw my request for this as well. |
Now it is implemented. Closing. |
? |
Yea it does, I have been using it for over a year. |
@rajil, did you make sure the jumper on the back of the us-100 is in the correct position? I do not have any code, but I am using the sensor with wemos d1 with opengarage. You can check the opengarage project for some code examples. |
@Gompka I was able to get it working after taking off the jumper. Is it possible to hook two ultrasonic sensors on the same ESP8266. In Tasmota 'configure module' 73/74 device type is Trigger/Echo. I assigned these to two devices, but only one device showed up. |
5.12.0m * Add support for sensor HC-SR04 ultrasonic (arendst#113, arendst#1964, arendst#2444)
Can we change trigger time? |
First off, fantastic firmware! I have installed this firmware on more than 20 Sonoffs and am really appreciating the capabilities and attention to detail!
I do find that I would really like to add the use of a SR04 distance sensor for one of my implementation and am wondering if there may be any plan or ideas on how to do so?
Thanks!
The text was updated successfully, but these errors were encountered: