EveryCircuit
Contact
Reviews
Home
czlee
modified 11 years ago

E40M Pull-up resistors demo

5
1
181
02:59:28
The circuit on the left shows an input switch circuit without a pull-up resistor. The circuit on the right shows it with a pull-up resistor. The input switch circuit comprises the resistor and the switch. The two transistors arranged in a CMOS inverter aren't part of the circuit: they're inside the Arduino. We're interested in the output of the inverter (which is inside the Arduino, and goes to other logic in the Arduino). Since it's an inverter, note that it will be the opposite of whatever is read on the input pin. Start with both switches off. When you start the simulation, the circuit on the left will output... some random voltage that is neither 0V nor 5V. What? How? Well, the input pin isn't connected to anything ("floating"), so its voltage is basically random, and this causes the transistor circuit to do funny things. Floating input pins are bad. The circuit on the right, however, will have its input pin at 5V, thanks to the 10kΩ resistor which (by Ohm's law) has no voltage drop across it. So the inverter correctly outputs 0V. Now, turn both switches on. Bingo! Everything works in both circuits, which both dutifully output 5V (the input is 0V). This is expected: when the switch is closed, the input pin is connected to ground in both circuits, so everything is find in both worlds. Finally, turn both switches off again. The circuit on the right will go back to 0V, just as it was before. But the circuit on the left? It's staying where it was! So releasing the switch didn't do anything. Why? Well, now the input pin is floating again... but this time, it "remembers" what voltage was there before. (This is because the gates of transistors function as capacitors. We haven't learnt about these yet, and we'll cover them later in the course.) But although the voltage isn't random any more, it's both useless (the switch didn't do anything!) and very unreliable. Floating input pins are bad.
published 11 years ago
mbeakley
11 years ago
Good stuff, man. I'm a ME so I had to take a few EE courses, but the profs barely half-assed it and so we didn't learn anything. Pull up and pull down resistors have baffled me, but this is a great help. How I just have to figure out what a mosfet does! :p

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy