comes with the big standard-B plug, while other boards, such as the Arduino
Leonardo or the Arduino Due, have the small micro-B plugs.
You can use the USB connection for various purposes:
• Upload new software to the board. (You’ll see how to do this in Compiling
and Uploading Programs, on page 19.)
• Communicate with the Arduino board and your computer. (You’ll learn
that in Using Serial Ports, on page 28.)
• Supply the Arduino board with power.
As an electronic device, the Arduino needs power. One way to power it is to
connect it to a computer’s USB port, but that isn’t a good solution in some
cases. Some projects don’t necessarily need a computer, and it would be
overkill to use a whole computer just to power the Arduino. Also, the USB
port delivers only 5 volts, and sometimes you need more.
Figure 1—A typical AC adapter.
In these situations, the best solu-
tion usually is an AC adapter
supplying 9 volts. (The recommend-
ed range is 7V to 12V.)
7
You need
an adapter with a 2.1mm barrel
tip and a positive center. (You
don’t need to understand what
that means; just ask for it in your
local electronics store.) Plug it into
the Arduino’s power jack, and it
will start immediately, even if it
isn’t connected to a computer. By the way, even if you connect the Arduino
to a USB port, it will use the external power supply if available.
Please note that older versions of the Arduino board (Arduino NG and Diecim-
ila) don’t switch automatically between an external power supply and a USB
supply. They come with a power selection jumper labeled PWR_SEL, and you
manually have to set it to EXT or USB, respectively. (See Figure 2, Older
Arduinos have a power source selection jumper, on page 8.)
Now you know two ways to supply the Arduino with power. But the Arduino
isn’t greedy and happily shares its power with other devices. At the bottom
of the board shown in Exploring the Arduino Board, on page 6, you can see
7.
http://www.arduino.cc/playground/Learning/WhatAdapter
report erratum • discuss
Exploring the Arduino Board • 7
www.it-ebooks.info