Multi-Colour Line following Robot CHAPTER 1 INTRODUCTION The records of various parameters of weather like temperature, humidity and pressure are vital for day-to-day activity of the people involved in agriculture, fishing etc and also for industries like salt industry, food processing industry, food storage etc. Therefore it is proposed to develop a monitoring system for various parameters of weather using appropriate sensors like humidity sensor, temperature sensor, pressure sensor for moistures, temperature. These sensors can be interfaced to microcontroller and the corresponding parameter values can be measured and displayed it on PC. 1.1 MOTIVATION: The majestic system is developed by using both PC based and microcontroller section because this system offers low cost, compact, reliable due to integration of CPU, memory and peripheral devices in a single chip and also mainly the system has been developed in PC using modem and cordless section. Then we monitor the status on from any remote area through PC by wireless communication simplex method. For communication purpose between PC to PC simplex wireless communication as been developed. The transmitter PC will send serial data at a specified baud rate through its serial port, which is converted to TTL levels by MAX 232 and 1 DEPARTMENT OF ECE, KGRCET
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Multi-Colour Line following Robot
CHAPTER 1INTRODUCTION
The records of various parameters of weather like temperature, humidity and
pressure are vital for day-to-day activity of the people involved in agriculture, fishing etc
and also for industries like salt industry, food processing industry, food storage etc.
Therefore it is proposed to develop a monitoring system for various parameters of
weather using appropriate sensors like humidity sensor, temperature sensor, pressure
sensor for moistures, temperature. These sensors can be interfaced to microcontroller and
the corresponding parameter values can be measured and displayed it on PC.
1.1MOTIVATION:
The majestic system is developed by using both PC based and microcontroller
section because this system offers low cost, compact, reliable due to integration of CPU,
memory and peripheral devices in a single chip and also mainly the system has been
developed in PC using modem and cordless section. Then we monitor the status on from
any remote area through PC by wireless communication simplex method.
For communication purpose between PC to PC simplex wireless communication
as been developed. The transmitter PC will send serial data at a specified baud rate
through its serial port, which is converted to TTL levels by MAX 232 and converted to
analog. The modulates the analog signal and then transmit through wireless
communication.
In the reception section there is one receiver to receive the data from the
transmitter. The receiver section will receive the transmitted signal and demodulate to
mark and space frequencies. The binary information is converted to RS-232C standard
levels and fed to serial port of receiver PC, which is in remote location area
1.2 ObjectiveThe project deals with the voice recognisation based home automation control
system which is very useful for adults and physical disabled persons.Their was many
projects existed in the market for home automations.
Home Automation industry is growing rapidly; this is fuelled by provide
supporting systems for the elderly and the disabled, especially those who live alone.
Coupled with this, the world population is confirmed to be getting older. Home
1 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
automation systems must comply with the household standards and convenience of usage.
This paper details the overall design of a wireless home automation system (WHAS)
which has been built and implemented. The automation centres on recognition of voice
commands and uses low-power RF Zigbee wireless communication modules which
are relatively cheap.
2 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
CHAPTER 2
EMBEDDED SYSTEM
2.1 INTRODUCTION An embedded system is a system which is going to do a predefined specified task
is the embedded system and is even defined as combination of both software and
hardware. A general-purpose definition of embedded systems is that they are devices used
to control, monitor or assist the operation of equipment, machinery or plant. "Embedded"
reflects the fact that they are an integral part of the system. At the other extreme a general-
purpose computer may be used to control the operation of a large complex processing
plant, and its presence will be obvious. 3
All embedded systems are including computers or microprocessors. Some of these
computers are however very simple systems as compared with a personal computer.
The very simplest embedded systems are capable of performing only a single
function or set of functions to meet a single predetermined purpose. In more complex
systems an application program that enables the embedded system to be used for a
particular purpose in a specific application determines the functioning of the embedded
system. The ability to have programs means that the same embedded system can be used
for a variety of different purposes. In some cases a microprocessor may be designed in
such a way that application software for a particular purpose can be added to the basic
software in a second process, after which it is not possible to make further changes. The
applications software on such processors is sometimes referred to as firmware.
The simplest devices consist of a single microprocessor (often called a "chip”),
which may itself be packaged with other chips in a hybrid system or Application Specific
Integrated Circuit (ASIC). Its input comes from a detector or sensor and its output goes to
a switc or activator which (for example) may start or stop the operation of a machine or,
by operating a valve, may control the flow of fuel to an engine.
As the embedded system is the combination of both software and hardware
3 DEPARTMENT OF ECE, KGRCET
Software Hardware
ALPCVB Etc.,
ProcessorPeripheralsmemory
Embedded System
Multi-Colour Line following Robot
Figure:2.1 Block diagram of Embedded System
Software deals with the languages like ALP, C, and VB etc., and Hardware deals with
Processors, Peripherals, and Memory.
Memory: It is used to store data or address.
Peripherals: These are the external devices connected
Processor: It is an IC which is used to perform some task
Applications of embedded systems
Manufacturing and process control
Construction industry
Transport
Buildings and premises
Domestic service
Communications
Office systems and mobile equipment
Banking, finance and commercial
Medical diagnostics, monitoring and life support
Testing, monitoring and diagnostic systems
Processors are classified into four types like:
Micro Processor (µp)
Micro controller (µc)
Digital Signal Processor (DSP)
4 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
Application Specific Integrated Circuits (ASIC)
Micro Processor (µp):
A silicon chip that contains a CPU. In the world of personal computers, the terms
microprocessor and CPU are used interchangeably. At the heart of all personal computers
and most workstations sits a microprocessor. Microprocessors also control the logic of
almost all digital devices, from clock radios to fuel-injection systems for automobiles.
Three basic characteristics differentiate microprocessors:
Instruction set: The set of instructions that the microprocessor can execute.
Bandwidth : The number of bits processed in a single instruction.
Clock speed : Given in megahertz (MHz), the clock speed determines how many
instructions per second the processor can execute.
Fig: 2.2 elements of microprocessor
Three Basic Elements of a Microprocessor
Micro Controller (µc):
A microcontroller is a small computer on a single integrated circuit containing a
processor core, memory, and programmable input/output peripherals. Program memory
in the form of NOR flash or OTP ROM is also often included on chip, as well as a
typically small amount of RAM. Microcontrollers are designed for embedded
applications, in contrast to the microprocessors used in personal computers or other
general purpose applications.
5 DEPARTMENT OF ECE, KGRCET
Timer, Counter, serial communication ROM, ADC, DAC, Timers, USART, Oscillators
Etc.,
ALU
CU
Memory
Multi-Colour Line following Robot
Figure:2.3 Block Diagram of Micro Controller (µc)
Digital Signal Processors (DSPs):Digital Signal Processors is one which performs scientific and mathematical
operation.Digital Signal Processor chips - specialized microprocessors with architectures
designedspecifically for the types of operations required in digital signal processing.
Application Specific Integrated Circuit (ASIC)
ASIC is a combination of digital and analog circuits packed into an IC to achieve
the desired control/computation function
ASIC typically contains
CPU cores for computation and control
Peripherals to control timing critical functions
Memories to store data and program
Analog circuits to provide clocks and interface to the real world which is analog in
nature
I/Os to connect to external components like LEDs, memories, monitors etc.
Computer Instruction Set
There are two different types of computer instruction set there are:
1. RISC (Reduced Instruction Set Computer) and
2. CISC (Complex Instruction Set computer)
Reduced Instruction Set Computer (RISC)
A RISC (reduced instruction set computer) is a microprocessor that is designed to
perform a smaller number of types of computer instruction so that it can operate at a
6 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
higher speed (perform more million instructions per second, or millions of instructions per
second). Since each instruction type that a computer must perform requires additional
transistors and circuitry, a larger list or set of computer instructions tends to make the
microprocessor more complicated and slower in operation.
Complex Instruction Set Computer (CISC)
CISC, which stands for Complex Instruction Set Computer, is a philosophy for
designing chips that are easy to program and which make efficient use of memory. Each
instruction in a CISC instruction set might perform a series of operations inside the
processor. This reduces the number of instructions required to implement a given
program, and allows the programmer to learn a small but flexible set of instructions.
Memory Architecture
There two different type’s memory architectures there are:
Harvard Architecture
Von-Neumann Architecture
Harvard Architecture
o Computers have separate memory areas for program instructions and data.
There are two or more internal data buses, which allow simultaneous
access to both instructions and data. The CPU fetches program instructions
on the program memory bus.
Von-Neumann Architecture
o A computer has a single, common memory space in which both program
instructions and data are stored. There is a single internal data bus that
fetches both instructions and data. They cannot be performed at the same
time
o The von Neumann architecture is a design model for a stored-program
digital computer that uses a central processing unit (CPU) and a single
separate storage structure ("memory") to hold both instructions and data. It
is named after the mathematician and early computer scientist John von
Neumann. Such computers implement a universal Turing machine and
have a sequential architecture.
7 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
CHAPTER 3
HARDWARE DIAGRAM
Fig: 3.1 Block diagram describing connections line following robot
3.1 WORKING
OPERATION:
The input voltage to the diodes 1 and 2 is supplied from a transformer and is equal
to the peak AC voltage of the secondary winding of the transformer as shown in
graph 1.
The circuit consisting of the combination of the two diodes is called full wave
rectifier.
These diodes combined with a capacitor are known as full wave rectifier with a
capacitor. This capacitor is known as filtering capacitor improves the output of the
rectifier and the efficiency of this rectifier is 81.2%.
8 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
The resistor is used to limit the voltage and current those are supplied to the
regulator in order to avoid the regulator from getting damaged.
The diode 3 is used to protect the diodes 1 and 2 from the back current discharged
by the capacitor.
The output at this point is not completely regulated since there is still some
amount of ripple present in the rectified voltage.
Therefore a regulator is used to ensure low voltage ripple and excellent load and
line voltage regulation.
The resistor after the regulator is used to limit the current supplied to the LED.
When the voltage supplied is greater than 3.8V, the LED will glow. The regulated
DC voltage output is taken across the capacitor and is further supplied to other
applications.
9 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
CHAPTER 4ARM MICROPROCESSOR
4.1. IntroductionSystem-on-chip solutions based on ARM embedded processors address many
different market segments including enterprise applications, automotive systems, home
networking and wireless technologies. The ARM Cortex™ family of processors provides
a standard architecture to address the broad performance spectrum required by these
diverse technologies. The ARM Cortex family includes processors based on the three
distinct profiles of the ARMv7 architecture; the A profile for sophisticated, high-end
applications running open and complex operating systems,the R profile for real-time
systems; and the M profile optimized for cost-sensitive and microcontroller applications.
The Cortex-M3 processor is the first ARM processor based on the ARMv7-M
architecture and has been specifically designed to achieve high system performance in
power- and cost-sensitive embedded applications, such as microcontrollers, automotive
body systems, industrial control systems and wireless networking, while significantly
simplifying programmability to make the ARM architecture an option for even the
simplest applications.
4.2 The History of ARM
The British computer manufacturer Acorn Computers first developed ARM in the
1980s to use in its personal computers. Its first ARM-based products were coprocessor
modules for the BBC Micro series of computers. After the successful BBC Micro
computer, Acorn Computers considered how to move on from the relatively simple MOS
Technology 6502 processor to address business markets like the one that was soon
dominated by the IBM PC, launched in 1981. The Acorn Business Computer (ABC) plan
required that a number of second processors be made to work with the BBC Micro
platform, but processors such as the Motorola 68000 and National Semiconductor
32016 were considered unsuitable, and the 6502 was not powerful enough for a graphics
based user interface.
After testing all available processors and finding them lacking, Acorn decided it
needed a new architecture. Inspired by white papers on the Berkeley RISC project, Acorn
10 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
considered designing its own processor.A visit to the Western Design Center in Phoenix,
where the 6502 was being updated by what was effectively a single-person company,
showed Acorn engineers Steve Furber and Sophie Wilson they did not need massive
resources and state-of-the-art research and development facilities.
Wilson developed the instruction set, writing a simulation of the processor in BBC
Basic that ran on a BBC Micro with a second 6502 processor. This convinced Acorn engineers
they were on the right track. Wilson approached Acorn's CEO, Hermann Hauser, and requested
more resources. Once he had approval, he assembled a small team to implement Wilson's model
in hardware Developed at Acorn Computers Limited,of Cambridge, England,between 1983
and 1985
Problems with CISC:
Slower then memory parts
Clock cycles per instruction
4.3 Migration from the ARM7™ processor family for better
performance and power efficiencyOver the last decade, the ARM7 family of processors has been widely adopted for
many applications. The Cortex-M3 processor builds on this success to present the logical
migration path for ARM7 processor-based systems. The central core offers higher
efficiency; a simpler programming model and excellent deterministic interrupt behaviour,
whilst the integrated peripherals offer enhanced performance at low cost.
Table 4.1 ARM7TDMI-S and Cortex-M3 comparison (100MHz frequency on TSMC
0.18G)
11 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
4.4 ARM and Thumb Performance
4.5 The Thumb-2 instruction set Variable-length instructions
ARM instructions are a fixed length of 32 bits
Thumb instructions are a fixed length of 16 bits
Thumb-2 instructions can be either 16-bit or 32-bit
Thumb-2 gives approximately 26%
improvement in code density over ARM
Thumb-2 gives approximately 25% improvement in performance over Thumb
12 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
4.6 Pipeline OrganizationIncreases speed –
most instructions executed in single cycle
Versions:
3-stage (ARM7TDMI and earlier)
5-stage (ARMS, ARM9TDMI)
6-stage (ARM10TDMI)
3-stage pipeline: Fetch – Decode - Execute
Three-cycle latency,
one instruction per cycle throughput
5-stage pipeline:
Reduces work per cycle => allows higher clock frequency
Separates data and instruction memory => reduction of CPI (average number of
clock Cycles Per Instruction)
13 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
4.7 Operating ModesExcept in the M-profile, the 32-bit ARM architecture specifies several CPU modes,
depending on the implemented architecture features. At any moment in time, the CPU
can be in only one mode, but it can switch modes due to external events (interrupts) or
programmatically.
User mode: The only non-privileged mode.
FIQ mode: A privileged mode that is entered whenever the processor accepts an FIQ interrupt.
IRQ mode: A privileged mode that is entered whenever the processor accepts an IRQ interrupt.
Supervisor (svc) mode: A privileged mode entered whenever the CPU is reset or when an SVC instruction is executed.
Abort mode: A privileged mode that is entered whenever a prefetch abort or data abort exception occurs.
Undefined mode: A privileged mode that is entered whenever an undefined instruction exception occurs.
System mode (ARMv4 and above): The only privileged mode that is not entered by an exception. It can only be entered by executing an instruction that explicitly writes to the mode bits of the CPSR.
4.8 ARM Registers
Registers R0 through R7 are the same across all CPU modes; they are never banked.R13 and R14 are banked across all privileged CPU modes except system mode. That is, each mode that can be entered because of an exception has its own R13 and R14. These registers generally contain the stack pointer and the return address from function calls, respectively.
Aliases:
R13 is also referred to as SP, the Stack Pointer.
R14 is also referred to as LR, the Link Register.
R15 is also referred to as PC, the Program Counter.
14 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
Fig: 4.1 ARM Registers description
15 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
CHAPTER 5HARDWARE REQUIERMENT
5.1 MICRO CONTROLLER
The LPC1768 is a ARM Cortex-M3 based microcontroller for embedded
applications featuring a high level of integration and low power consumption.The ARM
Cortex-M3 is a next generation core that offers system enhancements such as enhanced
debug features and a higher level of support block integration.The
LPC1768/67/66/65/64/63 operate at CPU frequencies of up to 100 MHz.
The LPC1769 operates at CPU frequencies of up to 120 MHz. The ARM Cortex-
M3 CPU incorporates a 3-stage pipeline and uses a Harvard architecture with separate
local instruction and data buses as well as a third bus for peripherals. The ARM Cortex-
M3 CPU also includes an internal prefetch unit that supports speculative branching.
The LPC1769/68/67/66/65/64/63 are pin-compatible to the 100-pin LPC236x
ARM7-based microcontroller series.
5.2 Features and benefits
ARM Cortex-M3 processor, running at frequencies of up to 100 MHz
(LPC1768/67/66/65/64/63) or of up to 120 MHz (LPC1769).
Up to 512 kB on-chip flash programming memory. Enhanced flash memory
accelerator enables high-speed 120 MHz operation with zero wait states.
In-System Programming (ISP) and In-Application Programming (IAP) via on-chip
bootloader software.
On-chip SRAM includes:
32/16 kB of SRAM on the CPU with local code/data bus for high-performance
CPU access.
Two/one 16 kB SRAM blocks with separate access paths for higher
throughput.These SRAM blocks may be used for Ethernet, USB, and DMA
memory, as well as for general purpose CPU instruction and data storage.
Eight channel General Purpose DMA controller (GPDMA) on the AHB multilayer
matrix that can be used with SSP, I2S-bus, UART, Analog-to-Digital and Digital-
16 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
to-Analog converter peripherals, timer match signals, and for memory-to-memory
transfers.
Multilayer AHB matrix interconnect provides a separate bus for each AHB
master.AHB masters include the CPU, General Purpose DMA controller, Ethernet
MAC, and the USB interface. This interconnect provides communication with no
arbitration delays.
Split APB bus allows high throughput with few stalls between the CPU and DMA.
5.3 Serial interfaces: Ethernet MAC with RMII interface and dedicated DMA controller.
USB 2.0 full-speed device/Host/OTG controller with dedicated DMA controller
and onchip PHY for device, Host, and OTG functions.
Four UARTs with fractional baud rate generation, internal FIFO, and DMA
support.One UART has modem control I/O and RS-485/EIA-485 support, and one
UART has IrDA support.
CAN 2.0B controller with two channels.
SPI controller with synchronous, serial, full duplex communication and
programmable data length.
Two SSP controllers with FIFO and multi-protocol capabilities. The SSP
interfaces can be used with the GPDMA controller.
Three enhanced I2C bus interfaces, one with an open-drain output supporting full
I2C specification and Fast mode plus with data rates of 1 Mbit/s, two with
standard port pins. Enhancements include multiple address recognition and
monitor mode.
70 (100 pin package) General Purpose I/O (GPIO) pins with configurable pull-
up/down resistors. All GPIOs support a new, configurable open-drain operating
mode. The GPIO block is accessed through the AHB multilayer bus for fast access
and located in memory such that it supports Cortex-M3 bit banding and use by the
General Purpose DMA Controller.
12-bit Analog-to-Digital Converter (ADC) with input multiplexing among eight
pins,conversion rates up to 200 kHz, and multiple result registers. The 12-bit ADC
can be used with the GPDMA controller.
17 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
10-bit Digital-to-Analog Converter (DAC) with dedicated conversion timer and
DMA support.
Four general purpose timers/counters, with a total of eight capture inputs and ten
compare outputs. Each timer block has an external count input. Specific timer
events can be selected to generate DMA requests.One motor control PWM with
support for three-phase motor control.
o Quadrature encoder interface that can monitor one external quadrature
encoder.
o One standard PWM/timer block with external count input.
o RTC with a separate power domain and dedicated RTC oscillator. The
RTC block includes 20 bytes of battery-powered backup registers.
WatchDog Timer (WDT). The WDT can be clocked from the internal RC
oscillator,the RTC oscillator, or the APB clock.
ARM Cortex-M3 system tick timer, including an external clock input option.
Repetitive interrupt timer provides programmable and repeating timed interrupts.
Each peripheral has its own clock divider for further power savings.
Standard JTAG test/debug interface for compatibility with existing tools. Serial
Wire Debug and Serial Wire Trace Port options.
Emulation trace module enables non-intrusive, high-speed real-time tracing of
SVCS-Configure Version Control: setup external Software Version Control System
6.5 COOCOX DEBUGGER
CoLinkEx is a hardware debugging adapter which supports SW debugging and
supports both ARM Cortex M3 and Cortex M0 devices, it supports debugging in
CooCox software and Keil Realview MDK.
Features: Free
Supports Cortex M0 and Cortex M3 devices
Supports SW debugging Supports JTAG debugging
Supports CoFlash, CoIDE, MDK and IAR
64 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
Requirements:
Hardware:512MB memory 20MB Disk space
Operating Systems:Windows XP / Windows Vista / Windows 7
Support SoftwareKeil RealView MDK v4.03 or higher CooCox CoIDE v1.4.0 or higher
Support Series:
Atmel ATSAM3U Series
Energy Micro EFM32 Series
TI LM3S Series
Nuvoton Numicro Series
NXP LPC17xx LPC13xx LPC12xx LPC11xx Series
ST STM32F10x STM32F4x Series
Holtek HT32 Series
Connection Figure:
Preparation:
Before you use this development kit, you need to install CoLinkEx Driver first.
The CoLinkEx USB drivers are different according to the OS of your PC, please
visit http://www.coocox.org/Colinkex.html to download the right one and install it as
below: 1. Double Click the EXE file, enter the installation interface, click “Next”. The
CoLinkEx USB drivers are different according to the OS of your PC to download the
65 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
right one and install it as below
2. Select the installation location, click “Next”.
66 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
3.Click “Install”.
4. Click “Finish”.
After that, you can use it in MDK or CoIDE environment.
67 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
Configuration:
CooCox CoIDE
68 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
Keil Realview MDK
Before you use it in MDK, you need to download and install CoMDKPlugin first, please visit http://www.coocox.org/CoLinkGuide/CoMDKPlugin.html to get the details. Just install it with the following simple steps:1. Double Click the EXE file, enter the installation interface, click “Next”.
2. Select the installation location, click “Next”.
69 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
3. Click “Install”.
4. Click “Finish”.
70 DEPARTMENT OF ECE, KGRCET
Multi-Colour Line following Robot
Now you need to do the following configurations while use it in MDK:
1. Debug -> Use of the configuration selects "CooCox Debugger
2. Click Settings, select "ColinkEx" for the Adapter
71 DEPARTMENT OF ECE, KGRCET
Multi-colored line following robot
6.6 HYPERTERMINAL
USING HYPERTERMINAL
Most Spectracom products have an RS-232 Com port to configure selectable parameters and retrieve operational status and performance logs. Connect the Spectracom RS-232 Com (Setup) port to a computer using a one to one pinned DB9 serial cable. This cable has a DB9 male on one end and a DB9 female on the other end. Do not try to use a null modem cable with gender changers to get the “correct” pin configuration. A null modem cable reverses transmit and receive lines and therefore will not work in this application. To allow communication the computer must be running a terminal emulation program such as HyperTerminal.
HyperTerminal is included with Windows 95/98/NT/ME/2000/XP computers. To start a HyperTerminal session left click on the START button and follow the path of Programs
HyperTerminal as shown in Figure 1.
NOTE:
The sample screen snapshots are from a Windows 2000 computer.
Screens may vary slightly on other versions of Windows.
Figure Starting HyperTerminal
72 DEPT OF ECE, KGRCET
Multi-colored line following robot
Double click on HyperTerminal. You will then be prompted to name the HyperTerminal session and select an icon. Figure 2 shows an example session named Spectracom.
Figure 2. New Connection Screen On the Connect To screen skip past the
Country/region, Area code and Phone number configuration selections. In the
Connect using box select the desired RS-232 port, COM 1 or COM 2 as shown in
Figure 3. Click on the OK box to continue.
Next you will be prompted to enter the port properties. Select 9600 baud, 8 data bits,
no parity, 1 stop bit and XON/XOFF flow control as shown in Figure 4. Click on the
OK box to continue.
FIGURE 4. Port Properties
The HyperTerminal Session is now ready for use. Enter the GPS Signal Status
command GSS<enter> , to view the satellites currently tracked by the GPS receiver.
Figure 5 shows a typical response from a Model 8195A GPS Disciplined Oscillator.
73 DEPT OF ECE, KGRCET
Multi-colored line following robot
FIGURE 5. Typical Configuration Response
When exiting HyperTerminal you will be given the option to save the session.
Select yes to save for future use. If there was no response from the GPS receiver try
the following:
1. Refresh the HyperTerminal port settings by clicking on CALL of the menu bar then
select Disconnect.
To enable HyperTerminal click on CALL again and this time select Call or
Connect.
2. Verify that a one to one pinned DB9 serial cable is used. The cable should have a
DB9 male on end and a DB9 female on the other. Do not use a cable having gender
changers to get the “correct”
connector combination. These cables are typically null modem cables and are
not pinned one to one as required and will have DB9 males on both ends of the cable.
The RS-232 cable requires a minimum 3 wires; RXD (pin 2), TXD (pin 3) and
Ground (pin 5).
3. Verify the serial port is operational. Simply shorting the RXD and TXD lines
together on the cable end that plugs into the receiver can do this. Using a small flat
bladed screwdriver short pin 2 to pin 3 while typing characters on the keyboard. If the
port is working you will see whatever you type.
74 DEPT OF ECE, KGRCET
Multi-colored line following robot
CHAPTER 7
RESULT
Fig: Working Kit with an LDR connected below the robot
RESULT ANALYSIS:
The main principal behind the working of this prototype is LDR.LDR gives
the output of variable resistance in Voltage which is then converted to digital values
by ADC in ARM board. Each colour has a unique voltage value in various light
condtions.This prototype is calibrated under different conditions.
75 DEPT OF ECE, KGRCET
Multi-colored line following robot
7.1 ADDVANTAGES
Can be used as robotic vehicles for warehousing
Defense applications
Cost effective
No external operating need
7.2 APPLICATIONS
Guidance system for industrial robots moving on shop floor etc.
Automobile industries
Used in home & industrial automation systems
Defense applications
76 DEPT OF ECE, KGRCET
Multi-colored line following robot
CONCLUSION
The project is aimed at providing complete automated robot which can operate by itself and can move automatically.This is a prototype which can be implemented in real time by using components such as logistics,industries,etc.Development can also be made in the number of sensors incorporated in the robot
77 DEPT OF ECE, KGRCET
Multi-colored line following robot
FUTURE SCOPE
The CPU must merely poll the speech circuit’s recognition lines occasionally
to check if a command has been issued to the robot.We can even improve upon this
by connecting the recognition line to one of the robot’s CPU interrupt lines.In future
this can be developed by the use of camera with digital image processing techique so
that it can travel for a greater distance and can be fully automated.Various other
sensors like LDR sensor can be added or IR sensor for avoiding obstacles can also be
added.
78 DEPT OF ECE, KGRCET
Multi-colored line following robot
APPENDIX
CODING:
#include <lpc17xx.h>
void Delay_m(unsigned int x){ int k,l;
for(k=0;k<=x;k++)for(l=0;l<=1500;l++);
}void Delay(unsigned int x){ int y;
for(y=0;y<=x;y++);
}void init_adc(){LPC_PINCON->PINSEL1=0x00550000; // in PINSEL1 we are usinng 17:16 AD0.1 with Function 01LPC_SC->PCONP|=(1<<12); // in PCONP register we are using 12th bit PCADC LPC_ADC->ADCR=0x00200B02; // in this AD 0.1 is SEL B==>5.5 Mhz PDN mode}unsigned char read_adc(unsigned char ch){ long val; LPC_ADC->ADCR=0x00200B00|(1<<ch); LPC_ADC->ADCR|=0x01000000; Delay(150000); while(!(LPC_ADC->ADGDR&0x80000000)); // ADCGDR 31-bit is DONE bit,this loop executes untill conversion is completed val=LPC_ADC->ADGDR; val=(val>>4)&(0xfff); return val;}
Delay(90); en_low() ; en_high(); LPC_GPIO1->FIOSET|=(((cmd )<<20)); LPC_GPIO1->FIOCLR=~(((cmd )<<20)); Delay(90); en_low() ; LPC_GPIO1->FIOCLR=0x0fffffff; LPC_GPIO0->FIOCLR=0x0fffffff;}void init_adc(){LPC_PINCON->PINSEL1=0x00010000; // in PINSEL1 we are usinng 17:16 AD0.1 with Function 01LPC_SC->PCONP|=(1<<12); // in PCONP register we are using 12th bit PCADC LPC_ADC->ADCR=0x00200B02; // in this AD 0.1 is SEL B==>5.5 Mhz PDN mode}unsigned char read_adc(unsigned char ch){ long val; LPC_ADC->ADCR=0x00200B00|(1<<ch); LPC_ADC->ADCR|=0x01000000; Delay(150000); while(!(LPC_ADC->ADGDR&0x80000000)); // ADCGDR 31-bit is DONE bit,this loop executes untill conversion is completed
val=LPC_ADC->ADGDR; val=(val>>4)&(0xfff); return val; } void lcd_int(unsigned int num){char str[5]={0,0,0,0,0};
int i=4,j=0;while(num){str[i]=num%10;num=num/10;i--;}for(i=j;i<5;i++)
1.The 8051 microcontroller-Kenneth Ayala,3rd reprint,2005;Thomson2.Asia Ltd.,Singapore; Chapter 3,6,7&8. For programming 89S513.ARM7TDMI datasheet4.L293D motor driver IC datasheet.5.The ARM Cortex-M3 processor datasheet.6.LPC1769/68/67/66/65/64/63