Тёмный

US-100 ultrasonic distance sensor - 3.3V and 5V with temperature sensor perfect for ESP8266 

DIY TECH BROS
Подписаться 12 тыс.
Просмотров 15 тыс.
50% 1

US-100 is the perfect ultrasonic distance sensor for all ESP8266 modules. Mainly for two reasons. It runs on 3.3V and it can feed you measurement readings via UART or Serial communication. And also, it measures temperature!
It works excellent with ESP-01, ESP-12E, ESP-12F, ESP-12S, ESP-07, Node-MCU, Wemos and all other ESP8266.
Link to products (Affiliate links)
************************************
US-100
Banggood - www.banggood.c...
Amazon - amzn.to/2X7sXNs
If you are connecting it to a Node-MCU, Wemos or similar you have a 5V pin and can use it. But you are using the ESP-01 or ESP-07 or ESP-12 on a PCB you might not have 5V available. So then the US-100 will fit you project perfectly.
Links to code:
************************************
UART MODE - github.com/DIY...
MANUAL MODE - github.com/DIY...
Short Guitar Clip by Audionautix is licensed under a Creative Commons Attribution license (creativecommon...)
Artist: audionautix.com/

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 37   
@DIYTECHBROS
@DIYTECHBROS 5 лет назад
Chris is convinced that the diode is a ntc100k thermistor which is used for temperature sensing, especially when it comes to 3D printers. There I go for not checking with him first. Live, learn, make and invent!
@zachreyhelmberger894
@zachreyhelmberger894 4 года назад
Yes I checked it out. If I hold onto the diode, the temp immediately changes and then does the Newton's law of cooling thing when I let go of it.
@RajeshJaswalPune
@RajeshJaswalPune 3 года назад
Thanks TECH BROS! I tried various combinations and found that NodeMCU with US-100 is the perfect one.
@mailpublic3543
@mailpublic3543 3 года назад
Hi, Thank you for your great video and explanation. Tested with arduino uno : works as expected in the UART mode, this is excellent. Testted with ESP8266-07 : works in manual mode ie Echo/Trigger, however I didn't success with the jumper on ie in UART mode. I guest ESP8226 07 model doesn't have the UART needed. What I am doing wrong ? Any feedback will be appreciated.
@Ahmadadnan88
@Ahmadadnan88 3 года назад
bei mir wird so gezeigt also Fehler , haben Sie eine Lösung ??? VG und Vielen Dannk für einfache Erklärung. Beim Hochladen des Sketches ist ein Fehler aufgetreten avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x53 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x53 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x53 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x53 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x53 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x53 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x53 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x53 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x53 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x53
@raymi9612
@raymi9612 3 года назад
Hello, In MANUAL MODE (shunt removed), I always get value of 0 returned by ""duration = pulseIn(ECHO, HIGH);". Do you know why? Thanks.
@andigharciapubianan4315
@andigharciapubianan4315 3 года назад
hi sir i want to ask you. excuse me sir, when i flash the manual code. my us-100 sensor always showed 0 value?
@jesusmonasterial8584
@jesusmonasterial8584 3 года назад
Where can I access the schematic diagram of this?
@easwaran83
@easwaran83 4 года назад
Great Video! UART MODE doesn't seem to work for me , I have added the jumper & also connected Trigger & Echo to Pin 4 & 5 as per the UART code. But i am not getting distance & temprature value in the serial monitor. Please let me know, is that am doing wrong. Also i have the latest software serial library updated in my IDE "espsoftwareserial"
@DIYTECHBROS
@DIYTECHBROS 4 года назад
Hi! Make sure TX goes to RX, and RX goes to TX :)
@hasifrozi5481
@hasifrozi5481 4 года назад
are this coding compatible with esp8266 nodemcu bcs my us100 can only detect distance using this coding
@gabrieledimare5124
@gabrieledimare5124 4 года назад
hello I tried your example in UART mode with a nodemcu, but it doesn't work. which pin should i connect?
@DIYTECHBROS
@DIYTECHBROS 4 года назад
You can use the pins you prefer, just remember that GPIO and D(n) is not the same. You can write D(n) instead of just a number to refer to the pin marked with that label. I believe GPIO 5 = D1 and GPIO 4 = D2. Just google NodeMCU pinout :) Let me know if that was the error!
@zachreyhelmberger894
@zachreyhelmberger894 4 года назад
Thanks for the video!! What version of Arduino IDE are you using? What operating system? What version of the required libraries are you using? I have Win7 Arduino IDE version 1.8.13 and esp8266 package from arduino.esp8266.com/stable/package_esp8266com_index.json and appears to be version 2.7.4. When I run the code on the esp8266, I ONLY get a "temperature". But I can change the "temperature" by moving my hand around in front of the sonar.
@zachreyhelmberger894
@zachreyhelmberger894 4 года назад
I have two US-100s and both of them work with the exact same code on Arduino IDE, just change board to Nano with the "old bootloader" compiler option.
5 лет назад
What is the reason for using this formula "mmDist = MSByteDist * 256 + LSByteDist" ? why 256?
@DIYTECHBROS
@DIYTECHBROS 5 лет назад
Hi Lawrence! That's an excellent question! It's simply because we need to do simple bit shifting. Not uncommon when dealing with analog reading from sensors. As an 8-bit number is limited to 255 (or 127 unsigned) we don't want an overflow. Also int in the word of arduino is 16 bit.
@DIYTECHBROS
@DIYTECHBROS 5 лет назад
Google "bit sifting" and "bit shifting analog sensors" to read more! Happy thinkering :-)
@zachreyhelmberger894
@zachreyhelmberger894 4 года назад
I compiled the code and uploaded to an ESP-12E module and I can ONLY get "temperature". No distance printout. But if I place my hand in front of the sensor, I can make the "temperature" change by moving my hand further from or closer to the sensor. I tried compiling with NodeMCU1.0 board, Generic ESP8266 Module and ESPino board compiler options but behavior does not change. Tx is connected to IO4 (D2) and Rx is connected to IO5 (D1). I tried swapping the lines but then it stopped working. I un-swapped the lines and then it started working again.
@zachreyhelmberger894
@zachreyhelmberger894 4 года назад
BTW, It works great with an Arduino Nano in the Arduino IDE.
@DIYTECHBROS
@DIYTECHBROS 4 года назад
That’s very strange... very! I’ll have a look at the code to see if there are anything that can enlighten me!
@DIYTECHBROS
@DIYTECHBROS 4 года назад
is there any output on distance? (any of the text?)
@zachreyhelmberger894
@zachreyhelmberger894 4 года назад
@@DIYTECHBROS Thank you kindly for the quick reply!! The "Distance: xxx mm " statement does not print but "Temp: xx C. Does print. AND I can change the Temp by moving my hand around. If I hold my hand about an inch away, I usually get something like "Temp: -11 C". If the sensor is on the floor pointing up at the ceiling, about 8Ft or so, I get "79F" or thereabouts.
@zachreyhelmberger894
@zachreyhelmberger894 4 года назад
@@DIYTECHBROSThe code is a copy and paste of your Github UART mode example. I was REALLY impressed with the accuracy of the sensor in UART mode! Also I tried it on Ubuntu 18.04 and got the same strange result. But if I use an Arduino Nano, it works fine. We have had trouble with SoftwareSerial in the past when working with the esp8266, if memory serves.
@mareiaambrocio9239
@mareiaambrocio9239 4 года назад
Is there any chance that we can adjust its frequency? we are using newping library.
@DIYTECHBROS
@DIYTECHBROS 4 года назад
That would be awesome! But, sorry, no, not that we are aware of.
@mareiaambrocio9239
@mareiaambrocio9239 4 года назад
@@DIYTECHBROS oh. is that so. i am currently working on an arduino based ultrasonic pest repellent. maybe u can help me out hehe. do you know other ultrasonic devices that can release adjusting frequency?
@DIYTECHBROS
@DIYTECHBROS 4 года назад
@@mareiaambrocio9239 If you try searching for ultrasonic speaker you can find several with different ranges :-)
@mareiaambrocio9239
@mareiaambrocio9239 4 года назад
@@DIYTECHBROS Thank you so much!!! :)
@DIYTECHBROS
@DIYTECHBROS 4 года назад
@@mareiaambrocio9239 Our pleasure!
@zikrialghifahri4600
@zikrialghifahri4600 Год назад
#1
@arduinonour4746
@arduinonour4746 4 года назад
:)
@DIYTECHBROS
@DIYTECHBROS 4 года назад
Great Arduino nour! The comments are motivating and they help the channel :-)
Далее
КОТЯТА НАУЧИЛИСЬ ГОВОРИТЬ#cat
00:13
Motion and Distance Sensors for your DIY Projects
28:12
Laser vs Ultrasonic - TOF10120 vs. HC-SR04
31:09
Просмотров 185 тыс.
Arduino To ESP32: How to Get Started!
9:26
Просмотров 354 тыс.
ESPNOW mix with #ESP32 and #ESP8266
25:37
Просмотров 39 тыс.