What is the purpose of the resistors in this Arduino circuit board?

Link to Video

I have recently discovered the brilliant concept that is Arduino. I have a programming background and am familiar with C (the Arduino language is based on C). For anyone who doesnt know about this, you can make just about anything. I found a website where someone who was doing a Masters made a segway/skateboard. It uses gyroscopes and motors and wheels etc to keep itself (with you on it) balanced. You can also drive it around, looks like fun.

Link to Video

The student has provided step by step instructions on how to build one for abount $300. He also provides the software he used.

Link to instrucitons

So anyway, I am very keen to learn all about this stuff but I think I need to get the fundamentals waxed first.

So what are the resistors for in the first video?
Is it because the pressure sensor induces a current that would get to all the LEDs unless there was some kind of barrier?
Also, do you know about any good books I can read to learn about all the components I might need to know about?

An LED must be given a fixed current, perhaps 20 mA. Most power sources (like a battery or a wall wart or the pins on that board in the video) provide a fixed voltage, say 5 V. If you want 20 mA to flow out of a 5 V source, the circuit must have resistance R = (5 V)/(20 mA) = 250 ohms. So, you can just put this resistor in to set the current.

Except…! LEDs also have a fixed voltage drop across them thanks to their semiconductor nature. This drop might be 1.8 V. (It depends on the type of LED.) So you will actually only have 3.2 V across the resistor itself, with the other 1.8 V drop taking place across the (approximately) resistance-free LED. Thus, you need a smaller resistor to throttle the current to 20 mA: R = (3.2 V)/(20 mA) = 160 ohms.

For LED circuits in particular, you could take a look at this wikipedia page.

Thanks, I though it might have something to do with that V equals I times R thing I learned at school.
So what would happen if you leave the resistors out? To much current and the LEDs pop?

Also, what should I search for on amazon to get a good book to start learning what I need to know? Electric + Circuit + components?

I’m at about the same place as you, as far as Arduino experimentation goes. The publishers of Make have a electronics instruction book that I have found to be enormously useful. Highly recommended.

Almost certainly. It is technically possible to run an LED without a current-limiting resistor, as they do have some resistance, but it’s also technically possible to drive without a steering wheel! :slight_smile:

ETA: I have no idea what the voltage on the Arduino output pins is, but if it’s 5 V, the LED may not actually pop, but then again it might. If the voltage is 9 or 12 V, then I’m betting that ‘pop’ is guaranteed.

Or, you’ll burn out the port (less likely, but it’s certainly possible to exceed the maximum total power dissipation of an IC by loading all port pins this way).