Pull-up Resistor - Collin’s Lab Notes

  Переглядів 159,795

Adafruit Industries

Adafruit Industries

2 роки тому

Pull-up resistors stabilize those otherwise floating inputs #adafruit #collinslabnotes
Find resistance at Adafruit:
www.adafruit.com/category/837
Visit the Adafruit shop online - www.adafruit.com
-----------------------------------------
LIVE CHAT IS HERE! adafru.it/discord
Adafruit on Instagram: / adafruit
Subscribe to Adafruit on UKposts: adafru.it/subscribe
New tutorials on the Adafruit Learning System: learn.adafruit.com/
-----------------------------------------

КОМЕНТАРІ: 105
@DavidGlaude
@DavidGlaude 2 роки тому
This is the best video ever. While I was already starting to understand, that explanation really nails it for me. Maybe another video on Pull-down and the pro/cons of Pull-up vs Pull-down will make me even more smart!
@ke6gwf
@ke6gwf 2 роки тому
I would guess that a pull down resistor would be the same except going to ground, and would be used when the input signal was a positive voltage. Basically just swapping the switch and the resistor.
@ryantprawira
@ryantprawira 2 роки тому
depends on what state u desire, if you want high state, use pullup..... low state, use pulldown...
@tennicktenstyl
@tennicktenstyl 2 роки тому
adding to the above, it's much easier to find a ground plane on the circuit board than a logic level line.
@aliasaka4416
@aliasaka4416 2 роки тому
Nah he should explain that with the different potentials
@alejandroperez5368
@alejandroperez5368 2 роки тому
Pull up means the high state is the default one with the switch open. Pressing the switch transitions to a low state. Pull down means the low state is the default one with the switch open. Pressing the switch transitions to a high state.
@snerble
@snerble 2 роки тому
so THATS why that resistor is there! back when i still messed with arduinos, i always neglected to put that resistor there because it worked well enough right? no wonder i had super unstable connections. i am definitely subbing to learn more about this stuff!
@SianaGearz
@SianaGearz 2 роки тому
You can just use INPUT_PULLUP pin mode. Then internally, 10-50 kOhm pullup resistor is applied to the pin. Keep in mind that breadboards are evil and are out to hurt your feelings.
@philipwpartain
@philipwpartain 2 роки тому
@@SianaGearz That breadboard fact has helped me sleep more peacefully. Thank you. 😁
@SirCrest
@SirCrest 2 роки тому
These adafruit shorts are excellent.
@Purposable
@Purposable 5 місяців тому
I’m just getting them a year later but every single one has been amazing so far. Great refresh/review
@chriswouse7713
@chriswouse7713 2 роки тому
I’m sure you’ll cover this in another video, but some micro controllers have internal pull up and pull down resistors that can be configured.
@rennepenne
@rennepenne 10 місяців тому
In Arduino IDE it can be configured easily with setting the pin as Pull-up Input
@milescarter7803
@milescarter7803 4 місяці тому
Knowing that they exist is the first step to understanding there are internal ones
@gazehound
@gazehound 2 роки тому
This is one of those things that every EE youtuber talks about but none of them ever explain.
@runforitman
@runforitman 2 роки тому
I remember, quite a few years ago, when I first started playing with microcontrollers like arduinos it took me an incredibly long time to find out about pull up/down resistors I was always wondering why my buttons etc were so unreliable
@ALXandroATS
@ALXandroATS 2 роки тому
The reset pin of a micro controller usually uses the same concept. A pull up resistor tied to Vcc and a capacitor tied to ground acts as a momentary switch to ensure proper instruction startup when power is applied.
@gordon1201
@gordon1201 2 роки тому
This is so good. Such a good explanation.
@UndregoGrey
@UndregoGrey 4 місяці тому
Thank you this is the first video i found explaining this properly
@drapakdave
@drapakdave 2 роки тому
Oooooh. I finally get it now. Thank you!
@allertschallenberg1857
@allertschallenberg1857 6 місяців тому
This is exactly what a short should be like!
@thomasldeanjr3337
@thomasldeanjr3337 2 роки тому
After reading and listening to other explanations, you solved it for me in 59 seconds. WOW
@itachi2011100
@itachi2011100 2 роки тому
Absolutely love these videos, it's making me more confident in picking up a hobby.
@rouuuk
@rouuuk 2 роки тому
Same for transistors and mosfets, they need a pull up or down resistor so it doesn't randomly switch on or off..
@okay1296
@okay1296 10 місяців тому
Thank you this was the moost easiest explenation i could find, and this in under 60 seconds.
@tapalmer99
@tapalmer99 2 роки тому
I was never interested in the electronics and breadboard resistor chip end of things but I still find your videos informative and interesting
@williamwell4341
@williamwell4341 2 роки тому
Very good explaining thank you very much. I like to add something, that the microcontroller comes with internal 1k pull-up resistor and by programming you have to choose whatever you want to use it or not
@perwestermark8920
@perwestermark8920 2 роки тому
Not all microcontrollers have internal pull-up or pull-down support. And the internal value is normally mugh higher than 1k because a 1k pull-up adds significantly to the current consumption. Geounding 3V3 over a 1k resistor means 3.3 mA current. And that is over 10 mW power lost.
@magicsmokemitlothar7377
@magicsmokemitlothar7377 Рік тому
Great video I Love that you make thèse vidéos for beginners. When I started out with this Hobby i didn't Inderstand this for years.
@breec4634
@breec4634 4 місяці тому
Adafruit shorts are the best
@st3althyone
@st3althyone 2 роки тому
Excellent short explanation on the inner workings of IC’s, short but sweet.
@mateojbuteler8974
@mateojbuteler8974 2 роки тому
I simply love this videos.
@nolansprojects2840
@nolansprojects2840 2 роки тому
I always wondered why my inputs needed to be coded “LOW” for when they were turned on. Thanks!
@nahuel3256
@nahuel3256 Рік тому
so clearly explained!
@ChiefBacon6
@ChiefBacon6 Рік тому
Thank you! This was so helpful!
@clodman84
@clodman84 2 роки тому
These are an excellent series of videos. Have been binge watching them even though I don't really toy with electronics that much beyond getting and Arduino and running the example scripts. Welp, I might get into it properly now
@vladimirsch.3015
@vladimirsch.3015 2 роки тому
Thank you so much I was never able to get the reason for the pull-up resistors before.
@wanpanman5492
@wanpanman5492 Рік тому
its also important to note that this is the case for CMOS configuration ... in TTL ICs, a floating input or any static is automatically read as a high signal level
@aubreymcgee8230
@aubreymcgee8230 2 роки тому
Thank you 🙏🏾
@Orionrobots
@Orionrobots 2 роки тому
Great video - I've been using pull ups - but I didn't know about those slim tactile switches... Ordering now.
@samuellucaslimasoares9010
@samuellucaslimasoares9010 2 роки тому
Very nice! I love this!
@_FJB_
@_FJB_ 2 роки тому
Thank you so much. This was very much needed!
@rubenproost2552
@rubenproost2552 2 роки тому
Some of the microcontrollers have programmable pull up resistors, as in a built in feature you can turn on per pin.
@yasithanjana4713
@yasithanjana4713 2 роки тому
Love this video. Thanks
@imignap
@imignap 2 роки тому
Modern micros have pullup/pulldown pin configurations these days, worth taking a gander in micros reference manual
@chrislambe400
@chrislambe400 2 роки тому
Great explanation.
@smolderingcheeze
@smolderingcheeze 2 роки тому
This is the only video that made sense omg
@dgo42
@dgo42 2 роки тому
Using ARM (for example STM32 what is also chipper than atmega) we can programmatically pull-up or pull-down the pins without any external resistor!
@SianaGearz
@SianaGearz 2 роки тому
It is a very wimpy low current pullup though, which can sometimes be unstable. It is actually a feature on any fully featured microcontroller, including AVR 8-bit and PIC and whatever else pretty much you can think of. ARM micros have pretty much the wimpiest pull-ups though.
@perwestermark8920
@perwestermark8920 2 роки тому
Note that "ARM" is a processor core. The different chip manufacturers will then glue on I/O functionality. Not all ARM chips are even microcontrollers. So it makes a difference if using a STM32 or a NXP 17xx microcontroller.
@alexanderalvarado9675
@alexanderalvarado9675 2 роки тому
Lots of microcontrollers have internal pull ups you can enable by writing to a register!
@MrofficialC
@MrofficialC 4 місяці тому
Analogous to superposition until it's collapsed is what I'm seeing
@Mobin92
@Mobin92 2 роки тому
What always confused me was why the resistor doesn't drop the 5V voltage. Can someone explain? I assume because there isn't any current flow through the chip...
@nickharrison3748
@nickharrison3748 4 місяці тому
"floating" means floating voltage.it means today it is at some voltage, tomorrow it could be on another voltage, depending on what charges sit on that pin or part. so, keeping anything floating is not good. all terminals in an electronic circuit should be at known fixed voltage within the component's range.
@chrisnoren777
@chrisnoren777 2 роки тому
An input/output pin, or I/O pin, is the interface between a microcontroller and another circuit. In the Arduino, you configure whether a pin is an input or output using the pinMode() function. An output pin provides VDD or 0 V, by making a connection to VDD or ground via a transistor. 👽
@deang5622
@deang5622 4 місяці тому
You don't always need a transistor. It depends on whether the output pin of the microcontroller can sink or source enough current to drive the load connected to it. So check the current sink and source capability of the output pin.
@very_nice_777
@very_nice_777 Рік тому
ok i pull up 👌
@amateurprogrammer25
@amateurprogrammer25 2 роки тому
It's worth pointing out that most microcontrollers have pull up resistors built into them which can be toggled on and off by software. In the Arduino IDE, pinMode(12, INPUT); digitalWrite(12, HIGH); or, in newer versions of the IDE: pinMode(12, INPUT_PULLUP); will activate the internal pull up. Raspberry Pi's have both internal pull up and pull down resistors on each pin, which various GPIO libraries have different ways of selecting. With RPi.GPIO, use: GPIO.setup(21, GPIO.INPUT, GPIO.PUD_UP) You may also substitute PUD_DOWN for a pull down or PUD_NONE to disable both internal resistors. With the newer pigpio library, pi = pigpio.pi() pi.set_mode(21,pigpio.INPUT) pi.set_pull_up_down(pigpio.PUD_UP) Ditto. In CircuitPython: from digitalio import DigitalInOut, Direction, Pull switch = DigitalInOut(4) switch.direction = Direction.INPUT switch.pull = Pull.UP
@Rayy832
@Rayy832 2 роки тому
Can you give it a default low state by change the position of the switch and resistor?
@erwahnenswert2344
@erwahnenswert2344 6 місяців тому
Ty 🤝
@mitchahbw
@mitchahbw 2 роки тому
whoh that's why! thanks
@720MotorWorks
@720MotorWorks 6 місяців тому
many microcontrollers like Arduino have internal pull up resistors that can be activated in the setup function of the code. The extra resistor on the circuit is redundant in this case
@gianseven
@gianseven 2 роки тому
Path of least resistance??
@kuripotech461
@kuripotech461 2 роки тому
Where do you apply this kind of principle if I may ask?
@florinpandele5205
@florinpandele5205 8 місяців тому
I had a tough time with these terms too, they do feel contradictory, because resistors are electricity energy consumers yet adding one pulls the voltage up? But this is valid.Yet nobody bothers to explain it first before using the term.
@mikey38632
@mikey38632 4 місяці тому
Ohhhhhhhh NOW I get what it actually means and why we use it! Are pull-down resistors the same idea, except they create a default LOW state for the pin?
@techheck3358
@techheck3358 3 місяці тому
Yep!
@user-qs8dz2tr2d
@user-qs8dz2tr2d Місяць тому
wow🎉
@rawexploiterp6951
@rawexploiterp6951 2 роки тому
I always used diodes to fix floating, i thought with resistor it will short circuit
@ciptosong4719
@ciptosong4719 2 роки тому
mantap
@zidanrafifpratama
@zidanrafifpratama 2 роки тому
I have an esp 32 devkit v1 and that esp always in flash mode and i cannot send any code
@walangpart2
@walangpart2 5 місяців тому
That's why modern microcontrollers have internul pull ups
@jammer2omega277
@jammer2omega277 6 місяців тому
I still don't understand one thing about pullup resistors. You are essentially making a 5v to 10k ohm to ground aren't you? So shouldn't the 10k ohm resistor be heating up? Shouldn't it register as a short?
@techheck3358
@techheck3358 3 місяці тому
Yes, but because of the high resistance, it’s minuscule, not enough to matter. It’s flowing just enough to register. P = V^2 / R. if this were 3.3v, then 3.3*3.3/10,000 = 0.001 watts. With 5v, 0.0025 watts. Tiny
@Qui-9
@Qui-9 5 місяців тому
Are pull-down resistors with the switch on Vcc a thing? Or is it a taboo practice?
@techheck3358
@techheck3358 3 місяці тому
Yep!
@diegorivera5291
@diegorivera5291 2 роки тому
Shrodinger's pin
@windogmassey1
@windogmassey1 2 роки тому
Well done sir
@studiovlog3635
@studiovlog3635 2 роки тому
My question is why do we need a pull up or pull down resistor? And how do we know which is needed when ??
@perwestermark8920
@perwestermark8920 2 роки тому
Normally you decide what *idle* state you want. But if using a switch, it matters if using a make or break switch.
@studiovlog3635
@studiovlog3635 2 роки тому
@@perwestermark8920 thank you, but still am not getting the reason to use exactly why?
@perwestermark8920
@perwestermark8920 2 роки тому
@@studiovlog3635 Many (most) times you can do either choice. But sometimes someone else is responsible for the part containing a switch. If they say "this car has a switch that shorts to ground when trigged" then you must look into the opposite - i.e. pull sig al high when the switch isn't closed. If someone say "this signal/switch will supply 3V3 when trigged" (and we are assuming your processor supports 3V3 for your input pins) then you must supply opposite. I.e. pull the pin low when the switch is not active. If someone says "this signal is 3V3 or 0V" then you can use it directly. But what happens if the cable is ripped off? If 3V3 in means a request to run a motor and you don't want the motor to run if the cable is broken then you select a pull down. If 0V means a request to run the motor and you do not want the motor run if cable is broken then you add a pull up. This means you must select pull up or pull down when someone else have already decided what the input looks like. In a situation where you decide, then you can use pull uo and switch to ground. Or pull down and switch to VCC.
@studiovlog3635
@studiovlog3635 2 роки тому
@@perwestermark8920 thank you , I actually did some trials few years back to understand this, and since I did it only few times I forgot, but yup now I remember and understood a more better than what I had self taught myself, your explanation was very clean and direct on point. Thank you..
@patheticprepper4496
@patheticprepper4496 2 роки тому
Humm... efficiency, cost?
@zeronotemo
@zeronotemo 2 роки тому
Im in a default high state
@FilmFactry
@FilmFactry 2 роки тому
How did you determine the value of the resistor needed?
@PilotPlater
@PilotPlater 2 роки тому
it's not critical, you'll sometimes hear this referred to as "Jellybean" components, ones that are so generic that they can be used for basically anything. For the purpose of this video, it wouldn't matter if you used 1K Ohm, 10K Ohm, even 100K Ohm would be fine. When you start getting into the weeds and doing specialized things, then you'll have to worry about it more... for example maybe you wouldn't use 1K ohm for a pull-up if you expect the button to be pressed down 90% of the time, and you need to run it off a small battery. The very tiny power loss through the resistor and button would be 10x lower if you used a 10K resistor, or 100x better for 100K etc. Maybe you're in an industrial or other high-stakes environment where interference is critical to filter out, in that case the simple pull-up resistor may not be enough, but at very least you would want a low value so the "launch the missles button" never gets falsely pressed, power consumption be damned haha
@psynautic
@psynautic 2 роки тому
@@PilotPlater to clarify a bit more. the lower your value the higher your current draw when the button is pressed, the higher the value the lower the voltage reads in the unpressed case. The second part is because you're creating a voltage divider between the input impedance (can just be thought of as resistance in DC) [which iirc is often 1M+ for micro inputs] and your pull-up resistor
@PilotPlater
@PilotPlater 2 роки тому
@@psynautic and it's not about just free standing voltage when the button is not pressed, but noise interference. Ultimately it'll probably never matter in non-industrial settings
@Armadurapersonal
@Armadurapersonal 2 роки тому
Anything between 1k and 10k should work fine
@SubjectivelyDan
@SubjectivelyDan 2 роки тому
So the drain from vcc to ground would be small enough to not waste battery power?
@SianaGearz
@SianaGearz 2 роки тому
The power is only wasted here when the button is pressed anyway! Depending on sort of battery and pullup strength, the drain can be substantial though, you should calculate it, especially if you use NC (normally closed) connected switches anywhere.
@perwestermark8920
@perwestermark8920 2 роки тому
If you have a long cable working as an antenna to pick up noise, then you need a lower resistance to strongly hold the wire. If your signal traces are short and not picking up noise, then you can select a much larger resistance and keep down the current. In some situations, a processor pin held high can be used with the pull up resistor instead of Vcc. This means the program can turn on/off the pull up voltage so it's only when the switch state is checked by the code that there is any 3V3 pull-up. This obviously means the code needs to regularly poll the switch state.
@RicheyYT
@RicheyYT 2 роки тому
It's a floater
@windogmassey1
@windogmassey1 2 роки тому
What I don't understand with this configuration is how you stop ezrream power usage when the pin is pulled to ground. It's effectively a dead short limited by the resistor. Is this not very bad for devices powered from battery, for example?
@Hauketal
@Hauketal 2 роки тому
This method is for inputs where the button pressed time is much shorter than the intended lifetime of the battery. And the relatively high value of the resistor leads to a negible battery drain anyway.
@windogmassey1
@windogmassey1 2 роки тому
@@Hauketal really helpful, thank you
@perwestermark8920
@perwestermark8920 2 роки тому
You can normally use a quite big resistor unless you have a very noisy environment. With 3V3 a 1k resistor would be 3.3 mA. 10k would ve 0.33 mA. 47k would be 70 uA. Also, a switch can be from pin to ground or from pin to Vcc. Which means you can affect if the pin is low or high at idle.
@Mobin92
@Mobin92 2 роки тому
The resistor value is really big compated to the voltage.
@silver965
@silver965 5 місяців тому
ok i pull up
@foocett
@foocett 4 місяці тому
that actually makes so much sense, where does the name come from though, like what's being "pulled up"
@techheck3358
@techheck3358 3 місяці тому
The signal. It can be either high or low. The exact value depends on your exact use case, it could be 5v, 3.3v, whatever. But because we’re working in digital logic, we only really care about 2 states, on or off, high or low
@Kanken-jl7oe
@Kanken-jl7oe 2 роки тому
Very good explanation on this subject, it can be quite difficult for beginners to understand
@aryanmn1569
@aryanmn1569 2 роки тому
Really, i got it for first time
@manuelr7121
@manuelr7121 Рік тому
ohhhhh cool
Pull Up/Down Resistors
6:42
0612 TV w/ NERDfirst
Переглядів 6 тис.
Pull Up and Down Resistors for Floating Inputs- Simply Put
23:52
Simply Put
Переглядів 19 тис.
skibidi toilet 73 (part 1)
04:46
DaFuq!?Boom!
Переглядів 31 млн
Їжа Закарпаття. Великий Гід.
1:00:29
Мiша Кацурiн
Переглядів 522 тис.
How to use Pushbuttons with Arduino. Pull up vs Pull down resistors
10:36
Pull-up and pull-down resistors explained
6:33
Blueprint IoT
Переглядів 1,7 тис.
Open Collectors and Pull-up Resistors
10:16
Vocademy - Electronics Technology
Переглядів 4,5 тис.
What is a Pull Up Resistor?
26:09
High Performance Academy
Переглядів 15 тис.
Short and sweet:  pull up/pull down resistors explained
6:16
learnelectronics
Переглядів 126 тис.
ЭТО САМЫЙ МОЩНЫЙ ИГРОВОЙ СМАРТФОН ЗА 270$ 🔥
13:33
Thebox - о технике и гаджетах
Переглядів 38 тис.
intermediate switch circuit #automobile #electrical #electricalswitch #powerswitch #delta #starwars
0:15
DOMESTIC , INDUSTRIAL ELECTRICAL AND MECHANICS
Переглядів 3,1 млн
Как открыть дверь в Jaecoo J8? Удобно?🤔😊
0:27
Суворкин Сергей
Переглядів 817 тис.
Changing Replace And Edit Backgrounds New Tech || Photo Eedit NEW3X
0:50