Resistor Usage

On page 35 of the Arduino Projects book (Spaceship Interface project), a 10 K resisitor is added to the switch.

My simple question is why this rating resistor in particular? I understand the 220 ohm for the LEDs (to stop them burning out), but why and how is the 10K value for the switch calculated.

This is the one area that is befuddling my understanding of resistors.
'
TIA guys, I am having fun learning this stuff!

The 10K is a pull down resistor and the value is not at all critical. 10K is a sort of go to value for pull down (and pull up) resistors. It is low enough to pull the pin low but at the same time high enough so that not a lot of current flows through it. There is really no calculation to be done. More of a rule of thumb deal. A lower value (minimum 1K or so) might be used if the switch is at the end of a long wire to overcome noise on the wire. A higher value (like 100K or maybe more) might be used where there is little noise and low current is important (battery supplied project).

Google "arduino pullup" or "arduino pulldown" for more info.

Thank you!

My simple question is why this rating resistor in particular? I understand the 220 ohm for the LEDs (to stop them burning out), but why and how is the 10K value for the switch calculated.

This is the one area that is befuddling my understanding of resistors.
'

10k is NOT a 'rating' (period).
It is a VALUE.
VALUES & RATINGS are like APPLES & ORANGES.

(If you want to make an Apple Pie, you don't substitute oranges)

Everything has only ONE VALUE and only ONE "package STYLE" (e.g.: AXIAL) BUT may have many RATINGS :

e.g.
VALUE: 10k
Package Style: AXIAL
Rating-1: tolerance: +/- 5%
Rating-2: temp tolerance: +/- 20%
Rating-3: power dissipation(Watts) (NOT "Wattsup ?")

In the 'real world', many , and sometimes all of the ratings are 'assumed' because that particular
industry has standards that must be adhered to all the time so nobody actually talks about stuff
that everybody already knows .
For example, in the utility power industry, there are many details about equipment that are requirements
such that no part would be present or 'on hand' in certain locations unless it complied with all of the
standards that are applied. If you are asked to use a 1kW resistor, it might have some minimum voltage
rating for that application. In the hobby world, most people don't like to handle 1/16th W or 1/8th W
resistors so they use 1/2W or at the very least 1/4W, so if someone you know is breadboarding a
circuit, especially if it is at work, and they ask you if you have a 4.7k resistor because they need one
for the circuit they are breadboarding, you are not going to offer them a 1/8th W or 1/16th W or a
SMD 0401 surface mount resistor. If they are a hobbyist you are not likely going to give them a 1%
resistor like you would if they were an engineer. Likewise, almost nobody is ever going to ask you about
the temperature rating of a resistor unless they are putting it in some piece of equipment that will be
exposed to extremes of hot or cold. Likewise, if someone is breadboarding a circuit, and asks you for
some hookup wire, you're not going to offer them 20AWG solid unless they specifically ask for a size
that is unlikely to pull out of the solderless breadboard easily. (I used 20AWG for such an application).
Normally you would offer them 22 AWG wire for solderless breadboards and 24,28, or 30 AWG solid
for point to point soldering protoboards, (although some people actually like 22 AWG solid for the power
rails on soldered protoboards. You certainly would not offer them stranded wire unless for solderless
breadboards or point to point soldered protoboards unless they specifically requested it (which would
be rare). This whole line of thinking goes on and on and on. You could repeat the same kind of conversation for caps (radial vs axial) (ceramic vs film) etc. etc . etc.

If I could only tell you one thing, it would be never apply power to a circuit you haven't beeped out,
or at least visually inspected.

and then for those BIG jobs:

(we called that one the "Mafia Interrogator")

“Suitably chastened and educated”.

Thank you :slight_smile: