Lect 1 History
Lect 1 History
This is the
Arduino we’ll
be using for
this course.
Arduino Microcontrollers - specifications
Each microcontroller has different specifications. A few specifications for three of
the Arduino microcontrollers are listed below.
Making-robots-with-arduino.pdf
Arduino Microcontroller Boards
The power pins are as follows:
•Vin. The input voltage to the Arduino board when it's using an external power source
•5V. The regulated power supply used to power the microcontroller and other
components on the board.
•3V3. A 3.3-volt supply generated by the on-board FTDI chip. Maximum current draw
is 50 mA.
•GND. Ground pins.
USB connector
Power connector
Specification
Making-robots-with-arduino.pdf
Power
• The Arduino Uno can be powered via the USB connection
or with an external power supply.
• External (non-USB) power can come either from an AC-to-
DC adapter (wall-wart) or battery. The adapter can be
connected by plugging a 2.1 mm center-positive plug into
the board's power jack. Leads from a battery can be
inserted in the Gnd and Vin pin headers of the POWER
connector
Power
• The board can operate on an external supply of 6 to 20
volts. If supplied with less than 7 V, however, the 5 V
pin may supply less than five volts and the board may
be unstable. If using more than 12 V, the voltage
regulator may overheat and damage the board.
• The recommended range is 7 to 12 volts.
Powering the Arduino UNO The Arduino can be powered using:
1)USB cable (5V input) – OK for downloading and testing programs, but not for driving
external circuits. Provides a weak 5V to the Arduino board
2)AC to DC Adaptor (recommended 9 to 12V DC, 250mA or more, 2.1mm plug, centre pin positive)
3)DC Power Supply (7V – 12V recommended, 6V – 20V limits)
4)4 AA Batteries ( ≈ 6V input) - Provides a weak 5V to the Arduino board
5)5 AA Batteries (≈ 7.5V input)
Note: If both the USB and another source (AC/DC adapter, batteries, etc) are connected, the
Arduino will select the stronger source.
Typical Arduino UNO voltages:
Connection USB 4 AA Batteries 5 AA Batteries,
AC/DC Adaptor or
DC Power Supply
5V 4.28 V 4.92 V 4.98 V
3.3 V 3.20 V 3.29 V 3.29 V
Servo Port * 4.28 V 4.92 V 4.98 V
Vin 4.32 V 5.51 V 7.09 V
Powering the Arduino We will typically power the Arduino with an AC/DC
adaptor. You can leave both the USB and the AC/DC adaptor connected and
the Arduino will use the higher adaptor voltage. We will make 5V and GND
(ground) connections to the breadboard as shown below.
USB
AC/DC
Adaptor
Plug
Getting Started
1. Download & install the Arduino
environment (IDE)
2. Connect the board to your computer
via the UBS cable
3. If needed, install the drivers
4. Launch the Arduino IDE
5. Select your board
6. Select your serial port
7. Open the blink example
8. Upload the program
Connect the USB Cable
Arduino IDE
The Arduino Programming Environment
•The Arduino software (Arduino 1.05 or later) is available on lab computers and
can also be downloaded from http://arduino.cc
•The software requires no installation and can even be launched from a flash
drive.
•Open using the shortcut on the desktop or double-click Arduino on the
specified folder.
Select Serial Port and Board
The Arduino Programming Environment
The Arduino software is based on C/C++. Notes:
Note that the instructions are case-sensitive. •Verify is used to compile your program (or sketch). (It
checks for errors).
C++ is not line-oriented, so a semicolon (;) is
needed to indicated the end of an instruction. •Upload is used to send the program (sketch) to the
Arduino via the USB cable.
•Arduino programs have two main parts:
1. setup – a function to initialize items or to perform
operations one time.
2. loop – a function with commands that will be
repeated indefinitely
•Serial.begin(baud rate) is used to establish serial
communications between the Arduino and the computer.
Data is transmitted at 9600 baud (bits/second). Note that
Serial uses digital pins 0 and 1 so they cannot be used for
other inputs/outputs.
•Serial.print(text, values, or variables) is display
information from the Arduino-BOT on the display window.
•Select Serial Monitor to open a window to view printed
messages from the Arduino.
Status Messages
BREADBOARDS