Sie sind auf Seite 1von 35

CHAPTER 1: INTRODUCTION

1.1INTRODUCTION TO THE PROJECT:


The purpose of this project is to design and construct a Robot that follows Joystick direction with t
help of Zigbee module and calculating the speed of the Robot. This project consists of a Zigbee bas
remote control system, the Zigbee transmitter transmits the wireless signals according to the joysti
shield button being pressed on the remote Microcontroller and Zigbee based keypad. In the Rob
chassis, Zigbee receiver that is connected to the DC motors to be controlled and receives the
commands. The received commands are sent to the microcontroller for validation and processing. T
Atmega328 microcontroller processes data and controls robot movements through L293d motor driv
circuit. The dc motors are interfaced with the L293d circuit. If the commands received are valid th
the microcontroller takes necessary action of controlling the motors. In this project, we are measuri
the speed of the Robot by using an LED is placed near to the DC motor which detects the number
rotations of the wheel from that rpm it calculates the speed and it shows on the display.

1.2 MOTIVATION TO THE PROJECT:

The purpose of this project is to design and construct a Robot that follows Joystick direction with t
help of Zigbee module and calculating the speed of the Robot. This project consists of a Zigbee bas
remote control system, the Zigbee transmitter transmits the wireless signals according to the joysti
shield button being pressed on the remote Microcontroller and Zigbee based keypad. In the Rob
chassis, Zigbee receiver that is connected to the DC motors to be controlled and receives the
commands. The received commands are sent to the microcontroller for validation and processing. T
Atmega328 microcontroller processes data and controls robot movements through L293d motor driv
circuit. The dc motors are interfaced with the L293d circuit. If the commands received are valid th
the microcontroller takes necessary action of controlling the motors. In this project, we are measuri
the speed of the Robot by using an LED is placed near to the DC motor which detects the number
rotations of the wheel from that rpm it calculates the speed and it shows on the display.
1.3 Applications and Advantages:
 Maximum output can be obtained.
 Efficient and low cost design.
 Zigbee based wireless Robot measuring speed works on IR Proximity sensor.
Applications:
 This Robot can be used in the military purposes.
 This system can be used mainly in industries, home appliances.

1.4 Block Diagram Explanation


Transmitter:

ZIGBEE
Joystick Shield TRANSMITTER

ATMEGA328

MCU

REGULATED
POWER SUPPLY
Receiver:

ZIGBEE
RECEIVER
L293D Motor
Driver Gear DC
Motors
ATMEGA328

MCU

12V RECHARGEABLE REGULATED


POWER SUPPLY
BATTERY

Fig3.1. Block diagrams of Zigbee based wireless Robot measuring speed.

1.5 Components Used:


Wireless communication technology, usage is rapidly increasing nowadays in applications such
wireless sensor networks, industrial automation systems, home automation systems, remote cont
systems, medical care equipments, automation systems for agricultural use, and other applications. Amo
various communication technologies, Zigbee is an emerging and very promising international standard
based wireless-communication technology.

Zigbee technology is a wireless sensor network system which ensures remote monitoring a
controlling of load parameters. Some of the characteristics like low cost, low power, low data rate, ea
installation, low maintenance, multiple topologies, etc., make this communication more suitable for a wi
variety of applications compared to other short-range communication technologies.
CHAPTER 2
LITERARY SURVEY
CHAPTER 3
METHODOLOGY

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

Transmitter:

ZIGBEE
Joystick Shield TRANSMITTER

ATMEGA328

MCU

REGULATED
POWER SUPPLY
Receiver:

ZIGBEE
RECEIVER
L293D Motor
Driver Gear DC
Motors
ATMEGA328

MCU

12V RECHARGEABLE REGULATED


POWER SUPPLY
BATTERY

Fig3.1. Block diagrams of Zigbee based wireless Robot measuring speed.

The main blocks of this project are:


 Arduino UNO (ATMEGA328 Microcontroller)
 Joystick Shield
 Zigbee Module
 DC motors and L293D Motor Driver.
 12V Rechargeable Battery
 Regulated Power Supply

PROJECT OVERVIEW:

An embedded system is a combination of software and hardware to perform a dedicated task. Som
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 t
inputs, process it and give the output. In contrast, a microcontroller not only accepts the data as inputs b
also manipulates it, interfaces the data with various devices, controls the data and thus finally gives t
result.

The “Zigbee based wireless Robot measuring Speed” using microcontroller Atmega328 is
exclusive project which is used to process the data and controls the motors. In this microcontroller AD
channels are built, it converts analog signal to digital form.

Circuit Diagram:

LCD?
LM016L

VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
ARD1
1
2
3

4
5
6

7
8
9
10
11
12
13
14
VCC

AREF
13
PB5/SCK
12
PB4/MISO U1
RESET 11 16 8
~PB3/MOSI/OC2A
10
~ PB2/SS/OC1B
9 2 3
~ PB1/OC1A IN1 VSS VS OUT1
8 7 6
PB0/ICP1/CLKO IN2 OUT2
1
ATMEGA328P-PU
1121

DIGITAL (~PWM)

EN1
7
ANALOG IN

PD7/AIN1
6
A0 ~ PD6/AIN0
PC0/ADC0 5 9
A1 ~ PD5/T1 EN2
PC1/ADC1 4 10 11
A2 PD4/T0/XCK IN3 OUT3
PC2/ADC2 3 15 14
A3 ~ PD3/INT1 IN4 GND GND OUT4
PC3/ADC3 2
A4 PD2/INT0
PC4/ADC4/SDA 1
A5 TX PD1/TXD
PC5/ADC5/SCL 0 L293D
RX PD0/RXD

ARDUINO UNO R3

RXD

TXD

RTS

CTS

Fig 5. Schematic diagram for the Zigbee based wireless Robot (receiver)
CHAPTER 4
SOFTWARE DESCRIPTION

ARDUINO SOFTWARE:

The Arduino IDE is a cross-platform application written in Java, and is derived from the IDE for t
Processing programming language and the Wiring project. It is designed to introduce programming to arti
and other newcomers unfamiliar with software development. It includes a code editor with features such
syntax highlighting, brace matching, and automatic indentation, and is also capable of compiling a
uploading programs to the board with a single click. There is typically no need to edit make files or r
programs on a command-line interface. Although building on command-line is possible if required w
some third-party tools such as Ino.

The Arduino IDE comes with a C/C++ library called "Wiring" (from the project of the same nam
which makes many common input/output operations much easier. Arduino programs are written in C/C+
although users only need define two functions to make a run able program:
• setup() – a function run once at the start of a program that can initialize settings
• loop() – a function called repeatedly until the board powers off

It is a feature of most Arduino boards that they have an LED and load resistor connected between pin
and ground, a convenient feature for many simple tests. The above code would not be seen by a standa
C++ compiler as a valid program, so when the user clicks the "Upload to I/O board" button in the IDE
copy of the code is written to a temporary file with an extra include header at the top and a very simp
main() functionat the bottom, to make it a valid C++ program. The Arduino IDE uses the GNU tool cha
and AVR Libc to compile programs, and uses avr to upload programs to the board. As the Arduino platfo
uses Atmel microcontrollers

Atmel’s development environment, AVR Studioor the newer Atmel Studio, may also be used to devel
software for the Arduino. The Arduino hardware reference designs are distributed under a Creati
Commons Attribution Share-Alike 2.5 license and are available on the Arduino Web site. Layout a
production files for some versions of the Arduino hardware are also available. The source code for the ID
and the on-board library are available and released under the GPLv2 license. Arduino and Arduin
compatible boards uses of shields, which are printed circuit boards that sit atop an Arduino, and plug in
the normally supplied pin-headers. These are expansions to the base Arduino.
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.

4.1 ARDUINO IDE

 Arduino is an open-source project, enabling hobbyists to easily take advantage of the powerful Atme

chips. The Arduino IDE is the software where you can write code and upload it to the Atmega chip. T

code is then executed on the chip.

 Most 3D-printer electronics are Arduino-compatible, they use the Atmega chip and enable the user to uplo

their code using Arduino. This includes Megatronics, Minitronics and RAMPS.

 Before you can start using the electronics you need software 'firmware', that translates machine instructio

(gcode) into actual movements. There are a few options here, including Marlin and Sprinter and Repeti

The actual firmware is not discussed in this document. You can use Arduino to upload this firmware on

your electronics. This document will guide you in the steps you need to take.
Fig 4.1 Dialogue box for Arduino IDE4.2 PROCEDURAL STEPS

1. Downloading & 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.

2. Uploading Filmware:

 To upload a firmware, you must first open the files using File → Open. Select the into 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).

 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 upload will

start. This may take a minute for a large seeking.

4.2.1 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.

Fig 4.2.1 Dialogue box for Arduino serial monitor

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


Fig 4.2.1 Dialogue box for new window

Joystick Shield is directly fixed in transmitter side Arduino Board. The above schematic diagram is
for Robot Receiver. In this LCD is interfaced with Arduino UNO in 4-bit mode. LCD Data Lines are connected
to Pins 7,8,9,10. LCD Control Lines RS,R/W,EN are connected to Pin12,GND,Pin11 of microcontroller. The
L293D has six control signals. Those are En1,En2, In1,In2,In3,In4. Enable Pins are initially given to VCC and
rest of four control signals are given through microcontroller Atmega328. In1, In2,In3,In4 of L293d are
connected to Pin 3,4,5,6. Zigbee Module’s Tx Pin is connected to Rx Pin of the microcontroller. Zigbee
Module at receiver receives serial data and it is given to microcontroller which compares to perform
required operation for the movement of the robot.
We are using 12V DC rechargeable battery and 7805 Regulator to give regulated +5V for
operations of electronic components. The motors are given +12V supply using 7812 Regulator IC.
CHAPTER 5

RESULT

The project “ZIGBEE BASED WIRELESS ROBOT MEASURING SPEED” was


designed such that it used to construct and control a robot that follows the Joystick shield keypad
direction for producing maximum output of the speed of robot which can be used for many
applications. This process was done by the microcontroller with help of IR Proximity. The
ATMEGA328 microcontroller processes data and controls robot movements through L293d motor
driver circuit.
CHAPTER 6
CONCLUSION

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.

FUTURE SCOPE

Our project “ZIGBEE BASED WIRELESS ROBOT MEASURING SPEED” is mainly


intended to follow the Joystick direction using a IR Proximity sensor and using a dc motor. The
signals from the Joystick which is fed as input to the micro controller which is on the receiver part
i.e., robot, turn rotates the dc motor by predefined number of steps. The rotation of DC motor
depends on the commands of the Joystick. In this project, we are calculating the speed of the robot
by connecting LED to dc motor. Then it detects the number of rotations of the wheel per
minute(RPM) and displays the speed in the liquid crystal display. This process is done by the
microcontroller with help of IR Proximity.
This project can be extended by using the temperature sensor, pressure sensor, gas sensors,
etc. In our project, we are taken wheeled robot but it moves only on the smooth surfaces. For the
extension of this robot, instead of wheels connect the bettles and four dc motors attached to it, then
the robot moves on all surfaces easily.
REFERENCES

The sites which were used while doing this project:

1. www.allaboutcircuits.com
2. www.microchip.com
3. www.ti.com/zstack

Books referred:
 ] F. Zhou, G. Tian, Y. Xue, et al., “Robot Wards Inspection System Based on Multi-Pattern
Information Acquisition in Intelligent Space,” Journal of Computational Information Systems,
Vol. 7, No. 11, 2011.
 B. Song, G. Tian and G. Li, “Implementation of ZigBee Based Wireless Sensor and Actuator
Network in Intelligent Space,” Proceedings of International Conference on Computers,
Communications, Control and Automation, Hong Kong, 2011.
APPENDIX [A]:
INTRODUCTION OF 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 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.
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.
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.

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.
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.
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 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:
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..
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

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
APPLICATIONS OF EMBEDDED SYSTEMS:
1 Consumer applications:
At home we use a number of embedded systems which include microwave oven, remote control,
vcd players, dvd players, camera etc….
1 Office automations:
We use office automation systems like fax machine, modem, printer etc…
3 Industrial automations:
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. In critical industries where human presence is avoided there
we can use robots which are programmed to do a specific operation.
4 Computer networking:
In computer networking, Embedded systems are used as bridges routers etc..
5 Tele communications:
In telecommunication, Embedded systems are used as Cell phones, web cameras etc.

APPENDIX

3.2 ARDUINO UNO:

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware


and software. It is a single board microcontroller, descendant of the open-source wiring platform designed
to make the process of using electronics in multidisciplinary projects. Arduino Uno, a microcontroller board
based on the ATmega328 is used in this project. The hardware consists of a simple open hardware design
for the Arduino board with an on-board input/output support. The software consists of a standard
programming language compiler and the boot loader that runs on the board. Arduino hardware is
programmed using a Wiring-based language (syntax and libraries), similar to C++ with some slight
simplifications and modifications, and a Processing-based integrated development environment.
Arduino can sense the environment by receiving input from a variety of sensors and canaffect its
surroundings by controlling lights, motors, and other actuators. The microcontroller on the board is
programmed using the Arduino programming language (based on Wiring) and the Arduino development
environment (based on Processing). Arduino projects can be stand-alone or they can communicate with
software running on a computer (e.g. Flash, Processing, MaxMSP and Megunolink). The hardware
reference designs (CAD files) are available under an open-source license; you are free to adapt them to
your needs. The open-source Arduino environment makes it easy to write code and upload it to the i/o
board. It runs on Windows, Mac OS X, and Linux. In addition to all the features of the previous board, the
Uno now uses an ATmega8U2 instead of the FTDI chip. This allows for faster transfer rates, no drivers
needed for Linux or Mac (in file for Windows is needed), and the ability to have the Uno show up as a
keyboard, mouse, joystick, etc.

3.2.1 Arduino Hardware:

An Arduino board consists of an 8-bit Atmel AVR microcontroller with complementary


components to facilitate programming and incorporation into other circuits. An important aspect of the
Arduino is the standard way that connectors are exposed, allowing the CPU board to be connected to a
variety of interchangeable add-on modules known as shields. Some shields communicate with the Arduino
board directly over various pins, but many shields are individually addressable via an I²C serial bus,
allowing many shields to be stacked and used in parallel. Official Arduino’s have used the mega AVR
series of chips, specifically the ATmega8, ATmega168, ATmega328, ATmega1280, and ATmega2560. A
handful of other processors have been used by Arduino compatibles. Most boards include a 5 volt linear
regulator and a 16 MHz crystal oscillator (or ceramic resonator in some variants), although some designs
such as the Lily Pad run at 8 MHz and dispense with the onboard voltage regulator due to specific form-
factor restrictions. An Arduino's microcontroller is also pre-programmed with a boot loader that simplifies
uploading of programs to the on-chip flash memory, compared with other devices that typically need an
external programmer.
At a conceptual level, when using the Arduino software stack, all boards are programmed over an
RS-232 serial connection, but the way this is implemented varies by hardware version. Serial Arduino
boards contain a simple inverter circuit to convert between RS-232-level and TTL-level signals. Current
Arduino boards are programmed via USB, implemented using USB-to-serial adapter chips such as the FTDI
FT232. Some variants, such as the Arduino Mini and the unofficial Board uno, use a detachable USB-to-
serial adapter board or cable, Bluetooth or other methods. (When used with traditional microcontroller tools
instead of the Arduino IDE, standard AVR ISP programming is used.)
The Arduino board exposes most of the microcontroller's I/O pins for use by other circuits. The
Diecimila, Duemilanove, and current Uno provide 14 digital I/O pins, six of which can produce pulse-width
modulated signals, and six analog inputs. These pins are on the top of the board, via female 0.1 inch headers.
Several plug-in application shields are also commercially available.
3.2.2 Features
• ATmega328 microcontroller

• Input voltage - 7-12V


• 14 Digital I/O Pins (6 PWM outputs)

• 6 Analog Inputs

• 32k Flash Memory

• 16Mhz Clock Speed

The maximum values that Arduino can handle:


• Max frequency: 16MHz

• Max Voltage: 5V

• Max Current: 50mA

Fig3.2 structure of microcontroller

3.2.3 Pin description

• Arduino can be powered using power jack, USB port. Apart from this it can also be powered by using a
external battery or AC to DC adaptor through pin Vin.

• 5V, 3.3V: there is a inbuilt regulator on the board. Through this regulator a constant DC supply of 5V,
3.3V is provided.

• Reset: This pin enables to reset the micro controller.


• IOREF: This pin acts as reference to the inputs given to the arduino board.

• There are 6 pins A0 – A5 through which analog input can be given to the arduino board.

• There are 14 digital pins 0-13. Among these (3,5,6,9,10,11) are PWM pins(pulse width modulation)
from which analog output can be taken from the arduino board.

• There is a inbuilt LED on pin 13.

• AREF- This pin acts as reference to the analog inputs.

• Rx,Tx are used for receiving and transmitting serial data.

• ICSP- (In circuit serial programming)- These pins enable the user to programme the chips on the circuit.

3.3 JOYSTICK SHEILD KEYPAD (Arduino Compatible)

3.3.1 Analog joystick has two variable resistor for two axis. Each variable resistor has three
pins, two extreme pins are connected to Vcc(5v in our case) and ground. The center pin is the
output pin. The output voltage is between Vcc and GND depending on the position of stick. By
measuring the voltage output of two variable resister from which the joystick is built, we can
determine the position of stick in x and y axis.
Fig3.3.1 Structure of Joystick shield keypad
As you can see in the schematic below, full deflection of a potentiometer in either direction
will provide ground or the supply voltage as an output. The analog inputs provided indications that
range between 0 and 1023. It is because adc resolution is 10-bit .

3.3.2 Arduino Interfacing with Joystick:

By knowing x and y axis data , we can know the exact joystick position. As per our application, we
have here considered front, back, left, right position of joystick which corresponds to different speed values
for induction motor speed.
3.4 ZIGBEE MODULE

ZigBee is the name of a specification for a suite of high level communication protocols using small,
low-power, low data rate digital radios based on the IEEE 802.15.4 standard for wireless personal area
networks (WPANs), such as wireless headphones connecting with cell phones via short-range radio. The
technology is intended to be simpler and cheaper than other WPANs, such as Bluetooth. ZigBee is targeted
at radio-frequency (RF) applications which require a low data rate, long battery life, and secure networking.
The standard supports 2.4 GHz (worldwide), 868 MHz (Europe) and 915 MHz (Americas) unlicensed radio
bands with range up to 100 meters. It is operating in an unlicensed, international frequency band. Potential
applications are sensors, interactive toys, smart badges, remote controls, and home automation.

3.4.1 Features of 802.15.4:


 Data rates of 250 kbps with 10-100 meter range.
 Automatic network establishment by the coordinator.
 Power management to ensure low power consumption.
 Low duty cycle - Provides long battery life
 Up to 65,000 nodes on a network
 128-bit AES encryption – Provides secure connections between devices
3.4.2 ZigBee Benefits:
In all of its uses, ZigBee offers four inherent, beneficial characteristics:
 Low cost
 Long Range Signal Transmission and Receiption
 Multi-source products
 Wireless Sensor Network Configuration
 Low power consumption
 High Data Transfer Rate

Zigbee Module has important four pins . Those are Vcc ,GND, Tx, Rx. We can directly
interface Rx and Tx pins with any microcontroller using TTL logic.
Fig3.4 Zigbee module connected to Arduino
3.5 L293D MOTOR DRIVER

The L293D is a quadruple half H-bridge bidirectional motor driver IC that can drive current of up
to 600mA with voltage range of 4.5 to 36 volts. It is suitable to drive small DC-Geared motors, bipolar
stepper motor etc.
3.5.1 Specifications:
 Supply Voltage Range 4.5V to 36V

 600-mA Output current capability per driver

 Separate Input-logic supply

 It can drive small DC-geared motors, bipolar stepper motor.

 Pulsed Current 1.2-A Per Driver

 Thermal Shutdown

 Internal ESD Protection

 High-Noise-Immunity Inputs

Fig3.5.1 L293DMotor Driver


Fig3.5.2 Pin configuration of L293DMotor Driver

As it can be seen in circuit diagram that there are two enable pins viz. en1 & en2 for two
different DC motors enable operation. There are four different control signals to be given to pins
A, B, C, D . The DC motors M1 & M2 are to be connected between pins 3 & 6 and 11 & 14 pins
respectively. We can interface en1, en2, A, B, C, D pins with microcontroller which performs
necessary actions in order to move robot in proper desired direction.There are two separate power
supply 5V and 12V for the IC and DC motors respectively.
3.6 DC MOTOR
We are here using 12V gear DC motor having 1oo RM speed. 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).
Fig3.6 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.
3.7 ROBOT CHASSIS

A Chassis consists of an internal framework that supports a man-made object in its construction
and use. It is an analogous to an animal’s skeleton. An example of a Chassis is the under part of a motor
vehicle, consisting of the frame (on which the body is mounted). Here metallic chassis is used for the Robot.

Fig3.7 Robot Chassis

3.8 VOLTAGE REGULATOR SUPPLY


This is most common voltage regulator that is still used in embedded designs. LM7805 voltage
regulator is a linear regulator. With proper heat sink these LM78xx types can handle even more than 1A
current. They also have Thermal overload protection, Short circuit protection. This will connect at the
output of rectifier to get constant Dc supply instead of ripple voltages. It mainly consists of 3 pins:
1. Input voltage 2. Output voltage 3. Ground
Fig 3.8 Circuit Diagram of Power Supply

3.9 LIQUID CRYSTAL DISPLAY

A liquid crystal display (LCD) is a thin, flat display device made up of any number of color or
monochrome pixels arrayed in front of a light source or reflector. Each pixel consists of a column of
liquid crystal molecules suspended between two transparent electrodes, and two polarizing filters, the
axes of polarity of which are perpendicular to each other. Without the liquid crystals between them,
light passing through one would be blocked by the other. The liquid crystal twists the polarization of
light entering one filter to allow it to pass through the other.

For an 8-bit data bus, the display requires a +5V supply plus 11 I/O lines. For a 4-bit data bus it
only requires the supply lines plus seven extra lines. When the LCD display is not enabled, data lines are
tri-state and they do not interfere with the operation of the microcontroller. For Arduino We are using 4-
bit interface. It means we are using only four data lines with digital i/o lines of the microcontroller.

3.9.1 Signals to the LCD:

The LCD also requires three control lines from the microcontroller:
1) Enable (E)
2) Read/Write (R/W)
3) Register Select (RS)
Fig 3.9.1 Pin Diagram of 16x2 LCD

3.9.2 Pin Description:

Das könnte Ihnen auch gefallen