Arduino Hardware - Arduino uno User Manual

Hide thumbs Also See for uno:
Table of Contents

Advertisement

5 Arduino Hardware

The power of the Arduino is not its ability to crunch code, but rather its ability to interact with
the outside world through its input-output (I/O) pins. The Arduino has 14 digital I/O pins labeled
0 to 13 that can be used to turn motors and lights on and off and read the state of switches.
Each digital pin can sink or source about 40 mA of current. This is more than adequate for
interfacing to most devices, but does mean that interface circuits are needed to control devices
other than simple LED's. In other words, you cannot run a motor directly using the current
available from an Arduino pin, but rather must have the pin drive an interface circuit that in turn
drives the motor. A later section of this document shows how to interface to a small motor.
To interact with the outside world, the program sets digital pins to a high or low value using C
code instructions, which corresponds to +5 V or 0 V at the pin. The pin is connected to external
interface electronics and then to the device being switched on and off. The sequence of events is
shown in this figure.
To determine the state of switches and other sensors, the Arduino is able to read the voltage
value applied to its pins as a binary number. The interface circuitry translates the sensor signal
into a 0 or +5 V signal applied to the digital I/O pin. Through a program command, the Ardiomp
interrogates the state of the pin. If the pin is at 0 V, the program will read it as a 0 or LOW. If it
is at +5 V, the program will read it as a 1 or HIGH. If more than +5 V is applied, you may blow
out your board, so be careful. The sequence of events to read a pin is shown in this figure.
Program sets pin
Program sets pin
high/low (1/0)
high/low (1/0)
Board pin
Board pin
set to +5V/0V
set to +5V/0V
Interface
Interface
electronics use
electronics use
signal voltages and
signal voltages and
power supply to
power supply to
switch motor
switch motor
on/off
on/off
digitalWrite(4,HIGH);
digitalWrite(4,HIGH);
digitalWrite(4,LOW);
digitalWrite(4,LOW);
+12 V
+12 V
1K
1K
PIN 4
PIN 4
TIP120
TIP120
12
+5V
+5V
0V
0V

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the uno and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF