Now that you’ve got your Arduino and a number of parts and tools, let’s look at them in more depth. The Arduino is just the thing to solve your everyday interactive needs. In this chapter, you’ll learn about the parts of the Arduino and how to attach it to a computer and to a power supply. We will also look at unboxing our electronic parts, sorting them out, and learning more about them on both websites and data sheets.
First let’s take a look at the labeled parts of the board, as shown in Figure 2-1.
We are going to break down each side of the board in more detail so you can see where everything important is located on the Arduino.
Let’s learn a bit more about what is on the Arduino board. Remember that there are different styles of boards, so yours may look slightly different. These figures are based on Arduino Uno revision 3. We’ll look first at the left side of the board, with the reset button, USB port, voltage regulator, and power port, as shown in Figure 2-2.
Reset Button
USB Port
Voltage Regulator
Power Port
We’ll take a closer look at the other side of the board now (Figure 2-3), which includes the digital, analog, and power pins as well as the actual chip for the board.
Built-In LEDs
ON Indicator LED
Digital I/O Pins
TX/RX Pins
ATmega328P, Black Chip
Power and Ground Pins
Analog Pins
Now let’s connect the Arduino to your computer. We’re not going to program it just yet, but it will help to see how to attach it to the computer via the USB cable.
You’ll need a USB A-B cable, your computer, and an Arduino Uno. If you have a newer MacBook model, you may also need a USB-C-to-USB adapter.
First, plug the USB cable into one of your computer’s USB ports as shown in Figure 2-4. Any port that is available, as shown in Figure 2-5, should work fine.
Now that you are attached to the computer, plug the USB cable into the USB port on the Arduino. The USB port is labeled in Figure 2-6.
You can see the top view of the USB port on the Arduino with the USB A-B cable in Figure 2-7.
What happens when you plug in the Arduino? The power LED labeled ON should light up. And if this is the first time you’ve plugged it in, the LED on the Arduino near Pin 13 should blink on and off, as shown in Figure 2-8.
You can always use a USB cable and a port on your computer to power the Arduino. The Arduino can also be powered by attaching it to a power supply that’s plugged into a wall outlet.
You will need a 9–12V DC power supply and an Arduino. The first step is to unplug the USB cable, which will completely power down the Arduino. Figure 2-9 shows the power port on the Arduino.
Attach the power supply to the power port on the Arduino (Figure 2-10).
Next, plug your power supply into a surge protector, and then into a wall outlet, as shown in Figure 2-11.
What happens now? It should be just the same as when you attached the Arduino to your computer with the USB cable: the LED labeled ON indicates that the Arduino has power. And if your Arduino is straight out of the box, the LED near Pin 13 will start blinking, as seen in Figure 2-12.
Now you know the two methods of powering an Arduino. You can switch your power source as your project evolves—you’re not stuck using one or the other.
Now that you have purchased the components in the parts list (Figure 2-13), you may wish to learn more about the individual pieces. Several different types of resources are available that can help you figure out which parts to use and where to put them.
The best thing to do when unboxing all your parts is to separate them by type. It’s nice to have all of your resistors in a separate place from your LEDs, or even to have separate places for different LED colors and for resistors of different values. Most hardware or craft supply stores sell plastic boxes that will make it easy to sort out the parts and find them when you need them later on. We recommend something that looks like the box shown in Figure 2-14.
Now that you have your parts separated out and can identify what they are, where should you look to find out information about them? The very first place to check for information about components is the components themselves. Resistors, LEDs, and most other components look different enough that you will quickly learn how to identify them. Often, components will have a part number listed on them somewhere, which can help you find a supplier’s or manufacturer’s website. When you order components or a kit, the store will also send along documentation or point you to a page on their website. Always check a part supplier’s website first and save yourself a headache.
If you can’t find the information you are looking for either on the component or on the website, the next thing to look for is your component’s data sheet. You can find it by entering the part number, followed by “data sheet,” in your favorite search engine online. Do not search for just the part name, since chances are there are many different versions of your part online with different information. For example, there are a lot of different LEDs!
Electronic data sheets document the behavior, function, and limitations of electronic components. They have a tremendous amount of information, from operating temperature and behavior and suggested wiring diagrams, to material makeup and industrial application.
For example, here’s how to find a data sheet online for one of your LEDs.
It can often be overwhelming to sift through the data sheet to find the one bit of information that you need, but data sheets come in handy, particularly when you are not sure what components you are handling. Let’s start by looking at a sample sheet, as shown in Figure 2-15.
Your data sheet contains a lot of parts, and not all of the technical information will matter for your project—but it can help you if you get stuck.
You should now feel comfortable with the layout of your Arduino. You know how to power up the Arduino from the USB and the power ports. If you are ever unsure about your components, you know you can look them up online from the website where you purchased them or search for their data sheet. In the next chapter, we are going to take a look at using a few components to build our first circuit.