Floating Pins, Pull-Up Resistors and Arduino

🤩 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.

Пікірлер: 254

  • @programmingelectronics
    @programmingelectronics3 жыл бұрын

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

  • @clunkclunk2099
    @clunkclunk20994 ай бұрын

    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

    3 ай бұрын

    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

    Ай бұрын

    @@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!

  • @mhelms1983
    @mhelms19838 жыл бұрын

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

  • @programmingelectronics

    @programmingelectronics

    8 жыл бұрын

    Glad you liked it, thanks for watching!

  • @cobra646

    @cobra646

    7 жыл бұрын

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

  • @enteranamehere4541
    @enteranamehere45414 жыл бұрын

    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.

  • @blehprojects5776
    @blehprojects577610 ай бұрын

    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!

  • @programmingelectronics

    @programmingelectronics

    10 ай бұрын

    I hope it helped!

  • @tedthisius4778
    @tedthisius47785 жыл бұрын

    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.

  • @harshitrajput6865
    @harshitrajput68657 жыл бұрын

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

  • @jupiter457
    @jupiter45710 жыл бұрын

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

  • @EgyGyro
    @EgyGyro4 жыл бұрын

    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.

  • @elecnut8211
    @elecnut82117 жыл бұрын

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

  • 6 жыл бұрын

    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

  • @jamescashmore8408
    @jamescashmore84085 жыл бұрын

    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.

  • @kim15742
    @kim157427 жыл бұрын

    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

  • @bradandsusan96
    @bradandsusan966 жыл бұрын

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

  • @chunheichau7947
    @chunheichau79477 жыл бұрын

    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
    @JohnIsaacBradshaw7 жыл бұрын

    Seeing the circuit you built helped a lot. Thanks!

  • @shvideo1
    @shvideo15 жыл бұрын

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

  • @humanperson8418
    @humanperson84182 жыл бұрын

    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

    2 жыл бұрын

    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/

  • @freethinker1957
    @freethinker19575 жыл бұрын

    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.

  • @afraimuangnory7195
    @afraimuangnory71957 жыл бұрын

    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 .

  • @davidizquierdogomez
    @davidizquierdogomez6 жыл бұрын

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

  • @johndripper
    @johndripper6 жыл бұрын

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

  • @henik9
    @henik96 жыл бұрын

    Thanks man this vid really clarified some stuff for me.

  • @MinhNg180
    @MinhNg1804 жыл бұрын

    This video just cured my headache. Thanks a lot.

  • @programmingelectronics

    @programmingelectronics

    4 жыл бұрын

    Glad it helped!

  • @TheDeIirium
    @TheDeIirium9 жыл бұрын

    Instant subscription after the first minute - brilliant humor.

  • @defariase
    @defariase8 жыл бұрын

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

  • @KW-ei3pi
    @KW-ei3pi Жыл бұрын

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

  • @programmingelectronics

    @programmingelectronics

    Жыл бұрын

    Thanks so much for watching!

  • @garvitgoyal5236
    @garvitgoyal52363 жыл бұрын

    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.

  • @OneIdeaTooMany
    @OneIdeaTooMany3 жыл бұрын

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

  • @programmingelectronics

    @programmingelectronics

    3 жыл бұрын

    Glad it helped!

  • @mohammedzoheb5299
    @mohammedzoheb52994 жыл бұрын

    Well explained..thank you so much!

  • @FRADemons
    @FRADemons5 жыл бұрын

    Very good video! So helpful !!

  • @SymphonyKol_androidLover
    @SymphonyKol_androidLover2 жыл бұрын

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

  • @programmingelectronics

    @programmingelectronics

    2 жыл бұрын

    Glad it was helpful!

  • @thomasalexander1563
    @thomasalexander15637 жыл бұрын

    Nice tutorial agains... Love this channel

  • @haribukkeprasad4612
    @haribukkeprasad46126 жыл бұрын

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

  • @pikeshmn
    @pikeshmn7 жыл бұрын

    Awesome Explanation!

  • @prashanthirwani8047
    @prashanthirwani80472 жыл бұрын

    For me as a beginner Most easy and value providing video on yt great explaination keep going🔥🔥🔥

  • @programmingelectronics

    @programmingelectronics

    2 жыл бұрын

    Thanks so much!

  • @derrickadusei7987
    @derrickadusei79874 жыл бұрын

    It solved my digital pin input problem. Thanks

  • @vadimkoller6232
    @vadimkoller62325 жыл бұрын

    Finally got it. Thank you

  • @bryanwesterveld5287
    @bryanwesterveld52879 жыл бұрын

    This explained it very well!

  • @The1Creston
    @The1Creston5 жыл бұрын

    Thank you. That helped a lot!

  • @regpollock9403
    @regpollock94037 жыл бұрын

    Thank you for making it understandable.

  • @twitchy9948
    @twitchy9948 Жыл бұрын

    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.

  • @koemdjiev
    @koemdjiev3 жыл бұрын

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

  • @programmingelectronics

    @programmingelectronics

    3 жыл бұрын

    Glad it helped! Thanks for watching!

  • @katrinagarcia8645
    @katrinagarcia86455 жыл бұрын

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

  • @d4ny4pres1d3nt
    @d4ny4pres1d3nt9 жыл бұрын

    Thank you, you explain things very clearly! Cheers

  • @programmingelectronics

    @programmingelectronics

    8 жыл бұрын

    +d4ny4pres1d3nt Thanks for the kind words! I hope you enjoy the other videos.

  • @pi11sburydoeboy
    @pi11sburydoeboy7 жыл бұрын

    Great explanation. Subbed!

  • @northshorepx
    @northshorepx8 жыл бұрын

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

  • @programmingelectronics

    @programmingelectronics

    8 жыл бұрын

    +northshorepx Thanks for watching - glad it helped!

  • @MJ-iy4fb
    @MJ-iy4fb3 жыл бұрын

    Good Lesson!!

  • @lizardofoz5329
    @lizardofoz53295 жыл бұрын

    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.

  • @mayurthombare3288
    @mayurthombare32886 жыл бұрын

    Thanks for this helpful video

  • @ahmedamer777
    @ahmedamer7778 жыл бұрын

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

  • @avinashpankhade8644
    @avinashpankhade86447 жыл бұрын

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

  • @MakerTutor101
    @MakerTutor1016 жыл бұрын

    Thank you your tutorials are great

  • @filipemarques9144
    @filipemarques91447 жыл бұрын

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

  • @jeroendruwe9061
    @jeroendruwe90617 жыл бұрын

    Very good explanation :)

  • @bartnoe4194
    @bartnoe41948 жыл бұрын

    Thank you for your clear explanation. great course!

  • @programmingelectronics

    @programmingelectronics

    8 жыл бұрын

    Thanks Bart - I hope you can find them all helpful.

  • @Lakitu1446
    @Lakitu14465 жыл бұрын

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

  • @bernhardbaumgartner2890
    @bernhardbaumgartner28903 жыл бұрын

    Great explanation, thanks a lot man!

  • @programmingelectronics

    @programmingelectronics

    3 жыл бұрын

    Glad it helped!

  • @Maxr1998X
    @Maxr1998X8 жыл бұрын

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

  • @programmingelectronics

    @programmingelectronics

    8 жыл бұрын

    +Maxr1998X Great, glad you found it useful!

  • @umarmoiz8810

    @umarmoiz8810

    8 жыл бұрын

    +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 ?

  • @mathiastyseng9208
    @mathiastyseng92084 жыл бұрын

    easy new sub, first vid to properly explain it

  • @programmingelectronics

    @programmingelectronics

    4 жыл бұрын

    Glad to hear it helped!

  • @redtipon9910
    @redtipon99104 жыл бұрын

    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.

  • @programmingelectronics

    @programmingelectronics

    4 жыл бұрын

    Awesome, thank you!

  • @Ammani-Yat
    @Ammani-Yat5 жыл бұрын

    great lecture 👍

  • @jorgemariofernandezfuentes3399
    @jorgemariofernandezfuentes33994 жыл бұрын

    Excelente Información!!

  • @Richie_
    @Richie_2 жыл бұрын

    Nice one Michael. That helped.

  • @programmingelectronics

    @programmingelectronics

    2 жыл бұрын

    Glad it helped Richie!

  • @donaldklopper
    @donaldklopper3 жыл бұрын

    Remember: that life boat is still floating! Better pull that up into the ... no, wait.

  • @kameelamareen
    @kameelamareen7 жыл бұрын

    WOW man hands down for sure !!!

  • @Bianchi77
    @Bianchi772 жыл бұрын

    Nice video, thanks for sharing :)

  • @programmingelectronics

    @programmingelectronics

    2 жыл бұрын

    Thanks for watching!

  • @georgekot6377
    @georgekot63778 жыл бұрын

    Good work. Thanks

  • @programmingelectronics

    @programmingelectronics

    8 жыл бұрын

    +George Kot Thank you for watching!

  • @jianbinchen1428
    @jianbinchen14287 жыл бұрын

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

  • @chuckhole
    @chuckhole2 жыл бұрын

    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.

  • @programmingelectronics

    @programmingelectronics

    2 жыл бұрын

    Totally agree Chuck! Thanks for pointing that out!

  • @mps6934
    @mps69346 жыл бұрын

    Funny intro ^.^ Great explanation, too.

  • @twinstarsnz3626
    @twinstarsnz36268 жыл бұрын

    Thanks mate!

  • @cill521
    @cill5218 жыл бұрын

    Very clear. Thanks

  • @programmingelectronics

    @programmingelectronics

    8 жыл бұрын

    +cill521 thanks for watching!

  • @vincent6313
    @vincent63138 жыл бұрын

    very helpful for my final exam. thanks

  • @programmingelectronics

    @programmingelectronics

    8 жыл бұрын

    +pengci gao Thanks for watching!

  • @shaunsomaru4524
    @shaunsomaru45245 жыл бұрын

    Thank you for great explanation

  • @programmingelectronics

    @programmingelectronics

    5 жыл бұрын

    Thanks Shaun!

  • @AhmedDeedatPalestine
    @AhmedDeedatPalestine5 жыл бұрын

    The best video.

  • @REACH253
    @REACH2533 жыл бұрын

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

  • @Moncayoboy
    @Moncayoboy9 жыл бұрын

    Good explanation, thanks.

  • @programmingelectronics

    @programmingelectronics

    9 жыл бұрын

    Raul M Thanks!

  • @parthpatel1605
    @parthpatel1605 Жыл бұрын

    Superb👌

  • @shahidilhan3139
    @shahidilhan31397 жыл бұрын

    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

  • @jeranrai645
    @jeranrai6454 жыл бұрын

    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 ?

  • @alexp7274
    @alexp72744 жыл бұрын

    Great explanation.

  • @programmingelectronics

    @programmingelectronics

    4 жыл бұрын

    Thank you - I appreciate that!

  • @WhiskyPankcake
    @WhiskyPankcake9 жыл бұрын

    Great tutorial

  • @programmingelectronics

    @programmingelectronics

    9 жыл бұрын

    WhiskyPankcake Thanks!

  • @threeelancer
    @threeelancer4 жыл бұрын

    Thanks, it helped.

  • @programmingelectronics

    @programmingelectronics

    4 жыл бұрын

    Glad it was useful!

  • @SukhdevSingh-tp4mg
    @SukhdevSingh-tp4mg4 жыл бұрын

    Good job!!!!!!!!

  • @programmingelectronics

    @programmingelectronics

    4 жыл бұрын

    Thank you!

  • @MrKbtor2
    @MrKbtor2 Жыл бұрын

    Great explanation!

  • @oteikwufrancis1108
    @oteikwufrancis11082 ай бұрын

    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

    2 ай бұрын

    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.

  • @joshuapitong899
    @joshuapitong8992 жыл бұрын

    Thank you.❤

  • @programmingelectronics

    @programmingelectronics

    2 жыл бұрын

    Thanks for watching!!!

  • @wick3de
    @wick3de9 жыл бұрын

    you are great men! and nice humor twitch on it

  • @programmingelectronics

    @programmingelectronics

    9 жыл бұрын

    Thanks for watching Pinda !

  • @Nqrgaard
    @Nqrgaard8 жыл бұрын

    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

  • @andytren9498
    @andytren94984 жыл бұрын

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

  • @MilanKarakas
    @MilanKarakas8 жыл бұрын

    What you are reading at "floating" pin is your main (50 or 60 Hz). That is because input pin has very high impedance. Pull up resistor make "offset" to the +5V. But, you may want to avoid adding resistors to +5V by simply using next code(s): pinMode (2, INPUT_PULLUP);, where MCU gives about 200 kOhm resistor internaly to pin 2. Or: pinMode (2, INPUT); digitalWrite(2, HIGH);, which gives the same result. Note that although pin 2 is input, you write in setup HIGH value (digital 1). There is NO pull-down resistor inside MCU. Another advanced way to make whole sketch: void setup() { Serial.begin(9600); DDRD &= ~(1

  • @pikeshmn

    @pikeshmn

    7 жыл бұрын

    Floating pin take charges around from your finger, stray wires etc.! This causes the fluctuating voltage..So you need to tie it up! Nice concept!

  • @eduardorecto9076
    @eduardorecto90765 жыл бұрын

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

  • @reubeyjanes3617
    @reubeyjanes36173 жыл бұрын

    Ok so I'm having this exact issue but instead of a button, I'm using an rc receiver. How do I stop this from happening as the rc receiver uses a pwm signal?

  • @actionoise
    @actionoise5 жыл бұрын

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

  • @embededfabrication4482
    @embededfabrication4482 Жыл бұрын

    how can we turn a pin high using the output of another arduino?

  • @johnbenson8080
    @johnbenson80807 жыл бұрын

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

  • @AbrarManzoor
    @AbrarManzoor3 жыл бұрын

    it helped

  • @neeldabhi
    @neeldabhi6 жыл бұрын

    what the another thing can be used in place of uno

  • @dhruvpatel7337
    @dhruvpatel73377 жыл бұрын

    i m a beginner 1st yr studentwhat should be the approx value of pullup resistor ? so that the pin reads high despite its drop across resistor.