labview operated map based car (repaired).pdf

34
1 1. INTRODUCTION A robot following its master’s instructions that where it should move- whether right or left, or forward or backward is already there in market. But how a master is communicates with his robot is much of concern. Keeping in mind various design metrics such as cost, time to market and performance we have just tried to control a robot using a sophisticated and user friendly tool LabVIEW. LabVIEW is system design software that is used by engineers and scientists to efficiently design, prototype, and deploy embedded monitoring and control applications. It combines hundreds of prewritten libraries, tight integration with off-the-shelf hardware, and a variety of programming approaches including graphical development, .m file scripts, and connectivity to existing ANSI C and HDL code. While designing any kind of devices or complex robots we can reduce time to market and the overall cost of embedded monitoring and control with LabVIEW. RF Tx Fig 1: Block Diagram of Transmitter RF Rx Fig 2: Block Diagram of Receiver LabVIEW GUI AT89S51 Microcontroller HT12E Encoder L293D Motor Driver AT89S51 Microcontroller HT12D Decoder Serial COM

Upload: rrrrahulranjan

Post on 18-Jul-2016

24 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

1

1. INTRODUCTION

A robot following its master’s instructions that where it should move- whether right or left, or

forward or backward is already there in market. But how a master is communicates with his

robot is much of concern. Keeping in mind various design metrics such as cost, time to market

and performance we have just tried to control a robot using a sophisticated and user friendly tool

LabVIEW. LabVIEW is system design software that is used by engineers and scientists to

efficiently design, prototype, and deploy embedded monitoring and control applications. It

combines hundreds of prewritten libraries, tight integration with off-the-shelf hardware, and a

variety of programming approaches including graphical development, .m file scripts, and

connectivity to existing ANSI C and HDL code. While designing any kind of devices or complex

robots we can reduce time to market and the overall cost of embedded monitoring and control

with LabVIEW.

RF Tx

Fig 1: Block Diagram of Transmitter

RF Rx

Fig 2: Block Diagram of Receiver

LabVIEW GUI AT89S51

Microcontroller

HT12E

Encoder

L293D

Motor Driver

AT89S51

Microcontroller

HT12D

Decoder

Serial COM

Page 2: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

2

2. REVIEW OF LITERATURE Various courses viz. ECE301: MICROPROCESSOR BASED SYSTEM DESIGN, ECE310:

MICROCONTROLLER AND APPLICATIONS, programming languages and different practical

laboratories have invoked so much curiosity in us that we have tried to make an embedded

system that is, LabVIEW operated RF based car, a robot with our prior knowledge of C, in Keil-

uV, Microcontroller and Proteus. We have combined the knowledge of various subjects taught to

us in previous terms and the present term and come out with this project. Top Reasons to Use

LabVIEW for embedded monitoring and control are:

Prototype Faster with Graphical Programming Build functional embedded systems in weeks instead of months using an intuitive graphical

programming approach. With LabVIEW, you can take advantage of one powerful language to

develop code for standard PCs, real-time CPUs, and FPGAs.

Reuse Embedded C, HDL, and .m File Scripts

We don't have to start from scratch when designing an embedded system. LabVIEW provides

easy integration of embedded C, HDL code, .m file scripts, and other IP. LabVIEW provides a

framework that combines all of the functionality we need to accomplish our system design goals.

Integrate Off-The-Shelf Hardware for Ultimate Flexibility Target a wide variety of embedded hardware platforms, including NI Single-Board RIO and

Compact RIO, featuring real-time CPUs, reconfigurable FPGAs, and more than 100 hot-

swappable I/O modules. Quickly add or reconfigure hardware during the prototyping phase,

reuse hardware across multiple projects, and port our final code to a rugged or cost-optimized

deployment target.

The control of robot can be done manually through switches as well. To make the project a little

more interesting and software based the control has been made through graphical user interface

(GUI) on LabVIEW. However, if in case serial communication doesn’t work well we have kept

provisions for manual override through direct connections.

Page 3: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

3

3. SCOPE OF STUDY

The features of the robotic car that we have designed can be enhanced like a voice controlled

robot or an image detecting and responding accordingly as LabVIEW supports both Speech

recognition and image recognition features. Collision avoidance feature can also be integrated in

to the project. Our study had a brighter scope in many fields such as in defense services for

spying, medical field such as controlling a wheel chair using LabVIEW wirelessly. If it has

image recognition features then it can be used in endoscopy and various surgeries just detecting

errors and failures within our body thus exploring much more fields in medical applications.

As we know RF communication uses wireless application protocol which is an open and

international standard commonly used for mobile phones. So we can just make executable files

with LabVIEW and can even control our robot using mobile phones. Its cost efficient feature,

flexibility, built-in debugging capabilities and simulation in LabVIEW is going to enhance its

scope. Robots with various sensors like temperature detecting sensors, pressure detecting sensors

etc. could be made which can detect temperature, pressure, humidity etc. all the real world

entities and thus responding accordingly could be made and controlled with the LabVIEW. It

will increase the scope of study in industries, weather forecasting, agricultural field etc. We can

get more done in less time with LabVIEW through its comprehensive system design

environment, unique graphical programming language, built-in engineering-specific libraries of

software functions and hardware interfaces, data analysis, visualization, and sharing features.

4. LEARNING OBJECTIVE OF THIS PROJECT

The main objective of this project was to control the movement of a robotic car wirelessly using

RF module. This development can be deployed later in many fields like in military applications

for spying, data collection, etc. and in biomedical applications such as electronic wheel chair for

disabled persons, etc.

1. To learn how to work on Keil-uV

2. To learn how to work on Proteus

3. To learn basic working of LabVIEW

Page 4: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

4

4. To learn the instruction set of 8051 microcontroller

5. To learn pin configuration and understand the role of each pin in 8051 microcontroller

6. To learn about encoder and decoder

7. To learn about RF module and its interfacing with microcontroller

8. To learn how to solder and de-solder components

9. To learn how to do serial communication with LabVIEW

10. To learn about dc motors, motor drivers and DB-9 Connector

5. RESEARCH METHODOLOGY

5.1 AT89S52 Microcontroller The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of

in-system programmable Flash memory. The device is manufactured using Atmel’s high-density

nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction

set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or

by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-

system programmable flash on a monolithic chip, the Atmel AT89S52 is a powerful

microcontroller which provides a highly-flexible and cost-effective solution to many embedded

control applications.

The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM,

32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-

level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In

addition, the AT89S52 is designed with static logic for operation down to zero frequency and

supports two software selectable power saving modes. The Idle Mode stops the CPU while

allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The

Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip

functions until the next interrupt or hardware reset.

5.1.1 Key Parameters:

Parameter Value

Page 5: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

5

Flash (Kbytes)

8 Kbytes

Pin Count

44

Max. Operating Frequency

24 MHz

CPU

8051-12C

Max I/O Pins

32

UART

1

SRAM (Kbytes)

0.25

Operating Voltage (Vcc) 4.0 to 5.5

Timers

3

Table 1: Key parameters of AT89S52 microcontroller

8051 is the name of a big family of microcontrollers. The device which we used in our project

was the 'AT89S52' which is a typical 8051 microcontroller manufactured by Atmel™. The block

diagram provided by Atmel™ in their datasheet that showed the architecture of 89S52 device

seemed a bit complicated. A simpler architecture can be represented below:

Fig 3: Internal architecture of AT89S25

Page 6: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

6

There are two different memory types: RAM and EEPROM. Shortly, RAM is used to store

variable during program execution, while the EEPROM memory is used to store the program

itself, that's why it is often referred to as the 'program memory'. It is clear that the CPU (Central

Processing Unit) is the heart of the micro controllers. It is the CPU that will Read the program

from the FLASH memory and execute it by interacting with the different peripherals.

5.1.2 Pin Diagram:

Fig 4: Pin diagram of AT89S52

Diagram above shows the pin configuration of the 89S52, where the function of each pin is

written next to it, and, if it exists, the dual function is written between brackets. Note that the

pins that have dual functions can still be used normally as an input/output pin. Unless the

program uses their dual functions, all the 32 I/O pins of the microcontroller are configured as

input/output pins.

5.1.3 Pin Description:

Page 7: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

7

Table 2: Pin description of AT89S52

Table 3: Port 1 functionalities

Table 4: Port 3 functionalities

Page 8: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

8

5.2 DC Motor

A DC motor runs with the help of Direct Current. It produces torque by using both electricity and

magnetic fields. The common term used to refer both fields is Electromagnetism. When a current

carrying conductor is placed in the external magnetic field, then it will experience a force

proportional to the current in the conductor and strength of the external magnetic field.

Mathematically, F = B*L*I

Where- F is force in dynes.

B is flux density in lines per square centimeters.

L is length of the conductor

I is current in the conductor. Figure 5: DC motor working The same principle is used in the DC motor. The DC motor has rotor, stator, field magnet,

brushes, shaft, commutator. The DC motor requires more current to produce initial torque than in

running state.

DC Motors are small, inexpensive and powerful motors used widely in robotics for their small

size and high energy out. A typical DC motor operates at speeds that are far too high speed to

be useful, and torque that are far too low. Gear reduction is the standard method by which a

motor is made useful .Gear’s reduce the speed of motor and increases the torque.

Page 9: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

9

Fig 6: Cross section view of DC motor

Choosing a DC Motor Depends on application prefer following:

DC Motor with Gear head

Operating voltage 12V

Speed 5.3 L293D Motor Driver

L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as current

amplifiers since they take a low-current control signal and provide a higher-current signal. This

higher current signal is used to drive the motors.L293D contains two inbuilt H-bridge driver

circuits. In its common mode of operation, two DC motors can be driven simultaneously, both in

forward and reverse direction. The motor operations of two motors can be controlled by input

logic at pins 2 & 7 and 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01

and 10 will rotate it in clockwise and anticlockwise directions, respectively. Enable pins 1 and 9

(corresponding to the two motors) must be high for motors to start operating. When an enable

input is high, the associated driver gets enabled. As a result, the outputs become active and work

in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and

their outputs are off and in the high-impedance state.

Page 10: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

10

5.3.1 Pin Diagram: Fig 7: Pin Diagram of L293D 5.3.2 Pin Description: Table 5: Pin description of L293D

5.4 RS232

Fig 8: Pin out of MAX232

Page 11: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

11

The RS-232 interface is the Electronic Industries Association (EIA) standard for the interchange

of serial binary data between two devices. It was initially developed by the EIA to standardize

the connection of computers with telephone line modems. The standard allows as many as 20

signals to be defined, but gives complete freedom to the user. Three wires are sufficient: send

data, receive data, and signal ground. The remaining lines can be hardwired on or off

permanently. The signal transmission is bipolar, requiring two voltages, from 5 to 25 volts, of

opposite polarity. It is connected with DB-9 Connector and microcontroller both. RxD Pin is

connected with TxD pin of microcontroller and TxD pin is connected with RxD pin of

microcontroller thus serial communication becomes possible with hardware and software.

5.5 HT12E Encoder HT12E is an encoder integrated circuit of 2 raised to the power 12 series of encoders. They

are paired with 2 raised to the power 12 series of decoders for use in remote control system

applications. It is mainly used in interfacing RF and infrared circuits. The chosen pair

of encoder/decoder should have same number of addresses and data format.

Simply put, HT12E converts the parallel inputs into serial output. It encodes the 12 bit

parallel data into serial for transmission through an RF transmitter. These 12 bits are divided

into 8 address bits and 4 data bits.

HT12E has a transmission enable pin which is active low. When a trigger signal is

received on TE pin, the programmed addresses/data are transmitted together with the

header bits via an RF or an infrared transmission medium. HT12E begins a 4-word

transmission cycle upon receipt of a transmission enable. This cycle is repeated as long

as TE is kept low. As soon as TE returns to high, the encoder output completes its final

cycle and then stops.

5.5.1 Pin Diagram:

Page 12: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

12

Fig 9: Pin diagram of HT12E

5.5.2 Pin Description:

Table 6: Pin description of HT12E

5.6 HT12D Decoder

HT12D IC comes from HolTek Company. HT12D is a decoder integrated circuit that

belongs to 2 raised to the power 12 series of decoders. This series of decoders are mainly

used for remote control system applications, like burglar alarm, car door controller, security

system etc. It is mainly provided to interface RF and infrared circuits. They are paired with 2

Page 13: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

13

raised to the power 12series of encoders. The chosen pair of encoder/decoder should have same

number of addresses and data format.

In simple terms, HT12D converts the serial input into parallel outputs. It decodes the serial

addresses and data received by, say, an RF receiver, into parallel data and sends them to

output data pins. The serial input data is compared with the local addresses three times

continuously. The input data code is decoded when no error or unmatched codes are

found. A valid transmission in indicated by a high signal at VT pin.

HT12D is capable of decoding 12 bits, of which 8 are address bits and 4 are data bits.

The data on 4 bit latch type output pins remain unchanged until new is received.

5.6.1 Pin Diagram:

Fig 10: Pin diagram of HT12D

5.6.2 Pin Description:

Page 14: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

14

Table 7: Pin description of HT12D

5.7 RF Module

The RF module, as the name suggests, operates at Radio Frequency. The corresponding

frequency range varies between 30 KHz & 300 GHz. In this RF system, the digital data is

represented as variations in the amplitude of carrier wave. This kind of modulation is known

as Amplitude Shift Keying (ASK).

Transmission through RF is better than IR (infrared) because of many reasons. Firstly, signals

through RF can travel through larger distances making it suitable for long range

applications. Also, while IR mostly operates in line-of sight mode, RF signals can travel

even when there is an obstruction between transmitter & receiver. Next, RF transmission

is more strong and reliable than IR transmission. RF communication uses a specific frequency

unlike IR signals which are affected by other IR emitting sources.

This RF module comprises of an RF Transmitter and an RF Receiver. The transmitter/receiver

(Tx/Rx) pair operates at a frequency of 434 MHz. An RF transmitter receives serial data

and transmits it wirelessly through RF through its antenna connected at pin4. The

transmission occurs at the rate of 1Kbps - 10Kbps.The transmitted data is received by an RF

receiver operating at the same frequency as that of the transmitter.

Page 15: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

15

The RF module is often used along with a pair of encoder/decoder. The encoder is used

for encoding parallel data for transmission feed while reception is decoded by a decoder.

HT12E-HT12D, HT640-HT648, etc. are some commonly used encoder/decoder pair ICs.

5.7.1 Pin diagram:

Fig 11: Pin diagram of RF receiver and RF transmitter module

5.7.2 Pin Description:

Transmitter module

Table 8: Pin description of RF transmitter module

Receiver module

Table 9: Pin description of RF receiver module

Page 16: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

16

6. SERIAL COMMUNICATION

In serial communication the serial port sends and receives bytes of information one bit at a time.

Although this is slower than parallel communication, which allows the transmission of an entire

byte at once, it is simpler and we can use it over longer distances. The serial communication uses

three transmission lines - ground, transmit, and receive. Because serial is asynchronous, the port

can transmit data on one line while receiving data on another. Other lines are available for

handshaking but are not required. The important serial characteristics are baud rate, data bits,

stop bits, and parity. For two ports to communicate, these parameters must match:

Baud rate is a speed measurement for communication that indicates the number of bit

transfers per second. For example, 300 baud is 300 bits per second. If the protocol calls

for a 9600 baud rate, the clock is running at 9600 Hz. This means that the serial port is

sampling the data line at 9600 Hz. Baud rates greater than these are possible, but these

rates reduce the distance.

Data bits are a measurement of the actual data bits in a transmission. When the computer

sends a frame of information, the amount of actual data may not be a full 8 bits. Standard

values for frames are 5, 7, and 8 bits. Which setting we choose depends on what

information we are transferring. For example, standard ASCII has values from 0 to 127 (7

bits). Extended ASCII uses 0 to 255 (8 bits). If the data we are transferring is standard

ASCII, sending 7 bits of data per frame is sufficient for communication. A frame refers to

a single byte transfer, including start/stop bits, data bits, and parity. Because the number

of actual bits depends on the protocol selected, we can use the term "frame" to cover all

instances.

Stop bits are used to signal the end of communication for a single frame. Typical values

are 1, 1.5, and 2 bits. Because the data is clocked across the lines and each device has its

own clock, it is possible for the two devices to become slightly out of sync. Therefore,

the stop bits not only indicate the end of transmission but also give the computers some

room for error in the clock speeds. The more bits used for stop bits, the greater the

lenience in synchronizing the different clocks, but the slower the data transmission rate.

Page 17: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

17

Parity is a simple form of error checking used in serial communication. There are four

types of parity - even, odd, marked, and spaced. We also can use no parity. For even and

odd parity, the serial port sets the parity bit (the last bit after the data bits) to a value to

ensure that the transmission has an even or odd number of logic-high bits. For example, if

the data is 011, for even parity, the parity bit is 0 to keep the number of logic-high bits

even. If the parity is odd, the parity bit is 1, resulting in 3 logic-high bits. Marked and

spaced parity does not actually check the data bits but simply sets the parity bit high for

marked parity or low for spaced parity. This allows the receiving device to know the state

of a bit so the device can determine if noise is corrupting the data or if the transmitting

and receiving device clocks are out of sync.

7. VISA PROGRAMMING IN LabVIEW

The Virtual Instrument Software Architecture (VISA) is a standard for configuring,

programming, and troubleshooting instrumentation systems comprising GPIB, VXI, PXI, Serial,

Ethernet, and USB interfaces. VISA provides the programming interface between the hardware

and development environments such as LabVIEW, LabWindows/CVI, and Measurement Studio

for Microsoft Visual Studio. NI-VISA is the National Instruments implementation of the VISA

I/O standard. NI-VISA includes software libraries, interactive utilities such as NI I/O Trace and

the VISA Interactive Control, and configuration programs through Measurement & Automation

Explorer for all your development needs.

7.1 VISA WRITE FUNCTION

Writes the data from write buffer to the device or interface specified by VISA resource name.

VISA resource name specifies the resource to be opened. The VISA resource name

control also specifies the session and class.

Write buffer contains the data to be written to the device.

Error in describes error conditions that occur before this node runs. This input provides

Page 18: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

18

standard error in functionality.

VISA resource name out is a copy of the VISA resource name that VISA functions return.

Return count contains the actual number of bytes written.

VISA resource name out is a copy of the VISA resource name that VISA functions return.

VISA Write Details

Whether the data is transferred synchronously or asynchronously is platform-dependent.

Right click the node and select Synchronous I/O Mode»Synchronous from the shortcut

menu to write data synchronously.

When we transfer data from or to a hardware driver synchronously, the calling thread is

locked for the duration of the data transfer. Depending on the speed of the transfer, this can

hinder other processes that require the calling thread. However, if an application requires

that the data transfer as quickly as possible, performing the operation synchronously

dedicates the calling thread exclusively to this operation.

7.2 VISA CLOSE FUNCTION

Closes a device session or event object specified by VISA resource name.

VISA resource name specifies the resource to be opened. The VISA

resource name control also specifies the session and class.

Error in describes error conditions that occur before this node runs. This node runs

normally even if an error occurred before this node runs.

Error out contains error information. This output provides standard error

out functionality.

VISA Close Details

Page 19: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

19

Error I/O operates uniquely in this function. The function closes the device session regardless of

whether an error occurred in a preceding operation. For each VISA session that we open, we

should close the session when we are finished with it. This function accepts all available classes.

7.3 VISA CONFIGURE SERIAL PORT FUNCTION

Initializes the serial port specified by VISA resource name to the specified settings. Wire data

to the VISA resource name input to determine the polymorphic instance to use or manually

select the instance.

Enable Termination Char prepares the serial device to recognize termination char. If

TRUE (default), the VI_ATTR_ASRL_END_IN attribute is set to recognize the

termination character. If FALSE, the VI_ATTR_ASRL_END_IN attribute is set to 0

(None) and the serial device does not recognize the termination char.

Termination char calls for termination of the read operation. The read operation

terminates when the termination char is read from the serial device. 0xA is the hex

equivalent of a linefeed character (\n). Change the termination char to 0xD for message

strings that terminate with a carriage return (\r).

VISA resource name specifies the resource to be opened. The VISA resource name

control also specifies the session and class.

Baud rate is the rate of transmission. The default is 9600.

Data bits are the number of bits in the incoming data. The value of data bits is between

five and eight. The default value is 8.

Page 20: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

20

Parity specifies the parity used for every frame to be transmitted or received. This input

accepts the following values.

0 no parity (default)

1 odd parity

2 even parity

3 mark parity

4 space parity

Error in describes error conditions that occur before this node runs. This input provides

standard error in functionality.

Stop bits specifies the number of stop bits used to indicate the end of a frame. This input

accepts the following values.

10 1 stop bit

151.5 stop bits

202 stop bits

Flow control sets the type of control used by the transfer mechanism. This input accepts

the following values:

0 : None (default)—The transfer mechanism does not use flow control. Buffers on both sides

of the connection are assumed to be large enough to hold all data transferred.

Page 21: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

21

1 : XON/XOFF—The transfer mechanism uses the XON and XOFF characters to perform

flow control. The transfer mechanism controls input flow by sending XOFF when the receive

buffer is nearly full, and it controls the output flow by suspending transmission when XOFF

is received.

2 : RTS/CTS— The transfer mechanism uses the RTS output signal and the CTS input signal

to perform flow control. The transfer mechanism controls input flow by unasserting the RTS

signal when the receive buffer is nearly full, and it controls output flow by suspending the

transmission when the CTS signal is unasserted.

3 : XON/XOFF and RTS/CTS— The transfer mechanism uses the XON and XOFF

characters and the RTS output signal and CTS input signal to perform flow control. The

transfer mechanism controls input flow by sending XOFF and unasserting the RTS signal

when the receive buffer is nearly full, and it controls the output flow by suspending

transmission when XOFF is received and the CTS is unasserted.

4 : DTR/DSR— The transfer mechanism uses the DTR output signal and the DSR input signal

to perform flow control. The transfer mechanism controls input flow by unasserting the DTR

signal when the receive buffer is nearly full, and it controls output flow by suspending the

transmission when the DSR signal is unasserted.

5 : XON/XOFF and DTR/DSR— The transfer mechanism uses the XON and XOFF

characters and the DTR output signal and DSR input signal to perform flow control. The

transfer mechanism controls input flow by sending XOFF and unasserting the DTR signal

when the receive buffer is nearly full, and it controls the output flow by suspending

transmission when XOFF is received and the DSR signal is unasserted.

VISA resource name out is a copy of the VISA resource name that VISA functions return.

NI-VISA automatically detects ports. We can view the list of ports with a VISA resource

name control on the front panel or with the VISA Find Resource function. The maximum

number of serial ports that NI-VISA supports on any platform is 256. The default numbering

Page 22: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

22

of serial ports is system dependent.

NI-VISA supports interaction with parallel ports as well as with serial ports on our computer.

You can use the VISA properties to communicate with parallel ports in the same way we

communicate with serial ports.

Error out contains error information. This output provides standard error out functionality. 7.4 SYSTEM FLOWCHART

START

Write program in Keil-uV software using assembly

language or either in C language

Generate Hex File and burn it in microcontroller in hardware.

Make circuit diagram in Proteus and put the generated hex file in

microcontroller present in Proteus software and output is checked.

Write VISA Programming in LabVIEW and using VISA write

function to control robot connected serially with RF module.

END

8. WORKING

This radio frequency (RF) transmission system employs Amplitude Shift Keying (ASK)

with transmitter/receiver (Tx/Rx) pair operating at 434 MHz. The transmitter module takes

serial input and transmits these signals through RF. The transmitted signals are received by the

Page 23: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

23

receiver module placed away from the source of transmission.

Fig 12: RF communication process

The system allows one way communication between two nodes, namely, transmission and

reception. The RF module has been used in conjunction with a set of four channel

encoder/decoder ICs. Here HT12E & HT12D have been used as encoder and decoder

respectively. The encoder converts the parallel inputs (from the remote switches) into serial

set of signals. These signals are serially transferred through RF to the reception point.

The decoder is used after the RF receiver to decode the serial format and retrieve the

original signals as outputs. These outputs can be observed on the blinking of LED.

Fig 13: Transmission

Page 24: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

24

Encoder IC (HT12E) receives parallel data in the form of address bits and control bits. The

control signals from remote switches along with 8 address bits constitute a set of 12 parallel

signals. The encoder HT12E encodes these parallel signals into serial bits. Transmission is

enabled by providing ground to pin14 which is active low. The control signals are given at pins

10 -13 of HT12E. The serial data is fed to the RF transmitter through pin17 of HT12E.

Transmitter, upon receiving serial data from encoder IC (HT12E), transmits it wirelessly to the

RF receiver. The receiver, up on receiving these signals, sends them to the decoder IC (HT12D)

through pin2. The serial data is received at th e data pin (DIN, pin14) of HT12D. The decoder

then retrieves the original parallel format from the received serial data.

Fig 14: Reception

9. PROGRAMMING OF MICROCONTROLLERS 9.1 Transmitter #include <REGX51.H>

char getc();

void main()

{

Page 25: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

25

unsigned char a;

P1=0x00;

SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */

TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */

TH1 = 0xFD; /* TH1: reload value for 9600 baud */

TR1 = 1; /* TR1: timer 1 run

*/

while(1)

{

a = getc();

switch(a)

{

case 'R' :

{

//temp1 = Right;

P1 = 0x01;

break;

}

case 'L' :

{

//temp1 = Left;

P1= 0x02;

break;

}

case 'F' :

{

//temp1 = Forward;

P1 = 0x04;

Page 26: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

26

break;

}

case 'B' :

{

//temp1 = Reverse;

P1= 0x08;

break;

}

default :

{

//temp1 = Stop;

P1 = 0x00;

break;

}

}

}

}

char getc()

{

char chr;

while(RI==0);

chr = SBUF;

RI=0;

return chr;

}

9.2 Receiver

#include<reg51.h>

Page 27: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

27

void main(void)

{

unsigned char x;

unsigned char x1,x2;

P1=0xff;

P2=0x00;

while(1)

{

x2=P1 ;

x1=x2&0x0f;

x=x1;

switch(x)

{

case 0x0e:

P2=0x05;

break;

case 0x0d:

P2=0x01;

break;

case 0x0b:

P2=0x04;

break;

case 0x07:

P2=0x0a;

break;

// case 15:

// P2=0x00;

// break;

default:

P2=0x00;

break;

Page 28: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

28

}

}

}

10. GUI AND SNAPSHOTS

Fig. 15: GUI: Front Panel

Page 29: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

29

Fig. 16: GUI: Block Diagram

Page 30: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

30

11. COMPLETE WORK PLAN WITH TIMELINES

September October November December

12. PROBLEMS FACED

1. Programming the microcontroller

Finalization of

the project and

mentor.

Study o f the project and

identification of the

components required and

areas of challenges.

Purchase of components

required for the completion

of project.

Testing circuitry on

breadboard for viability and

finding errors for correction.

Soldering the circuit on PCB and

vigorous testing on each stage.

Troubleshooting the problems and

focusing on the identified areas of

challenge.

Learnt the basics of LabVIEW for

interfacing our project.

Interfacing of our project to control

through GUI.

Troubleshooting the problems.

Initiation of

report writing

for the project.

Checkup of the

project.

Preparation for

evaluation.

Page 31: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

31

2. Soldering the components on PCB

3. Serial communication as the cable seemed to have some kind of problem

4. VISA programming in LabVIEW as it was completely new to us and it required some

basic prior knowledge

5. Establishing continuous RF communication

6. The motors were not responding to commands at times

13. EXPECTED OUTCOME

The objective of this Capstone project is implementation of our skills and knowledge practically

to develop a project that is suitable for the partial fulfillment of award of degree. The aim of our

project is to make a robotic car that can be controlled wirelessly through RF communication. To

make the project more interesting we also interfaced the controlling part through LabVIEW

where we developed a GUI to make the controlling more user friendly and easy to understand.

Although there were few hiccups in the working and performance of this project at times, we can

say that we achieved the expected outcome. We are successful in controlling the robotic car

wirelessly and move it in the desired direction.

14. EXPERIMENTAL WORKDONE

Programming in Keil-uV

Generating hex file

Burning the program in microcontroller

Interfacing RF module, decoder and encoder

Performing serial communication with AT89S52

Serial communication using LabVIEW through VISA(virtual instrumentation software

architecture)

Motor direction control using LabVIEW and L293D

15. CONCLUSION

This project is a result of various courses taught to us till date, mostly the courses that dealt with

Page 32: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

32

microprocessor, microcontroller, programming languages, various electronics laboratories, also

the guidance of our teachers, our mentor and our keen interest to implement the things that we

have learnt till date.

The LabVIEW operated robotic car has been made successfully and it is totally functional. This

project is an insight of how wireless communication is established through various commands.

We have incorporated certain direction controls through LabVIEW. The graphical user interface

(GUI) of LabVIEW is very much user friendly and easy to understand and control. A person who

needs to control such car without the understanding of the working can best rely on the GUI

control panel.

LabVIEW is a compilation of most of the programming tools and software available to us and

accepts all the codes in different formats. It is thus easy to interface any developed program or

task through LabVIEW. A person who do not have very in depth knowledge of different

programming languages can also perform the same tasks through LabVIEW as it basically works

on blocks and the tedious coding as required in different programming tools is not required in it.

Our project is functional as per the stated objective. There is a wide scope to further work on it

and enhance different features of it such as temperature sensitivity, humidity sensitivity, collision

avoidance, etc.

Page 33: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

33

REFERENCES

[1] The 8051 Microcontroller and Embedded Systems by Muhammad Ali Mazidi and Janice

Gillispie Mazidi, 2nd Edition

[2] Microprocessor Architecture, Programming and Applications†with 8085 by Ramesh S

Gaonkar, 5TH Edition

[3] LabVIEW 2011 Version Software

[4] http://www.ni.com/visa/

[5] http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/motdc.html

[6] http://experimentalev.wordpress.com/2011/03/22/motor-brush-replacment-how-to/

[7] http://hflink.com/interface/

http://www.datasheet.com

[9] http://www.engineersgarage.com

Page 34: LABVIEW OPERATED MAP BASED CAR (Repaired).pdf

34

BIODATA

1. Amit Kumar Sarkar

Regn No: 11004106

Section: RE2015

School: SEEE

Phone No: 9815104216

E-mail: [email protected]

2. Amit Raghuwanshi

Regn No: 11003346

Section: RE2015

School: SEEE

Phone No: 7508259795

E-mail: [email protected]

3. Sunil Kumar Bishnoi

Regn No: 11006492

Section: RE2015

School: SEEE

Phone No: 9646152991

E-mail: [email protected]