Floating Pins, Pull-Up Resistors and Arduino

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 17. 08. 2014
  • đŸ€© FREE Arduino Crash Course 👇👇
    bit.ly/get_Arduino_skills
    **If you like this, I think you'll like the premium Arduino training we offer. Check it out here** bit.ly/3nSBPUs
    We designed this circuit board for beginners!
    Kit-On-A-Shield: amzn.to/3lfWClU
    SHOP OUR FAVORITE STUFF! (affiliate links)
    ---------------------------------------------------
    Get your Free Trial of Altium PCB design Software
    www.altium.com/yt/programming...
    We use Rev Captions for our subtitles
    bit.ly/39trLeB
    Arduino UNO R3:
    Amazon: amzn.to/37eP4ra
    Newegg: bit.ly/3fahas8
    Budget Arduino Kits:
    Amazon:amzn.to/3C0VqsH
    Newegg:bit.ly/3j4tISX
    Multimeter Options:
    Amazon: amzn.to/3rRo3E0
    Newegg: bit.ly/3rJoekA
    Helping Hands:
    Amazon: amzn.to/3C8IYXZ
    Newegg: bit.ly/3fb03X1
    Soldering Stations:
    Amazon: amzn.to/2VawmP4
    Newegg: bit.ly/3BZ6oio
    AFFILIATES & REFERRALS
    ---------------------------------------------------
    â–șAudible Plus Free trial: amzn.to/3j5IGrV
    â–șJoin Honey- Save Money bit.ly/3xmj7rH
    â–șDownload Glasswire for Free:bit.ly/3iv1fql
    FOLLOW US ELSEWHERE
    ---------------------------------------------------
    Facebook: / programmingelectronics...
    Twitter: / progelecacademy
    Website: www.programmingelectronics.com/
    This tutorial talks about floating pins. Specifically, what they are, why they are unwanted and how to deal with them.

Komentáƙe • 254

  • @programmingelectronics
    @programmingelectronics  Pƙed 3 lety +4

    ****If you like this, I think you'll like the premium Arduino training we offer. You can check it out here**** bit.ly/3lHyzcB

  • @mhelms1983
    @mhelms1983 Pƙed 8 lety +104

    Hands down the best explanation on a pull up resistor I've seen. I actually understand now, thank you for this. Subscribing.

    • @programmingelectronics
      @programmingelectronics  Pƙed 8 lety +2

      Glad you liked it, thanks for watching!

    • @cobra646
      @cobra646 Pƙed 7 lety +4

      same. So many terrible "tutorials" so sift through until you find a good one on youtube

  • @enteranamehere4541
    @enteranamehere4541 Pƙed 4 lety +3

    The one phrase that made this video different from all others, and better than all others, is "the path of least resistance." Hearing that gave me a eureka moment. Thank you so much.

  • @clunkclunk2099
    @clunkclunk2099 Pƙed 3 měsĂ­ci +2

    I’ve watched about four videos on this topic, and yours is the first that explicitly says why a resistor is needed not just how to do it. The part where you said path of least resistance is when the proverbial lightbulb went off in my head. Thanks!

    • @programmingelectronics
      @programmingelectronics  Pƙed 3 měsĂ­ci

      Great to hear! Sometimes for me I think it takes quite a few different angles, and then all the sudden things pop into place - its a great feeling. Glad this could help some!

    • @independent900
      @independent900 Pƙed měsĂ­cem +1

      @@programmingelectronics I don't think it's about repetition and different angles, it's more about asking and answering the right questions, and breaking it down into digestable parts. After previous videos I was still clueless at the end. Your explanation and visual aids were fantastic, and I echo @clunkclunk2099's experience. Thank you!

  • @jupiter457
    @jupiter457 Pƙed 10 lety +15

    I finally understand this concept now!!! Thank you. Your tutorials are great.

  • @harshitrajput6865
    @harshitrajput6865 Pƙed 7 lety +1

    After learning from your tutorials from one week , no other tutorial on youtube can match your level ! Thanks man !

  • @elecnut8211
    @elecnut8211 Pƙed 7 lety +3

    I dont think you have any idea how much you are helping the electronics community. Thank you thank you thank you !!

  •  Pƙed 6 lety

    I got No words to express how iluminating your videos are.... you make all the electronic's messy theory a vivid and smooth experience. THANK YOU SO MUCH

  • @tedthisius4778
    @tedthisius4778 Pƙed 5 lety +2

    Great video. I always think of a pull up resistor like a coil spring. When the resistor is connected to 5V, it tries to pull up the voltage at that point to 5V but can be overcome by a direct connection to ground when the button is pushed. Much like a spring, it returns to the original position (5V) when released. When the button is pushed there is a 5V drop across the resister which is converted to a very small amount of heat. There is very little current flow because the resistance is relatively high. A pull down resistor really works the same way, the resistor or "spring" is connected to ground. When the button is pushed the switch can provide 5V which overcomes the ground and produces 5V to the Arduino pin. Since the symbol for a resistor is a wiggly line, it reminds me of a coil spring.

  • @bradandsusan96
    @bradandsusan96 Pƙed 6 lety +1

    **THANK YOU SIR** Best tutorial's; simple, well thought out, flows logically and to the point. Great stuff!

  • @jamescashmore8408
    @jamescashmore8408 Pƙed 5 lety +5

    best explanation i have ever found. You have a skill that many people lack that is explaining things clearly and using the right images to add to what you are saying. So many videos the stuff on the screen doesn't quite fit what is being said.

  • @chunheichau7947
    @chunheichau7947 Pƙed 7 lety +1

    Very good explanation on how the pull up resistor works, I have been finding a good explanation for a long time until I find this.

  • @JohnIsaacBradshaw
    @JohnIsaacBradshaw Pƙed 7 lety +1

    Seeing the circuit you built helped a lot. Thanks!

  • @blehprojects5776
    @blehprojects5776 Pƙed 10 měsĂ­ci +1

    Holy crud I’ve been looking at videos like this for over a month now and this is the first one that explains things in plain English! Keep ‘em coming!

  • @EgyGyro
    @EgyGyro Pƙed 4 lety +2

    another great expression; " *Tying up* the pin to a certain voltage". It draws a clearer figure in my mind than "pulling up" the pin to voltage.

  • @shvideo1
    @shvideo1 Pƙed 5 lety +1

    The best video on this important concept. Very nicely done. Thank you.

  • @afraimuangnory7195
    @afraimuangnory7195 Pƙed 7 lety +1

    you are really a gift to engineering.I now understand clearly what is mean by pull up resistor. I am try to get the money so that i will buy training materials from you .
    thanks a lot .

  • @freethinker1957
    @freethinker1957 Pƙed 5 lety +1

    Michael Cheich: Thank you for this excellent video. Took me a while to "get it", but now I do. After watching this, I took your free "Arduino Crash Course", which convinced me it would definitely be worth buying full access to all your training, which I have now signed up for (so you can, as you say, keep gas in your Lamborghini...)
    Now just a couple of notes (as Michael says, the best way to learn is to look for opportunities to "teach" - explain it to someone else):
    This video shows the problem of floating pins, and how to resolve that via an external pull-up resistor. Once you understand the concept, you can by-pass the problem on digital input pins in one of these two ways in your code (rather than on a breadboard) - using digital pin 2 as an example:
    pinMode(2,INPUT);
    digitalWrite(2,HIGH); // WRITING HIGH to this INPUT pin activates its built-in pull-up resistor.
    OR
    pinMode(2,INPUT_PULLUP); // Does both of the above steps in a single statement.
    Either of those activates the internal pull-up resistor built into the Arduino digital (and maybe analog?) pins. This info can be found in the Arduino Reference documentation for the pinMode function.
    Again, I suggest you DON'T use the built-in pull-up resistors until you complete this video and understand the problem of floating pins in the first place.

  • @henik9
    @henik9 Pƙed 6 lety +2

    Thanks man this vid really clarified some stuff for me.

  • @johndripper
    @johndripper Pƙed 6 lety +2

    cool i like how you explain things :) this was very helpful you were the reason i got interested in arduino :) and other MCUs

  • @davidizquierdogomez
    @davidizquierdogomez Pƙed 6 lety +1

    that was a very cool video tutorial. Thanks for solving the pull-up meaning and floating pins....so cool ÂĄÂĄÂĄ

  • @KW-ei3pi
    @KW-ei3pi Pƙed rokem

    One of THE most important concepts for an Arduino use to understand. Thank you !!!

  • @kim15742
    @kim15742 Pƙed 7 lety +21

    lmao! I didn't even know I had this problem and since I am a programmer, I did the solution software-wise by it counting the number of loops that it's low. If it is low for over 20 loops the button is pressed. Not very elegant, I know

  • @OneIdeaTooMany
    @OneIdeaTooMany Pƙed 3 lety +1

    This is the best explanation I've seen and has also helped me understand what INPUT_PULLUP and INPUT_PULLDOWN are doing.

  • @garvitgoyal5236
    @garvitgoyal5236 Pƙed 3 lety +1

    Thanks a lot. I am a begineer in electronics and this problem made me frustated many times, but after your explanation it will be very easy to solve this.

  • @TheDeIirium
    @TheDeIirium Pƙed 9 lety +1

    Instant subscription after the first minute - brilliant humor.

  • @MinhNg180
    @MinhNg180 Pƙed 4 lety +4

    This video just cured my headache.
    Thanks a lot.

  • @defariase
    @defariase Pƙed 8 lety

    This tutorial is pretty awesome! Thanks for uploading it. I'm subscribing to your channel for more!
    Cheers,
    LD

  • @FRADemons
    @FRADemons Pƙed 5 lety +1

    Very good video! So helpful !!

  • @mohammedzoheb5299
    @mohammedzoheb5299 Pƙed 3 lety +1

    Well explained..thank you so much!

  • @derrickadusei7987
    @derrickadusei7987 Pƙed 4 lety

    It solved my digital pin input problem. Thanks

  • @prashanthirwani8047
    @prashanthirwani8047 Pƙed 2 lety +1

    For me as a beginner Most easy and value providing video on yt great explaination keep goingđŸ”„đŸ”„đŸ”„

  • @thomasalexander1563
    @thomasalexander1563 Pƙed 7 lety +1

    Nice tutorial agains...
    Love this channel

  • @SymphonyKol_androidLover
    @SymphonyKol_androidLover Pƙed 2 lety +1

    Beautiful explanation, was just looking for this, Thanks a ton.

  • @haribukkeprasad4612
    @haribukkeprasad4612 Pƙed 6 lety +1

    Thanks a lot for the explanation. You really saved my day. :)

  • @koemdjiev
    @koemdjiev Pƙed 3 lety

    Great explanation, nice and simple, thanks! I was having difficulty understanding the Pull-up pins

  • @d4ny4pres1d3nt
    @d4ny4pres1d3nt Pƙed 9 lety +1

    Thank you, you explain things very clearly! Cheers

  • @regpollock9403
    @regpollock9403 Pƙed 7 lety +1

    Thank you for making it understandable.

  • @humanperson8418
    @humanperson8418 Pƙed 2 lety +1

    Best explanation of Pull-Up Resistors I've seen. Only improvement is if you said the Arduino has one built in, and how to activate it.

    • @programmingelectronics
      @programmingelectronics  Pƙed 2 lety

      Thanks so much for watching! Good call - that totally should have been covered in this video. You may already know, but just in case...
      To use the internal input pull up, use pinMode(yourDigitalPinNumber, INPUT_PULLUP)
      What this does is set the pin as an input - so it can read digital inputs - but it is internally being pulled to a HIGH state. If you want to trigger your input, you connect the pin to ground (i.e. through a button press)
      www.arduino.cc/reference/en/language/functions/digital-io/pinmode/

  • @bryanwesterveld5287
    @bryanwesterveld5287 Pƙed 9 lety

    This explained it very well!

  • @ahmedamer777
    @ahmedamer777 Pƙed 8 lety +5

    the atmega 328 has built in pullup resistor you have to activate in the void setup using digital write to high. ;)

  • @vadimkoller6232
    @vadimkoller6232 Pƙed 5 lety +1

    Finally got it. Thank you

  • @pikeshmn
    @pikeshmn Pƙed 7 lety +1

    Awesome Explanation!

  • @The1Creston
    @The1Creston Pƙed 5 lety +1

    Thank you. That helped a lot!

  • @Maxr1998X
    @Maxr1998X Pƙed 8 lety +1

    Excellent video. Now I understand a LOT more. Thanks!

    • @programmingelectronics
      @programmingelectronics  Pƙed 8 lety

      +Maxr1998X Great, glad you found it useful!

    • @umarmoiz8810
      @umarmoiz8810 Pƙed 8 lety

      +Programming Electronics Academy Can we use INPUT_PULLUP in our code ?as opposed to adding an external resistor or does it not work like that ?

  • @pi11sburydoeboy
    @pi11sburydoeboy Pƙed 7 lety +1

    Great explanation. Subbed!

  • @northshorepx
    @northshorepx Pƙed 8 lety

    Nice a simple and makes perfect sense now! Thank you.

  • @mayurthombare3288
    @mayurthombare3288 Pƙed 6 lety +1

    Thanks for this helpful video

  • @bartnoe4194
    @bartnoe4194 Pƙed 7 lety

    Thank you for your clear explanation. great course!

  • @jeroendruwe9061
    @jeroendruwe9061 Pƙed 7 lety +1

    Very good explanation :)

  • @Lakitu1446
    @Lakitu1446 Pƙed 5 lety +1

    Thank you i've finally understrood thanks to you !!

  • @redtipon9910
    @redtipon9910 Pƙed 4 lety +1

    Thank you sir, I'm not really good at reading from the net but this video explain perfect. I love it!! subscribing. more power to you sir.

  • @avinashpankhade8644
    @avinashpankhade8644 Pƙed 7 lety +1

    great job... got it crystal cleared!!!!!!!!!!

  • @filipemarques9144
    @filipemarques9144 Pƙed 7 lety

    Finally...now I get it! Thanks! :)

  • @MakerTutor101
    @MakerTutor101 Pƙed 6 lety +1

    Thank you your tutorials are great

  • @MJ-iy4fb
    @MJ-iy4fb Pƙed 3 lety +1

    Good Lesson!!

  • @bernhardbaumgartner2890
    @bernhardbaumgartner2890 Pƙed 3 lety +1

    Great explanation, thanks a lot man!

  • @mathiastyseng9208
    @mathiastyseng9208 Pƙed 4 lety +1

    easy new sub, first vid to properly explain it

  • @Ammani-Yat
    @Ammani-Yat Pƙed 5 lety

    great lecture 👍

  • @katrinagarcia8645
    @katrinagarcia8645 Pƙed 5 lety +1

    Funny guy. Love the intro with the surfing micro-controller

  • @Richie_
    @Richie_ Pƙed 2 lety +1

    Nice one Michael. That helped.

  • @kameelamareen
    @kameelamareen Pƙed 7 lety

    WOW man hands down for sure !!!

  • @jorgemariofernandezfuentes3399

    Excelente InformaciĂłn!!

  • @vincent6313
    @vincent6313 Pƙed 8 lety +2

    very helpful for my final exam. thanks

  • @georgekot6377
    @georgekot6377 Pƙed 8 lety +2

    Good work. Thanks

  • @Bianchi77
    @Bianchi77 Pƙed 2 lety +1

    Nice video, thanks for sharing :)

  • @shaunsomaru4524
    @shaunsomaru4524 Pƙed 5 lety +1

    Thank you for great explanation

  • @twitchy9948
    @twitchy9948 Pƙed rokem

    I would also add that this mysterious "noise" is that cable starts working as an antenna (like the one in your phone), if you pull out the cable, the pin read will go from random to 0.

  • @AhmedDeedatPalestine
    @AhmedDeedatPalestine Pƙed 5 lety +1

    The best video.

  • @Moncayoboy
    @Moncayoboy Pƙed 9 lety +1

    Good explanation, thanks.

  • @cill521
    @cill521 Pƙed 8 lety +1

    Very clear. Thanks

  • @twinstarsnz3626
    @twinstarsnz3626 Pƙed 8 lety

    Thanks mate!

  • @jianbinchen1428
    @jianbinchen1428 Pƙed 7 lety

    I am wondering how the pull-up resistor put if I have a sensor that has V++, Vcc and GND?

  • @threeelancer
    @threeelancer Pƙed 4 lety +1

    Thanks, it helped.

  • @alexp7274
    @alexp7274 Pƙed 4 lety +1

    Great explanation.

  • @lizardofoz5329
    @lizardofoz5329 Pƙed 5 lety

    After watching AddOhm's tutorial I understood this topic. Now I am confused again.
    Never mind, I still liked it because you wrote some actual code and explained what
    it did and why. I am new to all this and it seems like everyone doing tutorials just
    uses simple existing sketches so you never see anything original being written. So
    bottom line, thank you and I'll watch this until I get clear on it again.

  • @andytren9498
    @andytren9498 Pƙed 4 lety

    Great. Anyway, how make press 2 times within one second make output?

  • @WhiskyPankcake
    @WhiskyPankcake Pƙed 9 lety +1

    Great tutorial

  • @mps6934
    @mps6934 Pƙed 6 lety +1

    Funny intro ^.^ Great explanation, too.

  • @jeranrai645
    @jeranrai645 Pƙed 4 lety +2

    This is the best tutorial i ever encountered but still a small question. After the pull up resistor is connected to 5V , isnt the connection to digital pin 2 is always gonna read High even after its pressed or not ! or am i wrong on some logic ?

  • @REACH253
    @REACH253 Pƙed 3 lety +1

    Is it possible to implement a pull up resistor, but substitute the pushbutton with a sensor or an optocoupler?

  • @joshuapitong899
    @joshuapitong899 Pƙed 2 lety +1

    Thank you.❀

  • @lgflanang
    @lgflanang Pƙed 5 lety

    Simply put, it is a bounce. And the pull up resistor corrected it to a point.

  • @ryanjin8343
    @ryanjin8343 Pƙed 8 lety

    Hey I really like this video. I am wondering if you can do a video on the button debounce. Like when you press a button and release it, the value might shake between 1 and 0 a few times, and if you are saying something like, when someone press it, turn on an led, when someone press it again, turn it off, this shake between the value can really mess this up. So I'm wondering if you mind doing a tutorial on this. Thanks a lot!

  • @shahidilhan3139
    @shahidilhan3139 Pƙed 7 lety

    I have a question to blink a led we connect ground to the negative pin of the led bit here I don't understand where does the current move from the ground or the 5v pin please help

  • @parthpatel1605
    @parthpatel1605 Pƙed rokem

    Superb👌

  • @MrKbtor2
    @MrKbtor2 Pƙed rokem

    Great explanation!

  • @kenfranco7981
    @kenfranco7981 Pƙed 9 lety +4

    Great video but why don't you use the internal pull up resistor built into the Arduino boards instead of an external pull up resistor ?

    • @programmingelectronics
      @programmingelectronics  Pƙed 9 lety +2

      Ken Franco Great question Ken! Since the button sketch examples that come loaded with Arduino all use external pull ups I decide to follow suit.
      But I agree, the INPUT_PULLUP is the way to go.

  • @randywetzler5976
    @randywetzler5976 Pƙed 5 lety

    That's a great explanation of a "pull up" resistor. I assume a "pull down" resistor does the opposite holding the pin value to 0V. I see other tutorials where the content provider will connect the resistor(s) to the ground side of a LED(s) circuit so it's a little confusing to me. Can someone explain the best practice for both type circuit? Maybe in a simple circuit it doesn't matter, I don't know. I am new to this Arduino stuff.

  • @oteikwufrancis1108
    @oteikwufrancis1108 Pƙed 2 měsĂ­ci

    Woohoo!!
    Thanks man. You just helped me understand the concept of floating pins. I've been trying to get this and all the other sources I consulted didn't help much. Thanks 😊
    Also I checked your other tutorials and I'll like to pay for your course. But I'm a bit wary course I've registered for some courses and they turned out to not be what I expected. So, is there like a trial version I can test with before payment?

    • @programmingelectronics
      @programmingelectronics  Pƙed 2 měsĂ­ci

      Here is a free course we offer:
      www.programmingelectronics.com/arduino-crash-course/
      If you like this, I think you'll like the training program.

  • @SukhdevSingh-tp4mg
    @SukhdevSingh-tp4mg Pƙed 4 lety +1

    Good job!!!!!!!!

  • @johnbenson8080
    @johnbenson8080 Pƙed 7 lety

    The book shown at the beginning of each video where to purchase??

  • @chuckhole
    @chuckhole Pƙed 2 lety +1

    I think it would have been helpful to add that changing the input pin mode assignment from
    pinMode(Pin_Input, INPUT);
    to
    pinMode(Pin_Input, INPUT_PULLUP);
    accomplishes the same thing and eliminates the need for an external resistor.

  • @wick3de
    @wick3de Pƙed 9 lety +1

    you are great men! and nice humor twitch on it

  • @actionoise
    @actionoise Pƙed 5 lety

    thanks bro you permitted actionoise sistem......

  • @josephshaff5194
    @josephshaff5194 Pƙed 2 lety

    Thanks! Why does it float ?

  • @neeldabhi
    @neeldabhi Pƙed 6 lety

    what the another thing can be used in place of uno

  • @eduardorecto9076
    @eduardorecto9076 Pƙed 5 lety

    Please help me. Can you tell me if I can activate a pull up resistor when an alarm sounds?

  • @Nqrgaard
    @Nqrgaard Pƙed 8 lety

    I'm not getting any change in the serial monitor when I push the button.
    I use a Nano.
    I'm not getting the shifting in 0 and 1 I the beginning of the example

  • @digitzero3613
    @digitzero3613 Pƙed 4 lety

    Can somebody help me with the flow thing, Like he said that it will find the path with the least resistance and will go to the GND in case its pressed. I want to understand how that works. Thanks