Picking Pull-Up Resistor Values | AO #25

  Рет қаралды 114,460

AddOhms

AddOhms

Күн бұрын

Common question that comes up about pull-up resistors: what value do you pick and why not just use a piece of wire? In this follow-up electronics tutorial, the bald engineer looks at how to pick pull-up resistor values.
Get show notes at: addohms.com/picking-pullup-res...
Video produced by James Lewis (@baldengineer):
baldengineer.com
AddOhms Discord:
/ discord
Subscribe to learn electronics with free tutorials:
goo.gl/H9r1RN
#resistors #pull-up #electronics

Пікірлер: 154
@idogendel
@idogendel 6 жыл бұрын
Was that the "Up Goer 5" poster on the wall? :-)
@AddOhms
@AddOhms 6 жыл бұрын
Yup. This end should point towards the ground if you want to go to space. For others, see the comic here: xkcd.com/1133/. You can buy the poster at: store.xkcd.com/products/up-goer-five-poster
@jon_raymond
@jon_raymond 6 жыл бұрын
Great explanation and that was a fancy "cut to second camera" feature!
@nate6386
@nate6386 6 жыл бұрын
Also look at your BOM if you are not using a 1K resistor anywhere else but you using lots of 5K resistors just go ahead use the 5K resistor.
@waltercomunello121
@waltercomunello121 5 жыл бұрын
I actually grasped more about pullups in these 2 videos (a grand total of maybe 7mins) than in all those months I wasted trying to figure out how to pick them, reading from multiple sources.
@Probot13g
@Probot13g 6 жыл бұрын
I have struggled to understand the reasoning behind pullup values for specific applications (CAN, I2C, SPI, etc.). This video not only explains it well but it's much easier to understand than I thought. I never considered the length of the wire as a major factor until now. Thank you!
@garycrockett4477
@garycrockett4477 3 жыл бұрын
Thank you! Finally a clear, understandable explanation of what a pull-up resistor is. I appreciate your time and effort!
@joost199207
@joost199207 6 жыл бұрын
Your videos/explanations are always so clear, well illustrated and easy to follow. Very helpful!
@mithrandirthegrey7644
@mithrandirthegrey7644 Жыл бұрын
This is so good. Finally somebody who actually explains the values.
@DarkWolf887
@DarkWolf887 3 жыл бұрын
Bro. You actually helped me to understand this topic in 4 mins! My lecturer isn't that great I see :P
@azmrblack
@azmrblack Жыл бұрын
Great, clear, no filler explanation. Loved it!
@johncronk1338
@johncronk1338 Жыл бұрын
Great video man. Learned the answer to my question in less than 4 minutes, and I have been on Google for probably an hour reading different sites and getting my head wrapped around this. Thanks. I look forward to watching more of your videos. 👍
@denishnatiuk921
@denishnatiuk921 2 жыл бұрын
Your explanations are so intuitive. Brilliant.
@loucostello3111
@loucostello3111 6 жыл бұрын
I watch electronic engineering tutorials all the time. AddOhms tutorials are the best.
@patprop74
@patprop74 3 жыл бұрын
2021, i just found your channel, you explain very clearly, i hope you come back and keep making more videos like these.
@devdylan6152
@devdylan6152 4 жыл бұрын
I always send people here when they start working with micro-controllers. you do the BEST job at elaborating this for people new to it.
@AddOhms
@AddOhms 4 жыл бұрын
Thank you! I appreciate the support.
@b.h.9490
@b.h.9490 5 жыл бұрын
Thanks for the video, perfectly clear. And most of all: great shirt!!
@stomp1691
@stomp1691 3 жыл бұрын
That made my life a whole lot easier. Thank you!
@nikosadie
@nikosadie 5 жыл бұрын
very good explanation! I am still new to electronics and this helps way more than books..
@Ziplock9000
@Ziplock9000 5 жыл бұрын
Great video. Very clear and concise. Thanks
@thecrazykartbyAJ
@thecrazykartbyAJ 4 жыл бұрын
Very nice tutorial, thanks for uploading!!
@75blackviking
@75blackviking 5 жыл бұрын
Thanks for the great vid! Very straightforward.
@ColinRichardson
@ColinRichardson 6 жыл бұрын
Thank you for the video. I had guessed the reasons for most of this in working with things, but nice to actually solidify it from guess work to knowledge. I normally use which ever resistor I find first. Hehe
@erictorti523
@erictorti523 6 жыл бұрын
Thanks, man! I was really struggling to undertand this :)
@Gallardo6669
@Gallardo6669 6 жыл бұрын
GREAT. I need more.... Great explanation. Thx for your vid!
@FindLiberty
@FindLiberty 6 жыл бұрын
Another consideration is attempting to help keep CLOSED switch contacts, "clean" by using a lower resistor value in order to pass higher current. The Phone company called it, sealing current" (also called wetting current or fritt current), usually 10 to 14 ma to keep contacts, splices and connections working instead of allowing them to become oxidized or dirty. Since the switch contacts sit OPEN most of the time, that constant sealing current won't flow as a preventative measure, though it may benefit from the micro arc as the button is pressed... Prolly not! lol
@2150dalek
@2150dalek 3 жыл бұрын
Great tutorial...Your T-shirt is spot on.
@zho670
@zho670 3 жыл бұрын
Short and sweet !
@gtag174
@gtag174 6 жыл бұрын
Oh man ! Good tutorial. I just came into electronics a few months back and never knew what a resist does in this particular application. Thank you for sharing. Any hopes on doing opamp tutorials 😊 Your explanations are very simple and easy to grasp.
@AddOhms
@AddOhms 6 жыл бұрын
Yes. Op-Amps are on the list.
@parulpari7346
@parulpari7346 4 жыл бұрын
Great video!
@CardosoEletrica
@CardosoEletrica 3 жыл бұрын
You got my attention at the first 20 seconds. Its exactly what I want to know lol
@rukshansheriffdeen195
@rukshansheriffdeen195 6 жыл бұрын
Marvelous Video.
@zwcharbin
@zwcharbin 3 жыл бұрын
Thank you! I finally get it!
@jasonhanjk
@jasonhanjk 6 жыл бұрын
If I need a fast response, I use 3k3 ohm and pull up to 3V3. Which give me a nice 1mA sink when using I2C, beware it uses lot's of power. Or just slow down the clock speed and use 10k pull up instead. Strong pull up is required if the boards have lot's of capacitance on the trace. For push button you can use 100k pull up and 1nF COG / NPO to ground.
@waltercomunello121
@waltercomunello121 5 жыл бұрын
thanks!
@Roobotics
@Roobotics 5 жыл бұрын
One thing you could definitely elaborate on, is what happens when your pull-up/down is too weak of a ratio from the internal resistor. Assuming they are pulling opposite directions, you get a voltage divider effectively. Then your resulting voltage can be referenced to the input high/low specifications to see if you are going to make the guaranteed voltage levels for a certain state.
@magnusbrzenk447
@magnusbrzenk447 2 жыл бұрын
I just asked the same question and got told that your/my assumption is incorrect that the internal and external resistors are in series
@LOLWUT281
@LOLWUT281 4 жыл бұрын
3:32 "Pick the resistor that works" really should be "pick the resistor that works that's already on your BOM"
@WereCatf
@WereCatf 6 жыл бұрын
Usually I just pick 10k, unless I can get away with the MCU-internal pull-ups/pull-downs. 1k is almost always an overkill.
@BGP_23
@BGP_23 6 жыл бұрын
Great video, thank you for sharing your knowledge. :-) subscribed for more.
@cursoderobotica
@cursoderobotica 6 жыл бұрын
good add-ohms !!! good video! I can't wait to see the raspberry pi project!! cheers!!
@goingoutotheparty1
@goingoutotheparty1 2 жыл бұрын
Excellent ! Thank You, I'm re-wiring an E-bike Hub motor and needed to replace Both the Hall Sensors and the Pull Up's, I'm running 48VDC Li-Ion and was concerned the pull up might be to protect the SS41 Honeywell sensor, but no, That's Great, I have some of those in my Arduino kit :) Happy Saturday
@alibehrouz9833
@alibehrouz9833 6 жыл бұрын
it was so simole and useful
@electronic7979
@electronic7979 6 жыл бұрын
Excellent
@BadLetsPlayer
@BadLetsPlayer 5 жыл бұрын
Thank you really much for that tutorial! It really helped me understand this! Picket 50kOhm for the Remote control i was working on and its working fine! PS: Love your t-shirt xD
@SSDshechka
@SSDshechka 6 жыл бұрын
best ever, thx.
@alibehrouz9833
@alibehrouz9833 6 жыл бұрын
nice job
@syun8305
@syun8305 4 жыл бұрын
Yes, agree value is a check pint. Thank you!
@edgeeffect
@edgeeffect 6 жыл бұрын
Love your Saturn V "blueprint"
@AddOhms
@AddOhms 6 жыл бұрын
It is xkcd's Up Goer Fiver: store.xkcd.com/products/up-goer-five-poster
@JoeMosfet
@JoeMosfet 6 жыл бұрын
It may be worth noting that a strong pull up resistor is useful when there is a weaker pull down resistor already in circuit (say, built-in to a chip.)
@tom95521
@tom95521 6 жыл бұрын
I have not played with electronics since TTL but if the resistance is too high you may find false state changes due to noise can be a problem depending on your circuit layout. Floating a pin is a no-no.
@iLive2Ride76
@iLive2Ride76 6 жыл бұрын
Great video as always. Which application do you use for the drawings in the videos?
@AddOhms
@AddOhms 6 жыл бұрын
Primarily After Effects and Illustrator, with an assist from Audition, Photoshop, and Premiere.
@aeromancystudios1295
@aeromancystudios1295 3 жыл бұрын
If long button life is a project requirement, note that choosing 1k pull-ups produces 5mV for a standard arduino, the minimum amperage needed to assist with button contact cleaning.
@adventureswithsteve2981
@adventureswithsteve2981 3 жыл бұрын
Could you do a video on optical encoders and using pull-up resistors on the AB lines
@ivotenotocensorship5247
@ivotenotocensorship5247 3 жыл бұрын
Just found your channel and I absolutely love everything. I have a question.. I have a circuit that constantly turns on and off. Intermittent power is what I thought at first. However, when I touch a point on the board with my tweezers, the circuit turns on and stays on. I measured the frequency of the oscillator and it keeps spiking causing the MCU to reset. Do you think a pull up or pull down resistor could smooth out the waveform preventing random resets? Or, is it because of the additional capacitance from my body and tweezers causing the waveform to smooth out and become stable preventing random resets?
@AddOhms
@AddOhms 3 жыл бұрын
Sounds like you have a grounding issue
@SathishKumar-if7ow
@SathishKumar-if7ow 4 жыл бұрын
Thanks
@josef.prosek
@josef.prosek 6 жыл бұрын
Will capacitor between input pin and ground make any diference when using weak pull-up?
@abbeed1
@abbeed1 4 жыл бұрын
thanks
@Kay-dx8vm
@Kay-dx8vm 4 жыл бұрын
This is so confusing, I cant still wrap my head around this pull up/pull down resistors arrrggg
@kusok8758
@kusok8758 6 жыл бұрын
Спасибо, всё понятно.
@maxximumb
@maxximumb 6 жыл бұрын
Nice
@y2ksw1
@y2ksw1 6 жыл бұрын
I choose pull-up resistors based on the internal resistance of a pin. If it is low, I will rather use a small resistor value. Generally however you are right, a 4.7k is a good choice for almost all applications.
@BIGMOTTER1
@BIGMOTTER1 6 жыл бұрын
Nice and simple. Just like me! Ha ha, thanks for the great explanation James. Keep up these videos and I may be able to repair things again!
@innoconnecttech
@innoconnecttech 4 жыл бұрын
after watching many videos , just now i understand this idea , Thank you brother
@harleycruiser4331
@harleycruiser4331 4 жыл бұрын
Thank you very much, my wires from a limit switch are pretty long and everytime the motor kicks on I get a false signal. The internal pull ups are just not strong enough, even the 10k external. I've been chasing this for a week, thanks.
@AddOhms
@AddOhms 4 жыл бұрын
A 10nF capacitor from signal to ground might well. It does have the negative trade-off of slowing down the edge of the signal, so the switch does not activate as fast, but we are talking less than nanosecond difference. If it cleans up the noise, it might be worth it.
@harleycruiser4331
@harleycruiser4331 4 жыл бұрын
@@AddOhms Wow, yes I can see how a capacitor would help, it would cushion, absorb the pulse from the magnetic wave. Let me explain what I have, it is a parts feeder with a small 12v motor on it. It is controlled with a inductive proximity sensor. This system is completely SEPARATE from the RPI and the limit switches. Every time the proximity sensor kicks on the motor I get the false signal to the pi. The motor and sensor is directly above the wires for the RPi. Going with the external pull up, and changing to the 1k from 10 has eliminated all most all the false signals but I am still getting a few false so will definitely try the capacitor from the feed wire to the ground and let you know how it works. I have thought about using a relay between the limit switch and the RPi but this would be simpler. It is sure nice to have someone who know what they are talking about reply. I have watched a dozen videos and yours is the first to explain why you need a stronger pull up, so thanks so much for your time. Steve
@malcolmhodgson7540
@malcolmhodgson7540 3 жыл бұрын
The capacitor is always “assumed” in the circuit. See the “Art of Electronics” text book. They are omitted from circuit diagrams to de-clutter the schematics but should never be omitted from real world circuits. It is a long standing protocol understood by electronics engineers. Unfortunately, most hobbyists find out the hard way. ( and to be clear, that includes me! Till I read the book, corrected my circuits and now have reliable circuits) . Unless of course you want random signals every time you switch the room lights on and off! Then in which case leave out the bypass capacitors.
@TimothyChapman
@TimothyChapman 6 жыл бұрын
You could use pull down resistors and wire the buttons to the positive rail.
@jjbailey01
@jjbailey01 5 жыл бұрын
Depends on what you're doing, and the type of switch.
@boriskontorovich
@boriskontorovich 6 жыл бұрын
What brand is the oscilloscope that is on the table directly behind you?
@AddOhms
@AddOhms 6 жыл бұрын
The scope is a Rohde and Schwarz RTM3004: www.rohde-schwarz.com/us/product/rtm3000-productstartpage_63493-427459.html. Next to it is a Rohde and Schwarz FPC1500 Spectrum Analyzer: www.rohde-schwarz.com/us/product/fpc-productstartpage_63493-542324.html
@soniyadhingra6522
@soniyadhingra6522 6 жыл бұрын
Hey! I found your videos very useful and educative for me..but can you please expalin me the difference between ground and negative.. It would be of great help.. Thanks.
@AddOhms
@AddOhms 6 жыл бұрын
Ground is a reference point, also called common. Voltages are relative and so for most of a circuit’s analysis voltage is referenced to its “ground.” Positive voltage are positive to that reference, and negative is, well, negative. In digital circuits negative is sometimes called ground since ground is 0 volts. Also probably because early digital stuff was powered by a battery which has positive and negative terminals. A battery floating in the air doesn’t have a ground reference, so it is referenced to itself, which is why you don’t call one of the terminals ground.
@soniyadhingra6522
@soniyadhingra6522 6 жыл бұрын
Thanks man.
@soniyadhingra6522
@soniyadhingra6522 6 жыл бұрын
But I am a beginner in the field of elctronics and i am not able to to understand the terms you have used so can you explain it through a video... Please I am very Desperate to know the difference between the two.. Thanks.
@Hoptronics
@Hoptronics 9 ай бұрын
I have 16 ad9833 spi modules I want to connect to a mux. Can I use pull-up resistors on the module side of the mux to keep the chip select high the use the mux to select the cs to send it low?
@AddOhms
@AddOhms 9 ай бұрын
Yes. it's usually a good idea to use a pull-up (or down if it is active high) on chip select regardless. That way the signal stays at a known state, especially when a microcontroller or other chip is initialized at reset/power-on.
@Magicman8508
@Magicman8508 3 жыл бұрын
You should make your 2 videos about Pull-up resistors to a single one. this one here answers all my questions i had after the other one.
@AddOhms
@AddOhms 3 жыл бұрын
Interesting idea, but that's not how youtube... works ...
@Offsettttt
@Offsettttt 6 жыл бұрын
Also, if your pin change it's mode from INPUT to OUTPUT ang goes LOW, you will blow pin or whole micro! Pins can change their modes for a moment at startup.
@AddOhms
@AddOhms 6 жыл бұрын
> Pins can change their modes for a moment at startup Almost all microcontrollers start-up with their pins as high-impedance (or INPUT). In the case of Arduino, care needs to be taken because Pin 13 is changed to an output pin to flash the LED. But that is by the bootloader and not a function of the microcontroller itself. The high-impedance state is one reason to use pull-up and pull-down resistors for other devices in the circuit. > if your pin change it's mode from INPUT to OUTPUT ang goes LOW, you will blow pin This is not a true statement all of the time. First, a pull-up or pull-down resistor will not save the pin in this case. Second, an OUTPUT to HIGH can destroy the pin just as easily as a LOW, depending on what is connected. Third, it entirely depends on what the pin is connected to.,
@Offsettttt
@Offsettttt 6 жыл бұрын
>Almost all microcontrollers start-up with their pins as high-impedance Did not know that, thanks for info. >> if your pin change it's mode from INPUT to OUTPUT ang goes LOW, you will blow pin >This is not a true statement all of the time. First, a pull-up or pull-down resistor will not save the >pin in this case. Second, an OUTPUT to HIGH can destroy the pin just as easily as a LOW, >depending on what is connected. Third, it entirely depends on what the pin is connected to. I agree. What I meant is 1K pull-up will limit 5V to nice and safe 5mA or so. Still a problem if pin becomes OUTPUT HIGH and button is pressed (it happens in development :))
@Lacipecsenye1
@Lacipecsenye1 4 жыл бұрын
Keep up the good work. Nicely explained. What resistor do you recommend for P channel mosfet with 20v battery supply ?
@AddOhms
@AddOhms 4 жыл бұрын
I don't know how to answer that question. Resistor for what? In that circuit, the only place I could see a pull-up resistor would be on the gate. And as I explained in this video, the exact value is not critical.
@Ericsimagination
@Ericsimagination 2 жыл бұрын
Thanks Adam!
@AddOhms
@AddOhms 2 жыл бұрын
Who is Adam?
@DimitrisTsoykalas
@DimitrisTsoykalas 3 жыл бұрын
Hi..My comment is long after this video so ..if and when you have time feel free to answer. I am trying to utilise A6 and A7 pins of arduino Pro mini (to save other pins) because A6 and A7 are strictly only ANALOG INPUT pins (no output no internal pull up) And as my project is with batteries i am following this advice and try to put big resistor. (even if the buttons only pressed a small amoynt of time ..but lets suppose that we are pressing button for large times) And now i put a 1 M resistor (that in multimeter shows as 0.6 M=600 K But i am getting this output 365 =buttoon unpressed -no resistor 319 321 1023 =i connected the 600 K resistor 1023 1019 1008 1015 1009 0 =push the button 0 1001 =release button 1022 1005 977 =disconnect resistor 896 1008 982 862 998 946 241 312 306 335 353 -------------------------------------------------- So my question is Why it is working with such a big resistor? I mean that can i safelly use this resistor to analogRead and consider Pressed when 512 ??? Or is it working only now,here oin my home that maybe i have no intefrerences?
@AddOhms
@AddOhms 3 жыл бұрын
If you measure the resistor while holding the leads, your body's 400-500 kiloohm resistance is in parallel with the 1 Megohm. So the reading is going to be wrong. 1 Meg is an extremely weak pull-up but it is slightly better than no pull-up.
@DimitrisTsoykalas
@DimitrisTsoykalas 3 жыл бұрын
@@AddOhms Yes !...i was holding the resistor!!! Ok...i will try it again and try it to understand. But to avoid overheatting you with questions... ..Just in case....when i will release my beehive scale project running on batteries it will be better to use the maximum resistoir that you are proposing that is 100K . Right? (The A6,A7 and dig2) buttons will NOT be used almost at all. Meaning that the arduino will run on 'silent' mode with no need buttons and ONLY once per month may the pulled up buttons(A6,A7) going to be used for 5 minutes. So...do i have your 'licence' to proceed with 100 K pulling up? Aslo in a kind of thank you and giving you something back (even most propably its not your need) I am giving you the 'almost released ' project of sms beehive scale (open source) And feel free to comment ...and share...if you want And again... THANK YOU FOR YOUR PRECIUS time!!!!!! jimakoskx.blogspot.com/2020/08/sms-beehive-scale-arduino-2-load.html
@AddOhms
@AddOhms 3 жыл бұрын
I wouldn't recommend anything over 10K for a pull-up.
@DimitrisTsoykalas
@DimitrisTsoykalas 3 жыл бұрын
@@AddOhms This is a confusing answer for me ...because in this video you were saying that we can go up to 100 K if we are on batteries. Anyway.....research is volatile so...i will keep your last proposion of 10K.!!! Goodmorning from locked down Athens!
@GCKteamKrispy
@GCKteamKrispy 4 жыл бұрын
hahah, nice T-shirt
@mikeadler434
@mikeadler434 5 ай бұрын
👍👍
@aibtw
@aibtw 5 жыл бұрын
can someone explain to me .. if we have a pull up resistor like in the video, isn't the pin in this case always connected to 5 volts? even when we press the button, it is still connected to the 5 volts(and ground as well). so, I just can't understand, how does the pin read the voltage exactly ?
@AddOhms
@AddOhms 5 жыл бұрын
Ohm’s and Kirchhoff’s laws. When the button is pushed there is path for current to flow from +V to ground. Current through a resistor creates a voltage drop, in this case 5 volts. So one side is at 5 and the other is 0 because it is dropping 5 volts. the side with 0 is connected to the pin
@aibtw
@aibtw 5 жыл бұрын
@@AddOhms Thank you! Guess I have to check keirchoff's laws again. But I am a bit confused. It is like when we don't push the button there will be no closed loop and thus we don't use kirchoff's law, but when we push the button that's like a closed loop from the 5Volts to ground, which means we apply kirchoff's laws. Am I right?
@AddOhms
@AddOhms 5 жыл бұрын
You always apply them. There is always a loop.
@aibtw
@aibtw 5 жыл бұрын
@@AddOhms um .. got more confused. Then why don't we say that there's a voltage drop when the switch is open, and it will also read LOW? Edit: is it because no current is flowing through the resistor? since it's not connected to ground.
@AddOhms
@AddOhms 5 жыл бұрын
an open switch doesn’t “drop” the voltage. an open switch has the same voltage on both sides. Kirchhoff’s law.
@SzDavidHUN
@SzDavidHUN 6 жыл бұрын
Or take ohms in case of fast signals, and/or long wires. :D
@snnwstt
@snnwstt 6 жыл бұрын
Indeed, with capacitance added (assume the switch is a MOSFET with 25pf), then in series with 10kOhms, the constant time of 3RC gives something which can't exceed much higher than 1MHz.
@22oodd
@22oodd 6 жыл бұрын
감사
@mikeunivers
@mikeunivers 4 жыл бұрын
how to calculate mosfet gate resistor
@RASHNAD
@RASHNAD 5 жыл бұрын
Why do you have a grill oven in your cupboard?
@AddOhms
@AddOhms 5 жыл бұрын
It's a toaster oven that I use for reflowing PCBs. You can see it in action in this video: kzbin.info/www/bejne/o4qbf3hphNqDnK8
@halcyonramirez6469
@halcyonramirez6469 3 ай бұрын
Why is it bad for the supply to short the ground? Is it because it damages the ground? If this were the case?
@AddOhms
@AddOhms 3 ай бұрын
It damages the supply and anything between it and ground. Shorts are bad.
@halcyonramirez6469
@halcyonramirez6469 3 ай бұрын
​@@AddOhms why does this damage the supply?. in my head. current flows from source to ground. why would having no resistor damage the supply?. is ground not just a way to get the current flowing?.. im genuinely perplexed because having strong pressure on a hose doesn't destroy the faucet. so having voltage with no resistor how can it damage the source?.
@AddOhms
@AddOhms 3 ай бұрын
Current flows in a closed loop. Ground is not a thing, it is a reference point and a return path for electric fields. When a short circuit happens, nearly infinite current flows causing everything to heat up, meaning the smallest resistive device in the circuit is going to burn on. Usually a transistor.
@insylem
@insylem 6 жыл бұрын
I normally use 10K. Just seems to work great for me. Tried 1M once but was unsuccessful. 10K are common enough.
@jkbrown5496
@jkbrown5496 6 жыл бұрын
I claim no expertise, but I came up with this deeper explanation. The changes of state when the pin is flapping in the breeze comes from emf induced voltages. These waves of emf of whatever frequency are likely to induce currents on the line (i.e., and antenna) which translate in to voltages along the line. Not volts, but rather microvolts, but this voltage has no where to go so it rushes back and forth from one end of the line to the other till it equalizes and/or dissipates in the very low wire resistance. But wait, along comes another pulse and another pulse and sooner or later you've got enough to get the microcontroller's attention and seemingly random state changes. So we stick in a pull-up or pull-down resistor depending on the default state we want on the pin. But those induced currents are still creating voltages that want to equalize, now with the supply or ground via the resistor. But resistors slow the pixies so if your pull-up resistor is to large the currents zipping back and forth on the line can add up to a voltage that gets the microcontroller's attention before they can bleed off. So you reduce it down to the lower values, but then you have to factor in the power used when the button is pushed as there will be a current through the resistor.
@Willy_Tepes
@Willy_Tepes 11 ай бұрын
What counts as a long I2c line?
@AddOhms
@AddOhms 11 ай бұрын
More than 12 inches / 30 cm. Remember I2C = IIC which was meant for Inter-IC communication. It was meant for talking to things on the same PCB.
@Willy_Tepes
@Willy_Tepes 11 ай бұрын
Thank you for the reply. Today it is often used for sensors that are mounted away from the PCB.@@AddOhms
@sujinkesavan2509
@sujinkesavan2509 4 жыл бұрын
Hi, suppose if I put a 100 ohm pullup resistor with 3.3 volt. and the pin connected to this 100 ohm have the max current capacity of 1 mA, will it damage the pin or microcontroller??
@AddOhms
@AddOhms 4 жыл бұрын
No
@sujinkesavan2509
@sujinkesavan2509 4 жыл бұрын
@@AddOhms Hi Addohms, Can you please explain? Here total current in the resistor will be 33mA, right. But the pin is only having a capacity of 1mA. But how is it not gonna damage it?
@AddOhms
@AddOhms 4 жыл бұрын
The pin in parallel with the resistor. It is high impedance. Almost no current goes into it.
@rajapavan7520
@rajapavan7520 5 жыл бұрын
How does the pull up resistor along with 5v supply solve the problem or EMI.
@Humanclock
@Humanclock 4 жыл бұрын
This is my question too (read through comments to see if it was asked). I understand all the pull up/pull down concepts from your other videos). What I don't understand from here and reading elsewhere is the "why" part. If the switch is open, what exactly is a pull up resistor doing physically to "pull up" the pin to "true" when connected to 5V.
@charlesmiller5606
@charlesmiller5606 2 жыл бұрын
Thanks...succinct and clear. I have a variation of the problem: Let's say I want to have a pullup on an EEPROM write-protect pin. The Vcc for the EEPROM is 5VDC. The GPIO from the MCU will drive 0 or 1 (0 or 3.3V) per software. I make the GPIO output push-pull. What sorts of information do I start looking at to make the situation safe? The GPIO pin is allowed to sink/source 25mA. If I make the pullup 10K, and the GPIO is 3.3V when '1', then the current would be .33mA--seems safe. But, I'm pulling up 5V via the 10K R. So, do I have to take into account Vcc? Is this the "way" to "think" about these kind of problems? Regards, just a software guy trying to make sense of it all. I very much appreciate your video lessons.
@AddOhms
@AddOhms 2 жыл бұрын
If the MCU is 3v3, then it probably isn’t 5V tolerant. So pull-up the enable to 3v 3.
@AI_Image_Master
@AI_Image_Master 3 жыл бұрын
It will vary. What is your input pin. A transistor. A TTL chip, CMOS. Micro controller, CPU. There are formulas that you can use to give you a range, because the 0 and 1 logic work in voltage ranges. Example for a pull up is Rmax = Vcc - Vih / Iih and Ir= Vcc/R. When in doubt 10K seems to do the trick. Not too high and not too low. THere are also formulas for Lower range too. So you can get a range of resistance to use.
@wiky1492
@wiky1492 5 жыл бұрын
1k pullup pulldown is standard for me tho
@br52685
@br52685 3 жыл бұрын
follow-up questions (critical for actually selecting a resistor): is the POWER RATING of the resister relevant? Obviously, the VOLTAGE RATING needs to be higher than the voltage being used, but is there a minimum power-requirement (which becomes a factor for small SMT resistors). Or is this essentially an irrelevant issue for pull-up/pull-down resistors?
@AddOhms
@AddOhms 3 жыл бұрын
Most resistors don't have a voltage rating. If they did, almost none on the market wouldn't be high enough for a microcontroller. Given that not even a few milliamps (at best) go through a pull-up resistor, 5 seconds with Ohm's Law would tell you that their power rating barely matters.
@br52685
@br52685 3 жыл бұрын
@@AddOhms All the resistor I use for SMT (Uniroyal), do have a "max working voltage" rating (or is that for something else and not what I I think it's for)? Whereas I do pay attention to resistor power-rating (for other functions), I've never really known if I can just ignore it for pull-up/pull-down.
@ryanramlochan1504
@ryanramlochan1504 3 жыл бұрын
Can you explain a pull up and pull down crank sensor
@AddOhms
@AddOhms 3 жыл бұрын
No clue what that is.
@cmuller1441
@cmuller1441 6 жыл бұрын
Technically you should use the largest possible resistor while preventing bad behavior to keep the wasted current as low as possible. If it works with a 100k why would you put 1k? The problem is to find if there's a bad behavior from time to time (if R is too high and the bus is only connected to open collector type drivers then that will slow down the raising edges). Also you don't want to spend time on that if it's not battery operated. So I guess the trick could be to test with 100k and reduce that until it works. Then add another 10x (3x on battery) safety margin for you final design so you know that with variations (in temperature, batch of components, drift over time...) it will still work. You can justify a smaller margin on battery because reliability is useless without power...
@Clouds095
@Clouds095 3 жыл бұрын
Sorry but could you explain 1:16? Why is a short-circuit between the supply and ground bad? What will this do? Total electronics newbie here
@AddOhms
@AddOhms 3 жыл бұрын
Since short circuits destroy things, most people consider them bad.
@user-yz9uw3pd5t
@user-yz9uw3pd5t 2 жыл бұрын
why does it work like an "open" when I use resistor +100K ohms?
@AddOhms
@AddOhms 2 жыл бұрын
An open is super high resistance. 100K is high resistance. So 100K acts like an open.
@magnusbrzenk447
@magnusbrzenk447 2 жыл бұрын
Your numbers have me worried. If, as you suggest (~ 1:58), we round up the internal pull-up resistor of the IC to 100kOhms, and then set our external pull-up resistor to 100kOhms (a value at one extreme of your range), then wouldn't the voltage at the input be VCC/2 (i.e. an non-permitted/ambiguous signal)? I would have thought, to make sure you get an unambiguous "logical 1" signal at the input of your IC, that the value of the external pull-up resistor would need to be, say, an order of magnitude smaller than the internal resistance of the IC. So, in this case, if we are rounding up the internal resistance of the IC to 100kOhms, then I would expect to have to set the external pull-up resistor to
@AddOhms
@AddOhms 2 жыл бұрын
External pull-up resistors would be in parallel to the internal pull-ups. Not in series.
@magnusbrzenk447
@magnusbrzenk447 2 жыл бұрын
@@AddOhms hmmm… that raises more questions in my head. Any chance you could do a more detailed discussion with schematic of internal resistor(s) included? Thx
@AddOhms
@AddOhms 2 жыл бұрын
It’s not that complicated. It’s just a resistor.
@AddOhms
@AddOhms 2 жыл бұрын
Page 63: ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf. Upper-Left corner, you can see the built-in pull up resistor is connected to the PIN and to VCC (Through a transistor.)
@eliotcougar
@eliotcougar 3 жыл бұрын
I used 50K, and my "button" thinks it's been pressed every time a relay in my air conditioner opens...
@AddOhms
@AddOhms 3 жыл бұрын
Good example of why a very large value (above 10K) is considered a "weak" pull-up.
@eliotcougar
@eliotcougar 3 жыл бұрын
@@AddOhms Replaced it with a 4.7k resistor, but it still catches interference from the air conditioner... Much less often, though... And it somehow detects a button press if I simply touch 5v lead of the button with my multimeter probe with the other probe not even connected... I guess the only way now is to increase the size of the capacitor, and add a Schmitt trigger... Oh, wait... (Why didn't I check it in the first place) Maybe the capacitor is simply dead?.. I don't have an oscilloscope, and I want one now... It'll make debugging a lot easier... ADDITION: Scrap everything I said above... It turns out, i don't have a resistor in my RC filter - I've connected both input and output to the same resistor lead on a breadboard by accident, creating a useless resistor... Ouch...
@NeneRomanovaBGC
@NeneRomanovaBGC 2 ай бұрын
Why is so much of electronics just picking random value components?
@AddOhms
@AddOhms 2 ай бұрын
Because in engineering there is no best or perfect answer. There are always trade-offs to consider. Some are critical, some are not.
@NrJ270
@NrJ270 5 жыл бұрын
Didn't know dana white is an electronics enthusiast
@Vortex-gz8se
@Vortex-gz8se 4 жыл бұрын
It still isn't clear to me why you can't just use a wire. When the button is pressed there doesn't seem to be any difference in the circuit whether you are using a resistor or wire. There is still a path for the electricity to flow. All the video says is "that is a short circuit and that is bad" with no indication why it is bad, the electricity is following the path you want when you press the button, why would that be bad?
@AddOhms
@AddOhms 4 жыл бұрын
Creating a short circuit from supply to ground damages the supply and everything between it.
DIY Arduino Turn-On and Debug | AddOhms #27
14:19
AddOhms
Рет қаралды 22 М.
Pull Up Resistor Tutorial | AddOhms #15
3:52
AddOhms
Рет қаралды 302 М.
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 37 МЛН
Pull Up and Down Resistors for Floating Inputs- Simply Put
23:52
The Most Important Circuit for our Electrical Future?! (PFC) EB#55
11:26
Decoupling Capacitors - And why they are important
7:39
Lalo Solo
Рет қаралды 333 М.
Pull Up/Down Resistors
6:42
0612 TV w/ NERDfirst
Рет қаралды 8 М.
8 awesome application of diodes in circuits.
19:50
Electronic Wizard
Рет қаралды 186 М.
If and When Do I2C Pull-Up Values Matter? - Workbench Wednesdays
9:53
element14 presents
Рет қаралды 8 М.
Linear Voltage Regulators (LM7805) | AO #17
6:36
AddOhms
Рет қаралды 240 М.
What does "impedance matching" actually look like? (electricity waves)
17:08
Pull-up and pull-down resistors explained
6:33
Blueprint IoT
Рет қаралды 4,1 М.
8 *Must-Try* features in KiCad 8
6:57
AddOhms
Рет қаралды 48 М.
Tag him😳💕 #miniphone #iphone #samsung #smartphone #fy
0:11
Pockify™
Рет қаралды 3,6 МЛН
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 8 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 63 МЛН
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,5 МЛН
iPhone 15 Pro Max vs IPhone Xs Max  troll face speed test
0:33