Distance measurement using ultrasonic sensor with arduino proteus simulation | Jeet.org

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ค. 2019
  • #jeetorg
    This simulation is ultrasonic sensor interfacing to the arduino in proteus software measurement in the cm.
    with 16*2 display also
    Arduino code :
    include "LiquidCrystal.h" //lcd libary
    LiquidCrystal lcd(2, 3, 4, 5, 6, 7); //LCD object Parameters: (rs, enable, d4, d5, d6, d7)
    const int trigPin = 12; //trig pin connection
    const int echoPin = 11; //echopin connection
    long duration;
    int distanceCm;
    float liquid;
    void setup() { // setup perameter
    lcd.begin(16,2);
    pinMode(trigPin, OUTPUT);
    pinMode(echoPin, INPUT);
    lcd.setCursor(0,0);
    lcd.print(" Distance ");
    lcd.setCursor(0,1);
    lcd.print(" Measurement ");
    delay(2000);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print(" Made By ");
    lcd.setCursor(0,1);
    lcd.print(" Jeet.org ");
    delay(2000);
    lcd.clear();
    }
    void loop() { // loop of flow program
    digitalWrite(trigPin, LOW);
    delayMicroseconds(2);
    digitalWrite(trigPin, HIGH);
    delayMicroseconds(10);
    digitalWrite(trigPin, LOW);
    duration = pulseIn(echoPin, HIGH);
    distanceCm= duration*0.034/2;
    lcd.setCursor(0,0);
    lcd.print("Distance Measur.");
    delay(10);
    lcd.setCursor(0,1);
    lcd.print("Distance:");
    lcd.print(distanceCm);
    lcd.print(" Cm ");
    delay(10);
    }
    Library link:
    drive.google.com/drive/folder...
    Thanks you for watching📺 this video🎞 ....... :)
    Please🙏 Like👍 Share Subscribe 🔴
    Our Playlist
    1) SCADA - Tutorial
    • SCADA - Tutorial
    2) PLC - Programming Tutorial
    • PLC - Programming Tuto...
    3) Proteus and Arduino
    • Proteus and Arduino
    4) Proteus
    • Proteus
    5) Fritzing
    • Fritzing
    6) Start Here to C language Programming
    • Start Here to C langua...
    7) Just information
    • Just information
    🏳‍🌈 #jeetorg
    --------------------------------------------------------------------------------------------------------
    Music:
    Track: Julius Dreisig & Zeus X Crona - Invisible [NCS Release]
    Music provided by NoCopyrightSounds.
    Watch: • Julius Dreisig & Zeus ...
    Free Download / Stream: ncs.io/InvisibleYO

ความคิดเห็น • 144

  • @omenechris4698
    @omenechris4698 3 ปีที่แล้ว

    Wow! What a powerful tutorial with a very clear code. The BEST Projectl Ever.
    Remain Blessed Sir!

  • @ElectroMentor
    @ElectroMentor 3 ปีที่แล้ว +1

    Perfect keep it up👍

  • @andresyesidmorenovilla7888
    @andresyesidmorenovilla7888 4 ปีที่แล้ว +2

    Hey dude, how is it going? I'm trying to understand your code (well, what is it that it exactly does), and i don't quite understand how you set the distance. I get that you can change the distance measured by device by using the variable resistor (although, i don't know exactly why nor how, i don't have any idea what the test pin should supposedly be doing hahahahahaha), however it would seem as the range of measured distance is always between 4cm and 1116cm. why is it? is it because of the device's charachteristics? Idk, i thought this device's range went up to 400cm? idk, i'm just confused. Also, the part where you use the delayMicrosecond() function, what is it for? I thought you may be using it to set the pulse's time duration? but after changing it, i didn't see much change in the measured values (except for when i set said delay at a value below like 5. Below this, it wouldn't measure anything), so I'd like to understand a little better what it is used for. Have you got another video that I'm not aware of where you explain the code maybe? hahahaha I'm sorry if this is too long, my bad. However, some explainning would be very much appreciated. Have a good one ;)

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      Thank you support me
      This is a virtual project in Proteus Simulation software here i check a hardware as well as my code is properly work or not so make this project
      if you need customize your in range in cm meter inch. etc.
      second question is why use in delayMicrosecond() ?
      > Answer is any sensor have taken to few micro second complete this one loop so this function is use in code.
      if any query in future please contact me in my official mail it mention in about page.

  • @misganawsahle
    @misganawsahle 2 ปีที่แล้ว

    thank you

  • @sa.9785
    @sa.9785 2 ปีที่แล้ว

    Hi, I need a help how to convert the Nodered for this project

  • @E2ESolutionsDIY
    @E2ESolutionsDIY 4 ปีที่แล้ว +2

    Good one dear keep growing 👍

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว +1

      Thank you 4 appreciate

    • @E2ESolutionsDIY
      @E2ESolutionsDIY 4 ปีที่แล้ว

      @@jeet_e_n_e hope you also support me back by subscribing my channel

  • @Oneaperxamspreparation99
    @Oneaperxamspreparation99 3 ปีที่แล้ว

    Thanks for sharing it is working well

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Most welcome @electronicshub

    • @Oneaperxamspreparation99
      @Oneaperxamspreparation99 3 ปีที่แล้ว

      @@jeet_e_n_e please sharing more Proteus based simple project like this!
      Appreciated ❤️

  • @dominicadjeh1849
    @dominicadjeh1849 4 หลายเดือนก่อน

    Please I’m currently having the potentiometer increment issue, the reading is not changing

  • @Pradeepkumar1960
    @Pradeepkumar1960 ปีที่แล้ว

    What a sound ..big sound polution

    • @jeet_e_n_e
      @jeet_e_n_e  6 หลายเดือนก่อน

      We will improve in next video

  • @ShirjeelAliHaider
    @ShirjeelAliHaider 3 ปีที่แล้ว

    can you plz tell code of the ultrasonic sensor as the code you have written down is for the Arduino right?

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Yes, Arduino IDE

  • @monalisa25_
    @monalisa25_ 2 หลายเดือนก่อน

    why when I try to run it's stuck at 4cm min

  • @lYl369
    @lYl369 3 ปีที่แล้ว +1

    thanks for this project, but my proteus is not finding Arduino and Ultrasonic sensor in the librari. WHY?

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      First check your license and second library path of given to in Proteus folder in c drive
      Thanks for asking this question :)

  • @memotathangjam9421
    @memotathangjam9421 3 ปีที่แล้ว +2

    Bro distance does not change when I increase or decrease the potentiometer resistance. It is always fixed to 4cm. Please help.

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Re uploaded program and restart your Proteus software

    • @Zero_Two_91
      @Zero_Two_91 ปีที่แล้ว

      Yeah its the same for me. Did u fixed it??

  • @ankitMadhu-ps5hg
    @ankitMadhu-ps5hg 4 ปีที่แล้ว

    Bro can u pls send me code and connection to my mail I'd I'm in trouble as in my old project in the last step I'm get 507 unable to connect to bluetooth device

  • @tsubasavo6445
    @tsubasavo6445 3 ปีที่แล้ว

    Why is pot used also at value should I keep it constant

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Port is use because this is simulation so no need to change in ultrasound output signal
      So port resistor value is set 1k and make connection same in video

  • @syedbasil8588
    @syedbasil8588 3 ปีที่แล้ว +3

    Im increasing and decreasing through pot hg but distance remains 4cm

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Check your programs first
      Or hex file also is updated or not in Proteus software
      Thanks for asking me 😊

  • @zainabejaz4997
    @zainabejaz4997 3 ปีที่แล้ว

    Aoa mere Waly arduino me reset k beechy 2 wires wala option hi ni h VCC or hbd.what should I do ?

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Do same thing, once your power supply gone your Arduino is reset, no problem

  • @mirmohiuddinabdullah680
    @mirmohiuddinabdullah680 3 ปีที่แล้ว +1

    I am not getting Vcc pin on arduino. It only shows Reset pin. What to do?? TIA

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      No problem just other connection and run simulation
      Some library is not given this pin it's fetch internally
      Thanks for asking this question :)

  • @ramelectronicsandrobotic7705
    @ramelectronicsandrobotic7705 4 ปีที่แล้ว +1

    Ram Chandra Rout Arduino

  • @chandanthakur6453
    @chandanthakur6453 4 ปีที่แล้ว +1

    could anyone please tell me roll of pot hg here and how it works...please and as soon as possible..
    thank you...

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      sorry i can't understand "pot hg" ????
      thank for reply me

    • @nandakrishna6277
      @nandakrishna6277 3 ปีที่แล้ว

      we cannot put obstacle in simulation so he used potentiometer to show it. If potentiometer is at high then the obstacle is near , if it's low obstacle is far away .Hoping this is helpful

  • @zuvy1664
    @zuvy1664 2 ปีที่แล้ว +1

    Bro if we want to replace arduino by atmega 328p ... Than how we can do... Please help me bro... Is there change in code

    • @jeet_e_n_e
      @jeet_e_n_e  6 หลายเดือนก่อน

      Code is changed

  • @sanjaysankar1220
    @sanjaysankar1220 3 ปีที่แล้ว +1

    Sir ...4cm distance shown in lcd display is constant and not changing .y?

    • @athulkrishna3619
      @athulkrishna3619 3 ปีที่แล้ว +1

      Just click on input terminal and change it to 5v.

    • @sanjaysankar1220
      @sanjaysankar1220 3 ปีที่แล้ว +1

      Tnku sir 🙏🙏

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Thanks for supporting to our YT family

  • @blacklisted_official1036
    @blacklisted_official1036 2 ปีที่แล้ว

    Which app you are using?

    • @jeet_e_n_e
      @jeet_e_n_e  2 ปีที่แล้ว

      Proteus and Arduino

  • @saifula.9977
    @saifula.9977 4 ปีที่แล้ว

    Can i put on the distance measurement? For example 0cm to 100cm?

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      Yes you can set value in program

    • @atharvaajaymane5358
      @atharvaajaymane5358 3 ปีที่แล้ว

      How can we set the values in program please help!!

  • @AJAY-df1lv
    @AJAY-df1lv 3 ปีที่แล้ว

    bro how to get library for the arduino used in this video....please help

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Which you need
      I using "liquidCrystal.h" is also Available in Arduino software
      If you get it please contact me on my office email address
      Thanks you

  • @amayvlogs8179
    @amayvlogs8179 3 ปีที่แล้ว

    Error reading HEX file '..\Desktop\sketch_jul3a\arduino .HEX' at line 1: Colon expected at start of line.. [ARD1]
    i am getting this message.
    and also real time error

    • @jeet_e_n_e
      @jeet_e_n_e  2 ปีที่แล้ว

      This error is display in Arduino ide or Proteus ...

  • @rutamkhati6948
    @rutamkhati6948 4 ปีที่แล้ว +1

    I wnt same o/p.. Only by using 3 ultrasonic sensor!!!!

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      It's possible
      Define other digital pin to you added sensor
      And copy this same code in void loop

  • @gauravborade449
    @gauravborade449 3 ปีที่แล้ว

    When I run the simulation it says " Invalid opcode 0xFFFF at PC=0x3802
    " pls help :(

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      It's May be your license issue if is not so re-upload your code in .hex file in Proteus

  • @divyeshkoli3975
    @divyeshkoli3975 2 ปีที่แล้ว

    I have problem on LCD panel
    Is showing access violation in module
    What can I do

    • @jeet_e_n_e
      @jeet_e_n_e  2 ปีที่แล้ว +1

      Please check your LCD library not more ...

    • @divyeshkoli3975
      @divyeshkoli3975 2 ปีที่แล้ว

      @@jeet_e_n_e yes thank you it's very helpful

  • @nazurahbintiramlee1215
    @nazurahbintiramlee1215 ปีที่แล้ว +1

    hi! where can i get ultrasonicTEP file?

    • @jeet_e_n_e
      @jeet_e_n_e  ปีที่แล้ว

      Read in discription
      Available in Google drive link

  • @ankitkumarrai7535
    @ankitkumarrai7535 4 ปีที่แล้ว +1

    can you make arduino proteus project for me using 7 sensors? if yes please reply i can give you money for that.

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      Contact to me in business email
      Please check channel description

  • @firhanrizani96
    @firhanrizani96 4 ปีที่แล้ว +5

    why my simulation doesnt work? the LCD display not changing after i adjust the potentiometer. it keeps display 4cm
    Solution : double click on the power input. Set the voltage to 5V

    • @iqbalpermana7413
      @iqbalpermana7413 4 ปีที่แล้ว +1

      yeah, me too

    • @firhanrizani96
      @firhanrizani96 4 ปีที่แล้ว +6

      @@iqbalpermana7413 double click on the power input. Set the voltage to 5v

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      Check the Programming in trig pin and connection to this pin
      Ex. me use 12 no pin in this example
      code is description
      thank for reply me

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว +1

      @@firhanrizani96 Yes @Firhan Rizani is Right

    • @refinabening9847
      @refinabening9847 4 ปีที่แล้ว +1

      Me too :(

  • @smsinan5019
    @smsinan5019 3 ปีที่แล้ว

    Sir showed no error, but the distance did not change, why? Can you help sir?

  • @ambikar7754
    @ambikar7754 3 ปีที่แล้ว +1

    How to vary the distance Range..I'n code?

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Yes, you using "map" function can done ✅

    • @ambikar7754
      @ambikar7754 3 ปีที่แล้ว

      @@jeet_e_n_e thank you

  • @Harsh-rb7vq
    @Harsh-rb7vq 3 ปีที่แล้ว

    Duration was not declare ka error aaya hai sir

  • @natashaambre3283
    @natashaambre3283 4 ปีที่แล้ว +1

    hello could you send the ultrasonicTEP file?

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      Contact to our emails is mention in about of channel
      Thank you

  • @dangerouspikachu4380
    @dangerouspikachu4380 4 ปีที่แล้ว +1

    can we do this same simulation in tinkercad?

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว +1

      Yes do this
      I make it but start in series of Arduino tutorial from scratch

    • @dangerouspikachu4380
      @dangerouspikachu4380 4 ปีที่แล้ว

      @@jeet_e_n_e how to measure distance in feet?

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      The HC-SR04 ultrasonic sensor readings in an easy-to-use package from 2 cm to 400 cm or 1” to 13 feet.
      so you simple change in your code
      1cm = 0.0328084 foot
      Feet = cm / 0.0328084

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      # include "LiquidCrystal.h" //lcd libary
      LiquidCrystal lcd(2, 3, 4, 5, 6, 7); //LCD object Parameters: (rs, enable, d4, d5, d6, d7)
      const int trigPin = 12; //trig pin connection
      const int echoPin = 11; //echopin connection
      long duration;
      int distanceCm;
      int distancefoot;
      float liquid;
      void setup() { // setup perameter
      lcd.begin(16,2);
      pinMode(trigPin, OUTPUT);
      pinMode(echoPin, INPUT);
      lcd.setCursor(0,0);
      lcd.print(" Distance ");
      lcd.setCursor(0,1);
      lcd.print(" Measurement ");
      delay(2000);
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print(" Made By ");
      lcd.setCursor(0,1);
      lcd.print(" Jeet.org ");
      delay(2000);
      lcd.clear();
      }
      void loop() { // loop of flow program
      digitalWrite(trigPin, LOW);
      delayMicroseconds(2);
      digitalWrite(trigPin, HIGH);
      delayMicroseconds(10);
      digitalWrite(trigPin, LOW);
      duration = pulseIn(echoPin, HIGH);
      distanceCm= duration*0.034/2;
      distancefoot= distanceCm/0.0328084;
      lcd.setCursor(0,0);
      lcd.print("Distance Measur.");
      delay(10);
      lcd.setCursor(0,1);
      lcd.print("Distance:");
      lcd.print(distancefoot);
      lcd.print(" Foot ");
      delay(10);
      }

  • @pavulurupapushpa1351
    @pavulurupapushpa1351 4 ปีที่แล้ว +1

    How much distance is measured for this device

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      Ultrasonic sensor HC-SR04 is used here to measure distance in range of 2cm-400cm with accuracy of 3mm.

  • @sangitapaul9833
    @sangitapaul9833 2 ปีที่แล้ว

    In proteus, my uno board doesn't have VCC pin.. Then what would I do?

    • @jeet_e_n_e
      @jeet_e_n_e  2 ปีที่แล้ว

      It's good thing, your library is up-to-date so no need to VCC pin connection it is connected by default
      Ignore it and do practical all the best

    • @sangitapaul9833
      @sangitapaul9833 2 ปีที่แล้ว

      @@jeet_e_n_e then where I will connect the +5 V pin of ultrasonic sensor with? And also how I'll connect the potentiometer and UNO board?
      Please sir tell me... All setup is done except this connection... So I can't stimulate... Please tell me... 😟😟😟😟

    • @jeet_e_n_e
      @jeet_e_n_e  2 ปีที่แล้ว

      External +5V DC supply in Proteus tools

    • @sangitapaul9833
      @sangitapaul9833 2 ปีที่แล้ว

      @@jeet_e_n_e
      What's the connection among ultrasonic sensor, potentiometer and uno board??

    • @sangitapaul9833
      @sangitapaul9833 2 ปีที่แล้ว

      @@jeet_e_n_e I have added this... I'm asking how I'll connect this DC with arduino UNO board??

  • @sivaganapathi2593
    @sivaganapathi2593 2 ปีที่แล้ว

    Bro can you do the project using microcontroller

  • @leminghau
    @leminghau 4 ปีที่แล้ว +1

    please give me the arduino library

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      find in google search easy to download
      thank for reply me

  • @scorpiogamingworlds7070
    @scorpiogamingworlds7070 3 ปีที่แล้ว +1

    iski labiray kidhr pari hai IMO16 OR ultrasonic sensor wali

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Inside the Proteus software
      If is not available download manual in Google
      It work 💯%

    • @scorpiogamingworlds7070
      @scorpiogamingworlds7070 3 ปีที่แล้ว

      @@jeet_e_n_e sir can you contact me at wattsapp

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว +1

      Please contact me my email

    • @scorpiogamingworlds7070
      @scorpiogamingworlds7070 3 ปีที่แล้ว

      @@jeet_e_n_e SEND EMAIL

  • @jeromejuntilla2152
    @jeromejuntilla2152 3 ปีที่แล้ว

    where can i get ultrasonic.tpe?

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว +1

      I will send you :)

    • @jeromejuntilla2152
      @jeromejuntilla2152 3 ปีที่แล้ว

      @@jeet_e_n_e thank you so much☺️

    • @dhevindranravi2527
      @dhevindranravi2527 3 ปีที่แล้ว

      @@jeet_e_n_e Plz send the ultrasonic.tpe file to my email : devanneymar10@gmail.com

  • @tusharbhagat9973
    @tusharbhagat9973 3 ปีที่แล้ว

    how it can be done in Raspberry pi??

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว +1

      Library changed & some sentences changing.
      Raspberry Pi is work on python language so this is changing

    • @tusharbhagat9973
      @tusharbhagat9973 3 ปีที่แล้ว

      @@jeet_e_n_e is the code is same for raspberry pi? If no then what are the changes have to do??

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Not same code to use, totally code is changing Raspberry Pi is Base language is python and Arduino base Language is c++ so u can't use as Raspberry Pi
      Find some other tutorial in YT
      Thanks for contacting me :)

  • @ShirjeelAliHaider
    @ShirjeelAliHaider 3 ปีที่แล้ว

    from where i can get that ultrasonic.tep ?

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      I will provide you in email
      Please contact to my official e-mail address
      Thanks you for asking

    • @ShirjeelAliHaider
      @ShirjeelAliHaider 3 ปีที่แล้ว

      @@jeet_e_n_e Thank you for replying ..I have downloaded it from a source ...

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      Ok

    • @akshatrajsharma
      @akshatrajsharma 3 ปีที่แล้ว

      @@ShirjeelAliHaider bro where did you download it from?

    • @ShirjeelAliHaider
      @ShirjeelAliHaider 3 ปีที่แล้ว +1

      @@akshatrajsharma Bro I forgot what was Ultrasonic .tep
      Is it a file ? Or a library ?
      I think I downloaded it from somewhere on google
      Sorry I don't remember exactly now

  • @hamzamahassine1526
    @hamzamahassine1526 3 ปีที่แล้ว

    Can you tell the code ultrasonic ?

    • @hamzamahassine1526
      @hamzamahassine1526 3 ปีที่แล้ว

      Hamza.mahassine.03@gmail.com

    • @jeet_e_n_e
      @jeet_e_n_e  3 ปีที่แล้ว

      See in discription all details is available

  • @ramelectronicsandrobotic7705
    @ramelectronicsandrobotic7705 4 ปีที่แล้ว +1

    phone nomber

    • @jeet_e_n_e
      @jeet_e_n_e  4 ปีที่แล้ว

      Contact me on email
      mention in about of my channel
      Thank you

  • @mzaki8503
    @mzaki8503 ปีที่แล้ว

    How about removing the stupid music and add some explanations next time?

    • @jeet_e_n_e
      @jeet_e_n_e  6 หลายเดือนก่อน

      Put your volume in mute mode otherwise pressure 'M' key in laptop/PC