Ultrasonic Sensor With Nodemcu

5,875

23

7

Introduction: Ultrasonic Sensor With Nodemcu

About: Electronic and Telecommunications Engineer

Ultrasonic Sensor Interfacing With Nodemcu

Th͏i͏s ͏i͏s ͏a ͏s͏i͏m͏p͏l͏e ͏t͏u͏t͏o͏r͏i͏a͏l ͏o͏n ͏i͏n͏t͏e͏r͏f͏a͏c͏i͏n͏g ͏u͏l͏t͏r͏a͏s͏o͏n͏i͏c ͏s͏e͏n͏s͏o͏r ͏w͏i͏t͏h ͏n͏o͏d͏e͏m͏c͏u ͏w͏i͏f͏i ͏m͏o͏d͏u͏l͏e ͏a͏n͏d ͏m͏e͏a͏s͏u͏r͏e ͏d͏i͏s͏t͏a͏n͏c͏e. ͏r͏e͏c͏e͏n͏t͏l͏y ͏i ͏m͏a͏d͏e ͏a͏n ͏i͏n͏t͏e͏r͏n͏e͏t ͏o͏f ͏t͏h͏i͏n͏g͏s ͏p͏r͏o͏j͏e͏c͏t ͏w͏h͏i͏c͏h ͏i͏n͏v͏o͏l͏v͏e͏s ͏a͏n ͏u͏l͏t͏r͏a͏s͏o͏n͏i͏c ͏s͏e͏n͏s͏o͏r ͏a͏n͏d ͏n͏o͏d͏e͏m͏c͏u ͏w͏i͏f͏i ͏m͏o͏d͏u͏l͏e ͏i͏n ͏i͏t. ͏u͏l͏t͏r͏a͏s͏o͏n͏i͏c ͏s͏e͏n͏s͏o͏r ͏w͏h͏i͏c͏h ͏i͏s ͏u͏s͏e͏d ͏i͏n ͏t͏h͏e ͏p͏r͏o͏j͏e͏c͏t ͏i͏s ͏t͏h͏e ͏m͏o͏s͏t ͏p͏o͏p͏u͏l͏a͏r ͏o͏n͏e ͏a͏m͏o͏n͏g ͏t͏h͏e ͏d͏i͏y ͏c͏i͏r͏c͏u͏i͏t ͏c͏o͏m͏m͏u͏n͏i͏t͏y, ͏t͏h͏e ͏h͏c͏s͏r04 ͏u͏l͏t͏r͏a͏s͏o͏n͏i͏c ͏s͏e͏n͏s͏o͏r measure distance up to 200 cm with high accurecy.

In this tutorial i will show you how you can make webpage control distance measurement using nodemcu microcontroller. you can see the all reading on your smart phone using wifi connection

Let's Start,

Step 1: Required Hardware

Get Component on Best Price

1. Nodemcu just 330/- Link

2. Ultrasonic sensor just 179/- Link

3. Jumper Wires just 220/- Link

4. Breadboard (optional) just 90/- Link

Other Component

  1. Arduino uno just 384/- Link
  2. Arduino nano just 330/- Link

For more low cost components comment me........

Step 2: Required Software

Arduino Sofrware Link

Step 3: Connecting the Hardware

* Nodemcu pins need wired are below:

* pin D0 on Nodemcu ---> on ultrasonic -- trig Pin

* pin D1 on Nodemcu ---> on ultrasonic-- echoPin

* Vcc on Nodemcu ---> on ultrasonic pin Vcc / +5v

* Gnd on Nodemcu ---> on ultrasonic pin Gnd

Step 4: Circuit Diagram

Step 5: Setting Up Arduino IDE

First we download the library , Now open arduino ide software then click on sketch ==> include library ==> manage library ==> and search for ESP8266Wifi and download the library. and also download WiFiClient and ESP8266WebSerber library.

Step 6:

Next, select the board , go to Tools ==> Board ==> Search for Nodemcu 1.0(ESP-12E Module) ==> and select this board.

If you don't have ESP8266 board installed then follow the steps, Go to Tools ==> Board ==> Board manager ==> and search esp8266 by ESP8266 community, and download the board.

Step 7: Code

Download the skecth below the link , and open code , and we need to do some changes, just type your wifi ssid and wifi password.

Code Link

To know more about other project visit us on official website IoTFever.tech

if you need my help in any other or custom project then visit us on offical website

Now , upload the source code.

Step 8: Final Step

After the successful upload of code then turn on your Hotspot , and wait for connecting nodemcu , open serial monitor you see message Conneting , then after conneting it will show one IP address , and you will see the distance measurement reading of your ultrasonic sensor, to see this reading on mobile screen ,just type this IP address in your mobile browser , you will see reading measure by ultrasonic sensor.

and here you are finish with project , Enjoy your project.

That’s it for this tutorial. Thanks for reading.

If you have any question about today’s tutorial, please feel free to share via the comment section

I hope it will helpful to you...........................Thanks.

Step 9: My Some Project

Step 10: Next Projects Advanced Water Level Indicator

Be the First to Share

    Recommendations

    • Fruit and Veggies Speed Challenge

      Fruit and Veggies Speed Challenge
    • Maps Challenge

      Maps Challenge
    • Fandom Contest

      Fandom Contest

    7 Comments

    0
    shyamala.19ec
    shyamala.19ec

    Question 4 months ago on Step 2

    How can I get the code for the above project?

    0
    IoTFever
    IoTFever

    Answer 4 months ago

    I have given the code link

    0
    dorji124
    dorji124

    Reply 3 months ago

    code link is not working

    0
    krishnavenikommuri
    krishnavenikommuri

    Question 11 months ago on Step 4

    HOW DO I GET VIRTUAL NODEMCU HARDWARE IN TINKERCAD