You are on page 1of 23

Arduino Uno

The main microcontroller:

- Atmel ATmega328P
- The brain of the Arduino UNO
- Microcontroller is different than microprocessor. In microcontroller, there are lots of digital
input and output pins.

- Using a digital input/output pin, the microcontroller can read or change the state of an
external device like a button or a LED.

- Microcontroller does not have an operating system.

- Microprocessors have an operating system, meaning that microcontroller is much simpler


than a microprocessor.

- Microcontroller has much less memory, less capable of doing general things such as
running a game.

- Microcontroller is dedicated to interacting with its environment via general purpose


input/output pins.

- The microcontroller can be replaced on the Arduino card in case of a damage.


The second microcontroller:

- Atmel ATmega16U2
- Implements the USB
serial interface
- Specifically controls the
communication between
the computer and
Arduino.
Long header

Short header
Shield

- A shield is a board in the shape of the Arduino Uno, with a set of


Uno-compatible headers.
- With a shield you can expand the capabilities of the Arduino.

Ethernet shield of
Arduino Uno
- Pins are numbered according the their functions.
- There are 14 digital input/output pins.
- SCL, SDA, AREF, TX and RX pins are dedicated for communication
with external devices such as sensors or other Arduino boards.
- A few pins are dedicated to power.
- 6 pins are dedicated for the Analog inputs.
USB connection socket

External power socket, this connector gives you the ability to detach
your Arduino from your computer. But be careful to connect a power
source with the appropriate voltage.
Voltage regulator:
7-12 V is recommended for the input voltage.
6-20 V is the absolute limit for the input voltage.
If you have around 15 V power source, you will have a lot of wasted
power on the voltage regulator and will result in heat.
In-Circuit Serial Programming (ICSP) headers:
You can program your microcontrollers using these headers.
In this course, we will not use ICSP, and instead, we will use Arduino IDE.
Reset button:
Executes the
program from
the beginning.

Crystal clock:
Calibrated to beat 16 million times in a second (16 MHz).
- Every microcontroller just like every microprocessor needs a clock to
operate.

- At every clock tick, the microcontroller will execute the next instruction.

- If there is no clock or the clock is not functioning properly, the


microcontroller will not operate.
Capacitors:
• Used to clean up the voltage coming through the external power
source. Voltage should be steady 5V.
• Voltage fluctuation results in poor functioning.
- Computer is a digital device which can understand only two ‘words’, 1 and 0 (Binary
system).

- In real world, we have infinitely many ‘words’. For example, the light can be bright, very
bright, low, vs. (infinitely many physical values in between).

- In digital system, there is only 1 and 0, which are symbolic. 1 represent a real value (a
voltage level of 5V for Arduino), 0 represent 0V.

- A range of voltage is actually described by 1 (between 3.5V-5V), and 0-3 V described by 0.

- Keyword ‘High’ is used for 1 and ‘Low’ is used for 0.


Digital Output

- Is a LED an output or input?

- An output. The Arduino can change the state of a LED by changing the voltage of the digital
pin where the LED is connected.

- Autodesk TINKERCAD – Circuits can be used for the sketch of circuits.


- Digital Output

Pin 7 LED
HIGH ON
LOW OFF
- Digital Input

- Receive information of an external component such as a button.

- Why the button is an input?

- The button’s state is changed by the user by pressing it, Not the Arduino. The Arduino
reads the button’s state so that it can determine whether it is pressed or not pressed.
- Hanging/floating: When button is up, pin 5
can not be defined by a particular value. It is
undeterminable.

Button Pin 5
UP HIGH
DOWN LOW
- Analog Output
- Pulse width modulation (PWM)

- Imagine that instead of a LED being ON constantly, it is turned ON then OFF then ON very
quickly.

- The digital pins with ‘Tilda ( ̴)’ are PWM pins and can be used as Analog output.
- Analog Input

You might also like