Intro to the Arduino - Weekend Project PDFcast


Arr

This week, Joe Grand and Bre Pettis bring you another Awesome Electronics Workshop! This time you'll learn about the open-source microcontroller board, the Arduino, ahem, the ARRR-duino. Make sure to download the PDF to see the schematic! - PDF Link

You can get an Arduino board in the Makezine store at or you can find plans to make your own from off the shelf parts. Then get some components and start playing around! You'll want to go wander around the Arduino website and the Arduino playground where users can share ideas and benefit from their collective research. Once you've checked that all out, go get thne software. Whatever projects you make, take pictures of them and upload them to the Make: Flickr pool or you'll have to walk the plank!

Intro to the Arduino PDF - Link
Buy one in the Make: Store - Link
Program Files - Link
Subscribe and get this podcast in itunes - Subscribe Link


Recent Entries

Comments

Oldest comments listed first.

Posted by: Dro_Kulix on September 21, 2007 at 9:51 AM

The sheets for the ATmega168 say that it has configurable internal pull-ups on some of its pins. Does the Arduino firmware allow access to that configuration? If so, that's one less component you'd actually need. If not...why not?

Anyway, I've been spending the past couple of months perfecting my PIC assembler technique, but Arduino is definitely looking like a cool platform for the less insane. :-)


Posted by: CCarlson on September 21, 2007 at 11:03 AM

It looks like issuing a "digitalWrite(pin,HIGH)" call after declaring a pin as INPUT will do the trick.

See about 2/3rds of the way through: http://todbot.com/blog/2006/10/29/spooky-arduino-projects-4-and-musical-arduino/


Posted by: danielj on September 21, 2007 at 12:27 PM

hey

you really need a resistor between pin 9 and the LED... that's sort of bad from for electronic design to leave it out!


Posted by: danielj on September 21, 2007 at 12:27 PM

oops "bad form", not "from".


Posted by: theuglymonkey on September 21, 2007 at 12:49 PM

Y dont u guys use the arduino to make a bigger LED Cube that would be realy cool like a 4*4*4 i wonder how you would do that


Posted by: theuglymonkey on September 21, 2007 at 12:52 PM

opps rong post


Posted by: flynnguy on September 21, 2007 at 2:07 PM

Actually, correct me if I'm wrong, I don't think you really need a resistor if you are going to blink the LED because it can handle the higher current because it is cooling down in the off state. If you were going to leave it on all the time it would be a good idea as to not burn out the resistor.

Aside from that, this is really funny because I just started learning to program the AVR, specifically the ATMega168. In fact I've been thinking of building my own Arduino board but I've been having fun with avr-gcc.


Posted by: Azira on September 21, 2007 at 2:19 PM

No, you really DO need the resistor. The LED will attempt to hold about 1.7v across it (as is its nature). Meanwhile, the Arduino will try and drive it with +VCC (maybe 5v). Something has to soak up the difference between 5v and 1.7v. A typical LED will flow about 10mA which means that (5-1.7)v*.01mA = 3.3 milli-watts of power has to be dissipated somewhere. Without a current limiting resistor, it will be forced to be dissipated in the output resistance of the Arduino which can potentially cause you to "burn out" your pins. If the uCPU is well designed, it'll have internal protection against something this bad happening but do you really want to rely on that as part of your standard design or would you rather rely on that from protecting your chip from frying because you forgot to unplug it first.

On the other hand, if the Arduino is worth anything as a uCPU, it should have configurable pull-ups on atleast some of it's pins which means that you don't necessarily need the 2.2k R on the pushbutton.
--
Danny


Posted by: danielj on September 21, 2007 at 6:04 PM

it's just totally bad engineering to leave out the resistor, as my namesake points out in the above post!
Both the LED and the Atmega have defined maximums for current, and without the resistor these will be exceeded.

It's sad to see the missing resistor here, as another generation of N00bs is coming along, and they will be building circuits based on this kind of erroneous design.

D


Posted by: merlin0952 on September 23, 2007 at 3:44 PM

While it certainly isn't the greatest design technique, a current limiting resistor isn't needed on the output of the Arduino. The ATMega can only source 40mA through it's output pins. While this could potentially burn up some low power LEDs when left in a constant ON state, the Pulse Width Modulated output used in the program isn't likely to destroy the LED. However, if the LED were to be connected directly to the power supply, it would most certainly destroy both the supply and the LED, unless a current limiting resistor were to be used.


Posted by: Azira on September 25, 2007 at 8:48 AM

It's sad to see the missing resistor here, as another generation of N00bs is coming along, and they will be building circuits based on this kind of erroneous design.

I totally agree with you here.

While it certainly isn't the greatest design technique, a current limiting resistor isn't needed on the output of the Arduino. The ATMega can only source 40mA through it's output pins

Merlin, this isn't exactly accurate. Just because the ATmega can source 40mA does not mean it is capable of dissipating that much energy in its output pins. What that value really tells you is that it the maximum load it is capable of handling. In this case (assuming a 5V +VCC), it would be able to handle a load of 5V / .04A = 125 Ohms. At even this maximum loading, there would be very little voltage drop over the output resistance of the ATmega which means it does not have to dissipate any energy. Instead, all the energy is being dissipated in the 125ohm load.

Compare this to the situation with the LED. An LED is a non-linear device, it takes progressivly more and more current to raise the voltage difference across it. Practically speaking you can rule-of-thumb it that the LED will hold 1.6V across it and it won't budge from that point unless you put exceedingly large amounts of current through it (in which case it'll just burn out). The only place for the remaining energy (again, 3.4v @ 10mA = 3.3mW) to be dissipated is within the output resistance of the chip itself.

Can you see how this situation is much worse for the chip even though it's only driving 25% of the current compared to driving full current into a proper load?

--
Danny


Posted by: mpare on October 1, 2007 at 6:54 PM

According to Arduino's Blink Tutorial Page...
We have added a 1K resistor to pin 13, what allows the immediate connection of a LED between that pin and ground.

Just thought I would throw that out there.

Cheers,
-mpare
--
Pare Technologies
Drupal Consulting, Themeing, and Module Development
806.781.8324 | 806.744.3025
www.paretech.com


Posted by: orangeperson on November 12, 2007 at 12:30 PM

Hey, I'm an electrical noob, and the pushbutton circuit isn't intuitive.

If I were given a pushbutton, a power source, and a pin that needs to get current when the button is pushed, I would attach the pushbutton to the power source, and then attach the other end of the pushbutton to the pin.

I don't even understand how that circuit works. Could someone explain?


Posted by: Ftales on March 4, 2008 at 12:07 PM

.


Posted by: Joe on December 26, 2008 at 9:23 AM

@Azira, @flynnguy, @danielj, @merlin0952:

Woops, I just came across these comments over a year later.

Ultimately, this podcast was intended to introduce the Arduino, not be an intro to electronics. However, if you look at the schematic above, I put a note stating "you could use an optional current-limiting resistor..." depending on your particular design.

Alas, I was using a blue LED with a forward voltage of 3.5V-3.7V, significantly reducing the required power dissipation. As merlin0952 noted, I am also PWM'ing the output giving me control of the effective output voltage.

Maybe not a good way to do it to teach n00bs, but it works fine for this extremely simple demonstration.

Joe


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television
MAKE: en EspaƱol MAKE: Japan


Check out all of the episodes of Make: television

Make: Science Room

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter

    MAKE's RSS feed is here.
    Add MAKE to iGoogle - GoogleGoogle.
    How to add MAKE to your RSS reader - Real simple.
    Add MAKE on FriendFeed




    Maker SHED

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Subscribe to MAKE Magazine!

    Make: Online authors!

    Gareth BranwynGareth Branwyn
    Senior Editor


    Phillip TorronePhillip Torrone
    Senior Editor
    | AIM | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Current Podcast

    itunesdl.gif Weekend Project: Making Char Cloth Learn how to make a cheap and effective fire starter made from an old t-shirt. To download The Char Cloth video click here and subscribe in iTunes. See Char Cloth in action with the Fire Piston from William Gurstelle.... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    MAKE Fascination video series brought to you by Dow

    Make: Education

    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog