A five minute lesson on pull-up and pull-down resistors

Oct 24, 2026 Last reply: 11 hours ago 2 Replies
Jump to replies (2)

The starting point for this project is a problem every microcontroller build runs into sooner or later: a digital input left floating picks up noise and gives unstable readings. Saral Tayal tackles it in episode 16 of an electronics crash course series, in a lesson that runs about five minutes. The explanation covers how digital pins read signals as high or low, why an unreferenced pin misbehaves, and then moves straight into the fix for it.



The demonstrations are built on breadboards, with an Arduino Mega 2560 and a Raspberry Pi both sitting on a green cutting mat. An SPDT lever microswitch gets connected with clip leads, and individual through-hole axial resistors do the actual work. Jumper wires run to a digital input along with ground or voltage. Onscreen schematics sit next to each breadboard setup, a pairing I find genuinely helpful for following the wiring. A pull-down demo references the input to ground, then a pull-up demo references it to the supply rail at 5V or 3.3V.



What stands out to me is the practical advice. A standard 10 kΩ resistor gets the recommendation, along with a rule of thumb to pick a value around one-tenth of the pin's input impedance. There is also a clear warning that going too low draws excessive current and could damage the microcontroller or trip safety shutdowns. The software side is covered too: pinMode(2, INPUT_PULLUP) in the Arduino IDE, and Python through RPi.GPIO in Visual Studio Code setting pin 25 with PUD_UP or PUD_DOWN, showing the internal resistor route through code.



One rough edge remains: the thumbnail misspells the word resistor. The maker has said it was made in a rush and plans to fix it. A worked example of calculating a value from input impedance also feels like a natural follow-up, and the maker has said that might become its own episode.



Project by Saral Tayal. Watch it on their YouTube channel:

formatting link


Demonstrating the internal pull-up route through code alongside the external resistor demos is a smart choice, in my view. pinMode(2, INPUT_PULLUP) plus the RPi.GPIO options cover both platforms with barely any extra hardware on the desk. The trade-off is that enabling it in software hides what the resistor is physically doing, though the breadboard portion of this lesson balances that out nicely.

One improvement I would love to see: a short segment where a resistor value is actually calculated from a pin's input impedance. The one-tenth rule of thumb gets mentioned, and the maker has said a dedicated episode on that calculation might happen, but even one worked number here would cement the idea. It could also place the 3.3V rail on the Raspberry Pi next to the 5V rail on the Arduino, since pull-up resistors reference whichever supply the board in front of you uses.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required