How To Control a LED Strip with Ultrasonic Sensor

Поділитися
Вставка
  • Опубліковано 22 жов 2024

КОМЕНТАРІ • 31

  • @paranormalparanoiauk
    @paranormalparanoiauk 10 місяців тому +4

    Could I ask if there is an alternative 5v pin for the sensor as only 3.3v available,sorry I’m new at this

    • @dajmispokojchuju8556
      @dajmispokojchuju8556 5 місяців тому

      I'd connect the sensor Vc Pin to external 5v supply with GND common with Your board (it should work just well with a common ground). It's a good way to connect anything that is power-hungry to the boards to have an external power supply not to burn your board due to the power levels, ofc you can connect 30ish ws2812 led controllers under 1:1 5050RGB diode, but if the diode power conscumption is about 1W per one powerLed or something even cut half in power consumption, there's a fair big chance that your board is going to evaporate, and, if it's connected to Your pc it can produce a spike on the usb port and thus damage it and/or the main board. Yes, ultrasonic sensor does not need that, but if you want a 100m range one i won't risk. It is always a good practice FYI not to connect any power pins THROUGH the board, but TO THE SAME SOURCE. And the signal pins- you connect them directly to the board unless there's a different voltage requirements used, like 12V or something transistor-gated sensor for leds for example- do not do this.
      Remember, every time you want to connect anything that is probably power-hungry straight to your board, as well as PC, make sure you use external power supply with a common ground (sometimes you'll need a capacitor but whatever not to burn this whole shit probably).
      I was supplying some 15-30 meters with external power supply on esp32 and it worked just perfectly, used some capacitor to connect grounds when i was on the cable and then just mounted proto on the very same power supply both for the board and the rest but after the programming was done and cable unmounted off the pc.
      However, with a long led strip there's probably (due to voltage drop caused by the cable/strip resistance, but you are not supposed to know this at this level), so whenever you are going to power a controller and a long strip of low-voltage leds just make sure it's powered from both ends or at least 2 points on the length, because it'd be dimmed or off.
      second thing is that any led diode is not voltage-driven, but it is necessary to have a voltage level between it's operating voltages for it to work. LEDs ar current-driven, thus the current flow through the board that exceeds the levels are going to burn it. Signal recieving/sending is just ok even with voltage converter ofc, not the power ones.
      Hope it helps.

  • @jimmydillon6530
    @jimmydillon6530 Рік тому +2

    Is there a way to make it so that when the ultrasonic picks up an object at a certain distance, it either turns on/off the led strip that is running its own code?

  • @zacharystevens9452
    @zacharystevens9452 Місяць тому

    Can I run two of these on one arduino? Also is it possible to reverse the lights so they turn on only where the object is?

  • @HDbacon
    @HDbacon Рік тому +1

    TY this helped me figure out why my sensor wasn't working lol. Only thing was I was using it for an RGB led, but either way..I got there xD

    • @arduinote
      @arduinote  Рік тому +1

      good happy to help :) what are you building?

    • @HDbacon
      @HDbacon Рік тому

      @arduinote a smart bin. I just need the bin + holes. And to get this code working lol.

  • @superiorlongboards
    @superiorlongboards 11 місяців тому

    How do i make it illuminate more as i get closer rather than the other way around like you did in the video?

  • @toniwahyudin1021
    @toniwahyudin1021 8 місяців тому

    hi... I just learned to assemble this component. but why doesn't it work? I have assembled the components according to your instructions in the video, including entering the same coding without adding or subtracting, but it still doesn't work and runs like the result. Am I still missing something? please help with directions.

  • @r917g
    @r917g Рік тому +1

    I am trying this as my first project and to be frank, I am yet to understand how to even programme the Arduino Uno. However, as soon as I connect up the strip and sensor as per your video, the board gets extremely hot. Any ideas please?

    • @r917g
      @r917g Рік тому +2

      Further to my comment above, I have now found it is because of the current drawn by the LED Strip. Please DO NOT CONNECT MORE THAN 10 LED's direct to the board without powering them from a separate power supply. It could well go up in flames!!!!

    • @HDbacon
      @HDbacon Рік тому

      I think resistors can help too, im a noob and thanks to this video finally my code works my sensor wasn't working xD it needed the sensor library @@r917g

    • @ikilledlogic
      @ikilledlogic 3 місяці тому

      Maybe a retorical question: Did you install the Arduino IDE programme? :D

  • @atharvasargar2882
    @atharvasargar2882 8 місяців тому

    Can we use dv12v led strip

  • @jul9832
    @jul9832 11 місяців тому

    VCC of the sensor is connected to the 3.3V not 5V no?

  • @macks9865
    @macks9865 Рік тому

    thank you so much!

  • @prads_left_shoe8752
    @prads_left_shoe8752 Рік тому

    looks like magic bro

  • @aniketkumar3126
    @aniketkumar3126 Рік тому +1

    impressive ❤️

    • @arduinote
      @arduinote  Рік тому

      thanks :) what project should I do next? :D

  • @anshulaery625
    @anshulaery625 6 місяців тому

    The led strip i have only has two pins any solution

  • @Gino_567
    @Gino_567 5 місяців тому

    i get the error "Compilation error: 'UltraSonicDistanceSensor' does not name a type" line 11.
    there seems to be another error on line 25 also.
    Any ideas please

    • @triptakaur4811
      @triptakaur4811 2 місяці тому

      Hi, mine has the same problem it seems...

  • @martinchristensen9125
    @martinchristensen9125 Рік тому

    Good video

    • @arduinote
      @arduinote  Рік тому

      Thx for your support :) what do you want to see next?

  • @r917g
    @r917g 3 місяці тому

    No I did not. Following the experience of it almost catching fire, it has sat in my cupboard untouched, so I have no idea if it is even serviceable any more.

  • @AlbertManuelAristoRumapea
    @AlbertManuelAristoRumapea 5 місяців тому

    error HCSR04

  • @הראלאלמליח-פ5ו
    @הראלאלמליח-פ5ו Рік тому

    Can you write me a code in c++? Please..

  • @fegil3371
    @fegil3371 Рік тому

    it really helps