Sunteți pe pagina 1din 95

INTRODUCTION

1.1 EMBEDDED SYSTEMS

Embedded systems are designed to do some specific task, rather than be a general-
purpose computer for multiple tasks. Some also have real time performance constraints that must
be met, for reason such as safety and usability; others may have low or no performance
requirements, allowing the system hardware to be simplified to reduce costs.

An embedded system is not always a separate block - very often it is physically built-in
to the device it is controlling. The software written for embedded systems is often called
firmware, and is stored in read-only memory or flash convector chips rather than a disk drive. It
often runs with limited computer hardware resources: small or no keyboard, screen, and little
memory.

Wireless communication has become an important feature for commercial products and a
popular research topic within the last ten years. There are now more mobile phone subscriptions
than wired-line subscriptions. Lately, one area of commercial interest has been low-cost, low-
power, and short-distance wireless communication used for \personal wireless networks."
Technology advancements are providing smaller and more cost effective devices for integrating
computational processing, wireless communication, and a host of other functionalities. These
embedded communications devices will be integrated into applications ranging from homeland
security to industry automation and monitoring. They will also enable custom tailored
engineering solutions, creating a revolutionary way of disseminating and processing information.
With new technologies and devices come new business activities, and the need for employees in
these technological areas. Engineers who have knowledge of embedded systems and wireless
communications will be in high demand. Unfortunately, there are few adorable environments
available for development and classroom use, so students often do not learn about these
technologies during hands-on lab exercises. The communication mediums were twisted pair,
optical fiber, infrared, and generally wireless radio.

1.1 OBJECTIVE OF THE PROJECT:

CHAPTER 2: EMBEDDED SYSTEMS


2.1 Embedded Systems:

An embedded system is a computer system designed to perform one or a few


dedicated functions often with real-time computing constraints. It is embedded as part of a
complete device often including hardware and mechanical parts. By contrast, a general-purpose
computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range
of end-user needs. Embedded systems control many devices in common use today.

Embedded systems are controlled by one or more main processing cores that are
typically either microcontrollers or digital signal processors (DSP). The key characteristic,
however, is being dedicated to handle a particular task, which may require very powerful
processors. For example, air traffic control systems may usefully be viewed as embedded, even
though they involve mainframe computers and dedicated regional and national networks between
airports and radar sites. (Each radar probably includes one or more embedded systems of its
own.)

Since the embedded system is dedicated to specific tasks, design engineers can
optimize it to reduce the size and cost of the product and increase the reliability and
performance. Some embedded systems are mass-produced, benefiting from economies of scale.

Physically embedded systems range from portable devices such as digital watches
and MP3 players, to large stationary installations like traffic lights, factory controllers, or the
systems controlling nuclear power plants. Complexity varies from low, with a single
microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a
large chassis or enclosure.

In general, "embedded system" is not a strictly definable term, as most systems


have some element of extensibility or programmability. For example, handheld computers share
some elements with embedded systems such as the operating systems and microprocessors which
power them, but they allow different applications to be loaded and peripherals to be connected.
Moreover, even systems which don't expose programmability as a primary feature generally need
to support software updates. On a continuum from "general purpose" to "embedded", large
application systems will have subcomponents at most points even if the system as a whole is
"designed to perform one or a few dedicated functions", and is thus appropriate to call
"embedded". A modern example of embedded system is shown in fig: 2.1.

Fig 2.1:A modern example of embedded system

Labeled parts include microprocessor (4), RAM (6), flash memory (7).Embedded
systems programming is not like normal PC programming. In many ways, programming for an
embedded system is like programming PC 15 years ago. The hardware for the system is usually
chosen to make the device as cheap as possible. Spending an extra dollar a unit in order to make
things easier to program can cost millions. Hiring a programmer for an extra month is cheap in
comparison. This means the programmer must make do with slow processors and low memory,
while at the same time battling a need for efficiency not seen in most PC applications. Below is a
list of issues specific to the embedded field.

2.1.1 History:

In the earliest years of computers in the 1930–40s, computers were sometimes


dedicated to a single task, but were far too large and expensive for most kinds of tasks performed
by embedded computers of today. Over time however, the concept of programmable controllers
evolved from traditional electromechanical sequencers, via solid state devices, to the use of
computer technology.

One of the first recognizably modern embedded systems was the Apollo Guidance
Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. At the
project's inception, the Apollo guidance computer was considered the riskiest item in the Apollo
project as it employed the then newly developed monolithic integrated circuits to reduce the size
and weight. An early mass-produced embedded system was the Autonetics D-17 guidance
computer for the Minuteman missile, released in 1961. It was built from transistor logic and had
a hard disk for main memory. When the Minuteman II went into production in 1966, the D-17
was replaced with a new computer that was the first high-volume use of integrated circuits.

2.1.2 Tools:

Embedded development makes up a small fraction of total programming. There's


also a large number of embedded architectures, unlike the PC world where 1 instruction set rules,
and the UNIX world where there's only 3 or 4 major ones. This means that the tools are more
expensive. It also means that they're lowering featured, and less developed. On a major
embedded project, at some point you will almost always find a compiler bug of some sort.

Debugging tools are another issue. Since you can't always run general programs
on your embedded processor, you can't always run a debugger on it. This makes fixing your
program difficult. Special hardware such as JTAG ports can overcome this issue in part.
However, if you stop on a breakpoint when your system is controlling real world hardware (such
as a motor), permanent equipment damage can occur. As a result, people doing embedded
programming quickly become masters at using serial IO channels and error message style
debugging.

2.1.3 Resources:

To save costs, embedded systems frequently have the cheapest processors that can
do the job. This means your programs need to be written as efficiently as possible. When dealing
with large data sets, issues like memory cache misses that never matter in PC programming can
hurt you. Luckily, this won't happen too often- use reasonably efficient algorithms to start, and
optimize only when necessary. Of course, normal profilers won't work well, due to the same
reason debuggers don't work well.
Memory is also an issue. For the same cost savings reasons, embedded systems
usually have the least memory they can get away with. That means their algorithms must be
memory efficient (unlike in PC programs, you will frequently sacrifice processor time for
memory, rather than the reverse). It also means you can't afford to leak memory. Embedded
applications generally use deterministic memory techniques and avoid the default "new" and
"malloc" functions, so that leaks can be found and eliminated more easily. Other resources
programmers expect may not even exist. For example, most embedded processors do not have
hardware FPUs (Floating-Point Processing Unit). These resources either need to be emulated in
software, or avoided altogether.

2.1.4 Real Time Issues:

Embedded systems frequently control hardware, and must be able to respond to


them in real time. Failure to do so could cause inaccuracy in measurements, or even damage
hardware such as motors. This is made even more difficult by the lack of resources available.
Almost all embedded systems need to be able to prioritize some tasks over others, and to be able
to put off/skip low priority tasks such as UI in favor of high priority tasks like hardware control.

2.2 Need For Embedded Systems:

The uses of embedded systems are virtually limitless, because every day new
products are introduced to the market that utilizes embedded computers in novel ways. In recent
years, hardware such as microprocessors, microcontrollers, and FPGA chips have become much
cheaper. So when implementing a new form of control, it's wiser to just buy the generic chip and
write your own custom software for it. Producing a custom-made chip to handle a particular task
or set of tasks costs far more time and money. Many embedded computers even come with
extensive libraries, so that "writing your own software" becomes a very trivial task indeed. From
an implementation viewpoint, there is a major difference between a computer and an embedded
system. Embedded systems are often required to provide Real-Time response. The main
elements that make embedded systems unique are its reliability and ease in debugging.
2.2.1 Debugging:

Embedded debugging may be performed at different levels, depending on the


facilities available. From simplest to most sophisticate they can be roughly grouped into the
following areas:
 Interactive resident debugging, using the simple shell provided by the embedded
operating system (e.g. Forth and Basic)
 External debugging using logging or serial port output to trace operation using either a
monitor in flash or using a debug server like the Remedy Debugger which even works for
heterogeneous multi core systems.
 An in-circuit debugger (ICD), a hardware device that connects to the microprocessor via
a JTAG or Nexus interface. This allows the operation of the microprocessor to be
controlled externally, but is typically restricted to specific debugging capabilities in the
processor.
 An in-circuit emulator replaces the microprocessor with a simulated equivalent,
providing full control over all aspects of the microprocessor.
 A complete emulator provides a simulation of all aspects of the hardware, allowing all of
it to be controlled and modified and allowing debugging on a normal PC.
 Unless restricted to external debugging, the programmer can typically load and run
software through the tools, view the code running in the processor, and start or stop its
operation. The view of the code may be as assembly code or source-code.

Because an embedded system is often composed of a wide variety of elements,


the debugging strategy may vary. For instance, debugging a software(and microprocessor)
centric embedded system is different from debugging an embedded system where most of the
processing is performed by peripherals (DSP, FPGA, co-processor). An increasing number of
embedded systems today use more than one single processor core. A common problem with
multi-core development is the proper synchronization of software execution. In such a case, the
embedded system design may wish to check the data traffic on the busses between the processor
cores, which requires very low-level debugging, at signal/bus level, with a logic analyzer, for
instance.
2.2.2 Reliability:

Embedded systems often reside in machines that are expected to run continuously
for years without errors and in some cases recover by them if an error occurs. Therefore the
software is usually developed and tested more carefully than that for personal computers, and
unreliable mechanical moving parts such as disk drives, switches or buttons are avoided.
Specific reliability issues may include:
 The system cannot safely be shut down for repair, or it is too inaccessible to repair.
Examples include space systems, undersea cables, navigational beacons, bore-hole
systems, and automobiles.
 The system must be kept running for safety reasons. "Limp modes" are less tolerable.
Often backup s are selected by an operator. Examples include aircraft navigation, reactor
control systems, safety-critical chemical factory controls, train signals, engines on single-
engine aircraft.
 The system will lose large amounts of money when shut down: Telephone switches,
factory controls, bridge and elevator controls, funds transfer and market making,
automated sales and service.

A variety of techniques are used, sometimes in combination, to recover from


errors—both software bugs such as memory leaks, and also soft errors in the hardware:
 Watchdog timer that resets the computer unless the software periodically notifies the
watchdog
 Subsystems with redundant spares that can be switched over to
 software "limp modes" that provide partial function
 Designing with a Trusted Computing Base (TCB) architecture[6] ensures a highly secure
& reliable system environment
 An Embedded Hypervisor is able to provide secure encapsulation for any subsystem
component, so that a compromised software component cannot interfere with other
subsystems, or privileged-level system software. This encapsulation keeps faults from
propagating from one subsystem to another, improving reliability. This may also allow a
subsystem to be automatically shut down and restarted on fault detection.
 Immunity Aware Programming

2.3 Explanation of Embedded Systems:

2.3.1 Software Architecture:

There are several different types of software architecture in common use.

 Simple Control Loop:

In this design, the software simply has a loop. The loop calls subroutines, each of which
manages a part of the hardware or software.

 Interrupt Controlled System:

Some embedded systems are predominantly interrupt controlled. This means that
tasks performed by the system are triggered by different kinds of events. An interrupt could be
generated for example by a timer in a predefined frequency, or by a serial port controller
receiving a byte. These kinds of systems are used if event handlers need low latency and the
event handlers are short and simple.

Usually these kinds of systems run a simple task in a main loop also, but this task
is not very sensitive to unexpected delays. Sometimes the interrupt handler will add longer tasks
to a queue structure. Later, after the interrupt handler has finished, these tasks are executed by
the main loop. This method brings the system close to a multitasking kernel with discrete
processes.

 Cooperative Multitasking:

A non-preemptive multitasking system is very similar to the simple control loop


scheme, except that the loop is hidden in an API. The programmer defines a series of tasks, and
each task gets its own environment to “run” in. When a task is idle, it calls an idle routine,
usually called “pause”, “wait”, “yield”, “nop” (stands for no operation), etc.The advantages and
disadvantages are very similar to the control loop, except that adding new software is easier, by
simply writing a new task, or adding to the queue-interpreter.

 Primitive Multitasking:

In this type of system, a low-level piece of code switches between tasks or threads
based on a timer (connected to an interrupt). This is the level at which the system is generally
considered to have an "operating system" kernel. Depending on how much functionality is
required, it introduces more or less of the complexities of managing multiple tasks running
conceptually in parallel.

As any code can potentially damage the data of another task (except in larger
systems using an MMU) programs must be carefully designed and tested, and access to shared
data must be controlled by some synchronization strategy, such as message queues, semaphores
or a non-blocking synchronization scheme.

Because of these complexities, it is common for organizations to buy a real-time


operating system, allowing the application programmers to concentrate on device functionality
rather than operating system services, at least for large systems; smaller systems often cannot
afford the overhead associated with a generic real time system, due to limitations regarding
memory size, performance, and/or battery life.

 Microkernels And Exokernels:

A microkernel is a logical step up from a real-time OS. The usual arrangement is


that the operating system kernel allocates memory and switches the CPU to different threads of
execution. User mode processes implement major functions such as file systems, network
interfaces, etc.

In general, microkernels succeed when the task switching and intertask


communication is fast, and fail when they are slow. Exokernels communicate efficiently by
normal subroutine calls. The hardware and all the software in the system are available to, and
extensible by application programmers. Based on performance, functionality, requirement the
embedded systems are divided into three categories:
2.3.2 Stand Alone Embedded System:

These systems takes the input in the form of electrical signals from transducers or
commands from human beings such as pressing of a button etc.., process them and produces
desired output. This entire process of taking input, processing it and giving output is done in
standalone mode. Such embedded systems comes under stand alone embedded systems

Eg: microwave oven, air conditioner etc..

2.3.3 Real-time embedded systems:

Embedded systems which are used to perform a specific task or operation in a


specific time period those systems are called as real-time embedded systems. There are two types
of real-time embedded systems.

 Hard Real-time embedded systems:

These embedded systems follow an absolute dead line time period i.e.., if the
tasking is not done in a particular time period then there is a cause of damage to the entire
equipment.

Eg: consider a system in which we have to open a valve within 30 milliseconds. If this
valve is not opened in 30 ms this may cause damage to the entire equipment. So in such cases we
use embedded systems for doing automatic operations.

 Soft Real Time embedded systems:

Eg: Consider a TV remote control system, if the remote control takes a few milliseconds
delay it will not cause damage either to the TV or to the remote control. These systems which
will not cause damage when they are not operated at considerable time period those systems
comes under soft real-time embedded systems.

2.3.4 Network communication embedded systems:

A wide range network interfacing communication is provided by using embedded


systems.
Eg:

 Consider a web camera that is connected to the computer with internet can be used
to spread communication like sending pictures, images, videos etc.., to another
computer with internet connection throughout anywhere in the world.

 Consider a web camera that is connected at the door lock.

Whenever a person comes near the door, it captures the image of a person and
sends to the desktop of your computer which is connected to internet. This gives an alerting
message with image on to the desktop of your computer, and then you can open the door lock
just by clicking the mouse. Fig: 2.2 show the network communications in embedded systems.

Fig 2.2: Network communication embedded systems

2.3.5 Different types of processing units:

The central processing unit (c.p.u) can be any one of the following
microprocessor, microcontroller, digital signal processing.
 Among these Microcontroller is of low cost processor and one of the main advantage of
microcontrollers is, the components such as memory, serial communication interfaces,
analog to digital converters etc.., all these are built on a single chip. The numbers of
external components that are connected to it are very less according to the application.

 Microprocessors are more powerful than microcontrollers. They are used in major
applications with a number of tasking requirements. But the microprocessor requires
many external components like memory, serial communication, hard disk, input output
ports etc.., so the power consumption is also very high when compared to
microcontrollers.

 Digital signal processing is used mainly for the applications that particularly involved
with processing of signals

2.4 APPLICATIONS OF EMBEDDED SYSTEMS:

2.4.1 Consumer applications:

At home we use a number of embedded systems which include microwave oven,


remote control, vcd players, dvd players, camera etc….

Fig2.3: Automatic coffee makes equipment


2.4.2 Office automation:

We use systems like fax machine, modem, printer etc…

Fig2.4: Fax machine Fig2.5: Printing machine

2.4.3. Industrial automation:

Today a lot of industries are using embedded systems for process control. In
industries we design the embedded systems to perform a specific operation like monitoring
temperature, pressure, humidity ,voltage, current etc.., and basing on these monitored levels we
do control other devices, we can send information to a centralized monitoring station.

Fig2.6: Vehicle
In critical industries where human presence is avoided there we can use vehicles
which are programmed to do a specific operation.

2.4.5 Computer networking:

Embedded systems are used as bridges routers etc..

Fig2.7: Computer networking

2.4.6 Tele communications:

Cell phones, web cameras etc.

Fig2.8: Cell PhoneFig2.9: Web camera


POWER SUPPLY

All digital circuits require regulated power supply. In this article we are going to learn how to get
a regulated positive supply from the mains supply.
 

Figure 1 shows the basic block diagram of a fixed regulated power supply. Let us go through
each block.

2.2.1 TRANSFORMER

A transformer consists of two coils also called as “WINDINGS” namely PRIMARY &
SECONDARY.
They are linked together through inductively coupled electrical conductors also called as CORE.
A changing current in the primary causes a change in the Magnetic Field in the core & this in
turn induces an alternating voltage in the secondary coil. If load is applied to the secondary then
an alternating current will flow through the load. If we consider an ideal condition then all the
energy from the primary circuit will be transferred to the secondary circuit through the magnetic
field.

So  

 
The secondary voltage of the transformer depends on the number of turns in the Primary as well as in the
secondary.

2.2.2 Rectifier
A rectifier is a device that converts an AC signal into DC signal. For rectification purpose we use
a diode, a diode is a device that allows current to pass only in one direction i.e. when the anode
of the diode is positive with respect to the cathode also called as forward biased condition &
blocks current in the reversed biased condition.
 
Rectifier can be classified as follows:
1)      Half Wave rectifier.
This is the simplest type of rectifier as you can see in the diagram a half wave rectifier consists
of only one diode. When an AC signal is applied to it during the positive half cycle the diode is
forward biased & current flows through it. But during the negative half cycle diode is reverse
biased & no current flows through it. Since only one half of the input reaches the output, it is
very inefficient to be used in power supplies.

  2)      Full wave rectifier.

Half wave rectifier is quite simple but it is very inefficient, for greater efficiency we would like
to use both the half cycles of the AC signal. This can be achieved by using a center tapped
transformer i.e. we would have to double the size of secondary winding & provide connection to
the center. So during the positive half cycle diode D1 conducts & D2 is in reverse biased
condition. During the negative half cycle diode D2 conducts & D1 is reverse biased. Thus we get
both the half cycles across the load.
One of the disadvantages of Full Wave Rectifier design is the necessity of using a center tapped
transformer, thus increasing the size & cost of the circuit. This can be avoided by using the Full
Wave Bridge Rectifier.
  3)     BridgeRectifier.

As the name suggests it converts the full wave i.e. both the positive & the negative half cycle
into DC thus it is much more efficient than Half Wave Rectifier & that too without using a center
tapped transformer thus much more cost effective than Full Wave Rectifier.

Full Bridge Wave Rectifier consists of four diodes namely D1, D2, D3 and D4. During the
positive half cycle diodes D1 & D4 conduct whereas in the negative half cycle diodes D2 & D3
conduct thus the diodes keep switching the transformer connections so we get positive half
cycles in the output.
 

If we use a center tapped transformer for a bridge rectifier we can get both positive & negative
half cycles which can thus be used for generating fixed positive & fixed negative voltages.

2.2.3 FILTER CAPACITOR

Even though half wave & full wave rectifier give DC output, none of them provides a constant
output voltage. For this we require to smoothen the waveform received from the rectifier. This
can be done by using a capacitor at the output of the rectifier this capacitor is also called as
“FILTER CAPACITOR” or “SMOOTHING CAPACITOR” or “RESERVOIR CAPACITOR”.
Even after using this capacitor a small amount of ripple will remain.
We place the Filter Capacitor at the output of the rectifier the capacitor will charge to the peak voltage during
each half cycle then will discharge its stored energy slowly through the load while the rectified voltage drops
to zero, thus trying to keep the voltage as constant as possible.
If we go on increasing the value of the filter capacitor then the Ripple will decrease. But then the costing will
increase. The value of the Filter capacitor depends on the current consumed by the circuit, the frequency of
the waveform & the accepted ripple.

 
Where,
Vr= accepted ripple voltage.( should not be more than 10% of  the voltage)
I= current consumed by the circuit in Amperes.
F= frequency of the waveform. A half wave rectifier has only one peak in one cycle so F=25hz
Whereas a full wave rectifier has Two peaks in one cycle so F=100hz.

2.2.4 VOLTAGE REGULATOR 


A Voltage regulator is a device which converts varying input voltage into a constant regulated
output voltage. Voltage regulator can be of two types
1)      Linear Voltage Regulator
      Also called as Resistive Voltage regulator because they dissipate the excessive voltage
resistively as heat.
2)      Switching Regulators.
      They regulate the output voltage by switching the Current ON/OFF very rapidly. Since their
output is either ON or OFF it dissipates very low power thus achieving higher efficiency as
compared to linear voltage regulators. But they are more complex & generate high noise due to
their switching action. For low level of output power switching regulators tend to be costly but
for higher output wattage they are much cheaper than linear regulators.
The most commonly available Linear Positive Voltage Regulators are the 78XX series where the
XX indicates the output voltage. And 79XX series is for Negative Voltage Regulators.

 After filtering the rectifier output the signal is given to a voltage regulator. The maximum input
voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts drop across the
regulator so the input voltage should be at least 2-3 Volts higher than the output voltage. If the
input voltage gets below the Vmin of the regulator due to the ripple voltage or due to any other
reason the voltage regulator will not be able to produce the correct regulated voltage.
Circuit diagram:

Fig 2.3. Circuit Diagram of power supply

IC 7805:

7805 is an integrated three-terminal positive fixed linear voltage regulator. It supports an input
voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a current rating of 1 amp
although lower current models are available. Its output voltage is fixed at 5.0V. The 7805 also
has a built-in current limiter as a safety feature. 7805 is manufactured by many companies,
including National Semiconductors and Fairchild Semiconductors.

The 7805 will automatically reduce output current if it gets too hot.The last two digits represent
the voltage; for instance, the 7812 is a 12-volt regulator. The 78xx series of regulators is
designed to work in complement with the 79xx series of negative voltage regulators in systems
that provide both positive and negative regulated voltages, since the 78xx series can't regulate
negative voltages in such a system.

The 7805 & 78 is one of the most common and well-known of the 78xx series regulators, as it's
small component count and medium-power regulated 5V make it useful for powering TTL
devices.

Table 2.1. Specifications of IC7805


SPECIFICATIONS IC 7805

Vout 5V

Vein - Vout Difference 5V - 20V

Operation Ambient Temp 0 - 125°C

Output Imax 1A

3.2 ARDUINO NANO (Micro controller)

3.3.1 Introduction to the Arduino NANO Board

The Arduino Nano, as the name suggests is a compact, complete and bread-board
friendly microcontroller board. The Nano board weighs around 7 grams with dimensions of 4.5
cms to 1.8 cms (L to B). This article discusses about the technical specs most importantly the
pinout and functions of each and every pin in the Arduino Nano board.
Arduino Nano has similar functionalities as Arduino Duemilanove but with a different
package. The Nano is inbuilt with the ATmega328P microcontroller, same as the Arduino UNO.
The main difference between them is that the UNO board is presented in PDIP (Plastic Dual-In-
line Package) form with 30 pins and Nano is available in TQFP (plastic quad flat pack) with 32
pins. The extra 2 pins of Arduino Nano serve for the ADC functionalities, while UNO has 6
ADC ports but Nano has 8 ADC ports. The Nano board doesn’t have a DC power jack as other
Arduino boards, but instead has a mini-USB port. This port is used for both programming and
serial monitoring. The fascinating feature in Nano is that it will choose the strongest power
source with its potential difference, and the power source selecting jumper is invalid.
Figure 3.3.2 Arduino nano Board

Arduino Nano – Specification

Arduino Nano Specifications

Analog I/O Pins 8

Architecture AVR

Clock Speed 16 MHz

DC Current per I/O Pins 40 milliAmps

Digital I/O Pins 22

EEPROM 1 KB

Flash Memory 32 KB of which 2 KB used by Bootloader

Input Voltage (7-12) Volts


Arduino Nano Specifications

Microcontroller ATmega328P

Operating Voltage 5 Volts

PCB Size 18 x 45 mm

Power Consumption 19 milliAmps

PWM Output 6

SRAM 2KB

Weight 7 gms

3.2 Pin diagram


Figure 3.3.3 Pin Configuration of Atmega328

Pin Description

Arduino Nan0 – Pin Description

Pins 1 to 30

Arduino Nano Pin


Type Function
Pin Name

1 D1/TX I/O Digital I/O Pin


Serial TX Pin

2 D0/RX I/O Digital I/O Pin


Serial RX Pin

3 RESET Input Reset ( Active Low)

4 GND Power Supply Ground

5 D2 I/O Digital I/O Pin

6 D3 I/O Digital I/O Pin

7 D4 I/O Digital I/O Pin

8 D5 I/O Digital I/O Pin


Arduino Nano Pin
Type Function
Pin Name

9 D6 I/O Digital I/O Pin

10 D7 I/O Digital I/O Pin

11 D8 I/O Digital I/O Pin

12 D9 I/O Digital I/O Pin

13 D10 I/O Digital I/O Pin

14 D11 I/O Digital I/O Pin

15 D12 I/O Digital I/O Pin

16 D13 I/O Digital I/O Pin

17 3V3 Output +3.3V Output (from FTDI)

18 AREF Input ADC reference

19 A0 Input Analog Input Channel 0

20 A1 Input Analog Input Channel 1


Arduino Nano Pin
Type Function
Pin Name

21 A2 Input Analog Input Channel 2

22 A3 Input Analog Input Channel 3

23 A4 Input Analog Input Channel 4

24 A5 Input Analog Input Channel 5

25 A6 Input Analog Input Channel 6

26 A7 Input Analog Input Channel 7

27 +5V Output or +5V Output (From On-board


Input Regulator) or
+5V (Input from External Power
Supply

28 RESET Input Reset ( Active Low)

29 GND Power Supply Ground

30 VIN Power Supply voltage

ICSP Pins
Arduino Nano ICSP Pin
Type Function
Name

MISO Input or Output Master In Slave Out

Vcc Output Supply Voltage

SCK Output Clock from Master to Slave

MOSI Output or Input Master Out Slave In

RST Input Reset (Active Low)

GND Power Supply Ground

Arduino Nano Digital Pins

Pins - 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and 16

As mentioned earlier, Arduino Nano has 14 digital I/O pins that can be used either as digital
input or output. The pins work with 5V voltage as maximum, i.e., digital high is 5V and digital
low is 0V. Each pin can provide or receive a current of 20mA, and has a pull-up resistance of
about 20-50k ohms. Each of the 14 digital pins on the Nano pinout can be used as an input or
output, using pinMode(), digitalWrite(), and digitalRead() functions.

Other than the digital input and output functions, the digital pins have some additional
functionality as well.
Serial Communication Pins

Pins - 1, 2

1 - RX and 2 - TX

These two pins RX- receive and TX- transmit are used for TTL serial data communication. The
pins RX and TX are connected to the corresponding pins of the USB-to-TTL Serial chip.

PWM Pins

Pins - 6, 8, 9, 12, 13, and 14

Each of these digital pins provide a Pulse Width Modulation signal of 8-bit resolution. The PWM
signal can be generated using analogWrite () function.

External Interrupts

Pins - 5, 6

When we need to provide an external interrupt to other processor or controller we can make use
of these pins. These pins can be used to enable interrupts INT0 and INT1 respectively by using
the attachInterrupt () function. These pins can be used to trigger three types of interrupts such as
interrupt on a low value, a rising or falling edge interrupt and a change in value interrupt.

SPI Pins

Pins - 13, 14, 15, and 16

When you don’t want the data to be transmitted asynchronously you can use these Serial
Peripheral Interface pins. These pins support synchronous communication with SCK as the
synchronizing clock. Even though the hardware has this feature, the Arduino software doesn’t
have this by default. So you have to include a library called SPI Library for using this feature.

LED

Pin - 16

If you remember your first Arduino code, blinking LED, then you’ll definitely came across this
Pin16. The pin 16 is being connected to the blinking LED on the board.

Arduino Nano Analog Pins

Pins - 18, 19, 20, 21, 22, 23, 24, 25, and 26

As mentioned earlier UNO got 6 analog input pins but Arduino Nano has 8 analog inputs (19 to
26), marked A0 through A7. This means you can connect *8 channel analog sensor inputs for
processing. Each of these analog pins has a inbuilt ADC of resolution of 1024 bits (so it will give
1024 values). By default, the pins are measured from ground to 5V. If you want the reference
voltage to be 0V to 3.3V, we can give 3.3V to AREF pin (18th Pin) by using the analogReference
() function.

Similar to digital pins in Nano, analog pins also got some other functions as well.

I2C

Pins 23, 24 as A4 and A5

Since SPI communication also has its disadvantages such as 4 essential pins and limited within a
device. For long distance communication we use the I2C protocol. I2C supports multi master and
multi slave with only two wires. One for clock (SCL) and another for data (SDA). For using this
I2C feature we need to import a library called Wire library.

AREF

Pin 18

As mentioned already the AREF- Analog Reference pin is used as a reference voltage for analog
input for the ADC conversion.

Reset

Pin 28
Reset pins in Arduino are active LOW pins which means if we make this pin value as LOW i.e.,
0v, it will reset the controller. Usually used to be connected with switches to use as reset button.

ICSP

ICSP stands for In Circuit Serial Programming, which represents one of the several methods
available for programming Arduino boards. Ordinarily, an Arduino bootloader program is used
to program an Arduino board, but if the bootloader is missing or damaged, ICSP can be used
instead. ICSP can be used to restore a missing or damaged bootloader.

Each ICSP pin usually is cross-connected to another Arduino pin with the same name or
function. For example, MISO on Nano’s ICSP header is connected to MISO / digital pin 12 (Pin
15); MOSI on the ISCP header is connected to MOSI / digital pin 11 (Pin 16); and so forth. Note,
MISO, MOSI, and SCK pins taken together make up most of an SPI interface.

We can use one Arduino to program another Arduino using this ICSP.

Arduino as ISP ATMega328

Vcc/5V Vcc
Arduino as ISP ATMega328

GND GND

MOSI/D11 D11

MISO/D12 D12

SCK/D13 D13

D10 Reset

RESET

Pins 3, 28 and 5 in ICSP

Power

Pins 4, 17, 27, 28, 30 and 2 & 6 in ICSP

Features 
 1.8-5.5V operating range
 Up to 20MHz
 Part: ATMEGA328P-AU
 32kB Flash program memory
 1kB EEPROM
 2kB Internal SRAM
 2 8-bit Timer/Counters
 16-bit Timer/Counter
 RTC with separate oscillator
 Master/Slave SPI interface
 2-wire (I2C) interface
 Watchdog timer
 23 IO lines
 Data retention: 20 years at 85C/ 100 years at 25C
 Digital I/O Pins are 14 (out of which 6 provide PWM output)
 Analog Input Pins are 6.
 DC Current per I/O is 40 mA
 DC Current for 3.3V Pin is 50mA
3.3.3 AVR CPU Core
The AVR core combines a rich instruction set with 32 general purpose working registers.
All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle. The
resulting architecture is more code efficient while achieving throughputs up to ten times faster
than conventional CISC microcontrollers.

Figure 3.3.3 AVR Block Diagram


Overview
This section discusses the AVR core architecture in general. The main function of the
CPU core is to ensure correct program execution. The CPU must therefore be able to access
memories, perform calculations, control peripherals, and handle interrupts.

Figure 3.3.4 AVR core architecture


In order to maximize performance and parallelism, the AVR uses a Harvard architecture
– with separate memories and buses for program and data. Instructions in the program memory
are executed with a single level pipelining. While one instruction is being executed, the next
instruction is pre-fetched from the program memory. This concept enables instructions to be
executed in every clock cycle. The program memory is In-System Reprogrammable Flash
memory. The fast-access Register File contains 32 x 8-bit general purpose working registers with
a single clock cycle access time. This allows single-cycle Arithmetic Logic Unit (ALU)
operation. In a typical ALU operation, two operands are output from the Register File, the
operation is executed, and the result is stored back in the Register File– in one clock cycle.
Six of the 32 registers can be used as three 16-bit indirect address register pointers for
Data Space addressing – enabling efficient address calculations. One of these address pointers
can also be used as an address pointer for look up tables in Flash program memory. These added
function registers are the 16-bit X-, Y-, and Z-register, described later in this section. The ALU
supports arithmetic and logic operations between registers or between a constant and a register.
Single register operations can also be executed in the ALU. After an arithmetic operation, the
Status Register is updated to reflect information about the result of the operation. Program flow
is provided by conditional and unconditional jump and call instructions, able to directly address
the whole address space. Most AVR instructions have a single 16-bit word format. Every
program memory address contains a 16- or 32-bit instruction.
3.2.4 Arduino with ATmega328
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has
14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It
contains everything needed to support the microcontroller; simply connect it to a computer with
a USB cable or power it with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial
driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to versionR2) programmed as
a USB-to-serial converter.
 Pin out: Added SDA and SCL pins that are near to the AREF pin and two other new pins
placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage
provided from the board. In future, shields will be compatible with both the board that
uses the AVR, which operates with 5V and with the Arduino. Due that operates with
3.3V. The second one is a not connected pin that is reserved for future purposes.
 Stronger RESET circuit.
 Atmega 16U2 replace the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0.
The Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is
the latest in a series of USB Arduino boards, and the reference model for the Arduino platform;
for a comparison with previous versions, see the index of Arduino boards.

Arduino Characteristics
Power
The Arduino Uno can be powered via the USB connection or with an external power
supply. The power source is selected automatically. 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.1mm 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. The board can operate on an external
supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than
five volts and the board may be unstable. If using more than 12V, the voltage regulator may
overheat and damage the board. The recommended range is 7 to 12 volts.
The power pins are as follows:
 VIN: The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it
through this pin.
 5V: This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V),
or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses
the regulator, and can damage your board. We don't advise it.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
 GND. Ground pins.
 IOREF. This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage
and select the appropriate power source or enable voltage translators on the outputs for
working with the 5V or 3.3V.
Memory:
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of
SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Serial Communication:
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a .inf file is required. 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
USB-to-serial chip and USB connection to the computer (but not for serial communication on
pins 0 and 1).
A Software Serial library allows for serial communication on any of the Uno's digital
pins. The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus. For SPI communication, use the SPI
library.

IR sensor

Infrared (IR) light is electromagnetic radiation with longer wavelengths than those of
visible light, extending from the nominal red edge of the visible spectrum at 700 nanometres
(nm) to 1 mm. This range of wavelengths corresponds to a frequency range of approximately
430 THz down to 300 GHz,[1] and includes most of the thermal radiation emitted by objects near
room temperature. Infrared light is emitted or absorbed by molecules when they change their
rotational-vibrational movements. The existence of infrared radiation was first discovered in
1800 by astronomer William Herschel.
Much of the energy from the Sun arrives on Earth in the form of infrared radiation.
Sunlight at zenith provides an irradiance of just over 1 kilowatt per square meter at sea level. Of
this energy, 527 watts is infrared radiation, 445 watts is visible light, and 32 watts is ultraviolet
radiation.[2] The balance between absorbed and emitted infrared radiation has a critical effect on
the Earth's climate.

Infrared light is used in industrial, scientific, and medical applications. Night-vision


devices using infrared illumination allow people or animals to be observed without the observer
being detected. In astronomy, imaging at infrared wavelengths allows observation of objects
obscured by interstellar dust. Infrared imaging cameras are used to detect heat loss in insulated
systems, to observe changing blood flow in the skin, and to detect overheating of electrical
apparatus.

Light comparison[3]
Name Wavelength Frequency (Hz) Photon Energy (eV)

Gamma ray less than 0.01 nm more than 10 EHz 124 keV – 300+ GeV

X-Ray 0.01 nm to 10 nm 30 EHz – 30 PHz 124 eV to 124 keV

Ultraviolet 10 nm – 380 nm 30 PHz – 790 THz 3.3 eV to 124 eV

Visible 380 nm – 700 nm 790 THz – 430 THz 1.7 eV – 3.3 eV

Infrared 700 nm – 1 mm 430 THz – 300 GHz 1.24 meV – 1.7 eV

Microwave 1 mm – 1 meter 300 GHz – 300 MHz 1.24 µeV – 1.24 meV

Radio 1 mm – 100,000 km 300 GHz – 3 Hz 12.4 feV – 1.24 meV

Infrared imaging is used extensively for military and civilian purposes. Military
applications include target acquisition, surveillance, night vision, homing and tracking. Non-
military uses include thermal efficiency analysis, environmental monitoring, industrial facility
inspections, remote temperature sensing, short-ranged wireless communication, spectroscopy,
and weather forecasting. Infrared astronomy uses sensor-equipped telescopes to penetrate dusty
regions of space, such as molecular clouds; detect objects such as planets, and to view highly
red-shifted objects from the early days of the universe.[4]
Humans at normal body temperature radiate chiefly at wavelengths around 10 μm
(micrometers), as shown by Wien's displacement law.

At the atomic level, infrared energy elicits vibrational modes in a molecule through a
change in the dipole moment, making it a useful frequency range for study of these energy states
for molecules of the proper symmetry. Infrared spectroscopy examines absorption and
transmission of photons in the infrared energy range, based on their frequency and intensity.[5]

ELEMENTS OF INFRARED DETECTION SYSTEM

A typical system for detecting infrared radiation is given in the following block diagram :

1. Infrared Source

All objects above 0 K radiate infrared energy and hence are infrared sources. Infrared sources
also include blackbody radiators, tungsten lamps, silicon carbide, and various others. For active
IR sensors, infrared Lasers and LEDs of specific IR wavelengths are used as IR sources.

 2. Transmission Medium

Three main types of transmission medium used for Infrared transmission are vacuum, the
atmosphere, and optical fibers.

The transmission of IR – radiation is affected by presence of CO2, water vapour and other
elements in the atmosphere. Due to absorption by molecules of water carbon dioxide, ozone, etc.
the atmosphere highly attenuates most IR wavelengths leaving some important IR windows in
the electromagnetic spectrum; these are primarily utilized by thermal imaging/ remote sensing
applications.

•           Medium wave IR (MWIR:3-5 µm)

•           Long wave IR (LWIR:8-14 µm)


Choice of IR band or a specific wavelength is dictated by the technical requirements of a specific
application.

 3. Optical Components.

Often optical components are required to converge or focus infrared radiations, to limit
spectral response, etc. To converge / focus radiations, optical lenses made of quartz, CaF2, Ge
and Si, polyethylene Fresnel lenses, and mirrors made of Al, Au or a similar material are used.
For limiting spectral responses, bandpass filters are used. Choppers are used to pass/ interrupt the
IR beams.

 4. Infrared detectors.

Various types of detectors are used in IR sensors. Important specifications of detectors are

• Photosensitivity or Responsivity

Responsivity is the Output Voltage/Current per watt of incident energy. Higher the better 

• Noise Equivalent Power (NEP)

NEP represents detection ability of a detector and is the amount of incident light equal to
intrinsic noise level of a detector 

•  Detectivity(D*: D-star)

D* is the photosensitivity per unit area of a detector. It is a measure of S/N ratio of a detector. D*
is inversely proportional to NEP. Larger D* indicates better sensing element.  
In addition, wavelength region or temperature to be measured, response time, cooling
mechanism, active area, no of elements, package, linearity, stability, temperature characteristics,
etc. are important parameters which need attention while selecting IR detectors.

5.  Signal Processing

Since detector outputs are typically very small, preamplifiers with associated circuitry are used to
further process the received signals.

Working:

IR sensors use infra red light to sense objects in front of them and gauge their distance.
The commonly used Sharp IR sensors have two black circles which used for this process, an
emitter and a detector (see image right).

A pulse of infra red light is emitted from the emitter and spreads out in a large arc. If no
object is detected then the IR light continues forever and no reading is recorded. However, if an
object is nearby then the IR light will be reflected and some of it will hit the detector. This forms
a simple triangle between the object, emitter and detector. The detector is able to detect the angle
that the IR light arrived back at and thus can determine the distance to the object. This is
remarkably accurate and although interference from sunlight is still a problem, these sensors are
capable of detecting dark objects in sunlight now.

Regions in the infrared

Objects generally emit infrared radiation across a spectrum of wavelengths, but


sometimes only a limited region of the spectrum is of interest because sensors usually collect
radiation only within a specific bandwidth. Therefore, the infrared band is often subdivided into
smaller sections.

Division Name Abbreviation Wavelength Photon Energy Characteristics

Near-infrared NIR, IR-A DIN 0.75–1.4 µ 0.9–1.7 eV Defined by the water absorption,
m and commonly used in fiber optic
telecommunication because of low
attenuation losses in the SiO2 glass
(silica) medium. Image intensifiers
are sensitive to this area of the
spectrum. Examples include night
vision devices such as night vision
goggles.

Water absorption increases


Short- significantly at 1,450 nm. The 1,530
SWIR, IR-B
wavelength 1.4-3 µm 0.4–0.9 eV to 1,560 nm range is the dominant
DIN
infrared spectral region for long-distance
telecommunications.

In guided missile technology the 3–


5 µm portion of this band is the
MWIR, IR-C atmospheric window in which the
Mid- DIN; MidIR.[7] homing heads of passive IR 'heat
wavelength Also called 3–8 µm 150–400 meV seeking' missiles are designed to
infrared intermediate work, homing on to the Infrared
infrared (IIR) signature of the target aircraft,
typically the jet engine exhaust
plume

The "thermal imaging" region, in


which sensors can obtain a
completely passive image based on
thermal emissions only and
Long-
LWIR, IR-C requiring no illumination such as
wavelength 8–15 µm 80–150 meV
DIN the sun, moon or infrared
infrared
illuminator. Forward-looking
infrared (FLIR) systems use this
area of the spectrum. This region is
also called the "thermal infrared."
15 – ( see also far-infrared laser and far
Far infrared FIR 1.2–80 meV
1,000 µm infrared).

NIR and SWIR is sometimes called "reflected infrared" while MWIR and LWIR is sometimes
referred to as "thermal infrared." Due to the nature of the blackbody radiation curves, typical 'hot'
objects, such as exhaust pipes, often appear brighter in the MW compared to the same object
viewed in the LW.

CIE division scheme:

The International Commission on Illumination (CIE) recommended the division of infrared


radiation into the following three bands:[8]

 IR-A: 700 nm–1400 nm (0.7 µm – 1.4 µm, 215 THz – 430 THz)


 IR-B: 1400 nm–3000 nm (1.4 µm – 3 µm, 100 THz – 215 THz)
 IR-C: 3000 nm–1 mm (3 µm – 1000 µm, 300 GHz – 100 THz)

ISO 20473 scheme:

ISO 20473 specifies the following scheme

Designation Abbreviation Wavelength

Near Infrared NIR 0.78–3 µm

Mid Infrared MIR 3–50 µm

Far Infrared FIR 50–1000 µm

Sensor response division scheme

A third scheme divides up the band based on the response of various detectors:

Near infrared: from 0.7 to 1.0  µm (from the approximate end of the response of the human eye
to that of silicon).
 Short-wave infrared: 1.0 to 3 µm (from the cut off of silicon to that of the MWIR
atmospheric window. InGaAs covers to about 1.8 µm; the less sensitive lead salts cover
this region.
 Mid-wave infrared: 3 to 5 µm (defined by the atmospheric window and covered by
Indium antimonide [InSb] and HgCdTe and partially by lead selenide [PbSe]).
 Long-wave infrared: 8 to 12 or 7 to 14 µm: the atmospheric window (Covered by
HgCdTe and microbolometers).
 Very-long wave infrared (VLWIR): 12 to about 30 µm, covered by doped silicon.

These divisions are justified by the different human response to this radiation: near
infrared is the region closest in wavelength to the radiation detectable by the human eye, mid and
far infrared are progressively further from the visible spectrum. Other definitions follow different
physical mechanisms (emission peaks, vs. bands, water absorption) and the newest follow
technical reasons (The common silicon detectors are sensitive to about 1,050 nm, while
InGaAs' sensitivity starts around 950 nm and ends between 1,700 and 2,600 nm, depending on
the specific configuration). Unfortunately, international standards for these specifications are not
currently available.

The boundary between visible and infrared light is not precisely defined. The human eye
is markedly less sensitive to light above 700 nm wavelength, so longer wavelengths make
insignificant contributions to scenes illuminated by common light sources. But particularly
intense light (e.g., from IR lasers, or from bright daylight with the visible light removed by
colored gels) can be detected up to approximately 780 nm, and will be perceived as red light,
although sources of up to 1050 nm can be seen as a dull red glow in intense sources. Using an
opaque IR-passing photographic filter, it is possible to see the Wood effect of glowing foliage if
all visible light leaks from around the filter are blocked, and the eye is given a moment to adjust
to the extremely dim image.[12] The onset of infrared is defined (according to different standards)
at various values typically between 700 nm and 800 nm.
Telecommunication bands in the infrared

In optical communications, the part of the infrared spectrum that is used is divided into
seven bands based on availability of light sources transmitting/absorbing materials (fibers) and
detectors:

Band Descriptor Wavelength range

O band Original 1260–1360 nm

E band Extended 1360–1460 nm

S band Short wavelength 1460–1530 nm

C band Conventional 1530–1565 nm

L band Long wavelength 1565–1625 nm

U band Ultralong wavelength 1625–1675 nm

IR transmitter and receiver

Basics of IR transmitter and receiver transmitter and receiver are commonly used in engineering
projects for remote control of objects. In particularly, in Robotic system uses transmitter and
receiver. Here i would like to describe the basics if IR transmitter and receiver

Basics of IR transmitter:

An electroluminescent IR LED is a product which requires care in use. IR LED’s are fabricated
from narrow band hetero structures with energy gap from 0.25 to 0.4 eV. Infra red transmitter
emits IR rays in planar wave front manner. Even though infra red rays spread in all directions, it
propagates along straight line in forward direction. IR rays have the characteristics of producing
secondary wavelets when it collides with any obstacles in its path. This property of IR is used
here.
When IR rays gets emitted from LED, it moves in the direction it is angled. When any obstacle
interferes in the path, the IR rays get cut and it produces secondary wavelets which propagates
mostly in return direction or in a direction opposite to that of the primary waves, which produces
the net result like reflection of IR rays.

Basics of IR receiver:

Infrared photo receiver is a two terminal PN junction device, which operates in a reverse bias. It
has a small transparent window, which allows light to strike the PN junction. A photodiode is a
type of photo detector capable of converting light into either current or voltage, depending upon
the mode of operation. Most photodiodes will look similar to a light emitting diode. They will
have two leads, or wires, coming from the bottom. The shorter end of the two is the cathode,
while the longer end is the anode.

A photodiode consists of PN junction or PIN structure. When a photon of sufficient energy


strikes the diode, it excites an electron thereby creating a mobile electron and a positively
charged electron hole. If the absorption occurs in the junction's depletion region, or one diffusion
length away from it, these carriers are swept from the junction by the built-in field of the
depletion region. Thus holes move toward the anode, and electrons toward the cathode, and a
photocurrent is produced.
Working of infrared communication:

Various types of infrared based applications are available in the market. The circuit for
infrared based applications is designed along with the transmitter and receiver sections i.e. we
can’t use it for other application. But the infrared communication project which we have done
here can be used in any application just by replacing the application at the place of infrared LED
in the circuit diagram of infrared communication. By using this project we can design infrared
based applications easily. The entire circuit consists of two sections named as

1. Transmitter section and


2. Receiver section

1. Transmitter section:

The transmitter section consists of a 555 timer IC functioning in astable mode. It is wired
as shown in figure. The output from astable mode is fed to an IR LED via resistor which limits
its operating current. Infrared LED in the transmitter section emits IR radiation which is focused
by a plastic lens (optics) in to a narrow beam.

2. Receiver section:

The receiver section consists of a silicon phototransistor to convert the infrared radiation
to an electric current. It responds only to the rapidly pulsing signal created by the transmitter, and
filters out slowly changing infrared radiation from ambient light. The receiver section comprises
an infrared receiver module, and a led indicator. When the signals are interrupted, the IR Led
goes off after a few seconds depending upon the value of RC combination.
We can increase the distance between the IR transmitter and receiver just by placing the
lens between them. After connecting the IR transmitter and receiver circuit, we can get the
output by applying 6V Power supply to the circuit. We can use this circuit with any application
very simply. For example a buzzer circuit is placed at the output of IR circuit, when the signals
are interrupted, the buzzer produces sound. Both the transmitter and receiver parts can be
mounted on a single bread board or PCB. The infrared receiver must be placed behind the IR Led
to avoid false indication due to infrared leakage. An object moving nearby actually reflects the
IR rays emitted by the IR Led.

Photo Diodes:

A photodiode is a semiconductor diode that functions as a photo detector. Photodiodes are


packaged with either a window or optical fiber connection, to let in the light to the sensitive part
of the device. They may also be used without a window to detect vacuum UV or X-rays.

A phototransistor is in essence nothing more than a bipolar transistor that is encased in


a transparent case so that light can reach the base-collector junction. The phototransistor works
like a photodiode, but with a much higher responsivity for light, because the electrons that are
generated by photons in the base-collector junction are injected into the base, and this current is
then amplified by the transistor operation.

Fig (3.13) Photodiode schematic symbol

Principle of operation:

A photodiode is a p-n junction or p-i-n structure. When a photon of sufficient energy


strikes the diode, it excites an electron thereby creating a mobile electron and a positively
charged electron hole. If the absorption occurs in the junction's depletion region, or one diffusion
length away from it, these carriers are swept from the junction by the built-in field of the
depletion region, producing a photocurrent.

Photodiodes can be used under either zero bias (photovoltaic mode) or reverse bias
(photoconductive mode). In zero bias, light falling on the diode causes a current across the
device, leading to forward bias which in turn induces "dark current" in the opposite direction to
the photocurrent. This is called the photovoltaic effect, and is the basis for solar cells in fact; a
solar cell is just a large number of big photodiodes. Reverse bias induces only little current
(known as saturation or back current) along its direction.

But a more important effect of reverse bias is widening of the depletion layer
(therefore expanding the reaction volume) and strengthening the photocurrent. Circuits based on
this effect are more sensitive to light than ones based on the photovoltaic effect and also tend to
have lower capacitance, which improves the speed of their time response. On the other hand, the
photovoltaic mode tends to exhibit less electronic noise.

Avalanche photodiodes have a similar structure, but they are operated with much
higher reverse bias. This allows each photo-generated carrier to be multiplied by avalanche
breakdown, resulting in internal gain within the photodiode, which increases the effective
responsivity of the device.

Features:

Critical performance parameters of a photodiode include:

1. Responsivity:

The responsivity may also be expressed as quantum efficiency, or the ratio of the number of
photo generated carriers to incident photons and thus a unit less quantity.

2. Dark current:

The dark current includes photocurrent generated by background radiation and the
saturation current of the semiconductor junction. Dark current must be accounted for by
calibration if a photodiode is used to make an accurate optical power measurement, and it is also
a source of noise when a photodiode is used in an optical communication system.

3. Noise-equivalent power:

(NEP) The minimum input optical power to generate photocurrent, equal to the RMS noise
current in a 1 hertz bandwidth. The related characteristic directivity (D) is the inverse of NEP,
1/NEPThe NEP is roughly the minimum detectable input power of a photodiode.

Applications:

1. P-N photodiodes are used in similar applications to other photo detectors, such as
photoconductors, charge-coupled devices, and photomultiplier tubes.
2. Photodiodes are used in consumer electronics devices such as compact disc players,
smoke detectors, and the receivers for remote controls in VCRs and televisions.
3. PIN diodes are much faster and more sensitive than ordinary p-n junction diodes, and
hence are often used for optical communications and in lighting regulation.

P-N vs. P-I-N Photodiodes:

1. Due to the intrinsic layer, a PIN photodiode must be reverse biased (Vr). The Vr
increases the depletion region allowing a larger volume for electron-hole pair production,
and reduces the capacitance thereby increasing the bandwidth.
2. The Vr also introduces noise current, which reduces the S/N ratio. Therefore, a reverse
bias is recommended for higher bandwidth applications and/or applications where a wide
dynamic range is required.
3. A PN photodiode is more suitable for lower light applications because it allows for
unbiased operation.
Applications

Night vision

Infrared is used in night vision equipment when there is insufficient visible light to see.
[16]
Night vision devices operate through a process involving the conversion of ambient light
photons into electrons which are then amplified by a chemical and electrical process and then
converted back into visible light.[16] Infrared light sources can be used to augment the available
ambient light for conversion by night vision devices, increasing in-the-dark visibility without
actually using a visible light source.[16]

The use of infrared light and night vision devices should not be confused with thermal
imaging which creates images based on differences in surface temperature by detecting infrared
radiation (heat) that emanates from objects and their surrounding environment.

Thermography

Infrared radiation can be used to remotely determine the temperature of objects (if the
emissivity is known). This is termed thermography, or in the case of very hot objects in the NIR
or visible it is termed pyrometry. Thermography (thermal imaging) is mainly used in military
and industrial applications but the technology is reaching the public market in the form of
infrared cameras on cars due to the massively reduced production costs.

Thermographic cameras detect radiation in the infrared range of the electromagnetic


spectrum (roughly 900–14,000 nanometers or 0.9–14 μm) and produce images of that radiation.
Since infrared radiation is emitted by all objects based on their temperatures, according to the
black body radiation law, thermography makes it possible to "see" one's environment with or
without visible illumination. The amount of radiation emitted by an object increases with
temperature, therefore thermography allows one to see variations in temperature (hence the
name).
Tracking

Infrared tracking, also known as infrared homing, refers to a passive missile guidance
system which uses the emission from a target of electromagnetic radiation in the infrared part of
the spectrum to track it. Missiles which use infrared seeking are often referred to as "heat-
seekers", since infrared (IR) is just below the visible spectrum of light in frequency and is
radiated strongly by hot bodies. Many objects such as people, vehicle engines, and aircraft
generate and retain heat, and as such, are especially visible in the infrared wavelengths of light
compared to objects in the background

Heating

Infrared radiation can be used as a deliberate heating source. According to this Mayo
Clinic article states that, "Several studies have looked at using infrared saunas in the treatment of
chronic health problems, such as high blood pressure, congestive heart failure and rheumatoid
arthritis, and found some evidence of benefit." For example it is used in infrared saunas to heat
the occupants, and also to remove ice from the wings of aircraft (de-icing). Far infrared is also
gaining popularity as a safe heat therapy method of natural health care and physiotherapy.
Infrared can be used in cooking and heating food as it predominantly heats the opaque, absorbent
objects, rather than the air around them.

Infrared heating is also becoming more popular in industrial manufacturing processes,


e.g. curing of coatings, forming of plastics, annealing, plastic welding, and print drying. In these
applications, infrared heaters replace convection ovens and contact heating. Infrared heaters
produce heat that is a product of invisible light and they consist of three parts: infrared light
bulbs, a heat exchanger and a fan that blows air onto the exchanger to disperse the heat.

Efficiency is achieved by matching the wavelength of the infrared heater to the


absorption characteristics of the material.
Communications

IR data transmission is also employed in short-range communication among computer


peripherals and personal digital assistants. These devices usually conform to standards published
by IrDA, the Infrared Data Association. Remote controls and IrDA devices use infrared light-
emitting diodes (LEDs) to emit infrared radiation which is focused by a plastic lens into a narrow
beam.

The beam is modulated, i.e. switched on and off, to encode the data. The receiver uses a
siliconphotodiode to convert the infrared radiation to an electric current. It responds only to the
rapidly pulsing signal created by the transmitter, and filters out slowly changing infrared
radiation from ambient light. Infrared communications are useful for indoor use in areas of high
population density. IR does not penetrate walls and so does not interfere with other devices in
adjoining rooms. Infrared is the most common way for remote controls to command appliances.
Infrared remote control protocols like RC-5, SIRC, are used to communicate with infrared.

Free space optical communication using infrared lasers can be a relatively inexpensive
way to install a communications link in an urban area operating at up to 4 gigabit/s, compared to
the cost of burying fiber optic cable.

Infrared lasers are used to provide the light for optical fiber communications systems.
Infrared light with a wavelength around 1,330 nm (least dispersion) or 1,550 nm (best
transmission) are the best choices for standard silica fibers.

IR data transmission of encoded audio versions of printed signs is being researched as an


aid for visually impaired people through the RIAS (Remote Infrared Audible Signage) project.

LCD MODULE

To display interactive messages we are using LCD Module. We examine an intelligent


LCD display of two lines,16 characters per line that is interfaced to the controllers. The protocol
(handshaking) for the display is as shown. Whereas D0 to D7th bit is the Data lines, RS, RW and
EN pins are the control pins and remaining pins are +5V, -5V and GND to provide supply.
Where RS is the Register Select, RW is the Read Write and EN is the Enable pin.

The display contains two internal byte-wide registers, one for commands (RS=0) and the
second for characters to be displayed (RS=1). It also contains a user-programmed RAM area (the
character RAM) that can be programmed to generate any desired character that can be formed
using a dot matrix. To distinguish between these two data areas, the hex command byte 80 will
be used to signify that the display RAM address 00h will be chosen.Port1 is used to furnish the
command or data type, and ports 3.2 to3.4 furnish register select and read/write levels.

The display takes varying amounts of time to accomplish the functions as listed. LCD bit 7 is
monitored for logic high (busy) to ensure the display is overwritten.

Liquid Crystal Display also called as LCD is very helpful in providing user interface as well as
for debugging purpose. The most common type of LCD controller is HITACHI 44780 which
provides a simple interface between the controller & an LCD. These LCD's are very simple to
interface with the controller as well as are cost effective.

2x16 Line Alphanumeric LCD Display


The most commonly used ALPHANUMERIC displays are 1x16 (Single Line & 16 characters),
2x16 (Double Line & 16 character per line) & 4x20 (four lines & Twenty characters per line). 
The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines. The number on data
lines depends on the mode of operation. If operated in 8-bit mode then 8 data lines + 3 control
lines i.e. total 11 lines are required. And if operated in 4-bit mode then 4 data lines + 3 control
lines i.e. 7 lines are required. How do we decide which mode to use? It’s simple if you have
sufficient data lines you can go for 8 bit mode & if there is a time constrain i.e. display should be
faster then we have to use 8-bit mode because basically 4-bit mode takes twice as more time as
compared to 8-bit mode.
 Pin  Symbol Function
 1  Vss  Ground
 2  Vdd  Supply Voltage
 3  Vo  Contrast Setting
 4  RS  Register Select
 5  R/W  Read/Write Select
 6  En  Chip Enable Signal
 7-14  DB0-DB7  Data Lines
 15  A/Vee  Gnd for the backlight
 16  K  Vcc for backlight
When RS is low (0), the data is to be treated as a command. When RS is high (1), the data being
sent is considered as text data which should be displayed on the screen.
When R/W is low (0), the information on the data bus is being written to the LCD. When RW is
high (1), the program is effectively reading from the LCD. Most of the times there is no need to
read from the LCD so this line can directly be connected to Gnd thus saving one controller line.
The ENABLE pin is used to latch the data present on the data pins. A HIGH - LOW signal is
required to latch the data. The LCD interprets and executes our command at the instant the EN
line is brought low. If you never bring EN low, your instruction will never be executed.

COMMANDS USED IN LCD


Basic 16x 2 Characters LCD - Black on Green 5V:

Description:

This is a basic 16 character by 2 line display. Black text on Green background. Utilizes
the extremely common HD44780 parallel interface chipset. Interface code is freely available. We
will need ~11 general I/O pins to interface to this LCD screen. Includes LED backlight.
Pin Description:
The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4 Line
LCDs which have only 1 controller and support at most of 80 characters, whereas LCDs
supporting more than 80 characters make use of 2 HD44780 controllers.
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two
pins are extra in both for back-light LED connections). Pin description is shown in the table
below.
Figure 1: Character LCD type HD44780 Pin diagram

Pin description:

Pin No. Name Description


Pin no. 1 VSS Power supply (GND)
Pin no. 2 VCC Power supply (+5V)
Pin no. 3 VEE Contrast adjust
0 = Instruction input
Pin no. 4 RS
1 = Data input
0 = Write to LCD module
Pin no. 5 R/W
1 = Read from LCD module
Pin no. 6 EN Enable signal
Pin no. 7 D0 Data bus line 0 (LSB)
Pin no. 8 D1 Data bus line 1
Pin no. 9 D2 Data bus line 2
Pin no. 10 D3 Data bus line 3
Pin no. 11 D4 Data bus line 4
Pin no. 12 D5 Data bus line 5
Pin no. 13 D6 Data bus line 6
Pin no. 14 D7 Data bus line 7 (MSB)

Table 1: Character LCD pins with 1 Controller

Pin No. Name Description


Pin no. 1 D7 Data bus line 7 (MSB)
Pin no. 2 D6 Data bus line 6
Pin no. 3 D5 Data bus line 5
Pin no. 4 D4 Data bus line 4
Pin no. 5 D3 Data bus line 3
Pin no. 6 D2 Data bus line 2
Pin no. 7 D1 Data bus line 1
Pin no. 8 D0 Data bus line 0 (LSB)
Pin no. 9 EN1 Enable signal for row 0 and 1 (1stcontroller)
0 = Write to LCD module
Pin no. 10 R/W
1 = Read from LCD module
0 = Instruction input
Pin no. 11 RS
1 = Data input
Pin no. 12 VEE Contrast adjust
Pin no. 13 VSS Power supply (GND)
Pin no. 14 VCC Power supply (+5V)
Pin no. 15 EN2 Enable signal for row 2 and 3 (2ndcontroller)
Pin no. 16 NC Not Connected

Table 2: Character LCD pins with 2 Controller

LCD Background:

Frequently, an 8051 program must interact with the outside world using input and
output devices that communicate directly with a human being. One of the most common devices
attached to an 8051 is an LCD display. Some of the most common LCDs connected to the 8051
are 16x2 and 20x2 displays. This means 16 characters per line by 2 lines and 20 characters per
line by 2 lines, respectively.

Fortunately, a very popular standard exists which allows us to communicate with the
vast majority of LCDs regardless of their manufacturer. The standard is referred to as
HD44780U, which refers to the controller chip which receives data from an external source (in
this case, the 8051) and communicates directly with the LCD.

44780 Background:

The 44780 standard requires 3 control lines as well as either 4 or 8 I/O lines for the data
bus. The user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus.
If a 4-bit data bus is used the LCD will require a total of 7 data lines (3 control lines plus the 4
lines for the data bus). If an 8-bit data bus is used the LCD will require a total of 11 data lines (3
control lines plus the 8 lines for the data bus).

The three control lines are referred to as EN, RS, and RW.

The EN line is called "Enable." This control line is used to tell the LCD that we are sending it
data. To send data to the LCD, our program should make sure this line is low (0) and then set the
other two control lines and/or put data on the data bus. When the other lines are completely
ready, bring EN high (1) and wait for the minimum amount of time required by the LCD
datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.

The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as
a command or special instruction (such as clear screen, position cursor, etc.). When RS is high
(1), the data being sent is text data which should be displayed on the screen. For example, to
display the letter "T" on the screen we would set RS high.

The RW line is the "Read/Write" control line. When RW is low (0), the information on the
data bus is being written to the LCD. When RW is high (1), the program is effectively querying
(or reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are
write commands--so RW will almost always be low.

Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation
selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2,
DB3, DB4, DB5, DB6, and DB7.

Interfacing Example - 16 Characters x 2 Lines LCD:

Description:

This is the first interfacing example for the Parallel Port. We will start with something
simple. This example doesn't use the Bi-directional feature found on newer ports, thus it should
work with most, if no all Parallel Ports.

It however doesn't show the use of the Status Port as an input. A 16 Character x 2 Line
LCD Module to the Parallel Port. These LCD Modules are very common these days, and are
quite simple to work with, as all the logic required running them is on board.

Schematic:
Circuit Description:

Above is the quite simple schematic. The LCD panel's Enable and Register Select is
connected to the Control Port. The Control Port is an open collector / open drain output. While
most Parallel Ports have internal pull-up resistors, there is a few which don't. Therefore by
incorporating the two 10K external pull up resistors, the circuit is more portable for a wider
range of computers, some of which may have no internal pull up resistors.

We make no effort to place the Data bus into reverse direction. Therefore we hard wire
the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the data
lines. As a result we cannot read back the LCD's internal Busy Flag which tells us if the LCD has
accepted and finished processing the last instruction. This problem is overcome by inserting
known delays into our program.

The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. As
with all the examples, I've left the power supply out. We can use a bench power supply set to 5v
or use an onboard +5 regulator. Remember a few de-coupling capacitors, especially if we have
trouble with the circuit working properly.

Applications:

 Medical equipment
 Electronic test equipment
 Industrial machinery Interface
 Serial terminal
 Advertising system
 EPOS 
 Restaurant ordering systems
 Gaming box
 Security systems
 R&D Test units
 Climatizing units
 PLC Interface
 Simulators
 Environmental monitoring
 Lab development
 Student projects
 Home automation
 PC external display
 HMI operator interface.

D.C. Motor:

A dc motor uses electrical energy to produce mechanical energy, very generally through
the interaction of magnetic fields and current-containing conductors. The reverse process,
producing electrical energy from mechanical energy, is carried out by an alternator, source or
dynamo. Many types of electric motors can be run as sources, and vice verse. The input of a DC
motor is current/voltage and its output is torque (speed).

Fig 3.19: DC Motor

The DC motor has two basic parts: the rotating part that is called the armature and the
stable part that includes coils of wire called the field coils. The stationary part is also called up
the stator. Figure shows a depict of a distinctive DC motor, Figure shows a picture of a DC
armature, and Figure shows a picture of a distinctive stator. From the picture you can see the
armature is made of coils of wire wrapped around the core, and the core has an covered shaft that
rotates on charges. You should also notice that the ends of each coil of wire on the armature are
finished at one end of the armature. The outcome points are called the commutator, and this is
where's brushes make electrical contact to bring electrical current from the stationary part to the
rotating part of the machine.

Operation:
The DC motor you will find in modem industrial applications operates very similarly to
the simple DC motor described earlier in this chapter. Figure 12-9 demonstrates an electrical
diagram of a simple DC motor. comment that the DC voltage is applied directly to the field
winding and the brushes. The armature and the area are both shown as a coil of wire. In
afterward diagrams, a field resistor will be added in series with the field to control the motor
speed. When voltage is applied to the motor, current begins to flow by the field coil from the
negative terminal to the positive terminal. This sets up a inviolable magnetic field in the field
winding. Current also begins to feed through the brushes into a commutator segment and then
through an armature coil. The current goes forward to flow through the coil back to the brush
that is attached to other end of the coil and returns to the DC power source. The current flow in
the armature coil sets up a strong magnetic field in the armature.

Fig 3.20: Simple electrical diagram of DC motor

Fig 3.21: Operation of a DC Motor

The magnetic field in the armature and field coil causes the armature to begin to
rotate. This occurs by the dissimilar magnetic poles attracting each other and the like magnetic
poles grossing out each other. As the armature begins to rotate, the commutator sections will also
begin to move beneath the brushes. As an individual commutator segment moves under the brush
connected to positive voltage, it will become positive, and when it impresses under a brush
connected to negative voltage it will turn negative. In this way, the commutator segments
continually change polarity from positive to negative. Since the commutator segments are
associated to the ends of the wires that make up the field winding in the armature, it induces the
magnetic field in the armature to change polarity continually from north pole to south pole. The
commutator sections and brushes are aligned in such a way that the switch in polarity of the
armature coincides with the location of the armature's magnetic field and the field winding's
magnetic field. The switching accomplish is timed so that the armature will not lock up
magnetically with the field. Rather the magnetic fields tend to build on each other and provide
additional torque to keep the motor shaft rotating.
When the voltage is de-energized to the motor, the magnetic fields in that armature
and the field winding will quickly diminish and the armature shaft's speed will begin to drop to
zero. If voltage is enforced to the motor again, the magnetic fields will toughen and the armature
will begin to rotate again .

Types of DC motors:

1. DC Shunt Motor,

2. DC Series Motor,

3. DC Long Shunt Motor (Compound)

4. DC Short Shunt Motor (Compound)

The rotational energy that you get from any motor is usually the battle between two magnetic
fields going after each other. The DC motor has magnetic poles and an armature, to windward
DC electricity is flowed, The Magnetic Poles are electromagnets, and when they are energized,
they develop a strong magnetic field approximately them, and the armature which is given power
with a commutator, invariably repels the poles, and therefore rotates.

1. The DC Shunt Motor:

In a 2 pole DC Motor, the armature will have two separate sets of winding, connected to a
commutator at the end of the shaft that are in constant touch with carbon brushes. The brushes
are motionless, and the commutator rotates and as the portions of the commutator touching the
respective positive or negative polarity brush will energize the respective part of the armature
with the respective polarity. It is commonly arranged in such a way that the armature and the
poles are always repelling.

The general idea of a DC Motor is, the stronger the Field Current, the stronger the magnetic
field, and faster the rotation of the armature. When the armature revolves between the poles, the
magnetic field of the poles induce power in the armature conductors, and some electricity is
generated in the armature, which is called back emf, and it acts as a resistance for the armature.
Generally an armature has resistance of less than 1 Ohm, and powering it with heavy voltages of
Direct Current could result in immediate short circuits. This back emf helps us there.When an
armature is loaded on a DC Shunt Motor, the speed naturally reduces, and therefore the back emf
reduces, which allows more armatures current to flow. This results in more armature field, and
therefore it results in torque.

Fig: Diagram of DC shunt motor

When a DC Shunt Motor is overloaded, if the armature becomes too slow, the reduction of the
back emf could cause the motor to burn due to heavy current flow thru the armature.

The poles and armature are excited separately, and parallel, therefore it is called a Shunt Motor.

2. The DC Series Motor:

Fig: Diagram of DC series motor

A DC Series Motor has its field coil in series with the armature. hence any amount of power
drawn by the armature will be passed through the field. As a result you cannot start a Series DC
Motor without any load affiliated to it. It will either run uncontrollably in full speed, or it will
block.
Fig: Diagram of DC series motor graph representation

When the load is increased then its efficiency increases with respect to the load employed. So
these are on Electric Trains and elevators.

Specifications

 DC supply: 4 to 12V
 RPM: 300 at 12V
 Total length: 46mm
 Motor diameter: 36mm
 Motor length: 25mm
 Brush type: Precious metal
 Gear head diameter: 37mm
 Gear head length: 21mm
 Output shaft: Centred
 Shaft diameter: 6mm
 Shaft length: 22mm
 Gear assembly: Spur
 Motor weight: 105gms

We generally use 300 RPM Center Shaft Economy Series DC Motor which is high quality low
cost DC geared motor. It has steel gears and pinions to assure longer life and better wear and tear
places. The gears are fixed on hardened steel spindles polished to a mirror finish. The output
shaft circumvolve in a plastic bushing. The whole assembly is crossed with a plastic ring.
Gearbox is sealed off and lubricated with lithium grease and require no sustainment. The motor
is screwed to the gear box from inside.

Although motor gives 300 RPM at 12V but motor runs smoothly from 4V to 12V and gives wide
range of RPM, and torque. Tables below gives reasonably good idea of the motor’s performance
in terms of RPM and no load current as a function of voltage and stall torque, stall current as a
operate of voltage.

3. DC Compound Motor:

A compound of Series and Shunt excitation for the fields is done in a Compound DC Motor. This
affords the best of both series and shunt motors. Improve torque as in a series motor, while the
possible action to start the motor with no load.
Fig: Diagram of DC compound motor

Above is the diagram of a long shunt motor, as in a short shunt, the shunt coil will be connected
after the serial coil.

A Compound motor can be run as a shunt motor absent connecting the serial coil at all but not
vice versa.

Applications

BLDC motors fulfill many functions originally performed by brushed DC motors, but cost and
control complexity keeps BLDC motors from replacing brushed motors completely in the
lowest-cost areas. However, DC motors have come to dominate many applications, especially
devices such as computer hard drives and CD/DVD players. Small cooling fans in electronic
instrumentation are powered exclusively by BLDC motors. They can be detected in cordless
power tools where the increased efficiency of the motor leads to longer periods of use before the
battery needs to be charged. Low speed, low power BLDC motors are expended in direct-drive
turntables for "analog" audio discs.

Transport
High power BLDC motors are found in electric vehicles and hybrid vehicles. These
motors are basically AC synchronous motors with permanent magnet rotors.

The Segway Scooter and Vectrix Maxi-Scooter expend BLDC technology.

A number of electric bicycles use BLDC motors that are sometimes built into the wheel
hub itself, with the stator determined solidly to the axle and the magnets attached to and rotating
withstand wheel. The bicycle wheel hub is the motor. This type of electric bicycle as well has a
standard bicycle transmission on pedals, sprockets, and chain that can be pedaled along with, or
absent, the use of the motor as need arises.

Heating and ventilation

There is a trend in the HVAC and refrigeration industries to use BLDC motors instead of
various types of AC motors. The most significant conclude to switch to a BLDC motor is the
dramatic reduction in power required to operate them versus a typical AC motor.[8][9] While
shaded-pole and permanent disconnected capacitor motors once dominated as the fan motor of
choice, many fans are immediately run using a BLDC motor. Some fans use BLDC motors also
in govern to increase overall system efficiency.[10]In increase to the BLDC motor's higher
efficiency, certain HVAC systems (especially those featuring variable-speed and/or load
modulation) use BLDC motors because the built-in microprocessor allows for programmability,
better assure over airflow, and serial communication.

Industrial engineering

This section requires expansion.

See Stepper motor, Servo motor.

Stepper motor

The stepper motor is used in microprocessor and micro controller-based and robotic equipment,
as it takes less power and provides accurate movement of robotic arms. Semiconductor
manufacturers include infinite engineering's, Texas Instruments and Microchip. Infineon offers
supposed LIN stepper motors used in applications such as instrumentation and gauges, CNC
machining, multi-axis laying, printers and surveillance equipment.

Model engineering

BLDC motors are a popular motor choice for model aircraft including helicopters. Their
prosperous power-to-weight ratios and large range of usable sizes, from under 5 gram to large
motors rated at thousands of watts, have inspired the market for electric-powered model flight.

Their introduction has redefined performance in electric model aircraft and helicopters, moving
virtually all brushed electric motors. They have also advocated a development of simple,
lightweight electric model aircraft, rather than the premature internal combustion engines
powering larger and greater models. The large power-to-weight ratio of modern batteries and
brushless motors allows models to come up vertically, rather than climb gradually. The low noise
and lack of mess compared to small glow fuel internal combustion engines that are used is
another reason for their popularity.

Legal confinements for the use of combustion engine driven model aircraft in some countries
have also supported the shift to high-power electric systems.

Their popularity has also risen in the Radio Controlled Car, cracked, and Truck scene, where
sensor-type motors (with an extra six wires, connected to Hall effect sensors) allow the position
of the rotor magnet to be detected. Brushless motors have been effectual in RC Car Racing in
accordance to ROAR (the American governing body for RC Car Racing), since 2006. various
RC Car Brushless motors, feature expendable and upgradable parts, such as sintered
neodymium-iron-boron (rare earth magnets), ceramic bearings, and exchangeable motor timing
assemblies. These motors as a result are rapidly rising to be the preferred motor type for electric
on and off-road RC racers and recreational drivers alike, for their low maintenance, high
campaigning reliability and power efficiency (most Sensored motors have an efficiency rating of
80% or greater).

PULSE WIDTH MODULATION (PWM):


Pulse-width modulation (PWM), or pulse-duration modulation (PDM), is a commonly
used technique for controlling power to inertial electrical devices, made practical by modern
electronic power switches.

The average value of voltage (and current) fed to the load is controlled by turning the
switch between supply and load on and off at a fast pace. The longer the switch is on equated to
the off periods, the higher the power provided to the load is.

The PWM switching frequency has to be much faster than what would regard the load,
which is to say the device that uses the power. generally switching have to be done several times
a minute in an electric range, 120 Hz in a lamp dimmer, from few kilohertz (kHz) to tens of kHz
for a motor drive and well into the tens or hundreds of kHz in audio amplifiers and computer
power supplies.

The term duty cycle describes the proportion of 'on' time to the regular interval or 'period'
of time; a low duty cycle corresponds to low power, because the power is off for most significant
bit the time. Duty cycle is conveyed in percent, 100% being fully on.

The main advantage of PWM is that power loss in the switching devices is very low.
When a switch is off there is much no current, and when it is on, there is nearly no voltage drop
across the switch. Power loss, existence the product of voltage and current, is thus in both
examples close to zero. PWM also works well with digital assures, which, because of their on/off
nature, can easily set the necessitated duty cycle. PWM has also been used in certain
communication systems where its duty cycle has been used to convey information over a
communications channel.

One of the advantages of PWM is that the signal remains digital all the way from the
processor to the controlled system; no digital-to-analog conversion is necessary. By continuing
the signal digital, noise effects are understated. Noise can only affect a digital signal if it is
strong enough to change a logic-1 to a logic-0, or contrariwise.

Increased noise immunity is yet another benefit of choosing PWM over analog control,
and is the principal conclude PWM is sometimes used for communication. Switching from each
one analog signal to PWM can increase the length of a communication channel dramatically. At
the receiving end, a suitable RC (resistor-capacitor) or LC (inductor-capacitor) network can
remove the modulating high frequency square wave and return the signal to analog form.

PWM finds application in a variety of systems. As a concrete example, conceive a PWM-


assured brake. To put it simply, a brake is a device that clamps down hard on something. In
many brakes, the quantity of clamping enforced (or stopping power) is controlled with an analog
input signal. The more voltage or current that's enforced to the brake, the more force the brake
will exert.

The output of a PWM controller could be connected to a switch between the supply and
the brake. To develop more stopping power, the software necessitates only increase the duty
cycle of the PWM output. If a particular amount of braking pressure is wanted, measurements
would need to be taken to determine the mathematical relationship between duty cycle and
pressure. (And the ensuing formulae or lookup tables would be tweaked for functioning
temperature, surface wear, and so on.)

To set the pressure on the bracken to, say, 100 psi, the software would do a reverse
lookup to determine the duty cycle that should produce that quantity of force. It would then set
the PWM duty cycle to the new value and the brake would react accordingly. If a sensor is
available in the system, the duty cycle can be tweaked, beneath closed-loop control, until the
desired pressure is precisely achieved.

PWM is economical, space saving, and noise resistant. And it's now in your bag of deceptions.
So use it.

PWM controllers
Many microcontrollers include on-chip PWM controllers. For example, Microchip's PIC16C67
admits two, each other which has a selectable on-time and period of time. The duty cycle is the
ratio of the on-time to the period; the modulating frequency is the inverse of the period. To start
PWM procedure, the data sheet suggests the software should:
• Set the period of time in the on-chip timer/counter that provides the modulating square
wave

• Set the on-time in the PWM assure register

• Set the direction of the PWM output, which is one of the general-function I/O pins

• Start the timer

• Enable the PWM controller

Although particular PWM controllers do vary in their programmatic details, the basic idea is
generally the same.

DC Motor Driver:
The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed to
allow for bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is
planned to provide bidirectional drive currents of up to 600-mA at voltages of 4.5 V to 36 V.
Both devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar
maltreating motors, as well as other high-current/high up-voltage loads in positive-supply
applications.
All inputs are TTL compatible. Each output is a complete totem-pole drive circuit,
with a Darlington transistor drop and a pseudo-Darlington source. Drivers are changed in pairs,
with drivers 1 and 2 enabled near 1,2EN and drivers 3 and 4 enabled by 3,4EN.When an enable
input is high, the linked drivers are enabled and their outputs are active and in phase with their
inputs.

When the enable input is low, those drivers are disabled and their outputs are off and in the high-
impedance state. With the thoroughly data inputs, each pair of drivers forms a full-H (or bridge)
reversible drive suitable for solenoid or motor applications. On the L293, international high-
speed output clamp diodes should be used for inductive transient stifling. A VCC1 terminal,
classify from VCC2, is provided for the logic inputs to minimize device power dissolution. The
L293and L293D are characterized for operation from 0°C to 70°C.
Fig 3.22: L293D IC

Pin Diagram of L293D motor driver:

Fig 3.23: L293D pin diagram


Fig 3.24: Internal structure of L293D.

Features of L293D:

 600mA Output current capability per channel


 1.2A Peak output current (non repetitive) per channel
 Enable facility
 Over temperature protection
 Logical “0”input voltage up to 1.5 v
 High noise immunity
 Internal clamp diodes

Applications of DC Motors:
1. Electric Train: A kind of DC motor called the DC Series Motor is used in Electric Trains. The
DC Series Motors have the attribute to deliver more power when they are affluent more. So the
more the people get on a train, the more herculean the train becomes.

2. Elevators: The best bidirectional motors are DC motors. They are expended in elevators.
Compound DC Motors are used for this covering.

3. DC Fans, CD ROM Drives, and Hard Drives: All these things need motors, very miniature
motors, with great exactness. AC motors can never conceive of any application in these places.

4. Starter Motors in Automobiles: An automobile battery supplies DC, so a DC motor is best


fitted here. Also, you cannot start an engine with a small sized AC motor,

5. Electrical Machines Lab in Colleges.

CHAPTER: SOFTWARE SPECIFICATION

The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains a text
editor for writing code, a message area, a text console, a toolbar with buttons for common
functions and a series of menus. It connects to the Arduino and Genuino hardware to upload
programs and communicate with them.

WRITING SKETCHES

Programs written using Arduino Software (IDE) are called sketches. These sketches are written
in the text editor and are saved with the file extension .ino. The editor has features for
cutting/pasting and for searching/replacing text. The message area gives feedback while saving
and exporting and also displays errors. The console displays text output by the Arduino Software
(IDE), including complete error messages and other information. The bottom righthand corner of
the window displays the configured board and serial port. The toolbar buttons allow you to verify
and upload programs, create, open, and save sketches, and open the serial monitor.

NB: Versions of the Arduino Software (IDE) prior to 1.0 saved sketches with the extension .pde.
It is possible to open these files with version 1.0, you will be prompted to save the sketch with
the .ino extension on save.

Verify 
Checks your code for errors compiling it.

Upload 
Compiles your code and uploads it to the configured board. See uploading below for
details.

Note: If you are using an external programmer with your board, you can hold down the
"shift" key on your computer when using this icon. The text will change to "Upload
using Programmer"

New Creates a new sketch.

OpenPresents a menu of all the sketches in your sketchbook. Clicking one will open it
within the current window overwriting its content.

Note: due to a bug in Java, this menu doesn't scroll; if you need to open a sketch late in
the list, use the File | Sketchbookmenu instead.

Save Saves your sketch.

Serial MonitorOpens the serial monitor.


Additional commands are found within the five menus: File, Edit, Sketch, Tools, Help. The
menus are context sensitive, which means only those items relevant to the work currently being
carried out are available.
File

 New Creates a new instance of the editor, with the bare minimum structure of a sketch
already in place.
 OpenAllows to load a sketch file browsing through the computer drives and folders.
 OpenRecent Provides a short list of the most recent sketches, ready to be opened.
 Sketchbook Shows the current sketches within the sketchbook folder structure; clicking
on any name opens the corresponding sketch in a new editor instance.
 Examples Any example provided by the Arduino Software (IDE) or library shows up in
this menu item. All the examples are structured in a tree that allows easy access by topic or
library.
 Close Closes the instance of the Arduino Software from which it is clicked.
 Save Saves the sketch with the current name. If the file hasn't been named before, a name
will be provided in a "Save as.." window.
 Saveas... Allows to save the current sketch with a different name.
 PageSetup It shows the Page Setup window for printing.
 Print 
Sends the current sketch to the printer according to the settings defined in Page Setup.
 Preferences 
Opens the Preferences window where some settings of the IDE may be customized, as the
language of the IDE interface.
 Quit 
Closes all IDE windows. The same sketches open when Quit was chosen will be automatically
reopened the next time you start the IDE.

EDIT

 Undo/Redo 
Goes back of one or more steps you did while editing; when you go back, you may go forward
with Redo.
 Cut 
Removes the selected text from the editor and places it into the clipboard.
 Copy 
Duplicates the selected text in the editor and places it into the clipboard.
 Copy for ForumCopies the code of your sketch to the clipboard in a form suitable for
posting to the forum, complete with syntax coloring.
 Copy as HTMLCopies the code of your sketch to the clipboard as HTML, suitable for
embedding in web pages.
 Paste 
Puts the contents of the clipboard at the cursor position, in the editor.
 Select AllSelects and highlights the whole content of the editor.
 Comment/Uncomment 
Puts or removes the // comment marker at the beginning of each selected line.
 Increase/Decrease Indent :Adds or subtracts a space at the beginning of each selected
line, moving the text one space on the right or eliminating a space at the beginning.
 Find 
Opens the Find and Replace window where you can specify text to search inside the current
sketch according to several options.
 Find Next: Highlights the next occurrence - if any - of the string specified as the search
item in the Find window, relative to the cursor position.
 Find Previous : Highlights the previous occurrence - if any - of the string specified as the
search item in the Find window relative to the cursor position.

SKETCH

 Verify/Compile 
Checks your sketch for errors compiling it; it will report memory usage for code and variables in
the console area.
 Upload 
Compiles and loads the binary file onto the configured board through the configured Port.
 Upload Using Programmer
This will overwrite the bootloader on the board; you will need to use Tools > Burn Bootloader to
restore it and be able to Upload to USB serial port again. However, it allows you to use the full
capacity of the Flash memory for your sketch. Please note that this command will NOT burn the
fuses. To do so a Tools -> Burn Bootloader command must be executed.

 Export Compiled Binary 


Saves a .hex file that may be kept as archive or sent to the board using other tools.
 Show Sketch Folder 
Opens the current sketch folder.
 Include Library 
Adds a library to your sketch by inserting #include statements at the start of your code. For more
details, seelibraries below. Additionally, from this menu item you can access the Library
Manager and import new libraries from .zip files.
 Add File... 
Adds a source file to the sketch (it will be copied from its current location). The new file appears
in a new tab in the sketch window. Files can be removed from the sketch using the tab menu
accessible clicking on the small triangle icon below the serial monitor one on the right side o the
toolbar.

TOOLS

 Auto Format 
This formats your code nicely: i.e. indents it so that opening and closing curly braces line up, and
that the statements inside curly braces are indented more.
 Archive Sketch 
Archives a copy of the current sketch in .zip format. The archive is placed in the same directory
as the sketch.
 Fix Encoding & Reload 
Fixes possible discrepancies between the editor char map encoding and other operating systems
char maps.
 Serial Monitor 
Opens the serial monitor window and initiates the exchange of data with any connected board on
the currently selected Port. This usually resets the board, if the board supports Reset over serial
port opening.
 Board 
Select the board that you're using. See below for descriptions of the various boards.
 Port 
This menu contains all the serial devices (real or virtual) on your machine. It should
automatically refresh every time you open the top-level tools menu.
 Programmer 
For selecting a harware programmer when programming a board or chip and not using the
onboard USB-serial connection. Normally you won't need this, but if you're burning a
bootloader to a new microcontroller, you will use this.
 Burn Bootloader 
The items in this menu allow you to burn a bootloader onto the microcontroller on an Arduino
board. This is not required for normal use of an Arduino or Genuino board but is useful if you
purchase a new ATmega microcontroller (which normally come without a bootloader). Ensure
that you've selected the correct board from the Boards menu before burning the bootloader on the
target board. This command also set the right fuses.

HELP

Here you find easy access to a number of documents that come with the Arduino Software
(IDE). You have access to Getting Started, Reference, this guide to the IDE and other documents
locally, without an internet connection. The documents are a local copy of the online ones and
may link back to our online website.

 Find in Reference 
This is the only interactive function of the Help menu: it directly selects the relevant page in the
local copy of the Reference for the function or command under the cursor.

SKETCHBOOK
The Arduino Software (IDE) uses the concept of a sketchbook: a standard place to store your
programs (or sketches). The sketches in your sketchbook can be opened from the File >
Sketchbook menu or from the Open button on the toolbar. The first time you run the Arduino
software, it will automatically create a directory for your sketchbook. You can view or change
the location of the sketchbook location from with the Preferences dialog.

Beginning with version 1.0, files are saved with a .ino file extension. Previous versions use the
.pde extension. You may still open .pde named files in version 1.0 and later, the software will
automatically rename the extension to .ino.

Tabs, Multiple Files, and Compilation

Allows you to manage sketches with more than one file (each of which appears in its own tab).
These can be normal Arduino code files (no visible extension), C files (.c extension), C++ files
(.cpp), or header files (.h).

UPLOADING

Before uploading your sketch, you need to select the correct items from the Tools >
Board and Tools > Port menus. Theboards are described below. On the Mac, the serial port is
probably something like /dev/tty.usbmodem241 (for an Uno or Mega2560 or Leonardo)
or /dev/tty.usbserial-1B1 (for a Duemilanove or earlier USB board),
or/dev/tty.USA19QW1b1P1.1 (for a serial board connected with a Keyspan USB-to-Serial
adapter). On Windows, it's probably COM1 or COM2 (for a serial board)
or COM4, COM5, COM7, or higher (for a USB board) - to find out, you look for USB serial
device in the ports section of the Windows Device Manager. On Linux, it should
be /dev/ttyACMx ,/dev/ttyUSBx or similar. Once you've selected the correct serial port and
board, press the upload button in the toolbar or select the Upload item from the Sketch menu.
Current Arduino boards will reset automatically and begin the upload. With older boards (pre-
Diecimila) that lack auto-reset, you'll need to press the reset button on the board just before
starting the upload. On most boards, you'll see the RX and TX LEDs blink as the sketch is
uploaded. The Arduino Software (IDE) will display a message when the upload is complete, or
show an error.

When you upload a sketch, you're using the Arduino bootloader, a small program that has been
loaded on to the microcontroller on your board. It allows you to upload code without using any
additional hardware. The bootloader is active for a few seconds when the board resets; then it
starts whichever sketch was most recently uploaded to the microcontroller. The bootloader will
blink the on-board (pin 13) LED when it starts (i.e. when the board resets).

LIBRARIES

Libraries provide extra functionality for use in sketches, e.g. working with hardware or
manipulating data. To use a library in a sketch, select it from the Sketch > Import Library menu.
This will insert one or more #include statements at the top of the sketch and compile the library
with your sketch. Because libraries are uploaded to the board with your sketch, they increase the
amount of space it takes up. If a sketch no longer needs a library, simply delete
its #includestatements from the top of your code.

There is a list of libraries in the reference. Some libraries are included with the Arduino software.
Others can be downloaded from a variety of sources or through the Library Manager. Starting
with version 1.0.5 of the IDE, you do can import a library from a zip file and use it in an open
sketch. See these instructions for installing a third-party library.

To write your own library.

THIRD-PARTY HARDWARE

Support for third-party hardware can be added to the hardware directory of your sketchbook


directory. Platforms installed there may include board definitions (which appear in the board
menu), core libraries, bootloaders, and programmer definitions. To install, create
the hardware directory, then unzip the third-party platform into its own sub-directory. (Don't use
"arduino" as the sub-directory name or you'll override the built-in Arduino platform.) To
uninstall, simply delete its directory.

For details on creating packages for third-party hardware, see the Arduino IDE 1.5 3rd party
Hardware specification.

SERIAL MONITOR

Displays serial data being sent from the Arduino or Genuino board (USB or serial board). To
send data to the board, enter text and click on the "send" button or press enter. Choose the baud
rate from the drop-down that matches the rate passed to Serial.begin in your sketch. Note that on
Windows, Mac or Linux, the Arduino or Genuino board will reset (rerun your sketch execution
to the beginning) when you connect with the serial monitor.

You can also talk to the board from Processing, Flash, MaxMSP, etc (see the interfacing page for
details).

PREFERENCES

Some preferences can be set in the preferences dialog (found under the Arduino menu on the
Mac, or File on Windows and Linux). The rest can be found in the preferences file, whose
location is shown in the preference dialog.

LANGUAGE SUPPORT
 
Since version 1.0.1 , the Arduino Software (IDE) has been translated into 30+ different
languages. By default, the IDE loads in the language selected by your operating system. (Note:
on Windows and possibly Linux, this is determined by the locale setting which controls currency
and date formats, not by the language the operating system is displayed in.)

If you would like to change the language manually, start the Arduino Software (IDE) and open
the Preferences window. Next to the Editor Language there is a dropdown menu of currently
supported languages. Select your preferred language from the menu, and restart the software to
use the selected language. If your operating system language is not supported, the Arduino
Software (IDE) will default to English.

You can return the software to its default setting of selecting its language based on your
operating system by selectingSystem Default from the Editor Language drop-down. This setting
will take effect when you restart the Arduino Software (IDE). Similarly, after changing your
operating system's settings, you must restart the Arduino Software (IDE) to update it to the new
default language.

BOARDS

The board selection has two effects: it sets the parameters (e.g. CPU speed and baud rate) used
when compiling and uploading sketches; and sets and the file and fuse settings used by the burn
bootloader command. Some of the board definitions differ only in the latter, so even if you've
been uploading successfully with a particular selection you'll want to check it before burning the
bootloader. You can find a comparison table between the various boards here.

Arduino Software (IDE) includes the built in support for the boards in the following list, all
based on the AVR Core. TheBoards Manager included in the standard installation allows to add
support for the growing number of new boards based on different cores like Arduino Due,
Arduino Zero, Edison, Galileo and so on.

 Arduino Yùn 
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O and 7 PWM.
 Arduino/Genuino Uno 
An ATmega328 running at 16 MHz with auto-reset, 6 Analog In, 14 Digital I/O and 6 PWM.
 Arduino Diecimila or Duemilanove w/ ATmega168 
An ATmega168 running at 16 MHz with auto-reset.
 Arduino Nano w/ ATmega328 
An ATmega328 running at 16 MHz with auto-reset. Has eight analog inputs.
 Arduino/Genuino Mega 2560 
An ATmega2560 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O and 15 PWM.
 Arduino Mega 
An ATmega1280 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O and 15 PWM.
 Arduino Mega ADK 
An ATmega2560 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O and 15 PWM.
 Arduino Leonardo 
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O and 7 PWM.
 Arduino/Genuino Micro 
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O and 7 PWM.
 Arduino Esplora 
An ATmega32u4 running at 16 MHz with auto-reset.
 Arduino Mini w/ ATmega328
An ATmega328 running at 16 MHz with auto-reset, 8 Analog In, 14 Digital I/O and 6 PWM.
 Arduino Ethernet 
Equivalent to Arduino UNO with an Ethernet shield: An ATmega328 running at 16 MHz with
auto-reset, 6 Analog In, 14 Digital I/O and 6 PWM.
 Arduino Fio 
An ATmega328 running at 8 MHz with auto-reset. Equivalent to Arduino Pro or Pro Mini (3.3V,
8 MHz) w/ATmega328, 6 Analog In, 14 Digital I/O and 6 PWM.
 Arduino BT w/ ATmega328 
ATmega328 running at 16 MHz. The bootloader burned (4 KB) includes codes to initialize the
on-board bluetooth module, 6 Analog In, 14 Digital I/O and 6 PWM..
 LilyPad  Arduino USB 
An ATmega32u4 running at 8 MHz with auto-reset, 4 Analog In, 9 Digital I/O and 4 PWM.
 LilyPad  Arduino 
An ATmega168 or ATmega132 running at 8 MHz with auto-reset, 6 Analog In, 14 Digital I/O
and 6 PWM.
 Arduino Pro or Pro Mini (5V, 16 MHz) w/  ATmega328 
An ATmega328 running at 16 MHz with auto-reset. Equivalent to Arduino Duemilanove or
Nano w/ ATmega328; 6 Analog In, 14 Digital I/O and 6 PWM.
 Arduino NG or older w/ ATmega168 
An ATmega168 running at 16 MHz without auto-reset. Compilation and upload is equivalent to
Arduino Diecimila or Duemilanove w/ ATmega168, but the bootloader burned has a slower
timeout (and blinks the pin 13 LED three times on reset); 6 Analog In, 14 Digital I/O and 6
PWM.
 Arduino Robot Control 
An ATmega328 running at 16 MHz with auto-reset.
 Arduino Robot MOTOR 
An ATmega328 running at 16 MHz with auto-reset.
 Arduino Gemma 
An ATtiny85 running at 8 MHz with auto-reset, 1 Analog In, 3 Digital I/O and 2 PWM.

THE COMPILATION PROCESS


The arduino code is actually just plain old c without all the header part (the includes and all).
when you press the 'compile' button, the IDE saves the current file as arduino.c in the 'lib/build'
directory then it calls a makefile contained in the 'lib' directory.

This makefile copies arduino.c as prog.c into 'lib/tmp' adding 'wiringlite.inc' as the beginning of
it. this operation makes the arduino/wiring code into a proper c file (called prog.c).

After this, it copies all the files in the 'core' directory into 'lib/tmp'. these files are the
implementation of the various arduino/wiring commands adding to these files adds commands to
the language

The core files are supported by pascal stang's procyon avr-lib that is contained in the 'lib/avrlib'
directory. At this point the code contained in lib/tmp is ready to be compiled with the c compiler
contained in 'tools'. If the make operation is succesfull then you'll have prog.hex ready to be
downloaded into the processor.

APPLICATIONS:

 This project can be used for parking system in any shopping mall, multiplex.
 Can be used for industries, commercial offices and educational institutes.

S-ar putea să vă placă și