You are on page 1of 13

COMPONENTS

MICROCONTROLLER

Arduino is an open source computer hardware and software company, project, and user
community that designs and manufactures single-board microcontrollers and microcontroller kits
for building digital devices and interactive objects that can sense and control objects in the
physical world. The project's products are distributed as open-source hardware and software,
which are licensed under the GNU Lesser General Public License (LGPL) or the GNU General
Public License (GPL), permitting the manufacture of Arduino boards and software distribution
by anyone. Arduino boards are available commercially in preassembled form, or as do-it-
yourself kits.
Arduino board designs use a variety of microprocessors and controllers. The boards are equipped
with sets of digital and analog input/output (I/O) pins that may be interfaced to various
expansion boards (shields) and other circuits. The boards feature serial communications
interfaces, including Universal Serial Bus(USB) on some models, which are also used for
loading programs from personal computers. The microcontrollers are typically programmed
using a dialect of features from the programming languages C and C++. In addition to using
traditional compiler toolchains, the Arduino project provides an integrated development
environment (IDE) based on the Processing language project.
The Arduino project started in 2003 as a program for students at the Interaction Design Institute
Ivrea in Ivrea, Italy, aiming to provide a low-cost and easy way for novices and professionals to
create devices that interact with their environment using sensors and actuators. Common
examples of such devices intended for beginner hobbyists include simple robots, thermostats,
and motion detectors.
The name Arduino comes from a bar in Ivrea, Italy, where some of the founders of the project
used to meet. The bar was named after Arduin of Ivrea, who was the margrave of the March of
Ivrea and King of Italy from 1002 to 1014

The Arduino Nano is a compact board similar to the UNO.

Fig. Arduino nano


The Arduino Nano is a small, complete, and breadboard-friendly board based on the
ATmega328 (Arduino Nano 3.x). It has more or less the same functionality of the
Arduino Duemilanove, but in a different package. It lacks only a DC power jack, and
works with a Mini-B USB cable instead of a standard one.

Getting Started

You can find in the Getting Started section all the information you need to configure
your board, use the Arduino Software (IDE), and start tinker with coding and
electronics.

Tech Specifications

Microcontroller ATmega328
Architecture AVR
Operating Voltage 5V
Flash Memory 32 KB of which 2 KB used by bootloader
SRAM 2 KB
Clock Speed 16 MHz
Analog I/O Pins 8
EEPROM 1 KB
DC Current per I/O Pins 40 mA (I/O Pins)40
Input Voltage 7-12 V
Digital I/O Pins 22
PWM Output 6
Power Consumption 19 mA
PCB Size 18 x 45 mm
Weight 7g
Power
The Arduino Nano can be powered via the Mini-B USB connection, 6-20V unregulated
external power supply (pin 30), or 5V regulated external power supply (pin 27). The
power source is automatically selected to the highest voltage source.

Memory
The ATmega328 has 32 KB, (also with 2 KB used for the bootloader. The ATmega328
has 2 KB of SRAM and 1 KB of EEPROM.

Input and Output


Each of the 14 digital pins on the Nano can be used as an input or output, using
pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each
pin can provide or receive a maximum of 40 mA and has an internal pull -up resistor
(disconnected by default) of 20-50 kOhms. In addition, some pins have specialized
functions:

 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the FTDI USB-to-TTL Serial chip.
 External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attach Interrupt() function for
details.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write() function.
 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication,
which, although provided by the underlying hardware, is not currently included in the
Arduino language.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.

The Nano has 8 analog inputs, each of which provide 10 bits of resolution (i.e. 1024
different values). By default they measure from ground to 5 volts, though is it possible
to change the upper end of their range using the analogReference() function. Analog
pins 6 and 7 cannot be used as digital pins. Additionally, some pins have specialized
functionality:

 I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library
(documentation on the Wiring website).

There are a couple of other pins on the board:

 AREF. Reference voltage for the analog inputs. Used with analogReference().
 Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.

 Communication
The Arduino Nano has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega328 provide UART TTL (5V)
serial communication, which is available on digital pins 0 (RX) and 1 (TX). An FTDI
FT232RL on the board channels this serial communication over USB and the FTDI
drivers (included with the Arduino software) provide a virtual com port to software on
the computer. The Arduino software includes a serial monitor which allows simple
textual data to be sent to and from the Arduino board. The RX and TX LEDs on the
board will flash when data is being transmitted via the FTDI chip and USB connection
to the computer (but not for serial communication on pins 0 and 1). A SoftwareSerial
library allows for serial communication on any of the Nano's digital pins. The
ATmega328 also support I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus. To use the SPI communication,
please see ATmega328 datasheet.

Programming
The Arduino Nano can be programmed with the Arduino software (download). Select
"Arduino Duemilanove or Nano w/ ATmega328" from the Tools > Board menu
(according to the microcontroller on your board). The ATmega328 on the Arduino
Nano comes preburned with a bootloader that allows you to upload new code to it
without the use of an external hardware programmer. It communicates using the
original STK500 protocol. You can also bypass the bootloader and program the
microcontroller through the ICSP (In-Circuit Serial Programming) header using
Arduino ISP or similar.

Automatic (Software) Reset

Rather then requiring a physical press of the reset button before a n upload, the Arduino
Nano is designed in a way that allows it to be reset by software running on a connected
computer. One of the hardware flow control lines (DTR) of the FT232RL is connected
to the reset line of the ATmega328 via a 100 nanofarad capacito r. When this line is
asserted (taken low), the reset line drops long enough to reset the chip. The Arduino
software uses this capability to allow you to upload code by simply pressing the upload
button in the Arduino environment. This means that the bootlo ader can have a shorter
timeout, as the lowering of DTR can be well-coordinated with the start of the
upload. This setup has other implications. When the Nano is connected to either a
computer running Mac OS X or Linux, it resets each time a connection is made to it
from software (via USB). For the following half-second or so, the bootloader is
running on the Nano. While it is programmed to ignore malformed data (i.e. anything
besides an upload of new code), it will intercept the first few bytes of data sen t to the
board after a connection is opened. If a sketch running on the board receives one -time
configuration or other data when it first starts, make sure that the software with which
it communicates waits a second after opening the connection and before sending this
data.

Programming Environment

• The Arduino Uno can be programmed with the Arduino software IDE .
• The Atmega328 on the Arduino Uno comes preburned with a Bootloader that allows you to
upload new code to it without the use of an external hardware programmer.
• You can also bypass the Bootloader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header.
• Arduino IDE works on windows , linux as well as Mac lion X platforms.
Brief History of Arduino

• In 2005, a project was initiated to make a device for controlling student-built interactive
design projects that was less expensive than other prototyping systems available at the
time.
• Founders Massimo Banzi and David Cuartielles named the project after Arduin of Ivrea
and began producing boards in a small factory located in Ivrea.
Advantages of Arduino

• Huge documentation and support


• Larger library collection
• Open source
• Simplified and user-friendly programming language
• No additional programmer/burner hardware required for programming board
• Highly Portable
• Low power consumption
• Highly customizable

LCD DISPLAY:
A 20x4 LCD display is very basic module and is very commonly used in various devices and circuits.
These modules are preferred over seven segments and other multi segment LEDs. The reasons
being: LCDs are economical; easily programmable; have no limitation of displaying special &
even custom characters (unlike in seven segments), animations and so on.
A 20x4 LCD means it can display 20 characters per line and there are 4 such lines. In this LCD
each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command
and Data. This is standard HD44780 controller LCD.
There is no change code for interfacing standard 16x2 or 20x4 LCD.

1. 20 Characters x 4 Lines
2. Built-in HD44780 Equivalent LCD Controller
3. Works directly with ATMEGA, ARDUINO, PIC amd many other microcontroller/kits.
4. 4 or 8 bit data I/O interface
5. Low power consumption
 COMMANDS FOR LCD DISPLAY

HEX CODE COMMAND

0x01H Clear display screen

0x02H Increment cursor(Shift cursor to right)

0x06H Display on, cursor blinking

0x0EH Force cursor to beginning of 1st line

0x80H Force cursor to beginning of 2nd line

0xC0H 2nd line and 5X7 matrix

To set starting address; address of that location is sended as command. To send command RS
pin is cleared. To send data RS pin is set. Than to Write to LCD WR pin is cleared and if we want to read
LCD screen WR is set. So generally it is grounded. There is a RAM in LCD stores characters displayed on
screen. LCD will active only when EN pin goes high to low.

POWER SUPPLY:
To active any device voltage source is required. For different device different voltage source is
required. In our project we use +5V and +3.3V DC power supplies. The +5V is required for controller unit.
For GSM unit +5V. To get +5V we use 7805 voltage regulator IC. To get +3.3V we use LM117 voltage
regulator IC. Refer figure.
Figure Power supply
GSM Modem
GSM/GPRS module is used to establish communication between a computer and a GSM-
GPRS system. Global System for Mobile communication (GSM) is an architecture used for
mobile communication in most of the countries. Global Packet Radio Service (GPRS) is an
extension of GSM that enables higher data transmission rate. GSM/GPRS module consists of a
GSM/GPRS modem assembled together with power supply circuit and communication
interfaces (like RS-232, USB, etc) for computer. The MODEM is the soul of such modules.

Wireless MODEMs

Wireless MODEMs are the MODEM devices that generate, transmit or decode data from a
cellular network, for establishing communication between the cellular network and the computer.
These are manufactured for specific cellular network (GSM/UMTS/CDMA) or specific cellular
data standard (GSM/UMTS/GPRS/EDGE/HSDPA) or technology (GPS/SIM). Wireless
MODEMs like other MODEM devices use serial communication to interface with and
need Hayes compatible AT commands for communication with the computer (any
microprocessor or microcontroller system).

GSM/GPRS MODEM

GSM/GPRS MODEM is a class of wireless MODEM devices that are designed for
communication of a computer with the GSM and GPRS network. It requires a SIM (Subscriber
Identity Module) card just like mobile phones to activate communication with the network.
Also they have IMEI(International Mobile Equipment Identity) number similar to mobile
phones for their identification. A GSM/GPRS MODEM can perform the following operations:

1. Receive, send or delete SMS messages in a SIM.

2. Read, add, search phonebook entries of the SIM.

3. Make, Receive, or reject a voice call.

The MODEM needs AT commands, for interacting with processor or controller, which are
communicated through serial communication. These commands are sent by the
controller/processor. The MODEM sends back a result after it receives a command. Different AT
commands supported by the MODEM can be sent by the processor/controller/computer to
interact with the GSM and GPRS cellular network.
GSM/GPRS Module

A GSM/GPRS module assembles a GSM/GPRS modem with standard communication interfaces


like RS-232 (Serial Port), USB etc., so that it can be easily interfaced with a computer or a
microprocessor / microcontroller based system. The power supply circuit is also built in the
module that can be activated by using a suitable adaptor.

AT Commands
AT commands are used to control MODEMs. AT is the abbreviation for Attention. These
commands come from Hayes commands that were used by the Hayes smart modems. The Hayes
commands started with AT to indicate the attention from the MODEM. The dial up and wireless
MODEMs (devices that involve machine to machine communication) need AT commands to
interact with a computer. These include the Hayes command set as a subset, along with other
extended AT commands.

AT commands with a GSM/GPRS MODEM or mobile phone can be used to access following
information and services:
1. Information and configuration pertaining to mobile device or MODEM and SIM card.
2. SMS services.
3. MMS services.
4. Fax services.
5. Data and Voice link over mobile network.

The Hayes subset commands are called the basic commands and the commands specific to a
GSM network are called extended AT commands.
Command, Information response and Result Codes:
The AT commands are sent by the computer to the MODEM/ mobile phone. The MODEM sends
back an Information Response i.e. the information requested by or pertaining to the action
initiated by the AT command. This is followed by a Result Code. The result code tells about the
successful execution of that command.

Execution of AT Commands

There are also unsolicited Result Codes that are returned automatically by the MODEM to notify
the occurrence of an event. For example the reception of a SMS will force MODEM to return an
unsolicited result code.

You might also like