50% found this document useful (2 votes)
802 views47 pages

Frequency Locked Loop DC Motor Speed Control

This document describes a project to control and maintain a constant speed of a DC motor even at variable loads using a microcontroller-based control system. The system uses an optical encoder to detect the motor speed and convert it to a feedback frequency, which is compared to a reference frequency to control the motor speed. It provides block diagrams and descriptions of the hardware components used, including the transformer, voltage regulator, rectifier, microcontroller, sensors and motor drive. It also discusses the characteristics, applications and classifications of embedded systems, and provides detailed descriptions of the transformer and voltage regulator components.

Uploaded by

Rakesh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
50% found this document useful (2 votes)
802 views47 pages

Frequency Locked Loop DC Motor Speed Control

This document describes a project to control and maintain a constant speed of a DC motor even at variable loads using a microcontroller-based control system. The system uses an optical encoder to detect the motor speed and convert it to a feedback frequency, which is compared to a reference frequency to control the motor speed. It provides block diagrams and descriptions of the hardware components used, including the transformer, voltage regulator, rectifier, microcontroller, sensors and motor drive. It also discusses the characteristics, applications and classifications of embedded systems, and provides detailed descriptions of the transformer and voltage regulator components.

Uploaded by

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

CHAPTER-1

1.1 INTRODUCTION
The purpose of this project is to control and maintain constant speed of a DC motor even at

variable loads.

This involves a micro controller based control system with an input reference frequency and a

feedback frequency (speed equivalent) from DC motor optical encoder. Optical encoder is to

detect speed of a DC motor and converts speed into equivalent frequency. Initially DC motor

tries to maintain the speed equivalent to the reference frequency, then onward the DC motor will

maintain constant speed at variables loads too.

1.2INTRODUCTION 0F PROJECT
This involves a micro controller based control system with an input reference frequency and a

feedback frequency (speed equivalent) from DC motor optical encoder. Optical encoder is to

detect speed of a DC motor and converts speed into equivalent frequency. Initially DC motor

tries to maintain the speed equivalent to the reference frequency, then onward the DC motor will

maintain constant speed at variables loads too.

1|Page
CHAPTER-2

PROJECT DETAILS

2.1 BLOCK DIAGRAM

FIG.2.1: BLOCKDIAGRAM OF SYSTEM

2|Page
2.2 CIRCUIT DIAGRAM

FIG.2.2: CIRCUIT DIAGRAM OF SYSTEM

3|Page
2.3 HARDWARE USED

1. Transformer

2. Voltage regulator

3. Rectifier

4. Arduino UNO

5. Diode IN4007

6. Resistor

7. Capacitor

8. Push button

9. LCD

10. LED

11. IR sensor

12. Motor Drive

4|Page
CHAPTER 3

EMBEDDED SYSTEM

3.1INTRODUCTION OF EMBEDDED SYSTEMS


In our present work we have used a combination of hardware and software which forms as
embedded system.

What is embedded system?

An embedded system is one kind of a computer system mainly designed to perform several tasks
like to access, process, store and also control the data in various electronics-based
systems. Embedded systems are a combination of hardware and software where software
is usually known as firmware that is embedded into the hardware. One of its most important
characteristics of these systems is, it gives the o/p within the time limits. Embedded systems
support to make the work more perfect and convenient. So, we frequently use embedded systems
in simple and complex devices too. The applications of embedded systems mainly involve in our
real life for several devices like microwave, calculators, TV remote control, home security and
neighborhood traffic control systems, etc.

3.2EMBEDDED SYSTEM DESIGN CYCLE

FIG.3.1 BLOCK DIAGRAM OF EMBEDDED

5|Page
3.3CHARACTERISTICS OF EMBEDDED SYSTEM
Embedded systems come in a variety of shapes and sizes, from the largest multiple-rack data
storage or networking power houses to tiny modules such as your personal MP3 player or
cellular handset. Following are some of the usual characteristics of an embedded system:

 Contains a processing engine, such as a general-purpose microprocessor


 Typically designed for a specific application or purpose
 Includes a simple (or no) user interface, such as an automotive engine ignition
controller
 Often is resource-limited. For example, it might have a small memory foot-print and
no hard drive
 Might have power limitations, such as a requirement to operate from batteries
 Not typically used as a general-purpose computing platform
 Generally has application software built in, not user-selected
 Ships with all intended application hardware and software pre-integrated
 Often is intended for applications without human intervention.

Most commonly, embedded systems are resource-constrained compared to the typical desktop
PC. Embedded systems often have limited memory, small or no hard-drives, and sometimes no
external network connectivity. Frequently, the only user interface is a serial port and some LEDs.
These and other issues can present challenges to the embedded system developer. With
advancements in IOT, embedded systems are getting much more complex.

APPLICATIONS
Some applications of embedded system are as follows:

 Military and aerospace.


 Communication systems.
 Industrial automation and process control software.
 Product designing.
 Real time processing of ever increasing amount of data.

6|Page
3.4CLASSIFICATION

Embedded systems are classified as:

Based on execution behavior

 RTS CLASSIFICATION
 Hard Real Time system

 Soft Real Time System

 HARD REAL TIME SYSTEM


“Hard real time systems” have very narrows response time. Example : Nuclear power system,

Cardiac pacemaker.

 SOFT REAL TIME SYSTEM


“Soft real time systems” have reduced constraints on “lateness” but still must operate very

quickly and repeatable. Example railway reservation system takes a few extra seconds the data

remain valid.

7|Page
CHAPTER-4

COMPONENTS DESCRIBTION

4.1TRANSFORMER
An electrical transformer works on the principle of Mutual Induction, which states that a uniform
change in current in a coil will induce an E.M.F in the other coil which is inductively coupled to
the first coil.

In its basic form, a transformer consists of two coils with high mutual inductance that are
electrically separated but have common magnetic circuit. The following image shows the basic
construction of a Transformer.

FIGURE:-4.1 Basic Transformer

4.2How Transformer Works?

The first set of the coil, which is called as the Primary Coil or Primary Winding, is connected to
an alternating voltage source called Primary Voltage.

The other coil, which is called as Secondary Coil or Secondary Winding, is connected to the load
and the load draws the resulting alternating voltage (stepped up or stepped down voltage).

8|Page
The alternating voltage at the input excites the Primary Winding, an alternating current circulates
the winding. The alternating current will result in an alternating magnetic flux, which passes
through the iron magnetic core and completes its path.

Since the secondary winding is also linked to the alternating magnetic flux, according to
Faraday’s Law, an E.M.F is induced in the secondary winding. The strength of the voltage at the
secondary winding is dependent on the number of windings through which the flux gets passed
through.

Thus, without making an electrical contact, the alternating voltage in the primary winding is
transferred to the secondary winding.

NOTE: Depending on the construction of the transformer, the voltage at the secondary of the
transformer may be equal, higher or lower than that at the primary of the transformer but the time
period of the voltage i.e. its frequency will not change.

4.3Relation between Voltage and Turns

Let NP be the number of turns of the coil in the Primary Winding and NS be the number of turns
of the coil in the Secondary Winding.

If the alternating voltage at the primary side of the transformer is VP and the alternating voltage
at the secondary side of the transformer is VS, then the relation between the voltages at primary
and secondary and number of turns of the coil in primary and secondary is given as follows.

VP
VS = N P
NS

9|Page
IDEAL POWER EQUATION

If the secondary coil is attached to a load that allows current to flow, electrical power is

transmitted from the primary circuit to the secondary circuit. Ideally, the transformer is perfectly

efficient. All the incoming energy is

transformed from the primary circuit to the

magnetic field and into the secondary

circuit. If this condition is met, (i.e. ideal

in transformer) the input electric power

must equal the output power:

Pincoming = VP IP = Poutgoing = VS IS

VP Fig. 4.2 CIRCUIT DIAGRAM OF TRANSFORMER

VS = N P = I S
NS IP

Transformers normally have high efficiency, so this formula is a reasonable approximation.

If the voltage is increased, then the current is decreased by the same factor. The impedance in

one circuit is transformed by the square of the turn’s ratio. For example, if an impedance ZS is

attached across the terminals of the secondary coil, it appears to the primary circuit to have an

2
N 
impedance of  P  × ZS. This relationship is reciprocal, so that the impedance ZP of the
 NS 

2
N 
primary circuit appears to the secondary to be  S  × ZP.
 NP 

10 | P a g e
11 | P a g e
4.4VOLTAGE REGULATOR 7805

Voltage sources in a circuit may have

fluctuations resulting in not providing fixed

voltage outputs. A voltage regulator IC maintains

the output voltage at a constant value. 7805 IC, a

member of 78xx series of fixed linear voltage

regulators used to maintain such fluctuations, is a


Fig:-4.3.1LM7805
popular voltage regulator integrated circuit

(IC).The xx in 78xx indicates the output voltage it provides. 7805 IC provides +5 volts regulated

power supply with provisions to add a heat sink.

 INTERNAL BLOCK DIAGRAM OF VOLTAGE REGULATOR IC:

Fig.4.3.2: BLOCKDIAGRAM OF LM7805

12 | P a g e
4.5REGULATED POWER SUPPLY

Introduction:

Power supply is a supply of electrical power. A device or system that supplies electrical or other

types of energy to an output load or group of loads is called a power supply unit or PSU. The

term is most commonly applied to electrical energy supplies, less often to mechanical ones, and

rarely to others.

A power supply may include a power distribution system as well as primary or secondary

sources of energy such as conversion of one form of electrical power to another desired form and

voltage, typically involving converting AC line voltage to a well-regulated lower-voltage DC for

electronic devices. Low voltage, low power DC power supply units are commonly integrated

with the devices they supply, such as computers and household electronics.

 Block Diagram:

FIG.4.4: BLOCK DIAGRAM OF POWER SUPPLY

13 | P a g e
Regulated Power Supply
The basic circuit diagram of a regulated power supply (DC O/P) with led connected as load is

shown in Fig: 4.5

FIG.4.5: Circuit diagram of Regulated Power Supply with Led connection


4.6 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

14 | P a g e
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.

4.6.1 Bridge full wave rectifier:

The Bridge rectifier circuit is shown in Fig: 4.6, 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.

Input Output

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


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.

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 RL in the same

15 | P a g e
direction as in the previous half cycle. Thus a bi-directional wave is converted into a

unidirectional wave.

16 | P a g e
4.7LED:

A light-emitting diode (LED) is a semiconductor light

source. LED is used as indicator lamps in many devices,

and are increasingly used for lighting. Introduced as a

practical electronic component in 1962, early LED is

emitted low-intensity red light, but modern versions are

available across the visible, ultraviolet and infrared

wavelengths, with very high brightness. The internal Fig 4.7: Parts of a LED
structure and parts of a LED are shown in the Fig. 4.7.

 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 Fig 4.8: Electrical Symbol & Polarities of LED

the energy of the photon) is determined by the energy gap of the semiconductor. An LED is

usually small in area (less than1 mm2), and integrated optical components are used to shape its

17 | P a g e
radiation pattern and assist in reflection. LED is 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 is 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.

 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

18 | P a g e
 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.

4.8IR sensor:

 IR transmitter and receiver


Basics of IR transmitter and receiver transmitter and receiver are commonly used in

engineering projects for remote control of objects. In particularly, in Robotic system uses

transmitter and receiver. Here would like to describe the basics if IR transmitter and receiver.

 Basics of IR transmitter:
An electroluminescent IR LED is a product
which requires care in use. IR LED is
fabricated from narrow band hetero
structures with energy gap from 0.25 to
0.4 eV. Infrared transmitter emits IR rays in
planar wave front manner. Even though
infrared rays spread in all directions, it
propagates along straight line in forward
FIG.4.9: REPRESENTION OF LED
direction. IR rays have the characteristics of
producing secondary wavelets when it collides with any obstacles in its path. This property of IR
is used here. When IR rays gets emitted from LED, it moves in the direction it is angled. When
any obstacle interferes in the path, the IR rays get cut and it produces secondary wavelets which

19 | P a g e
propagates mostly in return direction or in a direction opposite to that of the primary waves,
which produces the net result like reflection of IR rays.

 Basics of IR receiver:
Infrared photo receiver is a two terminal PN junction device, which operates in a reverse bias. It

has a small transparent window, which allows light to strike the PN junction. A photodiode is a

type of photo detector capable of converting light into either current or voltage, depending upon

the mode of operation. Most photodiodes will look similar to a light emitting diode. They will

have two leads, or wires, coming from the bottom. The shorter end of the two is the cathode,

while the longer end is the anode. A photodiode consists of PN junction or PIN structure. When

a photon of sufficient energy strikes the diode, it excites an electron thereby creating a mobile

electron and a positively charged electron hole. If the absorption occurs in the junction's

depletion region, or one diffusion length away from it, these carriers are swept from the junction

by the built-in field of the depletion region. Thus holes move toward the anode, and electrons

toward the cathode, and a photocurrent is produced.

 Working of infrared communication:


Various types of infrared based applications are available in the market. The circuit for infrared

based applications is designed along with the transmitter and receiver sections i.e. we can it use it

for other application. But the infrared communication project which we have done here can be

used in any application just by replacing the application at the place of infrared LED in the

circuit diagram of infrared communication. By using this project we can design infrared based

applications easily.

20 | P a g e
 The entire circuit consists of two sections named as:
1. Transmitter section

2. Receiver section

1. Transmitter section:

The transmitter section consists of a 555 timer IC functioning in a stable mode. It is wired as

shown in figure. The output from a stable mode is fed to an IR LED via resistor which limits its

operating current. Infrared LED in the transmitter section emits IR radiation which is focused by

a plastic lens (optics) in to a narrow beam.

2. Receiver section:

The receiver section consists of a silicon phototransistor to convert the infrared radiation to an

electric current. It responds only to the rapidly pulsing signal created by the transmitter, and

filters out slowly changing infrared radiation from ambient light. The receiver section comprises

an infrared receiver module, and a led indicator. When the signals are interrupted, the IR Led

goes off after a few seconds depending upon the value of RC combination.

We can increase the distance between the IR transmitter and receiver just by placing the

lens between them. After connecting the IR transmitter and receiver circuit, we can get the

output by applying 6V Power supply to the circuit. We can use this circuit with any application

very simply. For example a buzzer circuit is placed at the output of IR circuit, when the signals

are interrupted, the buzzer produces sound. Both the transmitter and receiver parts can be

mounted on a single bread board or PCB. The infrared receiver must be placed behind the IR Led

21 | P a g e
to avoid false indication due to infrared leakage. An object moving nearby actually reflects the

IR rays emitted by the IR Led.

 INFRARED LED'S:-
Gallium arsenide is a direct-gap semiconductor with an energy gap of 1.4eV at room

temperature. A typical GaPs LED is made by solid-state impurity diffusion with zinc as the p-

type impurity diffused into an n-type substrate doped with tin, tellurium or silicon. The external

efficiency at room temperature is typically 5 percent.

A GaAs diode can also be fabricated by liquid-phase epitaxial with silicon as both its n and p

dopants. If a silicon atom replaces a Ga atom, it provides one additional electron, thus the

resulting GaAs in as n-type. If a silicon atom replaces arsenic atoms, an electron is missing and

the resulting GaAs is a p-type. In Si doped GaAs diode, the emission peak shifts down to

1.32eV. Since the emission is in infrared region, GaAs light sources are suitable for application

such as the optical isolator. The high switching speed, with a recovery time between 2 and 10ns,

makes them ideal for data transmission.

The disadvantages of the GaAs emitter are emitted wavelength and the associated attenuation

and dispersion. A critical issue of using an LED for the fiber optics is the coupling of light from

the semiconductor to the fiber. Because of the larger refractive index of GaAs relative to air, the

internal efficiency of LED can be quite low.

 PHOTO SEMICONDUCTOR
A Germanium or silicon diode or transistor, which has a transparent encasing, can serve as a

photodiode or transistor because the light photons can initiate conduction in the p-n- junction

region. Early devices such as the OCP 71 were Ge-devices. Later, silicon types became available

22 | P a g e
with lower leakage current and better light sensitivity. In a phototransistor, the base lead is not

used; but, if a resistor is connected form base to emitter it reduced the light sensitivity.

Darlington connected photo transistors (two transistors together in one case) such as the 2N5777

are very sensitive with a hFE of 2.5K, a dark current of 100 nA and a light current of 0.5-2.0 mA

for light flux density H = 2mW/cm2. The device is rated 200 mW and voltage of 25 V maximum.

SCRs with a light window are also available, called as LASCR, which are very sensitive and can

turn mains power ON and OFF, with light.

The switching speed of phototransistors far exceeds those of LDRs, made of CdS. The rise time

for the 2N5777 is 75 s and fall time is 50 s. Maximum switching speed is 1 KHz. Photo devices

are useful in optical encoding, intrusion alarms, tape readers, level control, character recognition

etc.

Nowadays packing containing an LED and a photodiode, called ‘opto-coupler’ is used for

switching on power or control circuits. Because the light source (LED) and photodiode are

physically kept separated (with 2 mm) in the package, isolation up to 2500 V can be had.

4.9LIQUID CRYSTAL DISPLAY (LCD)

A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated optical

device that uses the light-modulating properties of liquid crystals. Liquid crystals do not emit

light directly, instead using a backlight or reflector to produce images in color or monochrome.

LCDs are available to display arbitrary images (as in a general-purpose computer display) or

fixed images with low information content, which can be displayed or hidden, such as preset

words, digits, and seven-segment displays, as in a digital clock. They use the same basic

technology, except that arbitrary images are made up of a large number of small pixels, while

23 | P a g e
other displays have larger elements.

In this project Liquid crystal display are interfacing to microcontroller Pic16F877A. A 16 × 2

LCD display is very basic module and is very commonly used in various devices and circuits.

These modules are preferred over seven segments and other multi segment LED’s.

The reasons being: LCDs are

economical; easily

programmable; have no

limitation of displaying

special & even custom

characters (unlike in seven Fig.4.10 LCD pin diagram


segments), animations and

soon. A 16 × 2 LCD means it can display 16 characters per line and there are 2 such lines. In this

LCD each character is displayed in 5 × 7 pixel matrix.

This LCD has two registers, namely, Command and Data. The command register stores the

command instructions given to the LCD.A command is an instruction given to LCD to do a

predefined task like initializing it, clearing its screen, setting the cursor position, controlling

display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII

value of the character to be displayed on the LCD.

24 | P a g e
4.9.1 Features of 16×2 LCD module
 Operating Voltage is 4.7V to 5.3V

 Current consumption is 1mA without backlight

 Alphanumeric LCD display module, meaning can display alphabets and numbers

 Consists of two rows and each row can print 16 characters.

 Each character is build by a 5×8 pixel box

 Can work on both 8-bit and 4-bit mode

 It can also display any custom generated characters

 Available in Green and Blue Backlight

 Some full form of lcd 16x2 commands


 DDRAM = Display Data RAM.

 CGRAM = Character Generator RAM.

 DDRAM address corresponds to cursor position.

 Address Counter is used for both DDRAM and CGRAM.

 * = Don't care.

 ** = Based on Fosc = 250 KHz.

25 | P a g e
4.9.2 PIN DESCRIPTION OF LCD

26 | P a g e
4.10Resistance and variable resistance
The resistors can be connected together with the other

components to form filters for a desired level. In this

project Variable resistor is connected across the LCD to

vary the resistance for the brightness of the display &


Fig.4.11.1 Variable Resistor
Resistance is used to design the cable line.

4.11CAPACITOR
In this project there are two types of capacitors

used. Cylindrical type of value 100 and 470

micro-farad to provide pure dc and two ceramic

type capacitor of value 0.01 µF connected across

the bridge rectifier. Fig.4.11.2Capacitor

4.12DC MOTOR

 DC Motor has two leads. It has bidirectional

motion

 If we apply +ve to one lead and ground to

another motor will rotate in one direction, if we

reverse the connection the motor will rotate in FIG.4.12: DC MOTOR

opposite direction.

 If we keep both leads open or both leads ground it will not rotate (but some inertia will be

there).

 If we apply +ve voltage to both leads then braking will occurs.

27 | P a g e
4.12.1 BLOCK DIAGRAM OF DC MOTOR DRIVE:

POWER SUPPLY

OPAMP

MOTOR
DRIVING IC
MOTOR IR SENSOR

FIG. 4.13: CONNECTION TO MOTORS

28 | P a g e
4.13COMPONENT LIST

Frequency Locked Loop D.C. Motor Speed Control

Name Capacity Quantity

Regulator 7805 1

Capacitor 470µf 1

Diode IN4007 4

16 Pin Base 1

L293D 1

LED 1

DC MOTOR 200 rpm 1

Resistance 220Ω 1

Resistance 10k 1

4.14DIODE

The diode is a p-n junction device. Diode is the component used

to control the flow of the current in any one direction. The diode

widely works in forward bias.

Diode when the current flows from the P to N direction. Then it is in forward bias. The Zener

diode is used in reverse bias function i.e. N to P direction. Visually the identification of the

diode`s terminal can be done by identifying he silver/black line. The silver/black line is the

negative terminal (cathode) and the other terminal is the positive terminal (cathode).

29 | P a g e
 APPLICATION
•Diodes: Rectification, free-wheeling, etc.

•Zener diode: Voltage control, regulator etc.

•Tunnel diode: Control the current flow, snobbier circuit, etc.

4.15RESISTORS

The flow of charge through any material encounters an opposing force similar in many respects

to mechanical friction .this opposing force is called resistance of the material .in some electric

circuit resistance is deliberately introduced in form of resistor. Resistor used fall in three

categories only two of which are color coded which are metal film and carbon film resistor .the

third category is the wire wound type ,where value are generally printed on the vitreous paint

finish of the component. Resistors are in ohms and are represented in Greek letter omega, looks

as an upturned horseshoe. Most electronic circuit require resistors to make them work properly

and it is obliviously important to find out something about the different types of resistors

available. Resistance is measured in ohms, the symbol for ohm is an omega ohm. 1 ohm is quite

small for electronics so resistances are often given in ohm and Kohm.

30 | P a g e
4.16 ARDUINO

Introduction

4.16.1 Overview

The Arduino microcontroller is an easy to use yet powerful single board computer that has

gained considerable traction in the hobby and professional market. The Arduino is open-source,

which means hardware is reasonably priced and development software is free. This guide is for

students in ME 2011, or students anywhere who are confronting the Arduino for the first time.

For advanced Arduino users, prowl the web; there are lots of resources.

The Duemilanove board features an Atmel ATmega328 microcontroller operating at 5 V with

2Kb of RAM, 32 Kb of flash memory for storing programs and 1 Kb of EEPROM for storing

parameters. The clock speed is 16 MHz, which translates to about executing about 300,000 lines

of C source code per second. The board has 14 digital I/O pins and 6 analog input pins. There is

a USB connector for talking to the host computer and a DC power jack for connecting an

external 6-20 V power source, for example a 9 V battery, when running a program while not

connected to the host computer. Headers are provided for interfacing to the I/O pins using 22 g

Solid wire or header connectors. For additional information on the hardware

The Arduino programming language is a simplified version of C/C++. If you know C,

programming the Arduino will be familiar. If you do not know C, no need to worry as only a few

commands are needed to perform useful functions.

An important feature of the Arduino is that you can create a control program on the host PC,

download it to the Arduino and it will run automatically. Remove the USB cable connection to

the PC, and the program will still run from the top each time you push the reset button. Remove

the battery and put the Arduino board in a closet for six months. When you reconnect the battery,

31 | P a g e
the last program you stored will run. This means that you connect the board to the host PC to

develop and debug your program, but once that is done, you no longer need the PC to run the

Program.

4.16.2 Working System

1. Arduino Duemilanove board.

2. USB programming cable

(A to B)

3. 9V battery or external power

supply (for stand-alone

operation)

4. Solder less breadboard for

external circuits, and 22 g solid FIG.4.14: ARDUINO BOARD


wire for connections

5. Host PC running the Arduino development environment. Versions exist for Windows, Mac

and Linux.

Troubleshooting

If there is a syntax error in the program caused by a mistake in typing, an error message will

appear in the bottom of the program window. Generally, staring at the error will reveal the

problem. If you continue to have problems, try these ideas

 Run the Arduino program again

 Check that the USB cable is secure at both ends.

 Reboot your PC because sometimes the serial port can lock up

32 | P a g e
 If a “Serial port…already in use” error appears when uploading.

PROGRAM FLOWCHART:

FIG. 4.15: PROGRAMME FLOW CHART

33 | P a g e
ARDUINO PROGRAM:

#include <LiquidCrystal.h>// header file for lcd

LiquidCrystal lcd(7, 10, 9, 11, 12,13);//RS,EN,D4,D5,D6,D7

volatile unsigned int pulse = 0;

const byte interruptPin = 2; // use for counting rpm using ir sensor

#define fan 6 // motor speed variation

///////////////////////////////////////variables

int beat=0;

int time_delay =0,sensor=HIGH;

int heat,counter=0,tempr=0,val=0;

//////////////////////////////////////////////////////////////////////

void setup()

pinMode(interruptPin, INPUT);//input_PULLUP for input

analogWrite(fan,220);

attachInterrupt(digitalPinToInterrupt(interruptPin), blinkk, FALLING); // calling interrupt

pulse = 0;

lcd.begin(16, 2);//initializing LCD

lcd.setCursor(0,0);

lcd.print("frequency");

lcd.setCursor(0,1);

34 | P a g e
lcd.print("locked loop");

delay(1000);

lcd.clear();

void blinkk()// function for counting rpm using interrupt

pulse += 1;

void health() // use for display and occur operation

lcd.setCursor(0,0);

lcd.print("Speed:");

lcd.setCursor(9,0);

lcd.print(beat);

delay(1);

time_delay++;

if(time_delay>=330)

lcd.setCursor(0,0);

35 | P a g e
lcd.print("Speed:");

lcd.setCursor(9,0);

lcd.print(beat);

beat=pulse;// change according to condition

time_delay = 0;

pulse = 0 ;

lcd.clear();

if(beat>160)

analogWrite(fan,220);

lcd.setCursor(0,1);

lcd.print("Freq:=");

lcd.setCursor(9,1);

lcd.print("100");

else if(beat<130)

lcd.setCursor(0,1);

lcd.print("Freq:=");

lcd.setCursor(9,1);

36 | P a g e
lcd.print("90 ");

analogWrite(fan,230);

else

analogWrite(fan,220);

lcd.setCursor(0,1);

lcd.print("Freq:=");

lcd.setCursor(9,1);

lcd.print("90");

void loop()

health();

37 | P a g e
4.17PRECAUTIONS

 SOLDERING PRECAUTIONS
The construction was carried out with care. The precautions taken during the soldering were:

 The tip of soldering iron was kept clean with the help of a file from time to time.

 The solder wire was of smaller thickness.

 Extra solder was not used in order to avoid a cause of short circuit in the conductive path.

 The overheating of components was avoided to prevent component damage as a result of

excessive heat on the components due to the heat from the soldering iron.

 The leads of the components were kept clean before soldering, with the use of sand paper.

 COMPONENTS PRECAUTION:
 IR sensor used should be sensitive. Before using in the circuit it should be tested with a

multi-meter.

 I.C should not be heated much while soldering; too much heat can destroy the I.C. For

safety and ease of replacement, the use of I.C socket is suggested.

 While placing the I.C pin no 1 should be made sure at right hole.

 Opposite polarity of battery can destroy I.C so please check the polarity before

switching ON the circuit. One should use diode in series with switch for safety since

diode allows flowing current in one direction only.

 Each component was soldered neatly and clean.

 We should use insulated wires

38 | P a g e
4.18 SOFTWARE ASPECT

4.18.1Proteus
Keil development tools for the 8051 microcontroller architecture supports every level of software

developer from the professional applications engineered to the student just learning about

embedded software development.

The Keil 8051 development tools are designed to solve the complex problems facing embedded

software developer. The keil software 8051 development tools are programs used to compile C

code, assemble source files, link and locate object modules and libraries, create hex files, and

debug the target program. Some of the commonly used keil software 8051 development tools

are:-

 µvision4 for windows is an integrated development environment that combines project

management, source code editing and program debugging in one single Powerful

environment. 

 The C51 ANSI optimizing C cross compiler creates re-locatable object modules from the C
source code. 

 The A51 macro assembler creates re-locatable object modules from the 8051 assembly

source code. 

 The L51 linker/locater combines re-locatable object modules created by the C51 compiler

and the A51 assembler into object modules. 

39 | P a g e
 The LIB51 library manager combines object modules into libraries that may be used by

the linker.

 The OHS51 object-HEX converter creates Intel HEX files from absolute object modules. 

4.18.2 Software Development Cycle

When the keil software tools are used, the project development cycle is roughly the

same as it is for any other software development project.

 Create a project, select the target chip from device database, and configure the tools settings.
 Create source file in C or assembly.
 Build the application with the project manager.
 Correct the errors in source file.
 Test the linked application.
C51 Compiler and A51 Assembler

Source files are created by the µ vision4 IDE and are passed to the C51 compiler or A51

Assembler. The compiler and assembler process source files and create re-locatable files. The

Keil C51 compiler is a full ANSI implementation of the C programming language that supports

all standard features of the C language. In addition, numerous features for direct support of the

8751 architecture have been added.

40 | P a g e
4.18.3 COMPILING IN WINDOWS ENVIRONMENT:
PROTEUS Software:-

Fig. ??????
It is the Software which we have used to develop the program using Embedded C Language. It
has inbuilt compiler in it which is used to convert Embedded C program into Hex file. The hex
file is dumped into the microcontroller by which it will understand the code we have return in
Embedded C language and operates according to the logics which we have written.
4.18.4 PROGRAM LOADER

Proload:-
This is the programmer

which we have used to

dump the hexadecimal

code into the

Microcontroller which we

have generated using Kiel

Micro vision Software. Fig. ?????

41 | P a g e
CHAPTER 5

PCB FABRICATION

5.1 PCB FABRICATION PROCESS

PCB form the backbone of all major electronics. These miraculous inventions pop up in nearly
all computational electronics, including simple device like digital clocks, calculator, etc. for the
uninitiated, a PCB routes electrical signal through electronics, which satisfies the device’s
electrical and mechanical circuit requirements. In short, PCB tells the electricity where to go,
bringing your electronics to life.

PCB direct current around their surface through a network of copper pathways. The complex
system of copper routes determines the unique role of each piece of PCB.

Step 1: Design and output


Commonly used PCB design software includes Altium designer, OrCAD, Pads, KiCad, Eagle
etc. Once the PPCB design is approved for production, designers export the design into format
their manufacturers support. After a thorough examination, designers forward PCB file to PC
board house for production.

Step 2: From file to film


Manufacturers use a special printer called a plotter, which makes a photo films of the PCB.
Although it’s a laser printer, it isn’t a standard laser jet printer. Plotter use incredibly precise
printing technology to provide a highly detailed film of the PCB design.

The final product result in a plastic sheet with a photo negative of the PCB in black ink. Black
ink represent the conductive part of the PCB. The remaining clear portion of the image denotes
the area of non-conductive material.

42 | P a g e
Step 3: Printing the inner layers
This step in PCB manufacturing prepare to make actual PCB. The basic form of PCB comprises
a laminate board whose core material is epoxy resin and glass fiber that are also called substrate
material.

In PCB construction, cleanliness does matter. The copper sided laminates is cleaned and passed
into a decontaminated environment.

Next, the clean panel receives a layer of photo-sensitive film called photo resist. The film and
board line up and receive a blast of UV lights. The light passes through a clear part of the film.

After the board becomes prepared, it is washed with an alkaline solution that removes any photo
resist left unhardened.

The product emerges with resist properly covering the copper areas meant to remain in final
form.

Step 4: Removing the unwanted copper


The copper solvent solution bath removes all of the exposed copper. Meanwhile, the desired
copper remains fully protected beneath the hardened layer of photo resist.

Step 5: Layer alignment and optical inspection


With all the layers are clean and ready, the layer require alignment punches to ensure they all
line up. The technician places the layer into a machine called the optical punch, which permits an
exact correspondence so the registration holes are accurately punched.

Once the layer are placed together, it’s impossible to correct any errors occurring on the inner
layers. Another machine perform an automatic optical inspection of the panels to confirm a total
absence of defects.

43 | P a g e
Step 6: Layer-up and bond
In this stage, the circuit board
take shape. All the separate layers
await their union. The process
happens in two steps: layer-up
and bonding.

The outer layer material consists


of sheets of fiber glass, pre-
impregnated with epoxy resin.
The shorthand for this is called
prepreg. A thin copper foil also
covers the top and bottom of the
original substrate, which contain
the copper trace etchings.

The bonding occurs on a heavy


steel table with metal clamps.
The layers securely fits into the
pins attaché d to the table. Figure5.1: showing fabrication of PCB layout

Everything must fit snugly to


prevent shifting during the alignment.

Step 7: Drill
Finally, holes are bored into the stack board. All components are slated to come later. The holes
are drilled to a hairs-width-the drill achieves 100 microns in diameter.

To find the location of the drill targets, an x-ray locator identifies the proper drill target spots.
Then, proper registration holes are bored to secure the stack for the series of more specific holes.

44 | P a g e
CHAPTER-6

ADVANTAGE AND DISADVANTAGE

Advantages:

 Automatic controlling of speed at various load.

 No need for manual monitoring.

 Fast response.

 Efficient and low cost design.

 Low power consumption.

 Conservation energy.

Disadvantages:

 Interfacing of high voltage device to microcontroller is sensitive.

Applications:

 Industrial application.

 In chemical labs.

45 | P a g e
CHAPTER-7

CONCLUSIONS

7.1 RESULT
The project “FREQUENCY LOCKED LOOP DC MOTOR SPEED CONTROL SYSTEM”

was designed such that to control and maintain constant speed of DC motor event at variable

load automatically without any manual mechanism.

7.2 CONSLUSION
Integrating features of all the hardware components used have been developed in it. The

presence of every module has been reasoned out and placed carefully, thus contributing the best

working of the unit. Secondly, using highly advanced IC’s is 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 “FREQUENCY LOCKED LOOP DC MOTOR CONTROL” is mainly intended to

control and maintain constant speed of DC motor even at variable load.

The speed DC motor can be varied by varying the input reference frequency. These two

frequency are continuously compared and the difference of these frequencies gets converted into

equivalent voltage and fed to DC motor. If the reference frequency is greater than feedback

frequencies, than the voltage input to the motor is increased till both frequency are equal. If the

reference frequencies is less than the motor feedback frequency than the voltage input to the Dc

motor are reduced so as to match with reference frequency. In this way the speed of Dc motor

can be controlled based on input frequency.

46 | P a g e
BIBLIOGRAPHY

WEBSITES

1. www.wikipedia.com

2. www.circuitdigest.com

3. www.efxkits.com

4. www.elprocus.com

5. http://www.nptel.com

6. http://www.ieee.com

BOOKS

Programming and Customizing the PIC Microcontroller by MykePredko

Power system by C.L Wadhwa

47 | P a g e

You might also like