A few noob questions

Hi! I just got my Arduino Starter Kit (with an Uno R3 board), and I'm excited to learn my way around. I've been programming for many years, so I'm quite comfortable with the code, but the electronics are all new to me.

I'm working my way through the tutorial book, and I'm trying to go slowly, only proceeding to the next project after I fully understand the previous one. I was hoping some more experienced folks could answer a few novice questions for me.

So here goes:

  1. In the second project (the "Spaceship Interface"—Arduino Starter Kit Multi-language — Arduino Official Store), and also in this sample circuit (http://arduino.cc/en/Tutorial/DigitalReadSerial), the pushbutton is connected to ground via a 10k? "pull-down" resistor. I understand why the button needs to be connected to ground—otherwise, the current has no return path when the switch is open.

However, I don't understand why it's connected to ground via a resistor, instead of just a plain wire. Why?

  1. In the first project ("Get to Know Your Tools"), you set up a simple circuit that goes like this:

5V -> 220? resistor -> pushbutton -> LED -> ground

I understand why the resistor is needed here—the LED can't handle the full current from the Arduino, so you have to "throttle" it to protect the LED.

However, in the second project (the aforementioned "Spaceship Interface"), the resistors come after the LEDs in the circuit.

I don't understand this. Since the current isn't being reduced until after it's passed through the LEDs, why don't the LEDs get fried? And what's the purpose of reducing the current later in the circuit?

  1. What happens to current that gets lost as it passes through a resistor? Is it simply radiated as heat?

  2. What happens to "leftover" current that returns to ground at the end of the circuit? Is it basically recycled back into the 5V supply?

I'm sure these are very elementary questions, but I gotta start somewhere. Any guidance will be appreciated!

Hi, and Welcome!

  1. The reason the pull-down is there (with or without a resistor), is in fact to force the pin to a known state when the switch is open. When open, the pin is at a definite ground; without the pull-down it can float at any value. When the switch is closed, it is of course forced high. But why the resistor, why not mere wire: look at the circuit diagram. When the switch is closed, you'll see a path from high volts, thru the switch, straight to ground. That's a short circuit of volts to ground and current is essentially infinite; the resistor prevents that.

  2. In a series circuit, the same current must pass thru each component and piece of wire, so sequence doesn't matter.

  3. Yes, and that's why resistors have a power rating in Watts, which is the heat they can dissipate.

  4. There's no "leftover" current: the resistive components in the circuit, and the voltage available across them, collectively determine the current via Ohm's Law, and that current is the same thru all series components.

Jim

Yes that's true, it does not matter if the resister is before or after, the current will be limited on the entire line. Think of it as a line of people that are tied together with rope at their waist (here the people are electrons) and they all going through the turnstyle gate(the resister). Can you see that the people way at the back of the line are slowed down even before they have gone through the resister and the people through the gate are tied by the waste so they can also only move as fast as what the turnstyle let's them?

The reason for the resister is to limit the current, remember you can only safely draw 20mA from an arduino pin. So the resister is there to save ur arduino in this case.

You might like to read up on strong and weak pullup and pulldown resistors

Sorry for the belated reply—you know how the holidays are.

Thanks for the answers—they're hugely illuminating. The book explains resistance using the analogy of rocks (current) rolling down a hill, with some of them being blocked by bushes (resistance)—but it sounds like that's not the greatest analogy. It's closer to water pipes: if I release a trickle of water from a water fountain, then there's only a trickle of water flowing out of the source, even if it that source is a water tower with thousands of pounds of pressure. (Right?)

The basic principles of how electricity works are still kinda counterintuitive to me, but hopefully that'll change as I get more practice.

I'm sure I'll be back to pick your brains some more. Hopefully I can pay it back when I'm a guru. Thanks again!

  1. Look up Kirchoff's Current Law. It states that the sum of all current entering a node is 0.

The wires are already packed full of electrons, just like a water pipe that is packed full of water. Just like water, the electrons are mostly incompressible. This, when current flows through a single path, such as through a resistor and LED, the current only has one place to go, so the same current flow MUST exist through all the series elements at all times, regardless of their order.

You can think of current roughly as the speed of electron flow. It's measured as the number of electrons flowing past a certain point per unit of time.

Taking your statement here: "I don't understand this. Since the current isn't being reduced until after it's passed through the LEDs, why don't the LEDs get fried? And what's the purpose of reducing the current later in the circuit?"

If, as your "intuition" tells you the current is higher through the LED than the resistor, that means there are more electrons flowing through the LED than the resistor. Where do those extra electrons go?

It's a trick question. There is nowhere for them to go. Your initial "intuition" is wrong. That is why in a series circuit, where there is only one path for the electrons to follow, all elements must have the same speed of current flow. Order doesn't matter.

  1. CURRENT does not get lost as it passes through a resistor, as I already covered above. VOLTAGE (the amount of energy per electron) is lost. That energy, as you already guessed, is just turned into heat.

  2. If there is current leaving the positive side of a power supply, due to Kirchoff's Current Law, there MUST be an equal amount of current flowing into the negative end. Electricity can only flow when there is a complete closed path for it to take. It is a convention in circuits that the negative end of the power supply is called ground (GND).

And yes, these are all very elementary questions.

Going a little further, should the electrons can bunch up, but even a tiny amount
of bunching (parts per billion) results in an appreciable amount of charge imbalance,
and large voltages.

For instance a few nano coulombs of charge are enough to produce static electricity
effects when on an insulator, but a copper wire contains many coulombs of charged
electrons (and the same number of positively charged lattice atoms).

So the free electrons in a metal act as an extremely incompressible fluid, at all
practical voltages.

Bunching up of charge is also what happens in a capacitor, one plate gets a slight
excess and the other a slight deficit, leading to a voltage difference - it takes large
areas of plate very close together to build up appreciable charge at normal voltages
(1uF means 1 micro-coulomb per volt).