Beginner Example 4 problem

Hi, I'm a newbie Arduino user.

I am going step by step through the Getting started with Arduino book, and am a little confused about Example 4 (in particular the set-up of Figure 5-4.)

I am able to get the circuit working and the program working, but I am not sure of why a resistor is placed into the circuit. When I have the resistor located as shown in the Figure, the LED is on and working appropriately, but so dull I can hardly see it. As a test I changed the resistor to a wire, and the LED worked perfectly.

Any ideas? The resistor is a 10K as the book suggests.

Cheers.

As a test I changed the resistor to a wire, and the LED worked perfectly

Bad, very bad!

10k sounds way too high (I don't have the book), try a 1k instead.

Thanks, I will try that. The book say to buy a 10k Ohm resistor though.

Thing that's confusing me is that the book explains about resistance generally which I get, but doesn't explain why a resistor is used in the circuits that you have ot copy to build, so in the true fashion of an Industrial Design Student with no electrical knowledge, I just threw some other stuff at it to see what happens.

Luckily I guess the wire worked, but I might have got more out of it if it ruined my LED or something!!!

Thanks again.

The resistor is there to limit the current through the LED.
Google "LED current limiting". (Hah! Front page of Google today has a tribute to Oersted!)

Luckily I guess the wire worked, but I might have got more out of it if it ruined my LED or something

LEDs are cheap.
Arduinos, on the other hand...

Even 1K is a little high, but is safe.

Looks like there is plenty of info on google, I'll sift through it. Cheers.

I think the confusion on the resistor is because the book mentions a 10k resistor for the example on page 43 (controlling an led with a switch). The LED is connected to pin 13 so it doesn't have a resistor (the 10k resistor is used as a pull-down for the switch, not as a series resistor for the LED).

The book does not mention the value resistor value in the text describing figure 5-4 although this is noted along with a suggested value on the errata page for the book: Unconfirmed Errata - O'Reilly Media

My question: Is the book any good for me ?
I have a degree in micro electronics and I have spent the last 12 years working with C code on large control systems.
I am new to the Arduino but I have recently wired up a 16x2 LCD on a breadboard and used the LCD4bit library to display temperatures from a DS1620.

Is there anything in the book I could benefit from? I would love a nice friendly book to point out stuff to go investigate and play with.

Matt

Matt, You will probably find that book too basic. With your experience I suggest: “Making Things Talk” Making Things Talk [Book]

Thanks for the feedback. I had a look on Amazon the I went to eBay to buy it ;+)
Cheers

For ideas I always browse through the hackaday blog. What I can recommend for reading is Horowitz/Hill "The Art of Electronics". This is pretty advanced but still readable. If you have an degree in micro electronics you maybe already might know it though.

Cheers, Udo

I used the Art of Electronics at college ;D I also have Hack-a-day as an RSS feed.

I'm just getting to grips with whole get a gizmo and strap it to your Arduino. I would like to build a GPS logger / compass in a water tight container so I can combine dinghy sailing and electronics....

Now where is that TomTom ?

Matt