You are on page 1of 38

INTRODUCTION

EMBEDDED SYSTEM

Embedded system is a combination of hardware and software use to achieve a


single task within a given time frame, repeatedly and endlessly, with or without
human interactions. Embedded system of a computer system that monitor, respond to
control an external environment. Environment connected to system through sensors,
actuators and other input output interfaces. Embedded system must meet timing and
other constraints imposed on it by environment. An embedded system in general,
incorporates hardware, operating system and peripheral devices and communication
software to enable to perform the predefined functions.

In contrast to desktops that perform a variety of tasks, an embedded system


performs a single, well-defined task. The system has a processor, associated
peripherals and software for a specific purpose. 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 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.
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. 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".

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 do not expose
programmability as a primary feature generally need to support software updates.

WSN, makes use of miniaturization made possible by advanced IC design to


couple full wireless subsystems to sophisticated sensors, enabling people and
companies to measure a myriad of things in the physical world and act on this
information through IT monitoring and control systems. These motes are completely
self contained, and will typically run off a battery source for many years before the
batteries need to be changed or charged. An embedded system is a computer system
that cannot be programmed by the user because it is pre-programmed for a specific
task and embedded within the equipment which it serves. It has three main
components:
1. It has hardware.
2. It has main application software. The application software may perform
Concurrently the series of tasks or multiple tasks.
3. It has a real time operating system (RTOS) that supervises the application software
and provides to let the processor to run a process as per scheduling and do the context.
RTOS defines the way of the system works.

CHARACTERISTICS
Respond to external events.
Timeless, Robustness/Safety.
Processing power and memory limitations.
Program stored in non-volatile memory such that it can be executed on power.

MICROCONTROLLER FOR EMBEDDED SYSTEMS


Microcontroller is a highly integrated chip that contains all the components
comprising the controller. Typically it includes the CPU, RAM some form of ROM,
I/O ports and timers. A printer is an example for an embedded system since a
processor inside the printer does any number of applications as word processor, print
Server, video game player, network server or internet terminal software for variety of
applications can be loaded.

A PC can run a myriad task is that it has RAM memory and an operating
system that loads the application software that is typically burned into ROM. Each
embedded system has a microcontroller inside it that performs one task. One of the
most critical needs of the microcontroller is to decrease the power consumption in
space. This can be achieved by integrating more functions into the CPU chip.

In high performance embedded processor, the trend is to integrate more and


more function into the CPU chip and let the designer to decide which feature is
wanted to be used. A microcontroller is a computer-on-a-chip, or a single-chip
computer. Micro suggests that the device is small, and controller tells you that the
device might be used to control objects, processes, or events.
Another term to describe a microcontroller is embedded controller, because the
microcontroller and its support circuits are often built into, or embedded in, the
devices they control. Any device that measures, stores, controls, calculates, or displays
information is a candidate for putting a microcontroller inside. The largest single use
for microcontrollers is in automobiles-just about every car manufactured today
includes at least one microcontroller for engine control, and often more to control
additional systems in the cars.
CHAPTER3

BLOCK DIAGRAM

BATTERY

ARDUNIO SERVO MOTOR

MOTOR DRIVER

MOTOR
BATTERY

In the modern era, electrical energy is normally converted from


mechanical energy, solar energy, and chemical energy etc. A battery is a device
that converts chemical energy to electrical energy. The first battery was
developed by Alessandro Volta in the year of 1800. In the year 1836, John
Frederic Daniell, a British chemist developed the Daniell cell as an improved
version of the voltaic cell. From that time until today, the battery has been the
most popular source of electricity in many daily life applications.In our daily
life, we generally use two types of battery, one of them is which can be used
once before it gets totally discharged. Another type of battery is rechargeable
which means it can be used multiple times by recharging it externally. The
former is called primary battery and the later is called secondary battery.
Batteries can be found in different sizes. A battery may be as small as a shirt
button or may be so big in size that a whole room will be required to install a
battery bank. With this variation of sizes, the battery is used anywhere from
small wrist watches to a large ship.

We often see this symbol in many diagrams of electrical and electronics


network. This is the most popularly used symbol for battery. The bigger lines
represent positive terminal of the cells and smaller lines represent negative
terminal of the cells connected in the battery.

HISTORY OF BATTERY

In the year of 1936 during the middle of summer, an ancient tomb was
discovered during construction of a new railway line near Bagdad city in Iraq.
The relics found in that tomb were about 2000 years old. Among these relics,
there were some clay jars or vessels which were sealed at the top with pitch. An
iron rod, surrounded by a cylindrical tube made of wrapped copper sheet was
projected out from this sealed top. When these pots were filled with an acidic
liquid, they produced a potential difference of around 2 volts between the iron
and copper. These clay jars are suspected to be 2000 year old battery cells.

In 1786, Luigi Galvani, an Italian anatomist and physiologist was


surprised to see that when he touched a dead frogs leg with two different
metals, the muscles of the legs contracted. He could not understand the actual
reason why, otherwise he would have been known as the first inventor of the
battery cell. He thought the reaction might be due to a property of the tissues.

After that, Alessandro Volta realized that same phenomenon could be


created by using cardboard soaked in salt water instead of frog's leg. He
sandwiched a copper disc and a zinc disc with a piece of cardboard soaked in
salt water in between them and found a potential difference between the copper
and zinc. After that in 1800, he developed the first Voltaic Pile (battery)
constructed of alternating copper and zinc discs with pieces of cardboard soaked
in brine between them. This system could produce measurable current.
Alessandro Volta's voltaic pile was considered the first "wet battery cell". Thus,
the history of battery began.

The main problem with the Voltaic pile was that, it could not deliver
current for a long time. This problem was solved by a British inventor John F.
Daniell in 1836. He invented a more developed version of the battery cell which
is known as the Daniell cell. Here in this cell, one zinc rod is immersed in zinc
sulfate in one container and one copper rod is immersed in copper (II) sulfate in
another container. The solutions of these two containers are bridged by a U
shaped salt bridge. A Daniell cell could produce 1.1 volt and this type of battery
lasted much longer than the Voltaic pile. In 1839, the fuel cell was designed by
Sir William Robert Grove, a discoverer and man of science. He mixed hydrogen
and oxygen within an electrolyte solution, and created electricity and water. The
fuel cell did not deliver enough electricity, but it is helpful. Bunsen (1842) and
Grove (1839) created enhancements to battery that used liquid electrodes to

supply electricity.

In the year of 1859, Gaston Plante; first developed the lead acid battery
cell. This was the first form of rechargeable secondary battery. The lead acid
battery is still in use for many industrial purposes. It is still the most popular to
be used as car battery. In 1866, the battery was again developed by a French
engineer, Georges Leclanche. It was a carbon-zinc wet cell battery known as the
Leclanche cell. Crushed manganese dioxide mixed with a bit of carbon forms
the positive electrode and a zinc rod is used as the negative electrode.
Ammonium chloride solution is used as a liquid electrolyte. After some years,
Georges Leclanche himself improved his own design by replacing liquid
ammonium chloride solution with ammonium chloride. This was the invention
of the first dry cell. In 1901, Thomas Alva Edison discovered the alkaline
accumulator. Thomas Edison's basic cell had iron as the anode material (-) and
nickel oxide as the cathode material (+). This is just one portion of an endless
history of battery .

Step by Step Development in History of Batteries

Developer/Inventor Country Year Invention


Luigi Galvani Italy 1786 Animal Electricity
Alessandro Volta Italy 1800 Voltaic Pile
John F. Daniell Britain 1836 Daniell Cell
Sir William Robert Grove Britain 1839 Fuel Cell
Robert Bunsen German 1842 used liquid electrodes to supp
Gaston Plante France 1859 Lead Acid Battery
Georges Leclanche France 1866 Leclanche Cell
Thomas Alva Edison United States 1901 Alkaline Accumulator

WORKING PRINCIPLE OF BATTERY

To understand the basic principle of battery properly, first, we should


have some basic concept of electrolytes and electrons affinity. Actually, when
two dissimilar metals or metallic compounds are immersed in an electrolyte,
there will be a potential difference produced between these metals or metallic
compounds. It is found that, when some specific compounds are added to water,
they get dissolved and produce negative and positive ions. This type of
compound is called an electrolyte. The popular examples of electrolytes are
almost all kinds of salts, acids, and bases etc. The energy released during
accepting an electron by a neutral atom is known as electron affinity. As the
atomic structure for different materials are different, the electron affinity of
different materials will differ. If two different kinds of metals or metallic
compounds are immersed in the same electrolyte solution, one of them will gain
electrons and the other will release electrons. Which metal (or metallic
compound) will gain electrons and which will lose them depends upon the
electron affinities of these metals or metallic compounds. The metal with low
electron affinity will gain electrons from the negative ions of the electrolyte
solution. On the other hand, the metal with high electron affinity will release
electrons and these electrons come out into the electrolyte solution and are
added to the positive ions of the solution. In this way, one of these metals or
compounds gains electrons and another one loses electrons. As a result, there
will be a difference in electron concentration between these two metals. This
difference of electron concentration causes an electrical potential difference to
develop between the metals. This electrical potential difference or emf can be
utilized as a source of voltage in any electronics or electrical circuit. This is a
general and basic principle of battery.

ARDUINO

Arduino is an open-source prototyping platform based on easy-to-use


hardware and software. Arduino boards are able to read inputs - light on a
sensor, a finger on a button, or a Twitter message - and turn it into an output -
activating a motor, turning on an LED, publishing something online. You can
tell your board what to do by sending a set of instructions to the microcontroller
on the board. To do so you use the Arduino programming language (based
onWiring), and the Arduino Software (IDE), based on Processing.

Over the years Arduino has been the brain of thousands of projects, from
everyday objects to complex scientific instruments. A worldwide community of
makers - students, hobbyists, artists, programmers, and professionals - has
gathered around this open-source platform, their contributions have added up to
an incredible amount of accessible knowledge that can be of great help to
novices and experts alike.

Arduino was born at the Ivrea Interaction Design Institute as an easy tool for
fast prototyping, aimed at students without a background in electronics and
programming. As soon as it reached a wider community, the Arduino board
started changing to adapt to new needs and challenges, differentiating its offer
from simple 8-bit boards to products for IoT applications, wearable, 3D
printing, and embedded environments. All Arduino boards are completely open-
source, empowering users to build them independently and eventually adapt
them to their particular needs. Thesoftware, too, is open-source, and it is
growing through the contributions of users worldwide.

Why Arduino?

Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-
to-use for beginners, yet flexible enough for advanced users. It runs on Mac,
Windows, and Linux. Teachers and students use it to build low cost scientific
instruments, to prove chemistry and physics principles, or to get started with
programming and robotics. Designers and architects build interactive
prototypes, musicians and artists use it for installations and to experiment with
new musical instruments. Makers, of course, use it to build many of the projects
exhibited at the Maker Faire, for example. Arduino is a key tool to learn new
things. Anyone - children, hobbyists, artists, programmers - can start tinkering
just following the step by step instructions of a kit, or sharing ideas online with
other members of the Arduino community.
There are many other microcontrollers and microcontroller platforms available
for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets,
MIT's Handyboard, and many others offer similar functionality. All of these
tools take the messy details of microcontroller programming and wrap it up in
an easy-to-use package. Arduino also simplifies the process of working with
microcontrollers, but it offers some advantage for teachers, students, and
interested amateurs over other systems:

Inexpensive - Arduino boards are relatively inexpensive compared to


other microcontroller platforms. The least expensive version of the Arduino
module can be assembled by hand, and even the pre-assembled Arduino
modules cost less than $50

Cross-platform - The Arduino Software (IDE) runs on Windows,


Macintosh OSX, and Linux operating systems. Most microcontroller systems
are limited to Windows.

Simple, clear programming environment - The Arduino Software (IDE) is


easy-to-use for beginners, yet flexible enough for advanced users to take
advantage of as well. For teachers, it's conveniently based on the Processing
programming environment, so students learning to program in that environment
will be familiar with how the Arduino IDE works.

Open source and extensible software - The Arduino software is published


as open source tools, available for extension by experienced programmers. The
language can be expanded through C++ libraries, and people wanting to
understand the technical details can make the leap from Arduino to the AVR C
programming language on which it's based. Similarly, you can add AVR-C code
directly into your Arduino programs if you want to.
Open source and extensible hardware - The plans of the Arduino boards
are published under a Creative Commons license, so experienced circuit
designers can make their own version of the module, extending it and
improving it. Even relatively inexperienced users can build the breadboard
version of the module in order to understand how it works and save money.

Arduino In brief

DESCRIPTION ON ARDUINO :
The current topic is the Arduino In brief description and outlook of the
arduinoboard , features , applications of the board are left to your creative part .
whether you make a Home Automation System or a Quadcopter or many
multidisciplinary projects that impresses you and your thoughts.

First of all we need to understand the components present in the board , here are
the components list numbered according to clockwise direction the Arduino
board.
Arduino In brief states the following factors:-
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 (digitalRead and digitalWrite) 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 pinMode(),
digitalRead(), and digitalWrite() commands. Each pin has an internal pull-up
resistor which can be turned on and off using digitalWrite() (w/ a value of
HIGH or LOW, respectively) when the pin is configured as an input. The
maximum current per pin is 40 mA.(remember we need to keep these important
points in mind for the projects we going to workout in the website).
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 theWT11 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
attachInterrupt() function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the
analogWrite() 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, its 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 analogRead() 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 labelled 9V). The input voltage to the Arduino board
when its 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.
Note that different boards accept different input voltages ranges, please see the
documentation for your board. Also note that the LilyPad 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. Not currently supported
by the Arduino software.
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
board.\

Example connections for a better idea :-

ARDUINO UNO BOARD:-

ARDUINO WITH :-
1)Photocell ; 2)Servo ; 3)Momentary button ; 4) IR Reflective Sensor ; 5)
Kill Switch
*ARDUINO MICROCONTROLLERS

GENERAL RELAY SWITCHES CONNECTIONS WITH


ARDUINO:-
1)

2)
ARDUINO CONNECTION WITH 1602LCD :-
What is Servo Motor
This is nothing but a simple electrical motor, controlled with the help of
servomechanism. If the motor as controlled device, associated with
servomechanism is DC motor, then it is commonly known DC Servo Motor. If
the controlled motor is operated by AC, it is called AC Servo Motor.

Servo Motor Theory


There are some special types of application of electrical motor where rotation of
the motor is required for just a certain angle not continuously for long period of
time. For these applications, some special types of motor are required with some
special arrangement which makes the motor to rotate a certain angle for a given
electrical input (signal). For this purpose servo motor comes into picture. This
is normally a simple DC motor which is controlled for specific angular rotation
with the help of additional servomechanism (a typical closed loop feedback
control system). Now days servo system has huge industrial applications.

What is a servo motor?

Servo motors (or servos) are self-contained electric devices (see Figure 1
below) that rotate or push parts of a machine with great precision. Servos are
found in many places: from toys to home electronics to cars and airplanes. If
you have a radio-controlled model car, airplane, or helicopter, you are using at
least a few servos. In a model car or aircraft, servos move levers back and forth
to control steering or adjust wing surfaces. By rotating a shaft connected to the
engine throttle, a servo regulates the speed of a fuel-powered car or aircraft.
Servos also appear behind the scenes in devices we use every day. Electronic
devices such as DVD and Blu-ray DiscTM players use servos to extend or retract
the disc trays. In 21st-century automobiles, servos manage the car's speed: The
gas pedal, similar to the volume control on a radio, sends an electrical signal
that tells the car's computer how far down it is pressed. The car's computer
calculates that information and other data from other sensors and sends a signal
to the servo attached to the throttle to adjust the engine speed. Commercial
aircraft use servos and a related hydraulic technology to push and pull just about
everything in the plane.

This assortment of servos is available in stores and by mail order. Servos range in price and application.

And of course, robots might not exist without servos. You see servo-controlled
robots in almost every movie (those complex animatronic puppets have dozens
of servos), and you have probably seen a number of robotic animal toys for sale.
Smaller laboratory robots also use servos to move their joints. Hobby servos
come in a variety of shapes and sizes for different applications. You may want a
large, powerful one for moving the arm of a big robot, or a tiny one to make a
robot's eyebrows go up and down. Figure 2 below shows two sizes you can find
in a hobby store an inexpensive common size and a more expensive miniature
one.
Two common servo sizes. The standard servo on the left can range in power or speed to move something q
ommodate a heavier load, such as steering a big radio-controlled monster truck or lifting the blade o
earthmover toy. The miniature servo is about the size of a U.S. quarter and is intended for applicatio
is a critical factor but a lot of power is not.

How does a servo motor work?

The simplicity of a servo is among the features that make them so reliable. The
heart of a servo is a small direct current (DC) motor, similar to what you might
find in an inexpensive toy. These motors run on electricity from a battery and
spin at high RPM (rotations per minute) but put out very low torque (a twisting
force used to do work you apply torque when you open a jar). An
arrangement of gears takes the high speed of the motor and slows it down while
at the same time increasing the torque. (Basic law of physics: work = force x
distance.) A tiny electric motor does not have much torque, but it can spin really
fast (small force, big distance). The gear design inside the servo case converts
the output to a much slower rotation speed but with more torque (big force, little
distance). The amount of actual work is the same, just more useful. Gears in an
inexpensive servo motor are generally made of plastic to keep it lighter and less
costly (see Figure 3 below). On a servo designed to provide more torque for
heavier work, the gears are made of metal (see Figure 4 below) and are harder
to damage.

The gears in a typical standard-size servo are made of plastic and convert the fast, low-power motion of
ht) to the output shaft (on the left).

In a high-power servo, the plastic gears are replaced by metal ones for strength. The motor is usually more
low-cost servo and the overall output torque can be as much as 20 times higher than a cheaper plastic o
more expensive, and high-output servos can cost two or three times as much as standard ones.

With a small DC motor, you apply power from a battery, and the motor spins.
Unlike a simple DC motor, however, a servo's spinning motor shaft is slowed
way down with gears. A positional sensor on the final gear is connected to a
small circuit board (see Figure 5 below). The sensor tells this circuit board how
far the servo output shaft has rotated. The electronic input signal from the
computer or the radio in a remote-controlled vehicle also feeds into that circuit
board. The electronics on the circuit board decode the signals to determine how
far the user wants the servo to rotate. It then compares the desired position to
the actual position and decides which direction to rotate the shaft so it gets to
the desired position.

The circuit board and DC motor in a high-power servo. Did you notice how few parts are on the circ
ve evolved to a very efficient design over many years.

Imagine you are playing catch with a friend on a sports field. You stand at one
end and want your friend to go out for a long throw. You could keep calling out
"farther, farther, farther" until she got as far away as you wanted. But if she
went out farther than you can throw, you would have to call out "closer" until
she got back to the right spot. If she were a simple motor in a robot arm and you
were the microprocessor, you would have to spend some of your time watching
what she did and giving her commands to move her back to the right spot (this
is called a feedback loop). If she were a servo motor, you could just say "go out
exactly 4.5 meters" and know that she would find the right spot. That is what
makes servo motors so useful: once you tell them what you want done, they do
the job without your help. This automatic seeking behavior of servo motors
makes them perfect for many robotic applications.

Types of servo motors

Servos come in many sizes and in three basic types: positional rotation,
continuous rotation, and linear.

Positional rotation servo: This is the most common type of servo motor.
The output shaft rotates in about half of a circle, or 180 degrees. It has
physical stops placed in the gear mechanism to prevent turning beyond
these limits to protect the rotational sensor. These common servos are
found in radio-controlled cars and water- and aircraft, toys, robots, and
many other applications.

Continuous rotation servo: This is quite similar to the common


positional rotation servo motor, except it can turn in either direction
indefinitely. The control signal, rather than setting the static position of
the servo, is interpreted as the direction and speed of rotation. The range
of possible commands causes the servo to rotate clockwise or
counterclockwise as desired, at varying speed, depending on the
command signal. You might use a servo of this type on a radar dish if you
mounted one on a robot. Or you could use one as a drive motor on a
mobile robot.

Linear servo: This is also like the positional rotation servo motor
described above, but with additional gears (usually a rack and
pinion mechanism) to change the output from circular to back-and-forth.
These servos are not easy to find, but you can sometimes find them at
hobby stores where they are used as actuators in larger model airplanes.

Selecting a servo motor

When starting a project that uses servos, look at your application requirements.
How fast must the servo rotate from one position to another? How hard will it
have to push or pull? Do I need a positional rotation, continuous rotation, or
linear servo? How much overshoot is allowable? The less you pay for the
servo, the less mechanical power it will have to muster and the less precision it
will have in its movements. You can pay a bit more and get one that moves
quickly, but it may not have a lot of power. You can also buy one that will pull
or push large loads, but it may not move quickly or precisely. Manufacturers'
websites and online hobby guides will have a lot of this information you can use
to compare models. You will also find that hobby stores have a selection of
servos and can usually help you decide which one is right for your project and
budget.

Controlling a servo motor

Servos take commands from a series of pulses sent from the computer or radio.
A pulse is a transition from low voltage to high voltage which stays high for a
short time, and then returns to low. In battery devices such as servos, "low" is
considered to be ground or 0 volts and "high" is the battery voltage. Servos tend
to work in a range of 4.5 to 6 volts, so they are extremely hobbyist computer-
friendly.

Have you ever picked up one end of a rope that was tied to a tree or held one
end of a jump rope while a friend held the other? Imagine that, while holding
your end of the rope, you moved your arm up and down. The rope would make
a big hump that would travel from your end to the other. What you have done is
applied a pulse, and it traveled down the rope as a wave. As you raise your hand
up and down, if you keep your hand in the air longer, someone watching this
experiment from the side would see that the pulse in the rope would be longer
or wider. If you bring your hand down sooner, the pulse is shorter or more
narrow. This is the pulse width. If you keep your end going up and down,
making a whole bunch of these pulses one after another, you have created
a pulse train (see Figure 6 below). How often did you raise and lower your
end? This is the frequency of your pulse train and is measured in pulses per
second, or Hz (abbreviation of "hertz").

Note: The microprocessor in your computer uses pulses from special clock
circuitry to get the job done. Have you heard of your computer speed referred to
as something like 1.7 gigahertz (GHz)? This is a way of saying that the pulses
are coming at 1.7 billion pulses per second, or 1,700,000,000 Hz. Imagine
trying to move your rope that fast!

An example of a pulse train you might generate to control a servo, as shown in a screen capture from an in
illoscope, an instrument for observing voltages). Here, a pulse is generated once every 20 milliseconds, o
this example, the pulse width is about 2 milliseconds, which would have a servo rotate almost all the way t
ion. An oscilloscope is incredibly useful for testing and debugging systems that use servos.
Your servo must be connected to a source of power (4.5 to 6 volts) and the
control signal must come from a computer or other circuitry. Each servo's
requirements vary slightly, but a pulse train (as in Figure 6 above) of about 50 to
60 Hz works well for most models. The pulse width will vary from
approximately 1 millisecond to 2 or 3 milliseconds (one millisecond is 1/1000
of a second). Popular hobbyist computers such as the Arduino TM have software
commands in the language for generating these pulse trains. But any
microcontroller can be programmed to generate these waveforms. A system that
passes information based on the width of pulses uses pulse width
modulation (or PWM) and is a very common way of controlling motor speeds
and LED brightness as well as servo motor position.

L293D DESCRIPTION

L293D is a typical Motor driver or Motor Driver IC which allows DC motor to


drive on either direction. L293D is a 16-pin IC which can control a set of two
DC motors simultaneously in any direction. It means that you can control
two DC motor with a single L293D IC. Dual H-bridge Motor Driver integrated
circuit (IC).

The l293d can drive small and quiet big motors as well, check the Voltage
Specification at the end of this page for more info.

Concept

It works on the concept of H-bridge. H-bridge is a circuit which allows the


voltage to be flown in either direction. As you know voltage need to change its
direction for being able to rotate the motor in clockwise or anticlockwise
direction, Hence H-bridge IC are ideal for driving a DC motor.

In a single L293D chip there are two h-Bridge circuit inside the IC which can
rotate two dc motor independently. Due its size it is very much used in robotic
application for controlling DC motors. Given below is the pin diagram of a
L293D motor controller.

There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive the
motor, the pin 1 and 9 need to be high. For driving the motor with left H-bridge
you need to enable pin 1 to high. And for right H-Bridge you need to make the
pin 9 to high. If anyone of the either pin1 or pin9 goes low then the motor in the
corresponding section will suspend working. Its like a switch.

L293D Pin Diagram


Working of L293D

There are 4 input pins for l293d, pin 2,7 on the left and pin 15 ,10 on the right as
shown on the pin diagram. Left input pins will regulate the rotation of motor
connected across left side and right input for motor on the right hand side. The
motors are rotated on the basis of the inputs provided across the input pins as
LOGIC 0 or LOGIC 1.

In simple you need to provide Logic 0 or 1 across the input pins for rotating the
motor.

L293D Logic Table.

Lets consider a Motor connected on left side output pins (pin 3,6). For rotating
the motor in clockwise direction the input pins has to be provided with Logic 1
and Logic 0.

Pin 2 = Logic 1 and Pin 7 = Logic 0| Clockwise Direction


Pin 2 = Logic 0 and Pin 7 = Logic 1| Anticlockwise Direction
Pin 2 = Logic 0 and Pin 7 = Logic 0 | Idle [No rotation] [Hi-Impedance state]
Pin 2 = Logic 1 and Pin 7 = Logic 1 | Idle [No rotation]
In a very similar way the motor can also operate across input pin 15,10 for
motor on the right hand side.

Circuit Diagram For l293d motor driver IC controller.

Voltage Specification
VCC is the voltage that it needs for its own internal operation 5v; L293D will
not use this voltage for driving the motor. For driving the motors it has a
separate provision to provide motor supply VSS (V supply). L293d will use
this to drive the motor. It means if you want to operate a motor at 9V then you
need to provide a Supply of 9V across VSS Motor supply.

The maximum voltage for VSS motor supply is 36V. It can supply a max
current of 600mA per channel.Since it can drive motors Up to 36v hence you
can drive pretty big motors with this l293d.

VCC pin 16 is the voltage for its own internal Operation. The maximum voltage
ranges from 5v and upto 36v.

DC MOTOR

The direct current motor or the DC motor has a lot of application in todays
field of engineering and technology. Starting from an electric shaver to parts of
automobiles, in all small or medium sized motoring applications DC motors
come handy. And because of its wide range of application different functional
types of dc motor are available in the market for specific requirements.

The types of DC motor can be listed as follows

DC motor

Permanent Magnet DC Motor

Separately Excited DC Motor

Self Excited DC Motor

Shunt Wound DC Motor

Series Wound DC Motor

Compound Wound DC Motor

Cumulative compound DC motor

Short shunt DC Motor

Long shunt DC Motor

Differential Compound DC Motor

Short Shunt DC Motor

Long Shunt DC Motor

Brushed
The brushed DC electric motor generates torque directly from DC power
supplied to the motor by using internal commutation, stationary permanent
magnets, and rotating electrical magnets. It works on the principle of Lorentz
force, which states that any current carrying conductor placed within an external
magnetic field experiences a torque or force known as Lorentz force.
Advantages of a brushed DC motor include low initial cost, high reliability, and
simple control of motor speed.

Disadvantages are high maintenance and low life-span for high intensity uses.
Maintenance involves regularly replacing the brushes and springs which carry
the electric current, as well as cleaning or replacing the commutator. These
components are necessary for transferring electrical power from outside the
motor to the spinning wire windings of the rotor inside the motor.

Synchronous

Synchronous DC motors, such as the brushless DC motor and the stepper motor,
require external commutation to generate torque. They lock up if driven directly
by DC power. However, BLDC motors are more similar to a synchronous ac
motor.

Brushless

Brushless DC motors use a rotating permanent magnet in the rotor, and


stationary electrical magnets on the motor housing. A motor controller converts
DC to AC. This design is simpler than that of brushed motors because it
eliminates the complication of transferring power from outside the motor to the
spinning rotor. Advantages of brushless motors include long life span, little or
no maintenance, and high efficiency. Disadvantages include high initial cost,
and more complicated motor speed controllers.

Uncommutated
Other types of DC motors require no commutation.

homopolar motor-A homopolar motor has a magnetic field along the axis
of rotation and an electric current that at some point is not parallel to the
magnetic field. The name homopolar refers to the absence of polarity
change. Homopolar motors necessarily have a single-turn coil, which
limits them to very low voltages. This has restricted the practical
application of this type of motor.
ball bearing motor-A ball bearing motor is an unusual electric motor that
consists of two ball-bearing-type bearings, with the inner races mounted
on a common conductive shaft, and the outer races connected to a high
current, low voltage power supply. An alternative construction fits the
outer races inside a metal tube, while the inner races are mounted on a
shaft with a non-conductive section (e.g. two sleeves on an insulating
rod). This method has the advantage that the tube will act as a flywheel.
The direction of rotation is determined by the initial spin which is usually
required to get it going.

You might also like