This article is relevant to Arduino Step by Step Getting Started "Getting to know the Arduino Uno: Atmega328P, USB, Shields".


I'm going to walk you through the Arduino board, have a look at the components that you see on it and explain what each of those components is and what it does. This will give you a good understanding of the board and make you familiar with its most important functions, and it will definitely help you going ahead. If, on the other hand, you are already familiar with the Arduino Uno, and you've built stuff in the past with it, then you're probably not going to get too much out of this lecture. Feel free to skip it and move on to other things further down in the course.


Let's start.


The Arduino Uno


IMG 1: The Arduino/Genuino Uno

This is the classic Arduino Uno. It is the simplest Arduino out there and the one that I strongly recommend that is your first Arduino. There's many other Arduino models out there that I'll be talking about in a separate lecture. If you are just starting up now with the Arduino, then this is the one that I recommend that you get. There are two different brands out there at the moment. The one that I have was purchased outside of the US so that is why it's branded as the Genuino Uno. If you purchase an Arduino inside the US, then it will say Arduino instead of Genuino, but apart from the brand, these two Arduinos are exactly the same, absolutely the same. There's no difference at all between them.

In this document, I'd like to explain some of the basic features of the Arduino Uno board and walk you through the components that you see on the board itself. In other lectures in this section, we will look at specific features of the board that are.


Let's begin with this walk through by looking at the brains of the Arduino Uno board, and that is this chip, the large chip in the lower right side of the board.

IMG 2: The Atmega 328P is the brain of the Arduino Uno

The brain of the Arduino Uno is the ATmega328P microcontroller. A microcontroller is different to a microprocessor in that it has lots of what's called “digital input and output pins” of about which I will be talking more later. Also, it does not run an operating system like your computer does.


Your computer has a microprocessor in its heart (not a microcontroller), it's running an operating system and then on the operating system you have a program that does things like showing this document on the screen. A microcontroller does not run an operating system. Any program that you write for it, will run directly on the microcontroller. This makes programming very easy, and, in my humble opinion, a lot more fun!


Compared to a microprocessor, a microcontroller is much, much simpler. For instance, it has a lot less memory. It is a lot less capable in doing general purpose things such as running a game, for example, or running a spreadsheet. A microcontroller is dedicated to interacting with its environment via its GPIO, which is general purpose input output pins.


A nice feature of the Arduino Uno with the Atmega328P on it, is that you can actually remove the chip if it gets damaged and replace it with a new chip. I have actually managed to damage this one a couple of weeks ago as I was doing some experimentation, and luckily, I had another 328P microcontroller chip lying around in one of my drawers, so I just removed the old damaged chip and replaced it with a new one.

IMG 3: It is easy to remove a defective Atmega328P with a flat-tip screwdriver

All you've got to do to do that is to take a flat-tip screwdriver like this one in IMG 3, and gently lift the damaged microcontroller off its socket. Then, you can replace it with a new one. Just be careful here though. Notice how at one side of the chip, there is a little indentation, like a little dimple. You need to match that side with a side on the socket that has a similar shaped dimple indentation (see IMG 4). Once you do that, just gently press in on both sides, so one and one and make sure that your new microcontroller makes a nice good contact with the socket. Done.

IMG 4: Place the chip on the socket so that the markings match

Beware that not all Arduino Unos have a chip that you can remove and replace. Instead, these Arduinos use a version of the Atmega chip that is stuck (soldered) on the board. This makes it impossible to change just with a screwdriver, so it is possible to do so if you have the right tools and skill. I strongly recommend that you get an Arduino Uno compatible or genuine with dip version of the microcontroller.


The USB interface

IMG 5: This is another microcontroller on the Arduino Uno! It is responsible for the USB interface

There is one more microcontroller on the Arduino Uno. You can see it circled in IMG 5. This is also an ATmega microcontroller. It's an SMD version (Surface Mounted Device), which means that it is stuck on the board using solder. This chip is responsible for the USB interface, through which the Arduino and the computer can talk to each other. You can’t program this microcontroller yourself (or, to be more exact, there is no reason to do so since it’s only wired to make USB communication possible.

Headers

Your Arduino Uno comes with two sets of headers (see IMG 6). One is slightly longer than the other, so we call them “long header” and “short header”. This is how you can connect things various devices to your Arduino Uno. Do connect something to a pin, you typically use flexible wires called “jumper wires”. You can see one in IMG 7.

IMG 6: The Arduino Uno comes with headers that give you access to its pin



IMG 7: A jumper wire allows you to connect all sorts of devices to the pins of your Arduino Uno that are available in its headers


Notice that the two headers have got numbers for each one of the pins? We're not going to get into the specifics, I've got another lecture that explains what the different types of pins are. For now, just be aware that each one of those pins does something different on the board, and that those numbers and markings are there to tell us about the capabilities of each one.


A few pins for example, are dedicated to power. There's a few pins here that deal with signals, and allow you to measure an analogue signal from the outside world. Then the other side you've got pins that are designed to work with digital signals.


Again, don't worry about the details, you will learn about all that further down in this course.


Also, notice that there are pins marked with the letters “SCL”, “SDA”, “RX” and “TX“. There are communication pins. We use these pins to allow the Arduino to communicate with external devices such as, for example sensors, or even your computer or other Arduinos.


You can actually multiple ways by which your Arduino Uno can communicate and data to other connected devices. You will learn about some of those ways later in this course.


 

Shields

Another way to connect devices to your Arduino is by using a shield, as it's called. The device in IMG 8 is a board with various components on it that makes it possible to connect your Arduino to a network. At the bottom, it has pins that are in the exact same configuration and dimensions as the long and short Arduino headers.

IMG 8: An example of an Arduino shield. This one is used to connect the Arduino to a network

You can see an example in IMG 9.

IMG 9: The shield plugs over the Arduino and provides additional functionality

When you attach a shield to your Arduino, you added additional functionality. The shield shown in IMG 9 provides Ethernet connectivity, so that now I can connect my Arduino Uno to my local Ethernet network and from there to the Internet. Also notice how this particular shield in IMG 9, the Ethernet shield, also provides another set of headers? This means that I can take another Arduino shield. You can see an example in IMG 10.

IMG 10: You can attach multiple shields to your Arduino, one on top of the other

In IMG 10 you can see a screen (LCD) shield connected over the Ethernet shield, which is connected to the Arduino Uno. Now your Arduino has two types of additional functionality. Your Arduino can connect to your local Ethernet network, and it can display information on a colour screen.


The Arduino headers give us the ability to expand its capabilities by stacking one header on top of the other.


To remove a shield, gently, use your fingertips to push one against the other so that they separate without bending the pins. Try to remove one device from the other by pushing against my fingers horizontally, making sure that there is no angle between the two boards, between the shield and the Arduino Uno.

Connectors

Let's move on to the front of the board, where there are two large sockets. The large silver-white socket is the USB socket, and the round black one is the power socket. The USB socket allows you to program your Arduino Uno by connecting it via USB to your computer. It also provides power to your board to the Arduino.


We use the power connector as an alternative way to provide power to your Arduino when we do not want, or can’t use, the USB connector. You can use the power connector to power the Arduino using a battery pack, or a wall power adaptor. This way you don't have to keep your Arduino connected to your computer for power. It can use an external power supply and connect it somewhere else where your gadget is supposed to be installed.

IMG 11: The USB and power connectors

You can also use an external battery power pack like the one in IMG 12. Just fill it up with easy to get cheap “AA” batteries, and connect it through the black barrel connector. It's an easy way to gain some independence for your gadgets from power sources through a battery.

IMG 12: You can power the Arduino with a battery pack using the barrel connector

The Reset button and the crystal oscillator

There's a couple of other components that you should learn about before this chapter ends.


The red button at the top right corner of your Arduino is the Reset button (see IMG 13). When you press it you reset the Arduino. This will force it to start executing whichever program is on the microcontroller from the beginning.


The silver device below the USB microcontroller, is a crystal clock. It is calibrated to “tick” 16 million times per second, so that's 16 megahertz. It’s the clock that makes the whole board work. Every microcontroller, just like a microprocessor, needs a clock in order for it to operate. Every time that the clock ticks, the processor will execute the next instruction. If there is no clock here or if the clock is not functioning properly, then the microcontroller will not operate as well. Is like time stops if there is no clock.

IMG 13: The Reset button and the Crystal Oscillator

Let’s stop here for now. Hopefully this chapter has given you a good overview of what is on the Arduino Uno board, and what are its main components. In the next chapter, you will learn about the digital and analogue ports before moving forward, and talking about communications.