Go Down

### Topic: Question about Spaceship Interface project (Read 2086 times)previous topic - next topic

#### Nightcrawler

##### Aug 31, 2014, 01:54 pmLast Edit: Aug 31, 2014, 02:46 pm by Nightcrawler Reason: 1
Hi, I'm completely new to electronics and I just finished the 2nd project of the Arduino Projects book.  I was able to complete it successfully but I still got a coupple doubts...

1) For the button there is a 10k ohm resistor being used, but then for the LEDs we use a 220 ohm resistor.  My question is,  why do we need a 10k one for the button? ...      I  understand a resistor is needed to connect to ground when switch is open, ..   but, why 10k and not 220 ?..    :~

2) Also, I noticed that for this proejcts the ohm resistors were placed in the ground, but then in the previous they were in the positive.   Does it make a diference where they're placed?

If anybody could help me figure this out,  Thanks!

#### groundFungus

#1
##### Aug 31, 2014, 03:32 pm
220 would work for the switch, but 10K is used because very little current needs to flow  into the digital pin and 10K will allow enough current.  If 220 ohm were used almost 50 times the current flows.  That much current is not required and is inefficient as heck.  On he other hand the LED requires the current that the 220 ohm resistor allows.

#### Nightcrawler

#2
##### Sep 01, 2014, 10:53 am

220 would work for the switch, but 10K is used because very little current needs to flow  into the digital pin and 10K will allow enough current.  If 220 ohm were used almost 50 times the current flows.  That much current is not required and is inefficient as heck.  On he other hand the LED requires the current that the 220 ohm resistor allows.

Hi!, thanks groundfungus!

#### atomix1987

#3
##### Jan 07, 2015, 02:05 pm
220 would work for the switch, but 10K is used because very little current needs to flow  into the digital pin and 10K will allow enough current.  If 220 ohm were used almost 50 times the current flows.  That much current is not required and is inefficient as heck.  On he other hand the LED requires the current that the 220 ohm resistor allows.
It is still not clear for me.
You are telling that pin needs a little current that is possible with this resistor, but pin does not need any current when it reads the LOW value, all the current goes to the GND. Only when switch is closed, current goes to the pin. It has two ways where to go, and it goes to the pin instead of GND, qoz pin's own resistance is less than 10k ohm, so it reads HIGH, when current goes into it.

And as I understand, we need any resistor to connect pin and GND with only one condition, that resistor's resistance should be higher than pin's own resistance.
Can anyone confirm it, or maybe I am wrong?

Go Up