0% found this document useful (0 votes)
1K views141 pages

Dual Axis Solar Tracking System

This document outlines the contents of a thesis on a dual axis solar tracking system with Arduino. It contains 7 chapters that discuss: 1) an introduction and overview of the project, 2) embedded systems, 3) hardware description, 4) software description, 5) project description, 6) advantages/disadvantages/applications, and 7) results, conclusion and future prospects. Chapter 2 provides background on embedded systems, including their history, definition, and uses in common devices today.

Uploaded by

Sadanand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views141 pages

Dual Axis Solar Tracking System

This document outlines the contents of a thesis on a dual axis solar tracking system with Arduino. It contains 7 chapters that discuss: 1) an introduction and overview of the project, 2) embedded systems, 3) hardware description, 4) software description, 5) project description, 6) advantages/disadvantages/applications, and 7) results, conclusion and future prospects. Chapter 2 provides background on embedded systems, including their history, definition, and uses in common devices today.

Uploaded by

Sadanand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 141

INDEX

TOPICS

 Certificates…………………………………………………………………………………
……
 Acknowledgement…………………………………………………………………………...
.....

CHAPTER 1: INTRODUCTION

1.1 Introduction of the project ………………………………………………………………………

1.2 Project overview……………………………………………………………………………………...

1.3 Thesis…………………………………………………………………………………………………

CHAPTER 2: EMBEDDED SYSTEMS

2.1 Introduction to embedded systems……………………………………………………………………

2.2 Need of embedded systems……………………………………………………………………………...

2.3 Explanation of embedded systems……………………………………………………………………...

2.4 Applications of embedded systems……………………………………………………………………

CHAPTER 3: HARDWARE DESCRIPTION

3.1 Introduction with block diagram……………………………………………………………………

3.2 Microcontroller………………………………………………………………………………………….

3.3 Regulated power supply……………………………………………………………………………...

3.4 LED indicator…………………..…………………………….………………………………………...

3.5 LDR sensor……..………………………….…………………..…………………………….………...


3.6 Solar Tracker ………..……………………………………………………………………………..

3.7 LCD………………………………………………………………………………………………………

3.8 DC motor………………………………………………………………………………………………...

CHAPTER 4: SOFTWARE DESCRIPTION

4.1 Arduino IDE…………………………………………………………………………………………

4.2Procedural steps for compilation, simulation and dumping……………………………..

CHAPTER 5: PROJECT DESCRIPTION

CHAPTER 6: ADVANTAGES, DISADVANTAGES AND APPLICATIONS

CHAPTER 7: RESULTS, CONCLUSION, FUTURE PROSPECTS

REFERENCES
CHAPTER 1: INTRODUCTION

1.1Introduction:

The purpose of this project is to design and construct a solar tracker system that follows the
sun direction for producing maximum out for solar powered applications. To get the maximum
sunlight in a limited distance, two solar panels were placed in bi-facial manner and reflectors.
LDRs are used to detect the sun direction. And the energy from the solar panels is stored in battery.
The stored energy is used for street lights. These street lights are automated. This automation
process is done by the microcontroller with help of LDR. The street lights switched ON in night
and switched OFF in day times.

A solar panel is a large flat rectangle, typically somewhere between the size of a radiator
and the size of a door, made up of many individual solar energy collectors called solar cells
covered with a protective sheet of glass. The cells, each of which is about the size of an adult's
palm, are usually octagonal and colored bluish black. Just like the cells in a battery, the cells in a
solar panel are designed to generate electricity; but where a battery's cells make electricity from
chemicals, a solar panel's cells generate power by capturing sunlight instead. They are sometimes
called photovoltaic cells because they use sunlight ("photo" comes from the Greek word for light)
to make electricity (the word "voltaic" is a reference to electricity pioneer Alessandro Volta).

This project consists of few LDR sensors and a motorized mechanism for rotating the panel
in the direction of sun. Moving the solar cell panel in the direction of sun can increase the solar
energy generated from the solar cell. Microcontroller based control system takes care of sensing
sunlight and controlling the motorized mechanism. This system works continuously without any
interruption.

1.2 Project Overview:

An embedded system is a combination of software and hardware to perform a


dedicated task. Some of the main devices used in embedded products are Microprocessors and
Microcontrollers.
Microprocessors are commonly referred to as general purpose processors as
they simply accept the inputs, process it and give the output. In contrast, a microcontroller not only
accepts the data as inputs but also manipulates it, interfaces the data with various devices, controls
the data and thus finally gives the result.

The “Solar tracking street light system” using PIC16F72 microcontroller is an


exclusive project which is used to move the solar cell panel in the direction of sun and can increase
the solar energy generated from the solar cell.

1.3 Thesis:

The thesis explains the implementation of “DUAL AXIS SOLAR TRACKING


SYSTEM WITH ARDUINO ” using ATMEGA328 microcontroller. The organization of the
thesis is explained here with:

Chapter 1 Presents introduction to the overall thesis and the overview of the project. In the
project overview a brief introduction of LDR sensor and its applications are discussed.

Chapter 2 Presents the topic embedded systems. It explains the about what is embedded systems,
need for embedded systems, explanation of it along with its applications.

Chapter 3 Presents the hardware description. It deals with the block diagram of the project and
explains the purpose of each block. In the same chapter the explanation of microcontroller, solar
panel, power supplies, LDR, LCD, Geared DC motor, Solar tracker with Inverter are considered.

Chapter 4 Presents the software description. It explains the implementation of the project using
PIC C Compiler software.

Chapter 5 Presents the project description along with stepper motor interfacing to microcontroller.

Chapter 6 Presents the advantages, disadvantages and applications of the project.

Chapter 7 Presents the results, conclusion and future scope 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 themselves 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 backups 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 Hyper visor 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 interrupting 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:

These embedded systems follow a relative dead line time period i.e.., if the task is not done
in a particular time that will not cause damage to the equipment.

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 shows 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: Robot

In critical industries where human presence is avoided there we can use robots
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 Phone Fig2.9: Web camera

CHAPTER 3: HARDWARE DESCRIPTION


3.1 Introduction:

In this chapter the block diagram of the project and design aspect of independent
modules are considered. Block diagram is shown in fig: 3.1:

DUAL AXIS SOLAR TRACKING WITH ARDUINO

The main blocks of this project are:

1. Micro controller (ATMEGA328)


2. Crystal oscillator

3. Regulated power supply (RPS)

4. LED Indicator

5. DC motor

6. LDR sensor

7. LCD

3.2 INTRODUCTION TO ARDUINO:

The Arduino is a family of microcontroller boards to simplify electronic design, prototyping and

experimenting for artists, hackers, hobbyists, but also many professionals. People use it as brains

for their robots, to build new digital music instruments, or to build a system that lets your house

plants tweet you when they’re dry. Arduinos (we use the standard Arduino Uno) are built around

an ATmega microcontroller — essentially a complete computer with CPU, RAM, Flash memory,

and input/output pins, all on a single chip. Unlike, say, a Raspberry Pi, it’s designed to attach all

kinds of sensors, LEDs, small motors and speakers, servos, etc. directly to these pins, which can

read in or output digital or analog voltages between 0 and 5 volts. The Arduino connects to your

computer via USB, where you program it in a simple language (C/C++, similar to Java) from

inside the free Arduino IDE by uploading your compiled code to the board. Once programmed, the

Arduino can run with the USB link back to your computer, or stand-alone without it — no

keyboard or screen needed, just power.


Figure 2.2 Structure of Arduino Board

Looking at the board from the top down, this is an outline of what you will see (parts of the board

you might interact with in the course of normal use are highlighted)
Figure 2.3 Arduino Board

Starting clockwise from the top center:

 Analog Reference pin (orange)

 Digital Ground (light green)

 Digital Pins 2-13 (green)

 Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - These pins cannot be used for digital

i/o (Digital Read and Digital Write) if you are also using serial communication (e.g.

Serial.begin).

 Reset Button - S1 (dark blue)

 In-circuit Serial Programmer (blue-green)

 Analog In Pins 0-5 (light blue)


 Power and Ground Pins (power: orange, grounds: light orange)

 External Power Supply In (9-12VDC) - X1 (pink)

 Toggles External Power and USB Power (place jumper on two pins closest to desired

supply) - SV1 (purple)

 USB (used for uploading sketches to the board and for serial communication between the

board and the computer; can be used to power the board) (yellow).

Digital Pins

In addition to the specific functions listed below, the digital pins on an Arduino board can

be used for general purpose input and output via the pin Mode(), Digital Read(), and Digital

Write() commands. Each pin has an internal pull-up resistor which can be turned on and off using

digital Write() (w/ a value of HIGH or LOW, respectively) when the pin is configured as an input.

The maximum current per pin is 40mA.

 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. On the

Arduino Diecimila, these pins are connected to the corresponding pins of the FTDI USB-

to-TTL Serial chip. On the Arduino BT, they are connected to the corresponding pins of the

WT11 Bluetooth module. On the Arduino Mini and LilyPad Arduino, they are intended for

use with an external TTL serial module (e.g. the Mini-USB Adapter).

 External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low

value, a rising or falling edge, or a change in value. See the attach Interrupt() function for

details.

 PWM: 3, 5, 6, 9, 10, and 11 Provide 8-bit PWM output with the analog Write() function.

On boards with an ATmega8, PWM output is available only on pins 9, 10, and 11.
 BT Reset: 7. (Arduino BT-only) Connected to the reset line of the bluetooth module.

 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication,

which, although provided by the underlying hardware, is not currently included in the

Arduino language.

 LED: 13. On the Diecimila and LilyPad, there is a built-in LED connected to digital pin 13.

When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.

Analog Pins

In addition to the specific functions listed below, the analog input pins support 10-bit analog-to-

digital conversion (ADC) using the analog Read() function. Most of the analog inputs can also be

used as digital pins: analog input 0 as digital pin 14 through analog input 5 as digital pin 19.

Analog inputs 6 and 7 (present on the Mini and BT) cannot be used as digital pins.

 I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library

(documentation on the Wiring website).

Power Pins

 VIN (sometimes labeled "9V"): 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. Also note that the Lily Pad has no VIN pin and

accepts only a regulated input.

 5V: The regulated power supply used to power the microcontroller and other components

on the board. This can come either from VIN via an on-board regulator, or be supplied by

USB or another regulated 5V supply.


 3V3 (Diecimila-only) : A 3.3 volt supply generated by the on-board FTDI chip.

 GND: Ground pins.

Other Pins

 AREF: Reference voltage for the analog inputs. Used with analog Reference().

 Reset: (Diecimila-only) Bring this line LOW to reset the microcontroller. Typically used to

add a reset button to shields which block the one on the Atmega328

2.5.1 Pin diagram


Figure 2.4 Pin Configuration of Atmega328

Pin Description

VCC:

Digital supply voltage.

GND:

Ground.

Port A (PA7-PA0):

Port A serves as the analog inputs to the A/D Converter. Port A also serves as an 8-bit bi-

directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up

resistors (selected for each bit). The Port A output buffers have symmetrical drive characteristics

with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are

externally pulled low, they will source current if the internal pull-up resistors are activated. The

Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running.

Port B (PB7-PB0):

Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each

bit). The Port B output buffers have symmetrical drive characteristics with both high sink and

source capability. As inputs, Port B pins that are externally pulled low will source current if the

pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes

active, even if the clock is not running. Port B also serves the functions of various special features

of the ATmega32.

Port C (PC7-PC0):
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each

bit). The Port C output buffers have symmetrical drive characteristics with both high sink and

source capability. As inputs, Port C pins that are externally pulled low will source current if the

pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes

active, even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on

pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs. The TD0 pin is

tri-stated unless TAP states that shift out data are entered. Port C also serves the functions of the

JTAG interface.

Port D (PD7-PD0):

Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each

bit). The Port D output buffers have symmetrical drive characteristics with both high sink and

source capability. As inputs, Port D pins that are externally pulled low will source current if the

pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes

active, even if the clock is not running. Port D also serves the functions of various special features

of the ATmega32.

Reset (Reset Input):

A low level on this pin for longer than the minimum pulse length will generate a reset, even

if the clock is not running. Shorter pulses are not guaranteed to generate a reset.

XTAL1:

Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.

XTAL2:

Output from the inverting Oscillator amplifier.


AVCC:

AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally

connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC

through a low-pass filter.

AREF:

AREF is the analog reference pin for the A/D Converter.

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

 6 PWM Channels

 8 Channel 10-bit ADC

 Serial USART
 Master/Slave SPI interface

 2-wire (I2C) interface

 Watchdog timer

 Analog comparator

 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

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 2.5 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.
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. Program Flash memory space is

divided in two sections, the Boot Program section and the Application Program section. Both

sections have dedicated Lock bits for write and read/write protection. The SPM instruction that

writes into the Application Flash memory section must reside in the Boot Program section. During

interrupts and subroutine calls, the return address Program Counter (PC) is stored on the Stack.
The Stack is effectively allocated in the general data SRAM, and consequently the Stack size is

only limited by the total SRAM size and the usage of the SRAM. All user programs must initialize

the SP in the Reset routine (before subroutines or interrupts are executed). The Stack Pointer (SP)

is read/write accessible in the I/O space. The data SRAM can easily be accessed through the five

different addressing modes supported in the AVR architecture.

The memory spaces in the AVR architecture are all linear and regular memory maps. A

flexible interrupt module has its control registers in the I/O space with an additional Global

Interrupt Enable bit in the Status Register. All interrupts have a separate Interrupt Vector in the

Interrupt Vector table. The interrupts have priority in accordance with their Interrupt Vector

position. The lower the Interrupt Vector address, the higher the priority.

ALU – Arithmetic Logic Unit

The high-performance AVR ALU operates in direct connection with all the 32 general

purpose working registers. Within a single clock cycle, arithmetic operations between general

purpose registers or between a register and an immediate are executed. The ALU operations are

divided into three main categories – arithmetic, logical, and bit functions. Some implementations

of the architecture also provide a powerful multiplier supporting both

signed/unsigned multiplication and fractional format. See the “Instruction Set” section for a

detailed description.

Status Register

The Status Register contains information about the result of the most recently executed

arithmetic instruction. This information can be used for altering program flow in order to perform

conditional operations. Note that the Status Register is updated after all ALU operations, as
specified in the Instruction Set Reference. This will in many cases remove the need for using the

dedicated compare instructions, resulting in faster and more compact code. The Status Register is

not automatically stored when entering an interrupt routine and restored when returning from an

interrupt. This must be handled by software.

The AVR Status Register – SREG is defined as:

Figure AVR status register

Bit 7 – I: Global Interrupt Enable

The Global Interrupt Enable bit must be set for the interrupts to be enabled. The individual

interrupt enable control The Global Interrupt Enable bit must be set for the interrupts to be

enabled. The individual interrupt enable control is then performed in separate control registers. If

the Global Interrupt Enable Register is cleared, none of the interrupts are enabled independent of

the individual interrupt enable settings. The I-bit is cleared by hardware after an interrupt has

occurred, and is set by the RETI instruction to enable subsequent interrupts. The I-bit can also be

set and cleared by the application with the SEI and CLI instructions, as described in the instruction

set reference.

Bit 6 – T: Bit Copy Storage

The Bit Copy instructions BLD (Bit Load) and BST (Bit Store) use the T-bit as source or

destination for the operated bit. A bit from a register in the Register File can be copied into T by
the BST instruction, and a bit in T can be copied into a bit in a register in the Register File by the

BLD instruction.

Bit 5 – H: Half Carry Flag

The Half Carry Flag H indicates a Half Carry in some arithmetic operations The Half Carry

Flag H indicates a Half Carry in some arithmetic operations. Half Carry Is useful in BCD

arithmetic. See the “Instruction Set Description” for detailed information.

Bit 4 – S: Sign Bit, S = N V

The S-bit is always an exclusive or between the Negative Flag N and the Two’s

Complement Overflow Flag V. See the “Instruction Set Description” for detailed information.

Bit 3 – V: Two’s Complement Overflow Flag

The Two’s Complement Overflow Flag V supports two’s complement arithmetic.

Bit 2 – N: Negative Flag

The Negative Flag N indicates a negative result in an arithmetic or logic operation.

Bit 1 – Z: Zero Flag

The Zero Flag Z indicates a zero result in an arithmetic or logic operation.

Bit 0 – C: Carry Flag

The Carry Flag C indicates a carry in an arithmetic or logic operation.

General Purpose Register File


The Register File is optimized for the AVR Enhanced RISC instruction set. In order to

achieve the required performance and flexibility, the following input/output schemes are supported

by the Register File:

• One 8-bit output operand and one 8-bit result input

• Two 8-bit output operands and one 8-bit result input

• Two 8-bit output operands and one 16-bit result input

One 16-bit output operand and one 16-bit result input

Most of the instructions operating on the Register File have direct access to all registers,

and most of them are single cycle instructions. As shown in Figure 6-2, each register is also

assigned a data memory address, mapping them directly into the first32 locations of the user data

space. Although not being physically implemented as SRAM locations, this memory organization

provides great flexibility in access of the registers, as the X-, Y-, and Z-pointer registers can be set
to index any register.

Figure 2.8 Structure of the 32 general purpose working registers in the CPU

X-, Y-, and Z-register


The registers R26:R31 have some added functions to their general purpose usage. These registers

are 16-bit address pointers for indirect addressing of the data space. The three indirect address

registers X, Y, and Z are defined as described in

Figure 2.9 X-,

Y-, and Z-Registers

In the different addressing modes these address registers have functions as fixed displacement,

automatic increment, and automatic decrement.

Stack Pointer
The Stack is mainly used for storing temporary data, for storing local variables and for

storing return addresses after interrupts and subroutine calls. Note that the Stack is implemented as

growing from higher to lower memorylocations. The Stack Pointer Register always points to the

top of the Stack. The Stack Pointer points to the data SRAM Stack area where the Subroutine and

Interrupt Stacks are located. A Stack PUSH command will decrease the Stack Pointer.

The Stack in the data SRAM must be defined by the program before any subroutine calls

are executed or interrupts are enabled. Initial Stack Pointer value equals the last address of the

internal SRAM and the Stack Pointer must be set to point above start of the SRAM

Table 2.1 Stack Pointer instructions

The AVR ATmega128A Stack Pointer is implemented as two 8-bit registers in the I/O

space. The number of bits actually used is implementation dependent. Note that the data space in

some implementations of the AVR architecture is so small that only SPL is needed. In this case, the

SPH Register will not be present.SPH and SPL - Stack Pointer High and Low Register.
Figure 2.10

SPH and SPL - Stack Pointer High and Low Register

Interrupt Response Time

The interrupt execution response for all the enabled AVR interrupts is four clock cycles

minimum. After four clock cycles the program vector address for the actual interrupt handling

routine is executed. During this four clock cycle period, the Program Counter is pushed onto the

Stack. The vector is normally a jump to the interrupt routine, and this jump takes three clock

cycles. If an interrupt occurs during execution of a multi-cycle instruction, this instruction is

completed before the interrupt is served. If an interrupt occurs when the MCU is in sleep mode,

the interrupt execution response time is increased by four clock cycles. This increase comes in

addition to the start-up time from the selected sleep mode.

AVR Memories

This section describes the different memories in the ATmega328. The AVR architecture has

two main memory spaces, the Data Memory and the Program Memory space. In addition,

theATmega328 features an EEPROM Memory for data storage. All three memory spaces are linear

and regular.

In-System Reprogrammable Flash Program Memory:


The ATmega328 contains 4/8/16/32Kbytes On-chip In-System Reprogrammable Flash

memory for program storage. Since all AVR instructions are 16 or 32 bits wide, the Flash is

organized as 2/4/8/16K x 16. For software security, the Flash Program memory space is divided

into two sections, Boot Loader Section and Application Program Section. The Flash memory has

an endurance of at least 10,000 write/erase cycles. The ATmega328 Program Counter (PC) is

11/12/13/14 bits wide, thus addressing the 2/4/8/16K program memory locations.

SRAM Data Memory:

ATmega328 is a complex microcontroller with more peripheral units than can be supported

within the 64 locations reserved in the Opcode for the IN and OUT instructions. For the Extended

I/O space from 0x60 - 0xFF in SRAM, only the ST/STS/STD and LD/LDS/LDD instructions can

be used.

The lower 768/1280/1280/2303 data memory locations address both the Register File, the

I/O memory, Extended I/O memory, and the internal data SRAM. The first 32 locations address

the Register File, the next 64 location the standard I/O memory, then 160 locations of Extended

I/O memory, and the next 512/1024/1024/2048 locations address the internal data SRAM. The five

different addressing modes for the data memory cover: Direct, Indirect with Displacement,

Indirect, Indirect with Pre-decrement, and Indirect with Post-increment. In The Register File,

Registers R26 to R31 Feature the indirect addressing pointer registers. The direct addressing

reaches the entire data space. The Indirect with Displacement mode reaches 63 address locations

from the base address given by the Y- or Z register.

When using register indirect addressing modes with automatic pre-decrement and post-

increment, the address registers X, Y, and Z are decremented or incremented. The 32 general

purpose working registers, 64 I/O Registers, 160 Extended I/O Registers, and the
512/1024/1024/2048 bytes of internal data SRAM in the ATmega328 are all accessible through all

these addressing modes.

Figure 2.11 Data Memory Map

Interrupts

This section describes the specifics of the interrupt handling as performed in the

Atmega328. In Atmega328Each Interrupt Vector occupies two instruction words and the Reset

Vector is affected by the BOOTRST fuse, and the Interrupt Vector start address is affected by the

IVSEL bit in MCUCR.

Table 2.2 Reset and Interrupt Vectors in ATMEGA 328 and ATMEGA 328P

Vector Program Source Interrupt Definition

No. Address

1 0x0000 RESET External Pin, Power-on Reset,

Brown-out Reset and Watchdog

System Reset
2 0x0002 INT0 External Interrupt Request 0

3 0x0004 INT1 External Interrupt Request 0

4 0x0006 PCINTO Pin Change Interrupt Request 0

5 0x0008 PCINT1 Pin Change Interrupt Request 1

6 0x000A PCINT2 Pin Change Interrupt Request 2

7 0x000C WDT Watchdog Time-out Interrupt

8 0x000E TIMER2 COMPA Timer/Counter2 Compare Match A

9 0x0010 TIMER2 COMPB Timer/Counter2 Compare Match B

10 0x0012 TIMER2 OVF Timer/Counter 2 Overflow

11 0x0014 TIMER1 CAPT Timer/Counter 2 Capture Event

12 0x0016 TIMER1 COMPA Timer/Counter1 Compare Match A

13 0x0018 TIMER1 COMPB Timer/Counter1 Compare Match B

14 0x001A TIMER 1 OVF Timer/Counter1 Overflow

15 0x001C TIMER0 COMPA Timer/Counter0 Compare Match A

16 0x001E TIMER0 COMPB Timer/Counter0 Compare Match B

17 0x0020 TIME0 OVF Timer/Counter0 Overflow

18 0x0022 SPI, STC SPI Serial Transfer Complete

19 0x0024 USART, RX USART RX Complete

20 0x0026 USART, UDRE USART, Data Register Empty

21 0x0028 USART, TX USART, TX Complete

22 0x002A ADC ADC Conversion Complete

23 0x002C EE READY EEPROM Ready

24 0x002E ANALOG COMP Analog Comparator

25 0x0030 TWI 2-wire Serial Interface

26 0x0032 SPM READY Store Program Memory Ready


When the IVSEL bit in MCUCR is set, Interrupt Vectors will be moved to the start of the

Boot Flash Section. The address of each Interrupt Vector will then be the address in this table

added to the start address of the Boot Flash Section.Table below shows reset and Interrupt Vectors

placement for the various combinations of BOOTRST and IVSEL settings. If the program never

enables an interrupt source, the Interrupt Vectors are not used, and regular program code can be

placed at these locations. This is also the case if the Reset Vector is in the Application section

while the Interrupt Vectors are in the Boot section or vice versa.

Table 2.3 Reset and Interrupt Vectors Placement in ATmega328 and ATmega328P

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.
Fig 3.3.2 Regulated Power Supply

The basic circuit diagram of a regulated power supply (DC O/P) with led connected
as load is shown in fig: 3.3.3.

Fig 3.3.3 Circuit diagram of Regulated Power Supply with Led connection

The components mainly used in above figure are


 230V AC MAINS
 TRANSFORMER
 BRIDGE RECTIFIER(DIODES)
 CAPACITOR
 VOLTAGE REGULATOR(IC 7805)
 RESISTOR
 LED(LIGHT EMITTING DIODE)
The detailed explanation of each and every component mentioned above is as follows:

Transformation: The process of transforming energy from one device to another is called
transformation. For transforming energy we use transformers.

Transformers:

A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled conductors without changing its frequency. A varying current in the
first or primary winding creates a varying magnetic flux in the transformer's core, and thus a
varying magnetic field through the secondary winding. This varying magnetic field induces a
varying electromotive force (EMF) or "voltage" in the secondary winding. This effect is
called mutual induction.

If a load is connected to the secondary, an electric current will flow in the


secondary winding and electrical energy will be transferred from the primary circuit through the
transformer to the load. This field is made up from lines of force and has the same shape as a bar
magnet.

If the current is increased, the lines of force move outwards from the coil. If the
current is reduced, the lines of force move inwards.

If another coil is placed adjacent to the first coil then, as the field moves out or in,
the moving lines of force will "cut" the turns of the second coil. As it does this, a voltage is
induced in the second coil. With the 50 Hz AC mains supply, this will happen 50 times a second.
This is called MUTUAL INDUCTION and forms the basis of the transformer.
The input coil is called the PRIMARY WINDING; the output coil is the
SECONDARY WINDING. Fig: 3.3.4 shows step-down transformer.

Fig 3.3.4: Step-Down Transformer

The voltage induced in the secondary is determined by the TURNS RATIO.

For example, if the secondary has half the primary turns; the secondary will have
half the primary voltage.

Another example is if the primary has 5000 turns and the secondary has 500 turns,
then the turn’s ratio is 10:1.

If the primary voltage is 240 volts then the secondary voltage will be x 10 smaller =
24 volts. Assuming a perfect transformer, the power provided by the primary must equal the power
taken by a load on the secondary. If a 24-watt lamp is connected across a 24 volt secondary, then
the primary must supply 24 watts.

To aid magnetic coupling between primary and secondary, the coils are wound on a
metal CORE. Since the primary would induce power, called EDDY CURRENTS, into this core,
the core is LAMINATED. This means that it is made up from metal sheets insulated from each
other. Transformers to work at higher frequencies have an iron dust core or no core at all.

Note that the transformer only works on AC, which has a constantly changing
current and moving field. DC has a steady current and therefore a steady field and there would be
no induction.
Some transformers have an electrostatic screen between primary and secondary.
This is to prevent some types of interference being fed from the equipment down into the mains
supply, or in the other direction. Transformers are sometimes used for IMPEDANCE
MATCHING.

We can use the transformers as step up or step down.

Step Up transformer:

In case of step up transformer, primary windings are every less compared to


secondary winding.

Because of having more turns secondary winding accepts more energy, and it
releases more voltage at the output side.

Step down transformer:

Incase of step down transformer, Primary winding induces more flux than the
secondary winding, and secondary winding is having less number of turns because of that it
accepts less number of flux, and releases less amount of voltage.

Battery power supply:

A battery is a type of linear power supply that offers benefits that traditional line-
operated power supplies lack: mobility, portability and reliability. A battery consists of multiple
electrochemical cells connected to provide the voltage desired. Fig: 3.3.5 shows Hi-Watt 9V
battery
Fig 3.3.5: Hi-Watt 9V Battery

The most commonly used dry-cell battery is the carbon-zinc dry cell battery. Dry-
cell batteries are made by stacking a carbon plate, a layer of electrolyte paste, and a zinc plate
alternately until the desired total voltage is achieved. The most common dry-cell batteries have one
of the following voltages: 1.5, 3, 6, 9, 22.5, 45, and 90. During the discharge of a carbon-zinc
battery, the zinc metal is converted to a zinc salt in the electrolyte, and magnesium dioxide is
reduced at the carbon electrode. These actions establish a voltage of approximately 1.5 V.

The lead-acid storage battery may be used. This battery is rechargeable; it consists
of lead and lead/dioxide electrodes which are immersed in sulfuric acid. When fully charged, this
type of battery has a 2.06-2.14 V potential (A 12 volt car battery uses 6 cells in series). During
discharge, the lead is converted to lead sulfate and the sulfuric acid is converted to water. When
the battery is charging, the lead sulfate is converted back to lead and lead dioxide A nickel-
cadmium battery has become more popular in recent years. This battery cell is completely sealed
and rechargeable. The electrolyte is not involved in the electrode reaction, making the voltage
constant over the span of the batteries long service life. During the charging process, nickel oxide
is oxidized to its higher oxidation state and cadmium oxide is reduced. The nickel-cadmium
batteries have many benefits. They can be stored both charged and uncharged. They have a long
service life, high current availabilities, constant voltage, and the ability to be recharged. Fig: 3.3.6
shows pencil battery of 1.5V.
Fig 3.3.6: Pencil Battery of 1.5V

Rectification:

The process of converting an alternating current to a pulsating direct current is


called as rectification. For rectification purpose we use rectifiers.

Rectifiers:

A rectifier is an electrical device that converts alternating current (AC) to direct


current (DC), a process known as rectification. Rectifiers have many uses including as components
of power supplies and as detectors of radio signals. Rectifiers may be made of solid-state diodes,
vacuum tube diodes, mercury arc valves, and other components.

A device that it can perform the opposite function (converting DC to AC) is known
as an inverter.

When only one diode is used to rectify AC (by blocking the negative or positive
portion of the waveform), the difference between the term diode and the term rectifier is merely
one of usage, i.e., the term rectifier describes a diode that is being used to convert AC to DC.
Almost all rectifiers comprise a number of diodes in a specific arrangement for more efficiently
converting AC to DC than is possible with only one diode. Before the development of silicon
semiconductor rectifiers, vacuum tube diodes and copper (I) oxide or selenium rectifier stacks
were used.

Bridge full wave rectifier:


The Bridge rectifier circuit is shown in fig: 3.3.7, which converts an ac voltage to
dc voltage using both half cycles of the input ac voltage. The Bridge rectifier circuit is shown in
the figure. The circuit has four diodes connected to form a bridge. The ac input voltage is applied
to the diagonally opposite ends of the bridge. The load resistance is connected between the other
two ends of the bridge.

For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct,
whereas diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with
the load resistance RL and hence the load current flows through RL.

For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct
whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load
resistance RL and hence the current flows through R L in the same direction as in the previous half
cycle. Thus a bi-directional wave is converted into a unidirectional wave.

Input Output

Fig 3.3.7: Bridge rectifier: a full-wave rectifier using 4 diodes

DB107:

Now -a -days Bridge rectifier is available in IC with a number of DB107. In our


project we are using an IC in place of bridge rectifier. The picture of DB 107 is shown in fig: 3.3.8.

Features:

 Good for automation insertion


 Surge overload rating - 30 amperes peak

 Ideal for printed circuit board

 Reliable low cost construction utilizing molded

 Glass passivated device

 Polarity symbols molded on body

 Mounting position: Any

 Weight: 1.0 gram

Fig 3.3.8: DB107

Filtration:

The process of converting a pulsating direct current to a pure direct current using
filters is called as filtration.

Filters:

Electronic filters are electronic circuits, which perform signal-processing functions,


specifically to remove unwanted frequency components from the signal, to enhance wanted ones.

Introduction to Capacitors:

The Capacitor or sometimes referred to as a Condenser is a passive device, and one


which stores energy in the form of an electrostatic field which produces a potential (static voltage)
across its plates. In its basic form a capacitor consists of two parallel conductive plates that are not
connected but are electrically separated either by air or by an insulating material called
the Dielectric. When a voltage is applied to these plates, a current flows charging up the plates
with electrons giving one plate a positive charge and the other plate an equal and opposite negative
charge this flow of electrons to the plates is known as the Charging Current and continues to flow
until the voltage across the plates (and hence the capacitor) is equal to the applied voltage Vcc. At
this point the capacitor is said to be fully charged and this is illustrated below. The construction of
capacitor and an electrolytic capacitor are shown below.

Fig 3.3.9:Construction Of a Capacitor Fig 3.3.10:Electrolytic Capaticor

Units of Capacitance:

Microfarad (μF) 1μF = 1/1,000,000 = 0.000001 = 10-6 F

Nanofarad (nF) 1nF = 1/1,000,000,000 = 0.000000001 = 10-9 F

Pico farad (pF) 1pF = 1/1,000,000,000,000 = 0.000000000001 = 10-12 F

Operation of Capacitor:

Think of water flowing through a pipe. If we imagine a capacitor as being a storage


tank with an inlet and an outlet pipe, it is possible to show approximately how an electronic
capacitor works.
First, let's consider the case of a "coupling capacitor" where the capacitor is used to
connect a signal from one part of a circuit to another but without allowing any direct current to
flow.

If the current flow is alternating between zero and a


maximum, our "storage tank" capacitor will allow the current
waves to pass through.

However, if there is a steady current, only the initial short


burst will flow until the "floating ball valve" closes and stops
further flow.

So a coupling capacitor allows "alternating current" to pass through because the


ball valve doesn't get a chance to close as the waves go up and down. However, a steady current
quickly fills the tank so that all flow stops.

A capacitor will pass alternating current but (apart from an initial surge) it will not
pass d.c.

Where a capacitor is used to decouple a circuit, the effect is to


"smooth out ripples". Any ripples, waves or pulses of current
are passed to ground while d.c. Flows smoothly.

Regulation:
The process of converting a varying voltage to a constant regulated voltage is called
as regulation. For the process of regulation we use voltage regulators.

Voltage Regulator:

A voltage regulator (also called a ‘regulator’) with only three terminals appears to
be a simple device, but it is in fact a very complex integrated circuit. It converts a varying input
voltage into a constant ‘regulated’ output voltage. Voltage Regulators are available in a variety of
outputs like 5V, 6V, 9V, 12V and 15V. The LM78XX series of voltage regulators are designed for
positive input. For applications requiring negative input, the LM79XX series is used. Using a pair
of ‘voltage-divider’ resistors can increase the output voltage of a regulator circuit.

It is not possible to obtain a voltage lower than the stated rating. You cannot use a
12V regulator to make a 5V power supply. Voltage regulators are very robust. These can withstand
over-current draw due to short circuits and also over-heating. In both cases, the regulator will cut
off before any damage occurs. The only way to destroy a regulator is to apply reverse voltage to its
input. Reverse polarity destroys the regulator almost instantly. Fig: 3.3.11 shows voltage regulator.

Fig 3.3.11: Voltage Regulator

Resistors:

A resistor is a two-terminal electronic component that produces a voltage across its


terminals that is proportional to the electric current passing through it in accordance with Ohm's
law:
V = IR

Resistors are elements of electrical networks and electronic circuits and are ubiquitous in
most electronic equipment. Practical resistors can be made of various compounds and films, as
well as resistance wire (wire made of a high-resistivity alloy, such as nickel/chrome).

The primary characteristics of a resistor are the resistance, the tolerance, maximum
working voltage and the power rating. Other characteristics include temperature coefficient, noise,
and inductance. Less well-known is critical resistance, the value below which power dissipation
limits the maximum permitted current flow, and above which the limit is applied voltage. Critical
resistance is determined by the design, materials and dimensions of the resistor.

Resistors can be made to control the flow of current, to work as Voltage dividers, to
dissipate power and it can shape electrical waves when used in combination of other components.
Basic unit is ohms.

Theory of operation:

Ohm's law:

The behavior of an ideal resistor is dictated by the relationship specified in Ohm's


law:

V = IR

Ohm's law states that the voltage (V) across a resistor is proportional to the current
(I) through it where the constant of proportionality is the resistance (R).

Power dissipation:

The power dissipated by a resistor (or the equivalent resistance of a resistor


network) is calculated using the following:
Fig 3.3.12: Resistor Fig 3.3.13: Color Bands In Resistor

3.4. LED:

A light-emitting diode (LED) is a semiconductor light source. LED’s are used as


indicator lamps in many devices, and are increasingly used for lighting. Introduced as a practical
electronic component in 1962, early LED’s emitted low-intensity red light, but modern versions
are available across the visible, ultraviolet and infrared wavelengths, with very high brightness.
The internal structure and parts of a led are shown below.

Fig 3.4.1: Inside a LED Fig 3.4.2: Parts of a LED


Working:

The structure of the LED light is completely different than that of the light bulb.
Amazingly, the LED has a simple and strong structure. The light-emitting semiconductor material
is what determines the LED's color. The LED is based on the semiconductor diode.

When a diode is forward biased (switched on), electrons are able to recombine with
holes within the device, releasing energy in the form of photons. This effect is called
electroluminescence and the color of the light (corresponding to the energy of the photon) is
determined by the energy gap of the semiconductor. An LED is usually small in area (less than
1 mm2), and integrated optical components are used to shape its radiation pattern and assist in
reflection. LED’s present many advantages over incandescent light sources including lower energy
consumption, longer lifetime, improved robustness, smaller size, faster switching, and greater
durability and reliability. However, they are relatively expensive and require more precise current
and heat management than traditional light sources. Current LED products for general lighting are
more expensive to buy than fluorescent lamp sources of comparable output. They also enjoy use in
applications as diverse as replacements for traditional light sources in automotive lighting
(particularly indicators) and in traffic signals. The compact size of LED’s has allowed new text
and video displays and sensors to be developed, while their high switching rates are useful in
advanced communications technology. The electrical symbol and polarities of led are shown in fig:
3.4.3.

Fig 3.4.3: Electrical Symbol & Polarities of LED


LED lights have a variety of advantages over other light sources:

 High-levels of brightness and intensity


 High-efficiency

 Low-voltage and current requirements

 Low radiated heat

 High reliability (resistant to shock and vibration)

 No UV Rays

 Long source life

 Can be easily controlled and programmed

Applications of LED fall into three major categories:

 Visual signal application where the light goes more or less directly from the LED to the
human eye, to convey a message or meaning.
 Illumination where LED light is reflected from object to give visual response of these
objects.

 Generate light for measuring and interacting with processes that do not involve the human
visual system.

3.5: LDR

Photo resistor
Fig 3.5.1: The symbol for a photo resistor

Fig 3.5.2: Light Dependent Resistor


Fig 3.5.3: A light dependent resistor

The internal components of a photoelectric control for a typical American streetlight:

The photo resistor is facing rightwards, and controls whether current flows through the
heater which opens the main power contacts. At night, the heater cools, closing the power contacts,
energizing the street light. The heater/bimetal mechanism provides a built-in time-delay.

3.5.4 Description:

A photo resistor or light dependent resistor or cadmium sulfide (CdS) cell is a resistor
whose resistance decreases with increasing incident light intensity. It can also be referenced as a
photoconductor.

A photo resistor is made of a high resistance semiconductor. If light falling on the device is
of high enough frequency, photons absorbed by the semiconductor give bound electrons enough
energy to jump into the conduction band. The resulting free electron (and its hole partner) conduct
electricity, thereby lowering resistance.

A photoelectric device can be either intrinsic or extrinsic. An intrinsic semiconductor has its
own charge carriers and is not an efficient semiconductor, e.g. silicon. In intrinsic devices the only
available electrons are in the valence band, and hence the photon must have enough energy to
excite the electron across the entire band gap. Extrinsic devices have impurities, also called
dopants, and added whose ground state energy is closer to the conduction band; since the electrons
do not have as far to jump, lower energy photons (i.e., longer wavelengths and lower frequencies)
are sufficient to trigger the device. If a sample of silicon has some of its atoms replaced by
phosphorus atoms (impurities), there will be extra electrons available for conduction. This is an
example of an extrinsic semiconductor.

3.5.5: Applications:

Photo resistors come in many different types. Inexpensive cadmium sulfide cells can be
found in many consumer items such as camera light meters, street lights, clock radios, alarms, and
outdoor clocks. They are also used in some dynamic compressors together with a small
incandescent lamp or light emitting diode to control gain reduction.
Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light dependent resistor) are used
for the mid infrared spectral region. Ge:Cu photoconductors are among the best far-infrared
detectors available, and are used for infrared astronomy and infrared spectroscopy.

3.6 Solar Tracker with Invereter:

3.4 Solar cell/Plate

3.4.1 Introduction

A solar cell or photovoltaic cell is a device that converts solar energy into electricity by the
photovoltaic effect. Sometimes the term solar cell is reserved for devices intended specifically to
capture energy from sunlight, while the term photovoltaic cell is used when the source is
unspecified. Assemblies of cells are used to make solar panel, solar modules, or photovoltaic
arrays. Photovoltaic is the field of technology and research related to the application of solar cells
for solar energy.

Solar cell efficiencies vary from 6% for amorphous silicon-based solar cells to 40.7% with
multiple-junction research lab cells and 42.8% with multiple dies assembled into a hybrid package.
Solar cell energy conversion efficiencies for commercially available multicrystalline Si solar cells
are around 14-19%.

Solar cells can also be applied to other electronics devices to make it self-power sustainable in the
sun. There are solar cell phone chargers, solar bike light and solar camping lanterns that people
can adopt for daily use
Equivalent circuit of a solar cell

The equivalent circuit of a solar cell

The schematic symbol of a solar cell

1. Photons in sunlight hit the solar panel and are absorbed by semi conducting materials, such as
silicon.

2. Electrons (negatively charged) are knocked loose from their atoms, allowing them to flow
through the material to produce electricity. Due to the special composition of solar cells, only
allow the electrons to move in a single direction. The complementary positive charges that are also
created (like bubbles) are called holes and flow in the direction opposite of the electrons in a
silicon solar panel.
3. An array of solar panels converts solar energy into a usable amount of direct current (DC)
electricity.

3.4.2 Solar energy:

Solar energy, radiant light and heat from the sun, has been harnessed by humans since
ancient times using a range of ever-evolving technologies. Solar radiation, along with secondary
solar-powered resources such as wind and wave power, hydroelectricity and biomass, account for
most of the available renewable energy on earth Only a minuscule fraction of the available solar
energy is used.

Solar powered electrical generation relies on heat engines and photovoltaic. Solar energy's
uses are limited only by human ingenuity. A partial list of solar applications includes space heating
and cooling through solar architecture, potable water via distillation and disinfection, day lighting,
solar hot water, solar cooking, and high temperature process heat for industrial purposes. To
harvest the solar energy, the most common way is to use solar panels.

Solar technologies are broadly characterized as either passive solar or active solar
depending on the way they capture, convert and distribute solar energy. Active solar techniques
include the use of photovoltaic panels and solar thermal collectors to harness the energy. Passive
solar techniques include orienting a building to the Sun, selecting materials with favorable thermal
mass or light dispersing properties, and designing spaces that naturally circulate air.

The Earth receives 174 petawatts (PW) of incoming solar radiation (insolation) at the upper
atmosphere. Approximately 30% is reflected back to space while the rest is absorbed by clouds,
oceans and land masses. The spectrum of solar light at the Earth's surface is mostly spread across
the visible and near-infrared ranges with a small part in the near-ultraviolet.

Earth's land surface, oceans and atmosphere absorb solar radiation, and this raises their
temperature. Warm air containing evaporated water from the oceans rises, causing atmospheric
circulation or convection. When the air reaches a high altitude, where the temperature is low, water
vapor condenses into clouds, which rain onto the Earth's surface, completing the water cycle. The
latent heat of water condensation amplifies convection, producing atmospheric phenomena such as
wind, cyclones and anti-cyclones. Sunlight absorbed by the oceans and land masses keeps the
surface at an average temperature of 14 °C. By photosynthesis green plants convert solar energy
into chemical energy, which produces food, wood and the biomass from which fossil fuels are
derived.

The total solar energy absorbed by Earth's atmosphere, oceans and land masses is
approximately 3,850,000 exajoules (EJ) per year.[6] In 2002, this was more energy in one hour
than the world used in one year. Photosynthesis captures approximately 3,000 EJ per year in
biomass. The amount of solar energy reaching the surface of the planet is so vast that in one year it
is about twice as much as will ever be obtained from all of the Earth's non-renewable resources of
coal, oil, natural gas, and mined uranium combined.

From the table of resources it would appear that solar, wind or biomass would be sufficient
to supply all of our energy needs, however, the increased use of biomass has had a negative effect
on global warming and dramatically increased food prices by diverting forests and crops into
biofuel production. As intermittent resources, solar and wind raise other issues

Solar energy can be harnessed in different levels around the world. Depending on a
geographical location the closer to the equator the more "potential" solar energy is available. Solar
plate is a light sensitized steel backed polymer material used by artists as an alternative to
hazardous printing techniques. It is a simple, safer, and faster approach than traditional etching and
relief printing. It does not use grounds, acids or solvents. it is exposed with u.v. light (the sun) and
developed with ordinary tap water.

Fig: 3.4.3 Solar cell/ plate


The opaque materials in the form of non-water based pigments, or...
it may be utilized by exposing the plate through a transparent film with
artwork on it. The film may be created by drawing on acetate, photocopying
or scanning and printing on film, or darkroom techniques with kodalith.
a positive transparency is for printing as an etching; a negative
transparency is for printing a relief impression.

Photovoltaic (PV) cells utilize semiconductor technology to convert solar radiation


directly into an electric current which can be used immediately or stored for future use. PV cells
are often grouped in the form of “modules” to produce arrays which have the capability to produce
power for orbiting satellites and other spacecraft. Recently, with the continual decline of
manufacturing costs (declining 3% to 5% per year in recent years), uses of PV technology have
grown to include home power generation, and grid-connected electricity generation. Installations
of PV systems have also been increasing due in large part to comprehensive incentive programs
which help reduce the costs of these systems and also allow users to sell excess electricity back to
the public grid (feed-in).

Solar panels generate electricity using the same principles of electronics as chemical
batteries or standard electrical outlets. With solar panels, it's all about the free flow of electrons
through a circuit.

Evacuated heat pipe tubes are designed such that convection and heat loss are eliminated,
where as Flat-plate solar panels contain an air gap between absorber and cover plate which allows
heat loss to occur. Further, thermal heat pipe systems are capable of limiting the maximum
working temperature, where as Flat-plate systems have no internal method of limiting heat buildup
which can cause system failure. Finally, evacuated heat pipe systems are lightweight, easy to
install and require minimal maintenance. Flat-plate systems, on the other hand, are difficult to
install and maintain, and must be completely replaced should one part of the system stop working.

To understand how solar panels generate electrical power, it might help to take a quick trip back to
high school chemistry class. The basic element of solar panels is the same element that helped
create the computer revolution -- pure silicon. When silicon is stripped of all impurities, it makes a
ideal neutral platform for the transmission of electrons. Silicon also has some atomic-level
properties which make it even more attractive for the creation of solar panels.
 This cement helps to prevent the panel from becoming too hot, though solarenergypanels
can still overheat. Silicon solarenergypanels are constructed differently than crystalline
solarenergypanels.
 While years of free energy and decreased dependence on fossil fuels may sound great, no
examination of solarenergy pros and cons is complete without a look at the price, which is
considered the largest barrier to conversion to solarenergy use. Solarenergypanelsand
cells are very costly, and several may be required to power a home, business, or vehicle.

3.4.4 Advantages:

1. Solar energy is free of pollution.


2. The plant requires little maintenance or help after setup.

3. It is economical.

4. When it is connected to the grid, solar energy can overtake the highest cost electricity at
peak demand and can also reduce grid loading, apart from getting rid of the need for local
battery power in darkness.

3.4.5 Disadvantages:

1. It is available only by day and not when the sky is cloudy, thereby reducing the chances of
it being totally reliable and requiring storage facilities.
2. It needs a backup power plant to be kept hot and to replace solar power stations as they
stop producing energy.

3. Keeping backup plants hot includes an energy cost which includes coal burning.

4. Places located at high altitudes or those that are often cloudy are not targets for solar power
use.

5. It can only be used to power transport vehicles by converting energy into another form of
energy and recurring an energy penalty.

6. Solar cell technologies produce DC power which needs to be converted to AC power,


incurring an energy penalty.
Solar energy can be used to generate electricity using photovoltaic solar cells and
concentrated solar power, apart from other means. You can use solar power in the house for
domestic use.

3.4.6 Applications of solar technology:

Average insulation showing land area (small black dots) required to replace the world
primary energy supply with solar electricity. 18 TW is 568 Exajoule (EJ) per year. Insulation for
most people is from 150 to 300 W/m² or 3.5 to 7.0 kWh/m²/day.

Solar energy refers primarily to the use of solar radiation for practical ends. However, all
renewable energies, other than geothermal and tidal, derive their energy from the sun.

Solar technologies are broadly characterized as either passive or active depending on the
way they capture, convert and distribute sunlight. Active solar techniques use photovoltaic panels,
pumps, and fans to convert sunlight into useful outputs. Passive solar techniques include selecting
materials with favorable thermal properties, designing spaces that naturally circulate air, and
referencing the position of a building to the Sun. Active solar technologies increase the supply of
energy and are considered supply side technologies, while passive solar technologies reduce the
need for alternate resources and are generally considered demand side technologies

Solar cells can also be applied to other electronics devices to make it self-power sustainable in the
sun. There are solar cell phone chargers, solar bike light and solar camping lanterns that people
can adopt for daily use.

Solar power plants can face high installation costs, although this has been decreasing due to the
learning curve. Developing countries have started to build solar power plants, replacing other
sources of energy generation.

3.5 INVERTER DRIVER


3.5.1 MOSFET:

The metal–oxide–semiconductor field-effect transistor (MOSFET, MOS-FET, or


MOS FET) is a transistor used for amplifying or switching electronic signals. Although the
MOSFET is a four-terminal device with source (S), gate (G), drain (D), and body (B) terminals, [1]
the body (or substrate) of the MOSFET often is connected to the source terminal, making it a
three-terminal device like other field-effect transistors. When two terminals are connected to each
other (short-circuited) only three terminals appear in electrical diagrams. The MOSFET is by far
the most common transistor in both digital and analog circuits, though the bipolar junction
transistor was at one time much more common.

In enhancement mode MOSFETs, a voltage drop across the oxide induces a conducting
channel between the source and drain contacts via the field effect. The term "enhancement mode"
refers to the increase of conductivity with increase in oxide field that adds carriers to the channel,
also referred to as the inversion layer. The channel can contain electrons (called an nMOSFET or
nMOS), or holes (called a pMOSFET or pMOS), opposite in type to the substrate, so nMOS is
made with a p-type substrate, and pMOS with an n-type substrate (see article on semiconductor
devices). In the less common depletion mode MOSFET, described further later on, the channel
consists of carriers in a surface impurity layer of opposite type to the substrate, and conductivity is
decreased by application of a field that depletes carriers from this surface layer.

The 'metal' in the name MOSFET is now often a misnomer because the previously metal
gate material is now often a layer of polysilicon (polycrystalline silicon). Aluminium had been the
gate material until the mid 1970s, when polysilicon became dominant, due to its capability to form
self-aligned gates. Metallic gates are regaining popularity, since it is difficult to increase the speed
of operation of transistors without metal gates.

Likewise, the 'oxide' in the name can be a misnomer, as different dielectric materials are
used with the aim of obtaining strong channels with applied smaller voltages.

An insulated-gate field-effect transistor or IGFET is a related term almost synonymous with


MOSFET. The term may be more inclusive, since many "MOSFETs" use a gate that is not metal,
and a gate insulator that is not oxide. Another synonym is MISFET for metal–insulator–
semiconductor FET.

A variety of symbols are used for the MOSFET. The basic design is generally a line for the
channel with the source and drain leaving it at right angles and then bending back at right angles
into the same direction as the channel. Sometimes three line segments are used for enhancement
mode and a solid line for depletion mode. Another line is drawn parallel to the channel for the
gate.

The bulk connection, if shown, is shown connected to the back of the channel with an arrow
indicating PMOS or NMOS. Arrows always point from P to N, so an NMOS (N-channel in P-well
or P-substrate) has the arrow pointing in (from the bulk to the channel). If the bulk is connected to
the source (as is generally the case with discrete devices) it is sometimes angled to meet up with
the source leaving the transistor. If the bulk is not shown (as is often the case in IC design as they
are generally common bulk) an inversion symbol is sometimes used to indicate PMOS,
alternatively an arrow on the source may be used in the same way as for bipolar transistors (out for
nMOS, in for pMOS).

Comparison of enhancement-mode and depletion-mode MOSFET symbols, along with JFET


symbols (drawn with source and drain ordered such that higher voltages appear higher on the page
than lower voltages):

For the symbols in which the bulk, or body, terminal is shown, it is here shown internally
connected to the source. This is a typical configuration, but by no means the only important
configuration. In general, the MOSFET is a four-terminal device, and in integrated circuits many
of the MOSFETs share a body connection, not necessarily connected to the source terminals of all
the transistors.

3.6 PUSH BUTTON/ CONTROL SWITCH:

A push-button (also spelled pushbutton) (press-button in the UK) or simply button is a simple
switch mechanism for controlling some aspect of a machine or a process. Buttons are typically
made out of hard material, usually plastic or metal. The surface is usually flat or shaped to
accommodate the human finger or hand, so as to be easily depressed or pushed. Buttons are most
often biased switches, though even many un-biased buttons (due to their physical nature) require a
spring to return to their un-pushed state. Different people use different terms for the "pushing" of
the button, such as press, depress, mash, and punch.

Uses:

The "push-button" has been utilized in calculators, push-button telephones, kitchen


appliances, and various other mechanical and electronic devices, home and commercial.

In industrial and commercial applications, push buttons can be linked together by a mechanical
linkage so that the act of pushing one button causes the other button to be released. In this way, a
stop button can "force" a start button to be released. This method of linkage is used in simple
manual operations in which the machine or process have no electrical circuits for control.

Pushbuttons are often color-coded to associate them with their function so that the operator
will not push the wrong button in error. Commonly used colors are red for stopping the machine or
process and green for starting the machine or process.

Red pushbuttons can also have large heads (called mushroom heads) for easy operation and
to facilitate the stopping of a machine. These pushbuttons are called emergency stop buttons and
are mandated by the electrical code in many jurisdictions for increased safety. This large
mushroom shape can also be found in buttons for use with operators who need to wear gloves for
their work and could not actuate a regular flush-mounted push button. As an aid for operators and
users in industrial or commercial applications, a pilot light is commonly added to draw the
attention of the user and to provide feedback if the button is pushed. Typically this light is included
into the center of the pushbutton and a lens replaces the pushbutton hard center disk. The source of
the energy to illuminate the light is not directly tied to the contacts on the back of the pushbutton
but to the action the pushbutton controls. In this way a start button when pushed will cause the
process or machine operation to be started and a secondary contact designed into the operation or
process will close to turn on the pilot light and signify the action of pushing the button caused the
resultant process or action to start.

In popular culture, the phrase "the button" (sometimes capitalized) refers to a (usually
fictional) button that a military or government leader could press to launch nuclear weapons.

A Load control switch is a remotely controlled relay that is placed on home appliances
which consume large amounts of electricity, such as air conditioner units and electric water
heaters.

Most load control switches consist of a communication module and the relay switch and
can be used as part of a demand response energy efficiency system such as a smart grid. Such a
switch operates similarly to a pager, receiving signals from the power company or electrical
frequency shift to turn off or reduce power to the appliance during times of peak electrical
demand. Usually, the device has a timer that will automatically reset the switch back on after a
preset time. Some operation intolerant appliances, such as dryers, use switches that can reduce or
shut off power to their heating coils yet still tumble until signaled to resume full power.

We set out to build a solar tracker:


THE SENSING ELEMENT AND SIGNAL PROCESSING
Many different methods have been proposed and used to track the position of the sun. The simplest
of all uses an LDR – a Light Dependent Resistor to detect light intensity changes on the surface of
the resistor. Other methods, such as that published by Jeff Damm in ‘Home Power’ [8], use two
Photo transistors covered with a small plate to act as a shield to sunlight, as shown in Fig. 1.

Fig. 1 Alternative solar tracking method When morning arrives, the tracker is in state A from the
previous day. The left phototransistor is turned on, causing a signal to turn the motor continuously
until the shadow from the plate returns the tracker to state B. As the day slowly progresses, state C
is reached shortly, turning on the right phototransistor. The motor turns until state B is reached
again, and the cycle continues until the end of the day, or until the minimum detectable light level
is reached.

The tracker uses two Nema 23 bipolar stepper motors to rotate 2 photovoltaic cells around the
altitude and azimuth axes. We have three tracking algorithms to track the sun. The first moves the
PV panel in little squares in spherical coordinates, finds the point on the square with the best
voltage, and moves there, then starts over. The second moves in a little square, finds the voltage
gradient, and uses that to decide where to move. The third uses the second strategy to find 5 or 6
good points spread 1hour apart, uses a multivariable, nonlinear, least-squares fit to find its latitude,
the day of the year, the time of day, and then predicts where the sun will be next. It will use this
equation for a few repositions, and then check to make sure it’s right using the second algorithm.
In moving the PV panel, our stepper motors ramp up to speed in order to prevent overshoot and
jerk/rattling.

To prevent the stepper motors from rattling around and drawing current when not being sent a
signal; we use two relays to cut their current. The buttons of the STK500 allow the user to calibrate the
tracker and choose the tracking algorithm.

The stepper motors we obtained are NEMA size 23 with 200 steps per revolution, or 200 steps per
360 degrees. For the azimuth stepper motor, we used a gear ratio of 48:10 to decrease the motion
ratio to 960 steps per revolution. For the altitude stepper motor, we used a gear ratio of 4:1 to
decrease the motion ratio to 800 steps per revolution. However, these super high motion ratios
were only necessary to produce enough torque to move the heavy solar panels, and the backlash in
our gears was large enough so that we only stepped the motors in 4 step increments (making it
240steps per revolution for the azimuth and 200 steps per revolution for the altitude). The different
gear problems were no problem initially, but made some of the later math something of a pain with
all the conversions. For those fuzzy on their conservation of energy P=Tw.

Where P is power, T is torque, and w is angular velocity. So for constant power from the stepper
motor, a gear ratio of 4 caused the angular velocity to decrease by a factor of 4, and thus the torque
to increase by a factor of 4. This change in torque was true for both the holding torque and the
transient torque of the stepper motors (the holding torque is the torque necessary to break the
stepper lose when no voltage is being applied, the transient torque is the torque being applied
while the stepper is moving). From a high-level perspective, the design is very simple. The
microcontroller has two inputs; the buttons and the ADC. There are only two outputs; to control
each motor. The interface functions as follows:

(1) Turn it on.


(2) Press a button to calibrate… wait for this to complete.
(3) Press a button to choose a tracking mode. From now on, no button input is accepted.
(4) The device will then enter its main loop, running the tracking mode over and over.
The three tracking modes are designed to reuse as much code as possible. Each is built on Move
Circle(), Move Step(), Record Data(), and Reposition(). This is covered in more detail below, but
this is a basic overview. The simplest tracking mode (TrackE) simply runs Move Circle() and
Reposition()s to the best point repeatedly. TrackD does the same thing, but tries to calculate things
a little bit more intelligently. TrackC, on the other hand, is an entirely different beast. First, it uses
TrackD() to gather good data, then extrapolates the sun’s path, and manually moves the solar
tracker itself. It also takes about eight hours to run.

Hardware/Software Tradeoffs
We had to make some compromises in our design to make things work properly. For example, the
relays are there because the motors grind (but don’t move) when received “no” signal from the
microcontroller.
Additionally, we were not able to run the motors as fast as we’d like, simply because the software
can’t keep up. Another factor in this is that the PV panels take a few milliseconds to respond, as is
discussed later.
We also had to try not to move the motors too quickly, as they have a tendency to rattle and move
unpredictably. So, we had to add in a fairly significant amount of code to support variable speeds
and acceleration.
Hardware Details
The hardware design in our circuit consisted of three main portions: the driver circuitry for the
stepper motors, the relay circuitry, and the voltage control circuitry. The stepper motors are
complex electromotive devices that require precise timing control (such that the current is pushed
and pulled through the two internal coils of the stepper motor at the precise time to drive the motor
in the correct direction. Since we were unsure how much torque would be required to move the PV
panels we opted on 2 separate 2A 12VDC stepper motors. The immediate concern was how to
drive the stepper motors. Luckily, there are prepackaged devices that take in much simpler signals
and take care of the driving signals for the stepper motors. For our stepper motor drivers we chose
the LMD18245 which have the capability of producing a signal with enough driving force to
accommodate up to 55VDC at 3A (more than enough for our stepper motors). The driver
circuitries for the motors were much more complex than I’m used to so our circuitry for that
consisted of an exact replica of the recommended circuit provided in the data sheet. A copy of this
schematic can be found in the Appendix.

After setting up the stepper motors we found out that the stepper motors would not run. After
multiple hours spent debugging we found out that the 2 additional wires on the stepper motor,
which were supposed to be used for half stepping the motor (a feature we didn’t need so we
ignored) needed to be connected for the motor to operate. Then after getting the motors to step
properly we found that when we were not giving the drivers any driving signals (when we didn’t
want it to move) on occasion the motor would continue to produce a very irritating humming
noise. We found out that the 2 additional wires on the stepper motor when disconnected would
stop the noise (possible a result of inductive coupling between the two coils causing resonating).
Regardless, the noise was irritating and was undoubtedly sucking up power so we needed a
solution. I sampled two automotive relays from Tyco Electronics and applied 12V to one side of
the switching terminals and connected the other half to the Drain of a MOSFET. I connected the
source to ground and hooked the gate up to an output pin of the MCU. The relays I procured
allowed for a constant connection between 2 terminals when off and that connection to be broken
when power was applied. Thus whenever the MCU drove the gate of the MOSFET high it would
provide a path to ground for the relay causing it to break the connection between the two wires
attached to its terminals. Thus, I had a way to keep the 2 half-step wires connected while stepping
but to disconnect them when staying stationary through the use of only one additional port pin.
This circuitry is available in the Appendix.
Lastly was the voltage control circuitry. This was pretty simple in that it used the fact that there is
a voltage regulator on the STK-500. Ideally the STK-500 is supposed to be powered with 9VDC
but here we have 12-15V powering the stepper motor drivers and some 12V-5V-voltage regulators
that I had sampled at the beginning of the project. I decided that it would suffice to apply 10V to
the STK 500 and so I connected two 5V regulators in series to produce the 10V.

Speed of execution
The user can program in different values for different accuracies in the curve fitting algorithm, and
different radii for the circle in TrackD() and TrackE() to achieve different tracking speed levels if
so desired. However, the fact remains that the sun moves pretty slow, and so as long as none of the
algorithms take more than about an hour to work, there shouldn’t be any trouble. As for the speed
that everything actually moves at, as discussed above, we accelerated the stepper motors wherever
we could to make the calibration function and reposition functions happen as fast as possible, but
this was mainly because we were tired of waiting for them to finish during debugging and because
we thought that making them accelerate would look and sound cool (it does). The addition of
acceleration also stopped the solar tracker from vibrating so much, because the mass of the PV
panels was slowly ramped up to speed, instead of just stopped and started from full speed

Design Safety
There are essentially three features of our design that are designed for safety. First, the wires are
fairly securely taped together, so that they don’t get caught in the stepper motor gears. The other
features are software-based. We keep track of the solar panels’ position, and prevent them from
going too far in any direction. This means that they won’t hit the frame, or pull the wires too far.
We also added a feature to make the motors accelerate up to full speed, which reduces the amount
of rattling and possibility for damage.

Analysis of Design
We ended up being pretty satisfied with our end result. The tracker follows light fairly well in its
different modes. It avoids breaking the PV panels or pulling the wires out by having motion limits.
It gradually accelerates from 0 to a max speed and then down again without out any overshoot or
slippage. It uses transistors and relays to prevent the stepper motors from vibrating and making
unnecessary noise when not in use. It would have been better if the tracker was self powering, but
given the difficulty in such a task, we accept the failure easily. As it is, it is necessary to level the
solar panel and point the altitude stepper motor due south before calibration; if we could do it
again, it would be cool to have an integrated compass and inclination sensor so that this could be
done automatically during calibration. It would also have been interesting to program TrackC() to
work for more than a day at a time; at the end of the day it could move to the best position for
when the sun rises the next morning, but this is pretty trivial.

3.7: LCD DISPLAY

LCD Background:

One of the most common devices attached to a micro controller is an LCD display. Some of the
most common LCD’s connected to the many microcontrollers are 16x2 and 20x2 displays. This
means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.

Basic 16x 2 Characters LCD

Figure 1: LCD 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 Microcontroller


The LCD 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.
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.
SETB RW

Handling the EN control line:

As we mentioned above, the EN line is used to tell the LCD that we are ready for it to
execute an instruction that we've prepared on the data bus and on the other control lines. Note that
the EN line must be raised/ lowered before/after each instruction sent to the LCD regardless of
whether that instruction is read or write text or instruction. In short, we must always manipulate
EN when communicating with the LCD. EN is the LCD's way of knowing that we are talking to it.
If we don't raise/lower EN, the LCD doesn't know we're talking to it on the other lines.

Thus, before we interact in any way with the LCD we will always bring the EN line low
with the following instruction:

CLR EN

And once we've finished setting up our instruction with the other control lines and data bus
lines, we'll always bring this line high:

SETB EN

The line must be left high for the amount of time required by the LCD as specified in its
datasheet. This is normally on the order of about 250 nanoseconds, but checks the datasheet. In the
case of a typical microcontroller running at 12 MHz, an instruction requires 1.08 microseconds to
execute so the EN line can be brought low the very next instruction. However, faster
microcontrollers (such as the DS89C420 which executes an instruction in 90 nanoseconds given
an 11.0592 MHz crystal) will require a number of NOPs to create a delay while EN is held high.
The number of NOPs that must be inserted depends on the microcontroller we are using and the
crystal we have selected.

The instruction is executed by the LCD at the moment the EN line is brought low with a
final CLR EN instruction.

Checking the busy status of the LCD:


As previously mentioned, it takes a certain amount of time for each instruction to be
executed by the LCD. The delay varies depending on the frequency of the crystal attached to the
oscillator input of the LCD as well as the instruction which is being executed.

While it is possible to write code that waits for a specific amount of time to allow the LCD to
execute instructions, this method of "waiting" is not very flexible. If the crystal frequency is
changed, the software will need to be modified. A more robust method of programming is to use
the "Get LCD Status" command to determine whether the LCD is still busy executing the last
instruction received.

The "Get LCD Status" command will return to us two tidbits of information; the
information that is useful to us right now is found in DB7. In summary, when we issue the "Get
LCD Status" command the LCD will immediately raise DB7 if it's still busy executing a command
or lower DB7 to indicate that the LCD is no longer occupied. Thus our program can query the
LCD until DB7 goes low, indicating the LCD is no longer busy. At that point we are free to
continue and send the next command.

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.

3.8 D.C. Motor:

A dc motor uses electrical energy to produce mechanical energy, very typically


through the interaction of magnetic fields and current-carrying conductors. The reverse process,
producing electrical energy from mechanical energy, is accomplished by
an alternator, generator or dynamo. Many types of electric motors can be run as generators, and
vice versa. 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 stationary
part that includes coils of wire called the field coils. The stationary part is also called the stator.
Figure shows a picture of a typical DC motor, Figure shows a picture of a DC armature, and Fig
shows a picture of a typical stator. From the picture you can see the armature is made of coils of
wire wrapped around the core, and the core has an extended shaft that rotates on bearings. You
should also notice that the ends of each coil of wire on the armature are terminated at one end of
the armature. The termination points are called the commutator, and this is where the 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 shows an electrical diagram of a
simple DC motor. Notice that the DC voltage is applied directly to the field winding and the
brushes. The armature and the field are both shown as a coil of wire. In later 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 through the field coil from the
negative terminal to the positive terminal. This sets up a strong magnetic field in the field winding.
Current also begins to flow through the brushes into a commutator segment and then through an
armature coil. The current continues 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 flowing 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 unlike magnetic poles attracting each other and the like magnetic poles
repelling each other. As the armature begins to rotate, the commutator segments will also begin to
move under the brushes. As an individual commutator segment moves under the brush connected
to positive voltage, it will become positive, and when it moves under a brush connected to
negative voltage it will become negative. In this way, the commutator segments continually
change polarity from positive to negative. Since the commutator segments are connected to the
ends of the wires that make up the field winding in the armature, it causes the magnetic field in the
armature to change polarity continually from north pole to south pole. The commutator segments
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
action is timed so that the armature will not lock up magnetically with the field. Instead 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 the armature and
the field winding will quickly diminish and the armature shaft's speed will begin to drop to zero. If
voltage is applied to the motor again, the magnetic fields will strengthen and the armature will
begin to rotate again.
PARAMETRS OF THE DC MOTORS

1. Direction of rotation
2. Motor Speed

3. Motor Torque

4. Motor Start and Stop

Direction of Rotation

A DC Motor has two wires. We can call them the positive terminal and the negative terminal,
although these are pretty much arbitrary names (unlike a battery where these polarities are vital
and not to be mixed!). On a motor, we say that when the + wire is connected to + terminal on a
power source, and the - wire is connected to the - terminal source on the same power source, the
motor rotates clockwise (if you are looking towards the motor shaft). If you reverse the wire
polarities so that each wire is connected to the opposing power supply terminal, then the motor
rotates counter clockwise. Notice this is just an arbitrary selection and that some motor
manufacturers could easily choose the opposing convention. As long as you know what rotation
you get with one polarity, you can always connect in such a fashion that you get the direction that
you want on a per polarity basis.
DC Motor Rotation vs Polarity

Facts:
 DC Motor rotation has nothing to do with the voltage magnitude or the current magnitude
flowing through the motor.
 DC Motor rotation does have to do with the voltage polarity and the direction of the current
flow.

DC Motor Speed

Whereas the voltage polarity controls DC motor rotation, voltage magnitude controls motor speed.
Think of the voltage applied as a facilitator for the strengthening of the magnetic field. In other
words, the higher the voltage, the quicker will the magnetic field become strong. Remember that a
DC motor has an electromagnet and a series of permanent magnets. The applied voltage generates
a magnetic field on the electromagnet portion. This electromagnet field is made to oppose the
permanent magnet field. If the electromagnet field is very strong, then both magnetic entities will
try to repel each other from one side, as well as atract each other from the other side. The stronger
the induced magnetic field, the quicker will this separation/attaction will try to take place. As a
result, motor speed is directly proportional to applied voltage.

Motor Speed Curve

One aspect to have in mind is that the motor speed is not entirely lineal. Each motor will have
their own voltage/speed curve. One thing I can guarantee from each motor is that at very low
voltages, the motor will simply not move. This is because the magnetic field strength is not enough
to overcome friction. Once friction is overcome, motor speed will start to increase as voltage
increase.

The following video shows the concept of speed control and offers some ideas on how this can be
achieved.

Motor Torque

In the previous segment I kind of described speed as having to do with the strength of the magnetic
field, but this is in reality misleading. Speed has to do with how fast the magnetic field is built and
the attraction/repel forces are installed into the two magnetic structures. Motor strength, on the
other hand, has to do with magnetic field strength. The stronger the electromagnet attracts the
permanent magnet, the more force is exerted on the motor load.

Per example, imagine a motor trying to lift 10 pounds of weight. This is a force that when
multiplied by a distance (how much from the ground we are lifting the load) results in WORK.
This WORK when exerted through a predetermined amount of time (for how long we are lifting
the weight) gives us power. But whatever power came in, must come out as energy can not be
created or destroyed. So that you know, the power that we are supplying to the motor is computed
by

P = IV

Where P is power, I is motor current and V is motor voltage

Hence, if the voltage (motor speed) is maintained constant, how much load we are moving must
come from the current. As you increase load (or torque requirements) current must also increase.
Motor Loading

One aspect about DC motors which we must not forget is that loading or increase of torque
can not be infinite as there is a point in which the motor simply can not move. When this happens,
we call this loading “Stalling Torque”. At the same time this is the maximum amount of current the
motor will see, and it is refer to Stalling Current. Stalling deserves a full chapter as this is a very
important scenario that will define a great deal of the controller to be used. I promise I will later
write a post on stalling and its intricacies.

Motor Start and Stop

You are already well versed on how to control the motor speed, the motor torque and the
motor direction of rotation. But this is all fine and dandy as long as the motor is actually moving.
How about starting it and stopping it? Are these trivial matters? Can we just ignore them or should
we be careful about these aspects as well? You bet we should!

Starting a motor is a very hazardous moment for the system. Since you have an inductance
whose energy storage capacity is basically empty, the motor will first act as an inductor. In a sense,
it should not worry us too much because current can not change abruptly in an inductor, but the
truth of the matter is that this is one of the instances in which you will see the highest currents
flowing into the motor. The start is not necessarily bad for the motor itself as in fact the motor can
easily take this Inrush Current. The power stage, on the other hand and if not properly designed
for, may take a beating.
Once the motor has started, the motor current will go down from inrush levels to whatever
load the motor is at. Per example, if the motor is moving a few gears, current will be proportional
to that load and according to torque/current curves.

Stopping the motor is not as harsh as starting. In fact, stopping is pretty much a breeze.
What we do need to concern ourselves is with how we want the motor to stop. Do we want it to
coast down as energy is spent in the loop, or do we want the rotor to stop as fast as possible? If the
later is the option, then we need braking. Braking is easily accomplished by shorting the motor
outputs. The reason why the motor stops so fast is because as a short is applied to the motor
terminals, the Back EMF is shorted. Because Back EMF is directly proportional to speed, making
Back EMF = 0, also means making speed = 0.

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 chasing each other. The DC motor has magnetic poles and an armature, to which DC
electricity is fed, The Magnetic Poles are electromagnets, and when they are energized, they
produce a strong magnetic field around them, and the armature which is given power with a
commutator, constantly 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 windings, connected to a
commutator at the end of the shaft that are in constant touch with carbon brushes. The brushes are
static, and the commutator rotate 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 usually 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. Therefore any amount of power
drawn by the armature will be passed thru the field. As a result you cannot start a Series DC Motor
without any load attached to it. It will either run uncontrollably in full speed, or it will stop.

Fig: Diagram of DC series motor graph representation

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

3. DC Compound Motor:

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

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

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

DC Motor Driver:

The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed
to provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is
designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V.
Both devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar
stepping motors, as well as other high-current/high-voltage loads in positive-supply applications.
All inputs are TTL compatible. Each output is a complete totem-pole drive circuit, with a
Darlington transistor sink and a pseudo-Darlington source. Drivers are enabled in pairs, with
drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN.When an enable input is
high, the associated 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 proper data inputs, each pair of drivers forms a full-H (or bridge)
reversible drive suitable for solenoid or motor applications. On the L293, external high-speed
output clamp diodes should be used for inductive transient suppression. A VCC1 terminal, separate
from VCC2, is provided for the logic inputs to minimize device power dissipation. 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

MOTORDRIVER CIRCUIT (h bridge)

The name "H-Bridge" is derived from the actual shape of the switching circuit which control the
motoion of the motor. It is also known as "Full Bridge". Basically there are four switching
elements in the H-Bridge as shown in the figure below.
As you can see in the figure above there are four switching elements named as "High side left",
"High side right", "Low side right", "Low side left". When these switches are turned on in pairs
motor changes its direction accordingly. Like, if we switch on High side left and Low side right
then motor rotate in forward direction, as current flows from Power supply through the motor coil
goes to ground via switch low side right. This is shown in the figure below.
Similarly, when you switch on low side left and high side right, the current flows in opposite
direction and motor rotates in backward direction. This is the basic working of H-Bridge. We can
also make a small truth table according to the switching of H-Bridge explained above.

Truth Table
High Left High Right Low Left Low Right Description
On Off Off On Motor runs clockwise
Off On On Off Motor runs anti-clockwise
On On Off Off Motor stops or decelerates
Off Off On On Motor stops or decelerates

As already said, H-bridge can be made with the help of transistors as well as MOSFETs, the only
thing is the power handling capacity of the circuit. If motors are needed to run with high current
then lot of dissipation is there. So head sinks are needed to cool the circuit.

Now you might be thinking why i did not discuss the cases like High side left on and Low side left
on or high side right on and low side right on. Clearly seen in the diagram, you don't want to burn
your power supply by shorting them. So that is why those combinations are not discussed in the
truth table.
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 property to deliver more power when they are loaded more. So the
more the people get on a train, the more powerful the train becomes.

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

3. PC Fans, CD ROM Drives, and Hard Drives: All these things need motors, very miniature
motors, with great precision. AC motors can never imagine any application in these places.

4. Starter Motors in Automobiles: An automobile battery supplies DC, so a DC motor is best suited
here. Also, you cannot start an engine with a small sized AC motor,

5. Electrical Machines Lab in Colleges.

WiFi module:

Wifi, is a mechanism for wirelessly connecting electronic devices. A device enabled with

Ethernet, such as a personal computer, video game console, smart phone, or digital audio player,

can connect to the Internet via a wireless network access point. An access point (or hotspot) has a

range of about 20 meters (65 ft) indoors and a greater range outdoors. Multiple overlapping access

points can cover large areas.

A Ethernet enabled device such as a PC, video game console, mobile phone, MP3 player or

PDA can connect to the Internet when within range of a wireless network connected to the

Internet. The coverage of one or more interconnected access points — called a hotspot — can

comprise an area as small as a single room with wireless-opaque walls or as large as many square

miles covered by overlapping access points. "Ethernet" is a trademark of the Ethernet Alliance and

the brand name for products using the IEEE 802.11 family of standards. Ethernet is used by over
700 million people. There are over four million hotspots (places with Ethernet Internet

connectivity) around the world, and about 800 million new Ethernet devices are sold every year.

Ethernet products that complete Ethernet Alliance interoperability certification testing successfully

may use the "Ethernet CERTIFIED" designation and trademark.

3.9 History:

The name of a popular wireless networking technology that uses radio waves to provide

wireless high-speed Internet and network connections. The Ethernet Alliance, the organization that

owns the Ethernet (registered trademark) term specifically defines Ethernet as any "wireless local

area network (WLAN) products that are based on the Institute of Electrical and Electronics

Engineers' (IEEE) 802.11 standards."

WiFi is a popular term that is used referring to wireless communications between

computers and other computer related devices. Regular radio waves are use to broadcast and

receive just like a pair of walkie talkies, but on a much higher frequency.

These days you will find many areas around town that offer free WiFi internet access, but

the most common use for WiFi is in the home. If you have high speed Internet (DSL, Cable,

Satellite, etc) and have a piece of equipment that is called a wireless router, then you have WiFi.

Initially, Ethernet was used in place of only the 2.4GHz 802.11b standard, however the

Ethernet Alliance has expanded the generic use of the Ethernet term to include any type of network

or WLAN product based on any of the 802.11 standards, including 802.11b, 802.11a, dual-band,

and so on, in an attempt to stop confusion about wireless LAN interoperability.


Ethernet works with no physical wired connection between sender and receiver by using

radio frequency (RF) technology, a frequency within the electromagnetic spectrum associated with

radio wave propagation. When an RF current is supplied to an antenna, an electromagnetic field is

created that then is able to propagate through space. The cornerstone of any wireless network is an

access point (AP). The primary job of an access point is to broadcast a wireless signal that

computers can detect and "tune" into. In order to connect to an access point and join a wireless

network, computers and devices must be equipped with wireless network adapters.

Ethernet is supported by many applications and devices including video game consoles,

home networks, PDAs, mobile phones, major operating systems, and other types of consumer

electronics. Any products that are tested and approved as "Ethernet Certified" (a registered

trademark) by the Ethernet Alliance are certified as interoperable with each other, even if they are

from different manufacturers. For example, a user with a Ethernet Certified product can use any

brand of access point with any other brand of client hardware that also is also "Ethernet Certified".

Products that pass this certification are required to carry an identifying seal on their packaging that

states "Ethernet Certified" and indicates the radio frequency band used (2.5GHz for 802.11b,

802.11g, or 802.11n, and 5GHz for 802.11a).


In the illustration above you will see what equipment is used in a typical home WiFi

network. In some cases an Internet service provider will supply a wireless router/modem

combination when you subscribe to their service.

The main benefit of WiFi is cordless internet access. Many electronic devices have WiFi

built-in and can access the internet anywhere within range of your wireless router. This means that

while using a WiFi laptop computer you can browse the internet from your couch. If you own a

WiFi Internet Radio you can listen to over 14,000 stations in your bedroom, kitchen, or bathroom.

Some cell phones have WiFi internet access also.

An electronic device cannot communicate with a WiFi router unless it has a WiFi

receiver/transmitter (otherwise called a WiFi card or module) built-in. Most newer laptops have a

built-in WiFi card which can communicate with nearby wireless routers. If your computer does not

have built-in WiFi then you can purchase a USB WiFi Antenna for it. Modern USB WiFi

antennas can be connected to almost any computer to enable or improve WiFi communication.

WiFi works using two-way communication between devices. For example: When you type

"CCrane" into the Google search bar and press "Go", you are sending a request from your

computer to your router using WiFi. The router uses it's WiFi to receive your request and forward

it over the internet to Google. When Google replies, they send you the results of your request back

over the internet to your router. Your router then forwards the results via WiFi back to your laptop

computer. In this scenario the use of WiFi communication takes place only between your computer

and the router.

There are several different types of WiFi, but the end result is still the same, wireless

communication. In the technical world WiFi is translated to 802.11, which is a group of standards
created by the Institute of Electrical and Electronics Engineers (IEEE). Listed below are several

different types of WiFi.

A common misconception is that the term Ethernet is short for "wireless fidelity," however

this is not the case. Ethernet is simply a trademarked term meaning IEEE 802.11x.

The fast paced technology has changed the world as well as its habitants. In Today’s global

village there is no need to grab the telephone receiver and dial a specific number to transmit voice

through cables merely to hear the voice of a beloved. Now each of us carries our own handsets

with a built-in phonebook and text messages. The facilities like Ethernet have further improved the

standard of communications by cutting down expenditure and increasing availability.

No matter where you are, you can access the world of web through your handsets and your

laptops and your iPads. You might not have noticed what it is but the technology that enables you

to plug in internet without any wires whether you are in a cafe, a library, a shopping mall or an

airport is Ethernet – the wireless network also known as 802.11. The circumference where

wireless technology is present and available to the users is known as Hotspot. The inexpensive,

user-friendly WiFi networks are also obtrusive; if you do not need one you would not know there

exists any. Ethernet could be also installed in home or offices in order to transmit information over

the air without the aid of wires. In near future you would find wireless networking available in

every nook and corner.

Ethernet is derived from the decades old term Hi-Fi that stands for the output’s type

produced by quality music hardware. WiFi Technology is WIRELESS FIDELITY and stands for

all those technologies that fall under the specifications of IEEE 802.11 including 802.11a, 802.11b
and 802.11g. The association of the term Ethernet with various technologies is merely because of

the promotions made by the Ethernet Alliance.

For those whose laptops and cell phones do not have a built-in wireless transmitter then

you could purchase a wireless adaptor and inject it into USB port. A Ethernet hotspot is

automatically discovered and connected by the transmitters. The presence of Ethernet in public

places makes it convenient to stay connected to your official tasks or to the social networking.

Ethernet is also associated with 802.11 networking. The reference is derived from IEEE –

Institute of Electrical and Electronics Engineers uses the numbering system for classifying a

range of technological protocols.

Ethernet steps into the boots of TV and radio in order to transmit data through radio waves.

The two-way radio communication: the wireless adapter translates data into a radio signal then

transmits it via antenna; and the signal is received and decoded by the wireless router that uses a

tangible wired Ethernet connection to send information to the internet. The equation is reversed

when wireless router receives data from the internet and translates it into a signal where the

wireless adaptor receives the signal and decodes it.

Ethernet communication devices are extended forms of radios used for cell phones and

walkie-talkies: they simultaneously transmit and receive radio waves and convert 1s to 0s into the

radio waves along with reconverting the radio waves into 1s and 0s, however the Ethernet radios

enjoy some exceptional features.

Technology has developed far more than our expectations – none of us could perceive the

developments in approaching future. With features like Ethernet, earth would turn into a world

wide web where every user is omnipresent and active.


Wifinotes.com is constructed with the intention of educating the tech-savvy community on the

pros and cons of not only WiFi but many other wireless networking technologies. We hope that the

elaborated posts and references would taste like cookies.

Wireless technology has change the way for us to connect to internet, local and remote computers,

it has enabled the implementation of imagination beyond the limits. There are two most common

modes by which we connect to Ethernet for connectivity for accessing internet or other computer

for file sharing etc.

Infrastructure mode:

Infrastructure mode is one of the two methods for connecting to wireless networks with

Ethernet enabled devices such as laptops, Pda’s I-phone etc. These devices are connected to

wireless network with the help of Access point (AP). Wireless Access Points are usually routers or

switches which are connected to internet by Ethernet port.

Wireless Access points are always required for infrastructure mode of wireless networking. It is

necessary to use SSID while configuring AP, this SSID should be known to clients for their

computers to connect WLAN. SSID is basically security key which help prevent UN authorized

access to WLAN. The Access point is then connected to wire network (Internet) to provide

wireless internet connectivity to clients. Multiple access points can be added in the WLAN, this

increases the reach of infrastructure for supporting many number of wireless clients.

The most common modes for Ethernet connectivity are as follow:

- Infrastructure mode

- Ad hoc Mode
Infrastructure mode:

Infrastructure mode is one of the two methods for connecting to wireless networks with

Ethernet enabled devices such as laptops, Pda’s I-phone etc. These devices are connected to

wireless network with the help of Access point (AP). Wireless Access Points are usually routers or

switches which are connected to internet by Ethernet port.

Wireless Access points are always required for infrastructure mode of wireless networking.

It is necessary to use SSID while configuring AP, this SSID should be known to clients for their

computers to connect WLAN. SSID is basically security key which help prevent UN authorized

access to WLAN. The Access point is then connected to wire network (Internet) to provide

wireless internet connectivity to clients. Multiple access points can be added in the WLAN, this

increases the reach of infrastructure for supporting many number of wireless clients.

Setting Up Infrastructure Mode:

Setting up infrastructure mode for wireless connectivity is not that hard, all we are require follow

number of steps which will do the job.

We need to make sure that Internet cable is plugged in Ethernet port, second step is to

configure AP (Access point). http://192.168.1.1 is usually the access panel address. Write this URL

at your Internet browser, username and password window will appear, default settings are usually,

admin username and admin password. We name the connection name which will appear to all

wireless devices, then we enable infrastructure mode and also assign SSID in the switch/router for

it broadcast
Now we scan wireless adaptor to see if any wireless network is available to connect, when

configured network is appear, click and connect and provide SSID information, here you should be

able to connect to the network for internet browsing and file sharing.

Ad hoc Mode

There is another mode of connectivity available for Ethernet connectivity. This mode is

known to be ad hoc mode. By using ad hoc mode, devices are capable for communicating

directly with each other. No Access point (routers / switches) is required for communication

between devices and all devices in the range connect in peer to peer communication mode.

Setting up Ad hoc Mode

For setting up ad hoc mode, wireless adaptors of all devices are required to be configured

manually at ad hoc mode instead of infrastructure mode. It is also important to use same channel

name and configuring all wireless adaptors using same SSID for making connection live.

Limitation of Ad hoc mode

Ad hoc mode is best used for small number of devices which are physically present in close

proximity with each other and as the number of devices grows performance of network suffers.

Disconnections of random device may occur time to time and managing the network can be

difficult task for administrator. There is another limitation associated with ad hoc mode that is, ad

hoc mode networks cannot bridge to wire LANs and cannot access internet without installing

special gateways.

Advantages of Ad hoc network mode


Ad hoc mode networks works fine in small environment, like building, homes etc. No extra

hardware (Access point) is required to use ad hoc mode, therefore it reduces the cost. If devices

have wireless network adapters in them already then that will do the job as far as building ad hoc

networks is concern. Ad hoc can be useful as back up option for time being if network based on

infrastructure mode and access points are malfunctioning.

Advantages of Infrastructure mode (comparison between Ad hoc and infrastructure)

If we are to compare ad hoc with infrastructure mode then infrastructure mode provide much more

stability, scalability, ease of management and improved security. Ad hoc on the other hand does

not provide security to that level and managing can be difficult incase of network growth.

Performance suffers as we increase devices as well.

The only disadvantage associated with infrastructure mode is extra cost to for Access points

(routers and switches).Compared to the alternative, ad-hoc wireless networks, infrastructure mode

networks offer the advantage of scalability, centralized security management and improved reach.

The disadvantage of infrastructure wireless networks is simply the additional cost to purchase AP

hardware.

Step by step instructions for installing Wifi

1. First of al you need to list the equipment and hardware thetas is required for installing Wifi

uh as router or compatible gateway different models are available one of the common is DI

version 624 and Extreme G 802, 802.11 routers which are highly compatible with the Wifi

at present. Second is the wireless adapter that is required or connecting the network.

wireless adapters also comes in many specification such as DWL G650 is card adapter that
is compatible with the windows operating system and note books and Personal computers

,it is also equally reliable for the windows Xp home based systems.

2. Next you need a connection like broad band to access the internet which comes typically

with the dialing modem or DSL modems.

3. In case of static IP address Ethernet cable is also required.

4. if your connection is DSL then you must require provide username and password by the

service providers more specifically ISP

5. Another requirement is the usable Mac address that will support all the connected wireless

network adapters.

6. It is recommended to keep a notebook and pen to write down the MAC and IP setting s and

addressee because you may need it further during Wifi configuration.

Installation of Wireless Adapters

Now install the wireless adapters by following the provide instructions.

1. Install wireless adapter in the system that are required to be connected to the attached

router.

2. if you are using the Card adapter you may require to install the software for support before

starting hardware installation. This require complete shutdown of the system, install

adapter and reboot the complete computer to make it ready for installing wireless. To avoid

the computer reboot it is recommended to use wireless adapters which are independent of

additional software installations.


3. When system is restarted automatically new hardware wizard will run which will

atomically activate the adapter and it become ready to use.

Configuring Wifi

If the system doesn’t automatically detect the Wifi network you may need to perform few more

steps.

1. For configuring click networking icon that is available in the system tab

2. From appeared dialog box of Wireless Network Connection click “advanced” and

choose the Wireless network tab.

3. Select my wireless network setting ok system will be restarted.

4. now set security parameters to activate the secure connection by accessing IP address to the

browser

5. Configure the network for changing the name SSID by simply clicking wireless button

present in the network setting in control panel.

6. Enable the Wifi network encryption to stay protected from hackers and data stealers,

wireless adapter offers WPA protected access encryption technique for the Wifi security

through the wired Equivalent Privacy encryption algorithms.

7. next step is the Mac address filtration .for extra safety apply the limit the Mac address by

fix the router routines .enter Mac address in Wifi adapter and save it

8. For improving the performance choose 802.11 for all the available wireless system in the

network. This mode will help you speed up the communication.


9. Next step is saving and exit the step the wireless network is activated.

3.5.2 Features of “WiFi” Technology - A new aspect in networking

WiFi has brought a new aspect in the ground of networking. The broadcast of data is

completed via radio waves and the cost of cables for network lying down.Ethernet enable a user to

get access to internet anywhere in the given location. Now you can make a network in Hotels,

Libraries, colleges, universities, campus, private institutes, and coffee shops and even on a public

place to make your business more profitable and connect with their client any time. WiFi makes

waves for business with their highly effective cable less media.

WIFI technology supports two types, one is called “infrastructure” other one is “Ad hoc” In ad

hoc Ethernet network can be connected without central device known as router or access point Ad

hoc mode is always preferred over infrastructure mode, however ad hoc networks have following

issues Ethernet devices configure on Ad hoc mode offers nominal security against network

intruders. Ad hock WiFi configured devices cannot disable SSID broadcast in contrast to

infrastructure mode. Network attackers will not required much of effort to prevail in Ad hoc

Network.

WiF Limitations - Wireless network limitations

WIFI technology supports two types, one is called “infrastructure” other one is “Ad hoc” In ad

hoc Ethernet network can be connected without central device known as router or access point Ad

hoc mode is always preferred over infrastructure mode, however ad hoc networks have following

issues Ethernet devices configure on Ad hoc mode offers nominal security against network

intruders. Ad hock WiFi configured devices cannot disable SSID broadcast in contrast to
infrastructure mode. Network attackers will not required much of effort to prevail in Ad hoc

Network.

Using Ad hoc mode signals issues can experienced where as using alternative infrastructure

mode will provide full strength singles.Ethernet networking standard including 802.11g requires

ad hoc mode of communication supports which 11Mbps bandwidth.Ethernet devices when

configured to infrastructure mode can transfer data up to 54 Mbps, where as using ad hoc mode

only 11 mbps can be achieved. Ad hoc mode is considered slower in comparison to infrastructure

for this reason.

Security concerns

It is simple to set Ethernet network but keeping it secure takes much more effort, Access points of

Ethernet do not deploy encryption methods. It is required to be done as network is enabled. Secure

Ethernet network can be easily attacked by hackers to steal private information.

Guests who are not potentially harmful can still utilize the network resources and minimize the

performance.

Interference from other devices

Ethernet transmits data at 2.4 GHz making susceptible to interfere Bluetooth enabled devices,

mobile phones, cordless, Microwaves and other communication devices, closer the interfering

devices are the poor communication will be and vice versa.

Lacking high-quality media streaming


Today’s fastest Ethernet standards are pushed beyond their limit when trying to view high end

media.High definition video and audios cannot be viewed flawlessly because of lower transfer

rate; things can be much more worst if other clients are accessing the same access points.

Even the fastest current Ethernet standards are pushed beyond their limit when trying to handle

some of today's high-end media. High-definition audio and video files are timely-delivery-

intensive, and typical wireless networks have neither the transfer speeds nor the consistency to

transfer them flawlessly. This problem is further compounded if there are multiple devices

connected to the same because the bandwidth must be divided between all of the equipment.

Types:

WIFI technology supports two types, one is called “infrastructure” other one is “Ad hoc”

In ad hoc Ethernet network can be connected without central device known as router or access

point Ad hoc mode is always preferred over infrastructure mode, however ad hoc networks have

following issues Ethernet devices configure on Ad hoc mode offers nominal security against

network intruders. Ad hock WiFi configured devices cannot disable SSID broadcast in contrast to

infrastructure mode. Network attackers will not required much of effort to prevail in Ad hoc

Network

Using Ad hoc mode signals issues can experienced where as using alternative infrastructure

mode will provide full strength singles.Ethernet networking standard including 802.11g requires

ad hoc mode of communication supports which 11Mbps bandwidth.Ethernet devices when

configured to infrastructure mode can transfer data up to 54 Mbps, where as using ad hoc mode

only 11 mbps can be achieved. Ad hoc mode is considered slower in comparison to infrastructure

for this reason.


Security concerns

It is simple to set Ethernet network but keeping it secure takes much more effort, Access

points of Ethernet do not deploy encryption methods. It is required to be done as network is

enabled. Secure Ethernet network can be easily attacked by hackers to steal private information.

Guests who are not potentially harmful can still utilize the network resources and minimize

the performance.

Interference from other devices

Ethernet transmits data at 2.4 GHz making susceptible to interfere Bluetooth enabled devices,

mobile phones, cordless, Microwaves and other communication devices, closer the interfering

devices are the poor communication will be and vice versa.

Lacking high-quality media streaming

Today’s fastest Ethernet standards are pushed beyond their limit when trying to view high end

media.High definition video and audios cannot be viewed flawlessly because of lower transfer

rate; things can be much more worst if other clients are accessing the same access points.

Even the fastest current Ethernet standards are pushed beyond their limit when trying to handle

some of today's high-end media. High-definition audio and video files are timely-delivery-

intensive, and typical wireless networks have neither the transfer speeds nor the consistency to

transfer them flawlessly. This problem is further compounded if there are multiple devices

connected to the same because the bandwidth must be divided between all of the equipment.

Specifications:
IEEE 802.11 is standard use world widely for Wireless Local Area network, WLAN, it stands for

Institute of Electrical and Electronics Engineers. In simple words it is standard of

communication between computers and wireless devices. The standards were set by IEEE

LAN/MAN Standard committee in 5GHZ and 2.4 GHz public spectrum bands.

The IEEE 802.11 is consisting of of numerous mechanism and services that interrelate to

present station mobility translucent to the higher layers of the network mass. IEEE 802.11 is a

combination of wireless LAN. We can use IEEE 802.11 and WiFi often as interchangeably

depends on market demand. It is a basic protocol of any high speed wireless network from 1997 to

2008. There are lots of change occurred in it but the basics “high performance" never change. The

frequency of it is from 2.4 GHz to 5 GHz and range is from 100 meter to 5000 meter. It specifies a

single medium access control as MAC and three physical layers and offering different service such

as Authentication of system, Deauthentication of system, data privacy, MSDU delivery,

Association with files and system, Disassociation, Distribution of data, Integration of information,

and Reassociation. You can configure a station with IEEE 802.11 in different ways as independent

configuration, and infra-structure configuration. The IEEE 802.11 starts from the need to connect

more than one computer with each other wirelessly especially where the wire cannot go.

IEEE 802.11 required accepting device to activate in a peer-to-peer fashion within the

possibly of overlie same as access control level and data transformation services to allow top

layers .There are several physical layer represent signaling methods and interfaces. Solitude and

safety of user data is being moved over the wireless media via IEEE 802.11.According to OSI

model an IEEE 802.11 protocol having direct frequency, hopping sequence, spread spectrum PHY

and infrared PHY. IEEE 802.11 specifies a single medium access sub layers called MAC and

physical layers with different specifications. The first is physical layers having two radio and
infrared. The physical layer contain Frequency Hopping Spread Spectrum Radio PHY offering 1

Mbit/s with two level and 2 Mbit/s with 4 level, As it is Direct Sequence Spread Spectrum Radio

PHY provides DBPSK and DQPSKwith 1 and 2 Mbit/s operation, Infrared PHYoffer 1 Mbit/s

with16-PPM and 2 Mbit/s with –PPM.

These days 802.11a, 802.11b, and 802.11g are mostly in use to create a network home,

offices and commercial locations. The architecture of IEEE 802.11 consists of 802.1X for

verification, RSN for maintenance track of links, and AES-based CCMP to provide privacy,

veracity and basis. IEEE 802.11with the propagation of modems and DSL services makes it

reliable. People always desire to set up small networks in their homes to distribute their elevated

rate Internet connection. There are many free networks commonly permit anyone within specific

range, counting passersby outer, to connect to the Internet. There is also hard work by unpaid

helper groups to launch wireless community networks to provide free wireless connectivity to the

public. Networking without wire has a talented prospect with 802.11.The dynamic nature of IEEE

802.11 increasing radically in the near future.

Description and working of Wi- Fi module:

There are three most important items which makes Ethernet working in your laptop or desktop.

These are:

 Radio Signals

 Ethernet Card which fits in your laptop or computer.

 Hotspots which create Ethernet Network.


Radio Signals:

Radio Signals are the keys which make WiFi networking possible. These radio signals transmitted

from Ethernet antennas are picked up by WiFi receivers such as computers and cell phones that are

equipped with WiFi cards. Whenever a computer receives any of the signals within the range of a

WiFi network which is usually 300 - 500 feet for antennas, the WiFi card will read the signals and

thus create an internet connection between the user and the network without the use of a cord.

Access points which consist of antennas and routers are the main source which transmit

and receive radio waves. Antennas work stronger and have a longer radio transmission with a

radius of 300-500 feet which are used in public areas while the weaker yet effective router is more

suitable for homes with a radio transmission of 100-150 feet.

Ethernet Cards:

You can think WiFi card as being an invisible cord that connects your computer to the antenna for

a direct connection to the internet.

WiFi cards can be external or internal, meaning that if a WiFi card is not installed in your

computer, you may purchase a USB antenna attachment and have it externally connect to your

USB port, or have an antenna-equipped expansion card installed directly to the computer. For

laptops, this card will be a PCMCIA card in which you insert to the PCMCIA slot on the laptop.

Ethernet Hotspots:

A Ethernet hotspot is created by installing an access point to an internet connection. The

access point transmits a wireless signal over a short distance typically covering around 300 feet.
When a Ethernet .enabled device, such as a Pocket PC, encounters a hotspot, the device can then

connect to that network wirelessly.

Most hotspots are located in places that are readily accessible to the public, like airports,

coffee shops, hotels, book stores and campus environments. 802.11b is the most common

specification for hotspots worldwide. The 802.11g standard is backwards compatible with .11b but

.11a uses a different frequency range and requires separate hardware such as an a, a/g, or a/b/g

adapter. The largest public Ethernet networks are provided by private internet service providers

(ISPs) that charge a fee for users to connect to the internet.

Hotspots are increasingly developing around the world. In fact, T-mobile USA controls

more than 4,100 hotspots located in public locations such as Starbucks, Borders, Kinko.s, and the

airline clubs of Delta, United, and US Airways. Even select McDonald.s restaurants now feature

Ethernet hotspot access.

Any notebook computer with integrated wireless, a wireless adapter attached to the

motherboard by the manufacturer, or a wireless adapter such as a PCMCIA card can access a

wireless network. Furthermore, all Pocket PCs or Palm units with Compact Flash, SD I/O support,

or built-in Ethernet, can access hotspots.

Some Hotspots require WEP key to connect that is the connection is considered to be

private or secure. As for open connections, anyone with a WiFi card can gain access to that

hotspot. So in order for a user to gain access to the internet under WEP, the user must input the

WEP key code.

Differences between Bluetooth and Wifi:


Wifi and Bluetooth are the most famous wireless technology that creates and managed

wireless network with the of radio frequency waves. both them have the same mechanisms

through which they develop the wireless networks for the organizations adopting but still there are

some differences which make them different in use.

Coverage difference

The major purpose of the Bluetooth technology is to create the connection between the user

device and network over the short distances. Their ranges are limited to the one meter or 2 meter

hardly. The device outside this renege cannot be connected with the help of Bluetooth where as

Wifi has no such small distance limitation as compared to Bluetooth devices. Wifi has the ability

to create and provide its users and wireless internet facility over the long distances, they can link

multiple computer at the time. Although Bluetooth can also connect multiple device at a time but

coverage area difference is huge which makes wifi a better approach than Bluetooth?

Creation of network

Bluetooth Technology

Both Wifi and Bluetooth are the network creation technologies PAN Personal Area

Networks are created by the Bluetooth by utilizing radio wave so flow frequency which lows the

Bluetooth device to instantly connect the c0onntion device in the specific are to develop a pair. For

instant cell phone with blue tooth technology , ipods and PDAs.

Most frequency Bluetooth is used for immediately sending files for m laptop to laptop

desktop, hand set to hand set, and hand set to Desktop from the source like printer .when the

device that you are using for the communication does not contain the Bluetooth feature then it
contains the built in adapters to support the transfer feature. Most common of thee adapters are the

USB’s Universal Serial Buses that are extensive in use for carrying data.

Wifi Technology

Wifi use the same radio frequency technology. But it has one main advantage over

Bluetooth which is the dynamic protocol which can connect various computers over long distance

through wireless. Wifi permit the computer within the wireless network to communicate and send

message without any plugged cable. It just matches the radio frequency omitted by the service

provider boosters which ultimately save money and time effort. Because huge installation are not

required Computer that uses Local area Networks Wifi can share, send files, codes and document

over the Wifi network and can also share the resource like printers, fax machines and scanning

devices .internet facility and also be shared and no specific type of LAN is required for this

purpose too.

File swapping

File swapping is enjoyable task when using Wifi Bluetooth or button devices both of them

can easily transfer the related files to your near by computer system any time by activating

wireless connection. No complex installation and configuration is required for this purpose. Both

of them only require some allocation of resource for sharing the files.

Protocol specification

There is no extensive protocol specification for the Wifi and Bluetooth, both of them

follow the typical standards designed by the manufacturer to become compatible with the
hardware and to communicate with interoperable products the current protocol standard for the

Bluetooth is 2.0 and for Wifi standard for networking protocol is 802.extension to 802 , 802.11 is

also in great fame these days.

Support difference

Another important difference between Wifi and Bluetooth is the support. Wifi is supported

by the modem because it has to cover the wider area n sense of range and Bluetooth is supported

by the router that is available in the small carrying communications.

Advantages:

One of the most prevalent advantages of WiFi wireless LAN technologies is that it is

completely wire-free. Now, if you want to sit in one of your comfort zones in you house, such as a

couch or in your yard, you can carry your laptop with you and still be able to access the internet.

These days, if you buy a new laptop, a built-in WiFi card will allow you automatic allowance of

use. (Brain) A second advantage is becoming increasingly popular: hotspots. Instead of having to

be constricted to your home wired/wireless Local Area Network (LAN), you can now enjoy the

advantages of the Internet in public places such as lobbies, cafes, universities, hotels, airports, and

many other common areas.

WiFi also supports roaming: you can walk around a building from one access point to

another. A third advantage of WiFi is the ability for 802.11b and 802.11g to frequency hop. This

process allows the 802.11b and 802.11g cards to transmit themselves on any of three bands, or

splitting the radio bandwidth into channels and 'hop' between them. (Brain) This enables the WiFi

cards to talk at the same time without interference. The fourth advantage I know of is the

development of the Ethernet Alliance (formerly WECA). This association is formed with more

than 200 member companies whose business it is to test and certify the interoperability of WLAN
products, making sure they are based solely on the IEEE 802.11 specifications. (EthernetAlliance,

What) You also must remember that WiFi products are widely distributed, and an easy technology

to use.

Advantages of WiFi:

*Many Ethernet networks support roaming, in which a mobile client station such as a laptop

computer can move from one access point to another as the user moves around a building or area.

* Many access points and network interfaces support various degrees of encryption to protect

traffic from interception. Ethernet is a global set of standards. Unlike cellular carriers, the same

Ethernet client works in different countries around the world.

* Allows LANs to be deployed without cabling, potentially reducing the costs of network

deployment and expansion. Spaces where cables cannot be run, such as outdoor areas and

historical buildings, can host wireless LANs.

*Ethernet silicon pricing continues to come down, making Ethernet a very economical networking

option and driving inclusion of Ethernet in an ever-widening array of devices.Ethernet products

are widely available in the market. Different brands of access points and client network interfaces

are interoperable at a basic level of service. Products designated as Ethernet CERTIFIED by the

Ethernet Alliance are interoperable and include WPA2 security.

* Widely available in more than 100 thousand public hot spots and millions of homes and

corporate campuses worldwide.

*Ethernet networks support roaming, in which a mobile client station such as a laptop computer

can move from one access point to another as the user moves around a building or area.Ethernet is
a global set of standards. Unlike cellular carriers, the same Ethernet client works in different

countries around the world.

 WiFi uses unlicensed radio spectrum and does not require regulatory approval for

individual deployers.

 It allows local area networks (LANs) to be setup with cabling. The can reduce associated

costs of network connection and expansions. Places where cables cannot be run, such as

outdoor areas and historical buildings can use wireless LANs.

 WiFi products are extensively available in the market. There are different brands of access

points and user's network interfaces are able to inter-operate at a very basic service level.

 Prices are considerably lower as competition amongst vendors' increases.

 WiFi networks can support roaming. This allows mobile users with laptop computer to be

able to move from one access point to another.

 Numerous access points and network interfaces support various degrees of encryption to

protect traffic from interception.

 WiFi has a set of global standards. Not like the cellular carriers, the same WiFi users can

work in different countries around the world at all time.

Disadvantages:

Even though WiFi products are useful, there are still some downfalls that must be stated in

order to get a firm grasp on exactly what WiFi wireless LAN technologies are composed of. As

Morely points out, "Ethernet is designed for medium-range data transfers, and most versions of

802.11 works up to about 250-300 feet away from the access point indoors, and about 1,000 feet
away outdoors."(341) yes, and with more distance between your computer/laptop and the access

point, the speed and the quality falters tremendously.

It also doesn't help when there is interference from microwaves or cordless phones which

use the same frequency that 802.11g and 802.11b use: 2.4 GHz. Another disadvantage for WiFi

products is their security system. The Wired Equivalent Privacy (WEP) is the common wireless

encryption standard which is easily broken even when configured accurately. (Wikipedia, WiFi) To

counteract this problem, however, Ethernet Protected Access (WPA) has been established.

Due the fact that WiFi are still relatively new, there are considerably more disadvantages to users.

Let's have a look at them:

 The use of WiFi band that is 2.4 GHz does not require a license in most countries provided

that is stays below limit of 100mW and one accepts interference from other sources;

including interference which causes the users devices to no longer function.

 The spectrum assignments and operational limitations are not consistent worldwide.

 Power consumption is fairly high compared to some other standards, making the battery

life and heat a concern to some users.

 WiFi uses the unlicensed 2.4GHz spectrum, which often crowded with other devices such

as Bluetooth, microwave ovens, cordless phones, or video sender devices, and among

many others. This may cause degradation in performance.

 WiFi networks have limited range. A typical WiFi home router might have a range of 45m

(150ft) indoors and 90m (300ft) outdoors. Ranges may also vary as WiFi is no exception to

the physics of radio wave propagation with frequency band.


 The most common wireless encryption standard, wired equivalent privacy or WEP has

been shown to be breakable even when it has been correctly configured.

 Access points could be used to steal personal and confidential information transmitted from

WiFi consumers.

 Intervention of a closed or encrypted access point with other open access points on the

same or a nearby channel can prevent access to the open access points by others in the area.

It poses a high problem in high-density areas such as large apartment blocks where many

residents are operating WiFi access points.

 Inter-operability issues between brands or deviations can cause limited connection or lower

output speeds.

 Free access points can be used by the malicious to anonymous to initiate an attack that

would be extremely difficult to track beyond the owner of the access point.

CHAPTER 4: SOFTWARE DESCRIPTION

This project is implemented using following software’s:


1. Arduino IDE.

2. Atmel programmer for dumping code into Micro controller.

3. Proteus for Circuit design.


Arduino IDE user guide INTRODUCTION

 Arduino is an open-source project, enabling hobbyists to easily take advantage of the

powerful Atmega chips. The Arduino IDE is the software where you can write code and

upload it to the Atmega chip. The code is then executed on the chip.

 Most 3D-printer electronics are Arduino-compatible, they use the Atmega chip and enable the

user to upload their code using Arduino. This includes Megatronics, Minitronics and RAMPS.

 Before you can start using the electronics you need software 'firmware', that translates

machine instructions (gcode) into actual movements. There are a few options here, including

Marlin and Sprinter and Repetier. The actual firmware is not discussed in this document. You

can use Arduino to upload this firmware onto your electronics. This document will guide you

in the steps you need to take.


DOWNLOADING AND INSTALLING

 You can download and install the Arduino version from http://arduino.cc/. This ensures

you have the latest version. Instead, you may choose to download the Arduino version we

provide on http://reprapworld.com/?software. This version includes the required

components for Megatronics/Minitronics.

 Extract the files file into a location of your choice. On Windows you may need to install

drivers for the electronics board before you can upload software. The installation files are

located under the /drivers subdir. Linux and Mac should recognize the boards out-of-the-

box.

 You can simply run Arduino by executing the Arduino file.


UPLOADING FIRMWARE

 To upload a firmware, you must first open the files using File → Open. Select the

 .ino file from the directory containing the firmware. Arduino will open several tabs with files.

 Next step is to select the correct electronics board. From the Tools menu, locate the Board

item. This item should include a few sub items, including Megatronics, Minitronics, Arduino

mega 2560 (RAMPS with mega 2560) and Arduino Mega 1280 (RAMPS with mega1280).

Select the board that fits your electronics.

 Also we need to select the serial port the electronics is connected to. In the Tools menu, locate

the Serial port item. This should include at least one item if the board is connected and the

drivers are installed properly. If there are multiple items here, you need to find out which is the

correct one by unplugging the board and checking which port was removed.

 Once you have set the board and serial port, you can upload the firmware by pressing File →

Upload. Arduino will try to compile the firmware, if any errors occur the process will stop and

you will need to fix the errors before trying again. Once compilation is complete, the actual

Biometric Voting
Machine.doc
upload will start. This may take a minute for a large seeking.
SERIAL MONITOR

 You can actually 'talk' to the firmware using the Serial monitor. Make sure the correct

serial port is selected and locate the Serial monitor button.

 This will open a new window:

Make sure the line ending is set to newline and the baud rate corresponds to your firmware
(115200 mostly), or you will get jibberish. You can enter a command in the upper box (M105 for
example), this will result in response from the firmware

136
CHAPTER 5: PROJECT DESCRIPTION

In this chapter, schematic diagram and interfacing of ATMEGA328 microcontroller with each
module is considered.

Fig 5.1: schematic diagram of microcontroller based solar tracking with street light system

The above schematic diagram DUAL AXIS SOLAR TRACKING SYSTEM WITH
ARDUINO explains the interfacing section of each component with micro controller. Crystal
oscillator connected to 9th and 10th pins of micro controller, regulated power supply is also connected
to micro controller and LED’s also connected to micro controller through resistors.

The detailed explanation of each module interfacing with microcontroller is as follows:

137
CHAPTER 6: ADVANTAGES AND DISADVANTAGES

Advantages:

1. Conservation of Non Renewable energy sources.


2. Maximum output can be obtained.
3. Efficient and low cost design.
4. Automatic street light control system based on LDR sensor

Disadvantages:

1. Monitoring and Maintenance is required.


2. A drastic environmental change cannot be tolerated by the equipment.

Applications:

1. This energy can be utilized for simple house hold appliances, street light control system.
2. This energy can be stored and utilized as back up power supply mainly in industries.

138
CHAPTER 7: RESULTS

7.1 Result:

The project “DUAL AXIS SOLAR TRACKING SYSTEM WITH ARDUINO” was
designed such that it used to construct a solar tracker system that follows the sun direction for
producing maximum output of solar energy which can be used for solar powered applications.
The system also controls the street lights which are automated. This automation process was done
by the microcontroller with help of LDR. The street lights switched ON in night and switched
OFF in day times.

7.2 Conclusion:

Integrating features of all the hardware components used have been developed in it.
Presence of every module has been reasoned out and placed carefully, thus contributing to the best
working of the unit. Secondly, using highly advanced IC’s with the help of growing technology, the
project has been successfully implemented. Thus the project has been successfully designed and
tested.

7.3 Future Scope:

Our project “DUAL AXIS SOLAR TRACKING SYSTEM WITH ARDUINO” is mainly
intended to track the sun direction using a bunch of LDR (Light Dependent Resistor) sensors and
using a stepper motor. The light from sun falls on the LDR which is fed as input to the micro
controller which in turn rotates the stepper motor by predefined number of steps. The rotation of
DC motor depends on which LDR the light from the sun falls. The stored energy is used for street
lights. These street lights are automated. This automation process is done by the microcontroller
with help of LDR. The street lights switched ON in night and switched OFF in day times.

139
This project can be extended by using a solar plate instead of a bunch of LDR’s to
which a stepper motor is attached and also a battery attached to it, which helps in tracking the sun as
well as storing the maximum energy and this energy stored can be used for operating different
devices. By employing a larger solar plate, the output energy can be increased.

REFERENCES

The sites which were used while doing this project:

1. www.wikipedia.com

2. www.allaboutcircuits.com

3. www.microchip.com

4. www.howstuffworks.com

Books referred:

1. Raj kamal –Microcontrollers Architecture, Programming, Interfacing and System Design.

2. Mazidi and Mazidi –Embedded Systems.

3. PCB Design Tutorial –David.L.Jones.

4. PIC Microcontroller Manual – Microchip.

5. Embedded C –Michael.J.Pont.

140
141

You might also like