Raspberry Pi Tutorial on Connecting the Ultrasonic sensor HC SR04

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 มิ.ย. 2020
  • Connecting the Ultrasonic Sensor( HC-SR04) to the Raspberry Pi to measure distance.
    Coming Soon:
    🔥 Get the latest updates and project guides! Join our newsletter here bit.ly/3TRf3x7
    Equipment you need:
    Breadboard (amzn.to/3qxb8uk)
    Raspberry Pi 3 or 4 (amzn.to/3qA944v)
    Ultrasonic Sensor (HC-SR04) (amzn.to/3Ncbpvr)
    One 1 kilo-Ohm resistor (amzn.to/3oPorFY)
    One 2 kilo-Ohm resistor (amzn.to/3oPorFY)
    8 Female-Male Jumper Wire (amzn.to/3NfstAC)
    Other Info:
    Explore the exciting world of DIY making! Join Mark Frauenfelder’s Skillshare course with a free one-month trial here: skl.sh/3Vv83bB. Start your maker journey today!
    Credits:
    The steps in this tutorial, including the code, were obtained from the Pi Hut at the link below, with minor adjustments.
    Reference:
    thepihut.com/blogs/raspberry-...
    PS: Some of the links in this description are affiliate links that I get a kickback from

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

  • @Bianchi77
    @Bianchi77 5 หลายเดือนก่อน +1

    Nice video, thanks :)

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

    very nice and simple work

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

    Thank you very much

  • @vomm27
    @vomm27 2 ปีที่แล้ว +5

    bro seems you connected pin 2 to negative railway and pin 6 to positive railway can you please confirm

  • @WalkingBlock
    @WalkingBlock 4 หลายเดือนก่อน +1

    great thanks

  • @lagtabhamza1676
    @lagtabhamza1676 16 วันที่ผ่านมา +1

    Hi can i ask you please, is there's is a sensor that can present radar sensor ( calculating speed and velocity ) ? if yes tell me and thaak you so much brother

    • @raspberrypimadeeasy
      @raspberrypimadeeasy  14 วันที่ผ่านมา +1

      Yes, there are radar sensors that can be used with a Raspberry Pi to calculate speed and velocity. Here are a couple of examples:
      • OmniPreSense OPS243-A Doppler Radar Sensor: This sensor was used in a project to build a “speed trap” that uses machine learning to identify vehicles and a radar sensor to measure speed1. The data was then reported to the cloud1.
      • HB100 Radar Sensor: This sensor can be wired to a Raspberry Pi to calculate the speed/velocity of an object2.
      • A111 Pulsed Radar Sensor: This is a single-chip solution for pulsed coherent radar (PCR) and comes complete with antennae and an SPI interface capable of speeds of up to 50MHz3. Applications for PCR include distance-sensing, gesture, motion, and speed detection.
      Check out this links below
      wiki.ros.org/Drivers/Tutorials/SpeedMeasurementWithRadarSensorHB100Python
      www.tomshardware.com/news/raspberry-pi-mobile-speed-trap
      learn.sparkfun.com/tutorials/getting-started-with-the-a111-pulsed-radar-sensor/all

    • @lagtabhamza1676
      @lagtabhamza1676 13 วันที่ผ่านมา +1

      @@raspberrypimadeeasy I just want to know if there's sensor's do the same thing, that i can use in proteus simulation

    • @raspberrypimadeeasy
      @raspberrypimadeeasy  13 วันที่ผ่านมา

      You can simulate the ultrasonic sensor in Proteus using the Ultrasonic Sensor Library

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

    Can i add 2 more sensor in the same raspberry? volts/amps problems?

    • @JellyFoxYT
      @JellyFoxYT 6 หลายเดือนก่อน +1

      I know this is super late but volts are the amount of pressure and won't change unless you either add more power sources change the voltage on the existing one. The sensor needs 5V and the GPIO pins get fried on anything more than 3.3V. Amps shouldn't be a problem either.

  • @Detopie
    @Detopie 6 หลายเดือนก่อน +1

    i don’t have a 2kohm resistor, but i have lots of 1KOhm. how would i wire it that way?

    • @JellyFoxYT
      @JellyFoxYT 6 หลายเดือนก่อน +2

      the resistance can stack

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

    What coding software did u use

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

      The Raspberry Pi comes preloaded with Python which you can use to code

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

      Terminal or thonny that come preinstalled into the pi

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

      @@thefishersfisher2378 idk if you still need it but it's a command line text editor called GNU Nano

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

    working

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

    I'm not getting a continuous output. I need to keep pressing Run on the code in order to get a single reading. Anyone knows how to fix this?

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

      Same here did you find the answer

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

      @@wanderingsaint2659 nope

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

      Yes , You can add “while (True):”
      Then put your code after this sentence then it will run continuously

    • @leenavin2005
      @leenavin2005 7 หลายเดือนก่อน

      Put your code in a for loop or while loop and that should give you a continuous reading. I have noticed that the sensor gets overheated sometimes, hence make sure that you let it rest for some time using sleep.

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

    im getting waiting for sensors to settle then no reading any idea bro whatwent wrong

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

      did you figure it out

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

      @@marck4039 change TRIG from 16 to 23 and ECHO from 18 to 24 into the code only.

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

      it needs GPIO value not pin number

    • @JellyFoxYT
      @JellyFoxYT 6 หลายเดือนก่อน +1

      @@wajadadkarim1708 I have it wired to GPIO pins 21 and 20 and in the code, I assigned the right values to the variables. I don't know what the issue is though.

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

      @@JellyFoxYTdid you figure it out?

  • @amroelmughrabi
    @amroelmughrabi 7 หลายเดือนก่อน

    Did you film with potato?