Top Banner
SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK SRTIST 1
120

84.Vehicle Superintending System With Voice Feedback Docu

Oct 22, 2014

Download

Documents

Welcome message from author
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
Page 1: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

SRTIST 1

Page 2: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

INDEX

CONTENTS

1. Abbreviations

2. Figure Locations

3. Introduction to the project

4. Block Diagram

5. Block Diagram Description

6. Schematic

7. Schematic Description

8. Hardware Components

Micro controllers

About voice IC

IR SENSORS

Start/Stop switch

Temperature Sensor

LCD Display

Power Supply

Fuel

Ignition switch

Seat belt

Brake circuit

9. Circuit Description

10. Software components

a. About Keil

b. Embedded ‘C’

11. Source Code

12. Conclusion (or) Synopsis

13. Future Aspects

14. Bibliography

Abbreviations:

SRTIST 2

Page 3: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

ACC - Accumulator

B - B Register

PSW - Program Status Word

SP - Stack Pointer

DPTR - Data pointer

DPL - Low byte

DPH - High byte

P0 - Port 0

P1 - Port 1

P2 - Port 2

P3 - Port 3

IE - Interrupt Enable control

IP - Interrupt Priority control

TMOD - Timer/Counter Mode control

TCON - Timer/Counter control

T2CON - Timer/counter 2 control

T2MOD - Timer/counter mode2 control

TH0 - Timer/counter 0high byte

TL0 - Timer/counter 0 low byte

TH1 - Timer/counter 1 high byte

TL1 - Timer/counter 1 low byte

TH2 - Timer/counter 2 high byte

TL2 - Timer/counter 2 low byte

RCAP2H - T/C 2 capture register high byte

RCAP2L - T/C 2 capture register low byte

SCON - Serial control

SBUF - Serial data buffer

PCON - Power control

PCB - Printed circuit Board

AGC - Automatic Gain Control

SRTIST 3

Page 4: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

LCD - Liquid Crystal Display

IR - Infrared Radio Frequency

Figure Locations:

Fig 1: Block Diagram

Fig 2: Schematic Diagram

Fig 3: Functional block diagram of micro controller

Fig 4: Oscillator and timing circuit

Fig 5: Pin diagram of AT89C51

Fig 6.1 Oscillator Connections

Fig 6.2 External Clock Drive Configuration

Fig 7: Memory organization of RAM

Fig 8: RAM Allocation in the 8051

Fig 9: 8051 Register Banks and their RAM Addresses

Fig 10: DB-9 pin connector

Fig 11: Interfacing of MAX-232 to controller

Fig 12: The APR9600 DIP & SOP

Fig 13: APR9600 Block Diagram

Fig 14: Random Access Mode

Fig 15: Tape Mode, Auto Rewind option

Fig 16: Tape Mode, Normal option

Fig 17: Schematic Symbol of Thermistor

Fig 18: Thermistor characteristics

Fig 19: Interfacing of LCD to a micro controller

Fig 20: Functional Block Diagram of Power supply

Fig 21: An Electrical Transformer

Fig 22: Direction of current flow in a circuit

Fig 23: A Three Terminal Voltage Regulator

SRTIST 4

Page 5: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

ABSTRACT

Every system is automated in order to face new challenges in the present day

situation. Automated systems have less manual operations, so that the flexibility,

reliabilities are high and accurate. Hence every field prefers automated control systems.

Especially in the field of electronics automated systems are doing better performance.

The project “VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK”

deals with providing safe journey for vehicle drivers by giving necessary voice

instructions. Whenever the vehicle driver forgets to taking the safety measurements

during the journey, there will be a speaker which will give the voice announcement and

this indication depends on the given input by the different sensors (which are placed at

predefined locations in the vehicle) to controller.

In this project, different sensors have been used, to indicate the level of fuel in the

tank, condition of the brakes, proper closing of the doors etc. Here we are using the

LCD to display the status. Remote sensor is used to operate the closing or opening of the

doors. Ignition switch is used to control ON/OFF the engine. The control action is totally

done by the Micro controller.

This project is mainly helpful to avoid accidents from our side by knowing the

status of our vehicle and maintain the conditioning of the vehicle.

SRTIST 5

Page 6: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Introduction

The project deals with providing safe journey for vehicle drivers by giving

necessary voice instructions. Whenever the vehicle driver forgets to taking the safety

measurements during the journey, there will be a speaker which will give the

announcement whose indication depends on the input given by the different sensors

(which are placed at predefined locations in the vehicle) to controller.

The APR9600 device offers true single-chip voice recording, non-volatile storage,

and playback capability for 40 to 60 seconds. The device supports both random and

sequential access of multiple messages. Sample rates are user- selectable, allowing

designers to customize their design for unique quality and storage time needs. Integrated

output amplifier, microphone amplifier, and AGC circuits greatly simplify system design.

the device is ideal for use in portable voice recorders, toys, and many other consumer and

industrial applications.

BLOCK DIAGRAM:

SRTIST 6

Page 7: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

SRTIST

MICRO CONTROLLER

Power supply

SENSORS (temp, smoke))

Start/Stop Switch

LCD Display

Voice IC

Engine motor

fuel

Seat belt

Ignition switch

7

Page 8: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Block Diagram Description:

The Block diagram consists of sensors such as temperature sensor, a smoke

sensor and an IR sensor. There are different switches such as Ignition switch, start/stop

switch are kept in the circuitry. In addition to this we are placing one voice IC, which is

used for storing the messages in an IC and also we can retrieve the voice from the IC

according to the circuit operation. Here is a micro controller, which is a heart of the

circuitry, which handles the total controlling action in a circuitry.

Whenever if any parameter like temperature occurs in a vehicle, it detects and

gives the voice instruction like “temperature is high” will be given to speaker and at the

same time the status will be displayed on the LCD. The IR sensor is placed at the door to

find the status of the door either it is opened or closed. whenever the IR sensor finds if

the door is partially closed it will sends the signals to the micro controller, then voice

alert like ‘door is opened’ will be announced through by activating the voice IC. At the

same time status also displays on the LCD. There is another sensor called fuel sensor,

which detects the level of the fuel present in the tank. If it finds less, the voice alert and

status should be outputted.

In this project, there are different switches to perform various operations. One

switch vehicle is called start/stop switch, which is used for start or stop the vehicle.

There is another switch which is an Ignition switch that is used for the operation of the

engine. There is one Read switch, which is placed at the seat belt to find out whether the

person is wear the seat belt or not. There is a switch which is used to represent the hand

brake switch whether the hand brake is removed or not. If the hand brake is not removed

the concerned voice alert should be given out.

SRTIST 8

Page 9: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

The micro controller controls the output on the basis of the input given to it.

There is a voice IC that stores the different voice messages at the message pins on the

voice IC. These voice alerts are stored in the IC with the help of the MIC. The voice

should be retrieved through the speaker. There is a LCD display is used for displaying

the status. For the circuit operation, it requires maximum 5v DC power supply.

Schematic Diagram:

SRTIST 9

Page 10: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig 2: Schematic Diagram

Schematic Description:

Voice IC connections to Micro controller:

Pins Connections(1-6), 8,9 these pins are connected to Port P1 of the micro controller12,13 These pins are grounded.28, 16 these pins are connected to +5V DC supply.

Hardware connections to Micro controller:

Hardware ConnectionsTemperature sensor P3.1Fuel Indicator P3.6Brake Circuit P3.3Door Sensor P3.4

SRTIST 10

Page 11: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Belt (Read Switch) P3.5Start/Stop key P3.2Ignition Switch P3.7DC motor P2.0LCD connections to Micro controller:

Pins Connections1 VSS (ground)

2 VCC (+5V)

3 10k pot

4 RS, this pin is connected to P2.7 of the micro controller

5 R/w, this pin is connected to P2.6 of the micro controller

6 EN, this pin is connected to P2.5 of the micro controller

7-14 (D0-D7) these pins are connected to the port (P0) of the micro controller

Hardware Components:

MICRO CONTROLLER (AT89S51)

Introduction

A Micro controller consists of a powerful CPU tightly coupled with memory,

various I/O interfaces such as serial port, parallel port timer or counter, interrupt

controller, data acquisition interfaces-Analog to Digital converter, Digital to Analog

converter, integrated on to a single silicon chip.

If a system is developed with a microprocessor, the designer has to go for external

memory such as RAM, ROM, EPROM and peripherals. But controller is provided all

SRTIST 11

Page 12: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

these facilities on a single chip. Development of a Micro controller reduces PCB size and

cost of design.

One of the major differences between a Microprocessor and a Micro controller is

that a controller often deals with bits not bytes as in the real world application.

Intel has introduced a family of Micro controllers called the MCS-51.

Figure: micro controller

Features:

• Compatible with MCS-51® Products

• 4K Bytes of In-System Programmable (ISP) Flash Memory

– Endurance: 1000 Write/Erase Cycles

• 4.0V to 5.5V Operating Range

• Fully Static Operation: 0 Hz to 33 MHz

• Three-level Program Memory Lock

• 128 x 8-bit Internal RAM

• 32 Programmable I/O Lines

• Two 16-bit Timer/Counters

SRTIST 12

Page 13: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

• Six Interrupt Sources

• Full Duplex UART Serial Channel

• Low-power Idle and Power-down Modes

Description

The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K 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 AT89S51 is a

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

embedded control applications.

Block diagram:

SRTIST 13

Page 14: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Figure: Block diagram

Pin diagram:

Figure: pin diagram of micro controller

Pin Description

SRTIST 14

Page 15: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

VCC - Supply voltage.

GND - Ground.

Port 0:

Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink

eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance

inputs. Port 0 can also be configured to be the multiplexed low-order address/data bus during

accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0

also receives the code bytes during Flash programming and outputs the code bytes during

program verification. External pull-ups are required during program verification.

Port 1:

Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers

can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by

the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being

pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the

low-order address bytes during Flash programming and verification.

Port 2:

Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers

can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by

the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being

pulled low will source current (IIL) because of the internal pull-ups. Port 2 also receives the

high-order address bits and some control signals during Flash programming and verification.

Port 3:

Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers

can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by

SRTIST 15

Page 16: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being

pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control

signals for Flash programming and verification. Port 3 also serves the functions of various

special features of the AT89S51, as shown in the following table.

RST:

Reset input. A high on this pin for two machine cycles while the oscillator is running

resets the device. This pin drives High for 98 oscillator periods after the Watchdog times out.

The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the

default state of bit DISRTO, the RESET HIGH out feature is enabled.

ALE/PROG:

Address Latch Enable (ALE) is an output pulse for latching the low byte of the address

during accesses to external memory. This pin is also the program pulse input (PROG) during

Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator

frequency and may be used for external timing or clocking purposes. Note, however, that one

ALE pulse is skipped during each access to external data memory. If desired, ALE operation

can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only

during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the

ALE-disable bit has no effect if the microcontroller is in external execution mode.

SRTIST 16

Page 17: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

PSEN:

Program Store Enable (PSEN) is the read strobe to external program memory. When

the AT89S51 is executing code from external program memory, PSEN is activated twice each

machine cycle, except that two PSEN activations are skipped during each access to external

data memory.

EA/VPP:

External Access Enable. EA must be strapped to GND in order to enable the device to

fetch code from external program memory locations starting at 0000H up to FFFFH. Note,

however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be

strapped to VCC for internal program executions. This pin also receives the 12-volt

programming enable voltage (VPP) during Flash programming.

XTAL1:

Input to the inverting oscillator amplifier and input to the internal clock operating

circuit.

XTAL2:

Output from the inverting oscillator amplifier.

Oscillator Characteristics:

XTAL1 and XTAL2 are the input and output, respectively, of an inverting

amplifier which can be configured for use as an on-chip oscillator, as shown in Figs

6.2.3. Either a quartz crystal or ceramic resonator may be used. To drive the device from

an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as

shown in Figure 6.2.4.There are no requirements on the duty cycle of the external clock

signal, since the input to the internal clocking circuitry is through a divide-by-two flip-

flop, but minimum and maximum voltage high and low time specifications must be

observed.

SRTIST 17

Page 18: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig 6.2.3 Oscillator Connections Fig 6.2.4 External Clock Drive Configuration

APR 9600 RE-Recording Voice IC

Single-chip Voice Recording & Playback Device

60- Second Duration

1 Features :

• Single-chip, high-quality voice recording & playback solution

- No external ICs required

- Minimum external components

• Non-volatile Flash memory technology

- No battery backup required

• User-Selectable messaging options

- Random access of multiple fixed-duration messages

- Sequential access of multiple variable-duration messages

• User-friendly, easy-to-use operation

- Programming & development systems not required

SRTIST 18

Page 19: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

- Level-activated recording & edge-activated play back switches

• Low power consumption

- Operating current: 25 mA typical

- Standby current: 1 uA typical

- Automatic power-down

• Chip Enable pin for simple message expansion

2 General Description:

The APR9600 device offers true single-chip voice recording, non-volatile storage,

and playback capability for 40 to 60 seconds. The device supports both random and

sequential access of multiple messages. Sample rates are user- selectable, allowing

designers to customize their design for unique quality and storage time needs. Integrated

output amplifier, microphone amplifier, and AGC circuits greatly simplify system design.

the device is ideal for use in portable voice recorders, toys, and many other consumer and

industrial applications.

APLUS integrated achieves these high levels of storage capability by using its

proprietary analog/multilevel storage technology implemented in an advanced Flash non-

volatile memory process, where each memory cell can store 256 voltage levels. This

technology enables the APR9600 device to reproduce voice signals in their natural form.

It eliminates the need for encoding and compression, which often introduce distortion.

SRTIST 19

Page 20: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig 12: The APR9600 DIP & SOP

3 Functional Description:

APR9600 block diagram is included in order to describe the device's internal architecture.

At the left hand side of the diagram are the analog inputs. A differential microphone

amplifier, including integrated AGC, is included on-chip for applications requiring use.

The amplified microphone signals fed into the device by connecting the ANA_OUT pin

to the ANA_IN pin through an external DC blocking capacitor. Recording can be fed

directly into the ANA_IN pin through a DC blocking capacitor, however, the connection

between ANA_IN andANA_OUT is still required for playback. The next block

encountered by the input signal is the internal anti-aliasing filter. The filter automatically

adjust its response According to the sampling frequency selected so Shannon’s Sampling

Theorem is satisfied. After anti-aliasing filtering is accomplished the signal is ready to be

clocked into the memory array. This storage is accomplished through a combination of

the Sample and Hold circuit and the Analog Write/Read circuit. Either the Internal

Oscillator or an external clock source clocks these circuits. When playback is desired the

previously stored recording is retrieved from memory, low pass filtered, and amplified as

shown on the right hand side of the diagram. The signal can be heard by connecting a

speaker to the SP+ and SP- pins. Chip-wide management is accomplished through the

SRTIST 20

Page 21: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

device control block shown in the upper right hand corner. Message management is

provided through the message control block represented in the lower center of the block

diagram. More detail on actual device application can be found in the Sample

Application section. More detail on sampling control can be found in the Sample Rate

and Voice Quality section. More detail on Message management and device control can

be found in the Message Management section.

Fig 13: APR9600 Block Diagram

3.1 Message Management:

3.1.1 Message Management General Description

Playback and record operations are managed by on-chip circuitry. There are several

available messaging modes depending upon desired operation. These message modes

determine message management style, message length, and external parts count.

Therefore, the designer must select the appropriate operating mode before beginning the

design. Operating modes do not affect voice quality; for information on factors affecting

quality refer to the Sampling Rate & Voice Quality section. The device supports five

message management modes (defined by the MSEL1, MSEL2 and /M8_OPTION pins

shown in Figures 1 and 2):

SRTIST 21

Page 22: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Random access mode with 2, 4, or 8 fixed-duration messages Tape mode, with multiple

variable-duration messages, provides two options:

- Auto rewind

- Normal

Modes cannot be mixed. Switching of modes after the device has recorded an initial

message is not recommended. If modes are switched after an initial recording has been

made some unpredictable message fragments from the previous mode may remain

present, and be audible on playback, in the new mode. These fragments will disappear

after a Record operation in the newly selected mode. Table 1 defines the decoding

necessary to choose the desired mode. An important feature of the APR9600 Message

management capabilities is the ability to audibly prompt the user to change in the device's

status through the use of "beeps" superimposed on the device's output. This feature is

enabled by asserting a logic high level on the BE pin.

3.1.2 Random Access Mode

Random access mode supports 2, 4, or 8 Message segments of fixed duration. As

suggested recording or playback can be made randomly in any of the elected messages.

The length of each message segment is the total recording length available (as defined by

the selected sampling rate) divided by the total number of segments enabled (as decoded

in Table1). Random access mode provides easy indexing to message segments.

3.1.2A Functional Description of Recording in Random Access Mode

On power up, the device is ready to record or playback in any of the enabled message

segments. To record,/CE must be set low to enable the device and /RE must be set low to

enable recording. You initiate recording by applying a low level on the message trigger

pin that represents the message segment you intend to use. The message trigger pins are

SRTIST 22

Page 23: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

labeled /M1_MESSAGE - /M8_OPTION on pins 1-9 (excluding pin 7) for message

segments 1-8 respectively. Note: Message trigger pins of

M1_MESSAGE,/M2_NEXT, /M7_END, and /M8_OPTION, have expanded names to

represent the different functionality that these pins assume in the other modes. In random

access mode these pins should be considered purely message trigger pins with the same

functionality as /M3, /M4, /M5, and /M6. For a more thorough explanation of the

functionality of device pins in different modes please refer to the pin description table

that appears later in this document. When actual recording begins the device responds

with a single beep (if the BE pin is high to enable the beep tone) at the speaker outputs to

indicate that it has started recording. Recording continues as long as the message pin

stays low. The rising edge of the same message trigger pin during record stops the

recording operation (indicated with a single beep). If the message trigger pin is held low

beyond the end of the maximum allocated duration, recording stops automatically

(indicated with two beeps), regardless of the state of the message trigger pin. The chip

then enters low-power mode until the message trigger pin returns high. After the message

trigger pin returns to high, the chip enters standby mode. Any subsequent high to low

transition on the same message trigger pin will initiate recording from the beginning of

the same message segment. The entire previous message is then overwritten by the new

message, regardless of the duration of the new message. Transitions on any other

message trigger pin or the /RE pin during the record operation are ignored until after the

device enters standby mode.

3.1.2B Functional Description of Playback Random Access Mode

On power up, the device is ready to record or playback, in any of the enabled message

segments. To playback,/CE must be set low to enable the device and /RE must be set high

to disable recording & enable playback. You initiate playback by applying a high to low

edge on the message trigger pin that represents the message segment you intend to

playback. Playback will continue until the end of the message is reached. If a high to low

edge occurs on the same message trigger pin during playback, playback of the current

message stops immediately. If a different message trigger pin pulses during playback,

playback of the current message stops immediately (indicated by one beep) and playback

of the new message segment begins. A delay equal to 8,400 cycles of he sample clock

SRTIST 23

Page 24: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

will be encountered before the device starts playing the new message. If a message

trigger pin is held low, the selected message is played back repeatedly as long as the

trigger pin stays low. A period of silence, of a duration equal to 8,400 cycles of the

sampling clock, will be inserted during looping as an indicator to the user of the transition

between the end and the beginning of the message.

3.1.3 Tape Mode:

Tape mode manages messages sequentially much like traditional cassette tape recorders.

Within tape mode two options exist, auto rewind and normal. Auto rewind mode

configures the device to automatically rewind to the beginning of the message

immediately following recording or playback of the message. In tape mode, using either

option, messages must be recorded or played back sequentially, much like a traditional

cassette tape recorder.

3.1.3.1A Function Description of Recording in Tape Mode using the Auto Rewind Option

On power up, the device is ready to record or playback, starting at the first address in the

memory array. To record, /CE must be set low to enable the device and /RE must be set

low to enable recording. A falling edge of the /M1_MESSAGE pin initiates voice

recording (indicated by one beep).A subsequent rising edge of the /M1_MESSAGE pin

during recording stops the recording (also indicated by one beep). If the M1_MESSAGE

pin is held low beyond the end of the available memory, recording will stop

automatically (indicated by two beeps). The device will then assert a logic low on the

/M7_END pin until the /M1 Message pin is released.

The device returns to standby mode when the /M1_MESSAGE pin goes high gain. After

recording is finished the device will automatically rewind to the beginning of the most

recently recorded message and wait for the next user input. The auto rewind function is

convenient because it allows the user to immediately playback and review the message

without the need to rewind. However, caution must be practiced because a subsequent

record operation will overwrite the last recorded message unless the user remembers to

pulse the /M2_Next pin in order to increment the device past the current message.

A subsequent falling edge on the /M1_Message pin starts a new record operation,

overwriting the previously existing message. You can preserve the previously recorded

message by using the /M2_Next input to advance to the next available message segment.

SRTIST 24

Page 25: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

To perform this function, the /M2_NEXT pin must be pulled low for at least 400 cycles

of the sample clock. The auto rewind mode allows the user to record over the just

recorded message simply by initiating a record sequence without first toggling the

/M2_NEXT pin.

To record over any other message however requires a different sequence. You

must pulse the /CE pin low once to rewind the device to the beginning of the voice

memory. The /M2_NEXT pin must then be pulsed low for the specified number of times

to move to the start of the message you wish to overwrite. Upon arriving at the desired

message a record sequence can be initiated to overwrite the previously recorded material.

After you overwrite the message it becomes the last available message and all previously

recorded messages following this message become inaccessible. If during a record

operation all of the available memory is used, the device will stop recording

automatically,(double beep) and set the /M7_END pin low for a duration equal to 1600

cycles of the sample clock. Playback can be initiated on this last message, but pulsing

the /M2_Next pin will put the device into an "overflow state". Once the device enters an

overflow state any subsequent pulsing of /M1_MESSAGE or /M2_NEXT will only result

in a double beep and setting of the /M7_END pin low for a duration equal to 400 cycles

of the sample clock. To proceed from this state the user must rewind the device to the

beginning of the memory array. This can be accomplished by toggling the /CE pin low or

cycling power. All inputs, except the /CE pin, are ignored during recording.

3.1.3.1B Function Description of Playback in Tape Mode using Auto Rewind Option

On power-up, the device is ready to record or playback, starting at the first address in the

memory array. Before you can begin playback, the /CE input must be set to low to enable

the device and /RE must be set to high to disable recording and enable playback. The first

high to low going pulse of the /M1_MESSAGE pin initiates playback from the beginning

of the current message; on power up the first message is the current message. When

the /M1_MESSAGE pin pulses low the second time, playback of the current

Message stops immediately. When the /M1_MESSAGE pin pulses low a third time,

playback of the current message starts again from its beginning. If you hold the

SRTIST 25

Page 26: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

/M1_MESSAGE pin low continuously the same message will play continuously in a

looping fashion. A 1,540ms period of silence is inserted during looping as an indicator to

the user of the transition between the beginning and end of the message. Note that in auto

rewind mode the device always rewinds to the beginning of the current message. To

listen to a subsequent message the device must be fast forwarded past the current

message to the next message. This function is accomplished by toggling the /M2_NEXT

pin from high to low. The pulse must be low for least 400 cycles of the sampling clock.

After the device is incremented to the desired message the user can initiate playback of

the message with the playback sequence described above. A special case exists when

the /M2_NEXT pin goes low during playback. Playback of the current message will stop,

the device will beep, advance to the next message and initiate playback of the next

message. (Note that if /M2 Next goes low when not in playback mode, the device will

prepare to play the next message, but will not actually initiate playback). If the /CE pin

goes high during playback, playback of the current message will stop, the device will

beep, reset to the beginning of the first message, and wait for a subsequent playback

command. When you reach the end of the memory array, any subsequent pulsing of

/M1_MESSAGE or /M2_NEXT will only result in a double beep. To proceed from this

state the user must rewind the device to the beginning of the memory array. This can be

accomplished by toggling the /CE pin low or cycling power.

3.1.3.2A Functional Description of Recording In Tape Mode using the Normal Option

On power-up, the device is ready to record or playback, starting at the first address in the

memory array. Before you can begin recording, the /CE input must be set to low to

enable the device and /RE must be set to low to enable recording. On a falling edge of the

/M1_MESSAGE pin the device will beep once and initiate recording. A subsequent

rising edge on the /M1 Message pin will stop recording and insert a single beep. If the

M1_MESSAGE pin is held low beyond the end of the available memory, recording Stops

automatically, and two beeps are inserted; regardless of the state of the /M1_MESSAGE

pin. The device returns to the standby mode when the /M1_MESSAGE pin is returned

high. A subsequent falling edge on the /M1_MESSAGE pin starts a new record operation

SRTIST 26

Page 27: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

in the memory array immediately following the last recorded message, thus preserving

the last recorded message. To record over all previous messages you must pulse the /CE

pin low once to reset the device to the beginning of the first message. You can then

initiate a record sequence, as described above, to record a new message. The most

recently recorded message will become the last recorded message and all previously

recorded messages following this message will become inaccessible. If you wish to

preserve any current messages it is recommend that the Auto Rewind option be used

instead of the Normal option. If the Normal option is necessary the following sequence

can be used. To preserve current messages you must fast forward past the messages you

want to keep before you can record a new message. To fast forward when using the

Normal option you must switch to play mode and listen to messages sequentially until

you arrive at the beginning of the message you wish to overwrite. At this stage you

should switch back to record mode and overwrite the desired message.

The most recently recorded message will become the last recorded message and

all previously recorded messages following this message will become inaccessible. All

inputs, except /CE, are ignored during recording.

3.1.3.2B Functional Description of Playback in Tape Mode using the Normal Option

On power-up or after a low to high transition on /RE the device is ready to record or

playback starting at the first address in the memory array. Before you can begin playback

of messages, the /CE input must be set to low to enable the device and /RE must be set to

high to enable playback. The first high to low going pulse of the /M1_MESSAGE pin

initiates playback from the beginning of the current message. When the /M1_MESSAGE

pin pulses from high to low a second time, playback of the current message stops

immediately. When the /M1_MESSAGE pin pulses from high to low a third time,

playback of the next message starts again from the beginning. If you hold the

/M1_MESSAGE pin low continuously, the current message and subsequent messages

play until the one of the following conditions is met: the end of the memory array is

reached, the last message is reached, the /M1_message pin is released. If the last recorded

message has already played, any further transitions on the /M1_MESSAGE pin will

initiate a double beep for warning and the /M7_END pin will go low. To exit this state

SRTIST 27

Page 28: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

you must pulse the /CE pin high and then low once during standby to reset the pointer to

the beginning of the first message.

3.2 Microprocessor Controlled Message Management:

The APR9600 device incorporates several features design help simplify microprocessor

Controlled message management When controlling messages the microprocessor

essentially toggles pins as described in the message management sections described

previously. The /BUSY, /STROBE, and /M7_END pins are included to simplify

handshaking between the microprocessor and the APR9600. The /BUSY pin, when low,

indicates to the host processor that the device is busy and that No commands can be

accepted. When this pin is high the device is ready to accept and execute commands from

the host. The /STROBE pin pulses low each time a memory segment is used. Counting

pulses on this pin enables the host processor to accurately determine how much recording

time has been used, and how much recording time remains. The APR9600 has a total of

eighty memory segments. The /M7_END pin is used as an indicator that the device has

stopped its current record or playback operation.

During recording a low going pulse indicates that all memory has been used. During

playback a low pulse indicates that the last message has played. Microprocessor control

can also be used to link several APR9600 devices together in order to increase total

available recording time. In this application both the speaker and microphone signals can

be connected in parallel. The microprocessor will then control which device currently

drives the speaker by enabling or disabling each device using its respective /CE pins. A

continuous message cannot be recorded in multiple devices however because the

transition from one device to the next will incur a delay that is noticeable upon playback.

For this reason it is recommended that message boundaries and device boundaries always

coincide.

3.3 Signal Storage:

The APR9600 samples incoming voice signals and stores the instantaneous voltage

samples in non-volatile FLASH memory cells. Each memory cell can support voltage

ranges from 0 to 256 levels. These 256 discrete voltage levels are the equivalent of 8-bit

SRTIST 28

Page 29: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

(28=256) binary encoded values. During playback the stored signals are retrieved from

memory, smoothed to form a continuous signal, and then amplified before being fed to an

external speaker.

3.4 Sampling Rate & Voice Quality:

According to Shannon's sampling theorem, the highest possible frequency component

introduced to the input of a sampling system must be equal to or less than half the

sampling frequency if aliasing errors are to be eliminated. The APR9600 automatically

filters its input, based on the selected sampling frequency, to meet this requirement.

Higher sampling rates increase the bandwidth and hence the voice quality, but they also

use more memory cells for the same length of recording time. Lower sampling rates use

fewer memory cells and effectively increase the duration capabilities of the device, but

they also reduce incoming signal bandwidth. The APR9600 accommodates sampling

rates as high as 8 kHz and as low a 4 kHz. You can control the quality/duration trade off

by controlling the sampling frequency.

An internal oscillator provides the APR9600 sampling clock. Changing the resistance

from the OscR pin to GND. Table2 summarizes resistance values and the corresponding

sampling frequencies, as can change oscillator frequency well as the resulting input

bandwidth and duration.

3.5 Automatic Gain Control (AGC):

The APR9600 device has an integrated AGC. The AGC affects the microphone input but

does not affect the ANA_IN input. The AGC circuit insures that the input signal is

properly amplified. The AGC works by applying maximum gain to small input signals

and minimum gain to large input signals. This assures that inputs of varying amplitude

SRTIST 29

Page 30: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

are recorded at the optimum signal level. The AGC amplifier is designed to have a fast

attack time and a slow decay time.

This timing is controlled by the RC network connected to pin 19. A value of 220K and

4.7uF has been found to work well for the English language. Be aware that different

languages, speakers from different countries, and music may all require modification of

the recommended values for the AGC RC network.

3.6 Sampling Application:

The following reference schematics are included as examples of how a recording system

might be designed. Each reference schematic shows the device incorporated in one of its

three main modes: Random Access, Tape mode – Normal option, and Tape mode – Auto

Rewind option. Note that in several of the applications either one or all of the /BUSY,

/STROBE, or /M7_END pins are connected to LEDs as indicators of device status. This

is possible because all of these pins and signals were designed to have timing compatible

with both microprocessor interface and manual LED indication. A bias must be applied to

the electrets microphone in order to power its built-in circuitry. The ground return of this

bias network is connected to the /Busy.

This configuration saves power when record mode. Both pins 18 and 19, MicIn and

MicRef, must be AC coupled to the microphone network in order to block the DC biasing

voltage. Figure 3 shows the device configured in random access mode. The device is

using eight Message segments, the maximum available, in this mode. Note that message

trigger pins that are not used, for modes with less than eight segments, can be left

unconnected with the exception of pin /M8_OPTION which should be pulled to VCC

through a 100k resistor.

SRTIST 30

Page 31: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig 14: Random Access Mode

SRTIST 31

Page 32: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig 15: Tape Mode, Auto Rewind option

SRTIST 32

Page 33: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig 16: Tape Mode, Normal option

SRTIST 33

Page 34: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

SRTIST 34

Page 35: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

SRTIST 35

Page 36: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

SRTIST 36

Page 37: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Start/Stop switch:

In this project, there are different switches to perform various operations. One

switch vehicle is called start/stop switch, which is used for start or stop the vehicle. In

this project, we are placing a press button for start and stop the vehicle. If we press the

button to down, automatically the vehicle will be at ON state. If we press again, the

button will be released and the vehicle will come to OFF state.

TEMPERATURE SENSING CIRCUIT (temperature sensor)

The methods of temperature measurement may be divided into two main classes

according as the exchange of heat between the testing body and the hot system takes

place by contact or by radiation across a space. In the contact methods, thermometers or

thermocouples are used and they are immersed in solids or liquids. The thermodynamic

equilibrium between the hot body and the testing body is established by material contact.

In the non-contact methods, the thermodynamic equilibrium is established by the

radiation emitted as excited atom and molecules in the hot body return to the ground

state.

ThermistorsA thermistor is a temperature-sensing element composed of sintered semiconductor

material which exhibits a large change in resistance proportional to a small change in

temperature. Thermistors usually have negative temperature coefficients which means the

resistance of the thermistor decreases as the temperature increases.

SRTIST 37

Page 38: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Benefits of Thermistors:

Accuracy

Thermistors are one of the most accurate types of temperature sensors. OMEGA

thermistors have an accuracy of ±0.1°C or ±0.2°C depending on the particular thermistor

model. However thermistors are fairly limited in their temperature range, working only

over a nominal range of 0°C to 100°C.

Stability

Finished thermistors are chemically stable and not significantly affected by aging.

Thermistor Elements

The thermistor element is the simplest form of

thermistor. Because of their compact size, thermistor elements are commonly used when

space is very limited. OMEGA offers a wide variety of thermistor elements which vary

SRTIST 38

Page 39: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

not only in form factor but also in their resistance versus temperature characteristics.

Since thermistors are non-linear, the instrument used to read the temperature must

linearize the reading.

Thermistors are temperature sensitive resistors.  All resistors vary with temperature, but

thermistors are constructed of semiconductor material with a resistivity that is especially

sensitive to temperature.  However, unlike most other resistive devices, the resistance of a

thermistor decreases with increasing temperature.  That's due to the properties of the

semiconductor material that the thermistor is made from.  For some, that may be

counterintuitive, but it is correct.  Here is a graph of resistance as a function of

temperature for a typical thermistor.  Notice how the resistance drops from 100 k, to a

very small value in a range around room temperature.  Not only is the resistance change

in the opposite direction from what you expect, but the magnitude of the percentage

resistance change is substantial.

Liquid crystal display

Liquid crystal displays (LCDs) have materials, which combine the properties of

both liquids and crystals. Rather than having a melting point, they have a temperature

range within which the molecules are almost as mobile as they would be in a liquid, but

are grouped together in an ordered form similar to a crystal.

An LCD consists of two glass panels, with the liquid crystal material sand

witched in between them. The inner surface of the glass plates are coated with transparent

electrodes which define the character, symbols or patterns to be displayed polymeric

SRTIST 39

Page 40: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

layers are present in between the electrodes and the liquid crystal, which makes the liquid

crystal molecules to maintain a defined orientation angle.

One each polarisers are pasted outside the two glass panels. These polarisers

would rotate the light rays passing through them to a definite angle, in a particular

direction.

When the LCD is in the off state, light rays are rotated by the two polarisers and

the liquid crystal, such that the light rays come out of the LCD without any orientation,

and hence the LCD appears transparent.

When sufficient voltage is applied to the electrodes, the liquid crystal molecules

would be aligned in a specific direction. The light rays passing through the LCD would

be rotated by the polarisers, which would result in activating/ highlighting the desired

characters.

The LCD’s are lightweight with only a few millimeters thickness. Since the

LCD’s consume less power, they are compatible with low power electronic circuits, and

can be powered for long durations.

The LCD’s don’t generate light and so light is needed to read the display. By

using backlighting, reading is possible in the dark. The LCD’s have long life and a wide

operating temperature range.

Changing the display size or the layout size is relatively simple which makes the

LCD’s more customers friendly.

The LCDs used exclusively in watches, calculators and measuring instruments are

the simple seven-segment displays, having a limited amount of numeric data. The recent

advances in technology have resulted in better legibility, more information displaying

capability and a wider temperature range. These have resulted in the LCDs being

extensively used in telecommunications and entertainment electronics. The LCDs have

even started replacing the cathode ray tubes (CRTs) used for the display of text and

graphics, and also in small TV applications.

This section describes the operation modes of LCD’s then describe how to

program and interface an LCD to 8051 using Assembly and C.

SRTIST 40

Page 41: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

LCD operation

In recent years the LCD is finding widespread use replacing LEDs(seven-segment

LEDs or other multisegment LEDs).This is due to the following reasons:

1. The declining prices of LCDs.

2. The ability to display numbers, characters and graphics. This is in

contract to LEDs, which are limited to numbers and a few characters.

3. Incorporation of a refreshing controller into the LCD, there by

relieving the CPU of the task of refreshing the LCD. In the contrast,

the LED must be refreshed by the CPU to keep displaying the data.

4. Ease of programming for characters and graphics.

LCD pin description

The LCD discussed in this section has 14 pins. The function of each pin is given

in table.

TABLE 1:Pin description for LCD:

Pin symbol I/O Description

1 Vss -- Ground

2 Vcc -- +5V power supply

3 VEE -- Power supply to

control contrast

4 RS I RS=0 to select

command register

SRTIST 41

Page 42: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

RS=1 to select

data register

5 R/W I R/W=0 for write

R/W=1 for read

6 E I/O Enable

7 DB0 I/O The 8-bit data bus

8 DB1 I/O The 8-bit data bus

9 DB2 I/O The 8-bit data bus

10 DB3 I/O The 8-bit data bus

11 DB4 I/O The 8-bit data bus

12 DB5 I/O The 8-bit data bus

13 DB6 I/O The 8-bit data bus

14 DB7 I/O The 8-bit data bus

TABLE 2: LCD Command Codes

Code

(hex)

Command to LCD Instruction

Register

1 Clear display screen

2 Return home

4 Decrement cursor

6 Increment cursor

5 Shift display right

7 Shift display left

8 Display off, cursor off

A Display off, cursor on

C Display on, cursor off

SRTIST 42

Page 43: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

E Display on, cursor on

F Display on, cursor blinking

10 Shift cursor position to left

14 Shift cursor position to right

18 Shift the entire display to the left

1C Shift the entire display to the right

80 Force cursor to beginning of 1st line

C0 Force cursor to beginning of 2nd line

38 2 lines and 5x7 matrix

Uses:

The LCDs used exclusively in watches, calculators and measuring

instruments are the simple seven-segment displays, having a limited amount of numeric

data. The recent advances in technology have resulted in better legibility, more

information displaying capability and a wider temperature range. These have resulted in

the LCDs being extensively used in telecommunications and entertainment electronics.

The LCDs have even started replacing the cathode ray tubes (CRTs) used for the display

of text and graphics, and also in small TV applications.

LCD INTERFACING

Sending commands and data to LCDs with a time delay:

SRTIST 43

Page 44: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig 19: Interfacing of LCD to a micro controller

To send any command from table 2 to the LCD, make pin RS=0.

for data, make RS=1.Then send a high –to-low pulse to the E pin to enable the internal latch of the LCD.

Power supply

The power supply are designed to convert high voltage

AC mains electricity to a suitable low voltage supply for electronics circuits and other

devices. A power supply can by broken down into a series of blocks, each of which

performs a particular function. A d.c power supply which maintains the output voltage

SRTIST 44

Page 45: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

constant irrespective of a.c mains fluctuations or load variations is known as “Regulated

D.C Power Supply”

For example a 5V regulated power supply system as shown below:

Fig 20: Functional Block Diagram of Power supply

Transformer:

A transformer is an electrical device which is used to convert electrical power from one

electrical circuit to another without change in frequency.

Transformers convert AC electricity from one voltage to another with little loss of

power. Transformers work only with AC and this is one of the reasons why mains

electricity is AC. Step-up transformers increase in output voltage, step-down

transformers decrease in output voltage. Most power supplies use a step-down

transformer to reduce the dangerously high mains voltage to a safer low voltage. The

input coil is called the primary and the output coil is called the secondary. There is no

electrical connection between the two coils; instead they are linked by an alternating

magnetic field created in the soft-iron core of the transformer. The two lines in the middle

SRTIST 45

Page 46: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

of the circuit symbol represent the core. Transformers waste very little power so the

power out is (almost) equal to the power in. Note that as voltage is stepped down current

is stepped up. The ratio of the number of turns on each coil, called the turn’s ratio,

determines the ratio of the voltages. A step-down transformer has a large number of turns

on its primary (input) coil which is connected to the high voltage mains supply, and a

small number of turns on its secondary (output) coil to give a low output voltage.

Fig 21: An Electrical Transformer

Turns ratio = Vp/ VS = Np/NS

Power Out= Power In

VS X IS=VP X IP

Vp = primary (input) voltage

Np = number of turns on primary coil

Ip  = primary (input) current    

RECTIFIER:

A circuit, which is used to convert a.c to dc, is known as RECTIFIER. The process of

conversion a.c to d.c is called “rectification”

TYPES OF RECTIFIERS: Half wave Rectifier Full wave rectifier

1. Center tap full wave rectifier.

SRTIST 46

Page 47: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

2. Bridge type full bridge rectifier.

Comparison of rectifier circuits:

Parameter Type of Rectifier

Half wave Full wave BridgeNumber of diodes

1 2

3

PIV of diodes Vm

2Vm

Vm

D.C output voltage Vm/

2Vm/

2Vm/

Vdc, at no-load

0.318Vm

0.636Vm 0.636Vm

Ripple factor 1.21

0.482

0.482

Ripple frequency

f

2f

2f

Rectification efficiency

0.406

0.812

0.812

Transformer Utilization Factor(TUF)

0.287 0.693 0.812

RMS voltage Vrms Vm/2 Vm/√2 Vm/√2

Full-wave Rectifier:

From the above comparisons we came to know that full wave bridge rectifier as more

advantages than the other two rectifiers. So, in our project we are using full wave bridge

rectifier circuit.

Bridge Rectifier: A bridge rectifier makes use of four diodes in a bridge arrangement to

achieve full-wave rectification. This is a widely used configuration, both with individual

diodes wired as shown and with single component bridges where the diode bridge is

wired internally.

A bridge rectifier makes use of four diodes in a bridge arrangement as shown in

fig(a) to achieve full-wave rectification. This is a widely used configuration, both with

SRTIST 47

Page 48: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

individual diodes wired as shown and with single component bridges where the diode

bridge is wired internally.

Fig(A)

Operation:

During positive half cycle of secondary, the diodes D2 and D3 are in forward biased

while D1 and D4 are in reverse biased as shown in the fig(b). The current flow direction

is shown in the fig (b) with dotted arrows.

Fig(B)

During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward

biased while D2 and D3 are in reverse biased as shown in the fig(c). The current flow

direction is shown in the fig (c) with dotted arrows.

SRTIST 48

Page 49: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig(C)

Fig 22: Direction of current flow in a circuit

Filter: A Filter is a device, which removes the a.c component of rectifier output but allows the d.c component to reach the load

Capacitor Filter:

We have seen that the ripple content in the rectified output of half wave rectifier is

121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high

percentages of ripples is not acceptable for most of the applications. Ripples can be

removed by one of the following methods of filtering:

(a) A capacitor, in parallel to the load, provides an easier by –pass for the ripples voltage

though it due to low impedance. At ripple frequency and leave the d.c.to appears the load.

(b) An inductor, in series with the load, prevents the passage of the ripple current (due to

high impedance at ripple frequency) while allowing the d.c (due to low resistance to d.c)

(c) various combinations of capacitor and inductor, such as L-section filter section

filter, multiple section filter etc. which make use of both the properties mentioned in (a)

and (b) above. Two cases of capacitor filter, one applied on half wave rectifier and

another with full wave rectifier.

SRTIST 49

Page 50: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Filtering is performed by a large value electrolytic capacitor connected across the

DC supply to act as a reservoir, supplying current to the output when the varying DC

voltage from the rectifier is falling. The capacitor charges quickly near the peak of the

varying DC, and then discharges as it supplies current to the output. Filtering

significantly increases the average DC voltage to almost the peak value (1.4 × RMS

value).

To calculate the value of capacitor(C),

C = ¼*√3*f*r*Rl

Where,

f = supply frequency,

r = ripple factor,

Rl = load resistance

Note: In our circuit we are using 1000microfarads.

Regulator:

Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output

voltages. The maximum current they can pass also rates them. Negative voltage

regulators are available, mainly for use in dual supplies. Most regulators include some

automatic protection from excessive current ('overload protection') and overheating

('thermal protection'). Many of the fixed voltage regulator ICs have 3 leads and look like

power transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is

simple to use. You simply connect the positive lead of your unregulated DC power

supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to

the Common pin and then when you turn on the power, you get a 5 volt supply from the

output pin.

SRTIST 50

Page 51: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig 23: A Three Terminal Voltage Regulator

78XX:

The Bay Linear LM78XX is integrated linear positive regulator with three

terminals. The LM78XX offer several fixed output voltages making them useful in wide

range of applications. When used as a zener diode/resistor combination replacement, the

LM78XX usually results in an effective output impedance improvement of two orders of

magnitude, lower quiescent current. The LM78XX is available in the TO-252, TO-220 &

TO-263packages,

Features:

• Output Current of 1.5A

• Output Voltage Tolerance of 5%

• Internal thermal overload protection

• Internal Short-Circuit Limited

• No External Component

• Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V

• Offer in plastic TO-252, TO-220 & TO-263

• Direct Replacement for LM78XX

IGNITION SWITCH

SRTIST 51

Page 52: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

The term ignition switch is often used interchangeably to refer to two very different parts: the lock cylinder into which the key is inserted, and the electronic switch that sits just behind the lock cylinder. In some cars, these two parts are combined into one unit, but in other cars they remain separate. It is advisable to check your car's shop manual before attempting to purchase an ignition switch, to ensure that you buy the correct part.

In order to start a car, the engine must be turning. Therefore, in the days before ignition switches, car engines had to be turned with a crank on the front of the car in order to start them. The starter performs this same operation by turning the engine's flywheel, a large, flat disc with teeth on the outer edge. The starter has a gear that engages these teeth when it is powered, rapidly and briefly turning the flywheel, and thus the engine.

The ignition switch generally has four positions: off, accessories, on, and start. Some cars have two off positions, off and lock; one turns off the car, and the other allows the key to be removed from the ignition. When the key is turned to the accessories position, certain accessories, such as the radio, are powered; however, accessories that use too much battery power, such as window motors, remain off in order to prevent the car's battery from being drained. The accessories position uses the least amount of battery power when the engine is not running, which is why drive-in movie theaters recommend that the car be left in the accessories mode during the movie.

The on position turns on all of the car's systems, including systems such as the fuel pump, because this is the position the ignition switch remains in while the car's engine is running. The start position is spring loaded so that the ignition switch will not remain there when the key is released. When the key is inserted into the ignition switch lock cylinder and turned to the start position, the starter engages; when the key is released, it returns to the on position, cutting power to the starter. This is because the engine runs at speeds that the starter cannot match, meaning that the starter gear must be retracted once the engine is running on its own.

Either the ignition switch or the lock cylinder may fail in a car, but both circumstances have very different symptoms. When the ignition switch fails, generally the electrical wiring or the plastic housing develops problems. The car may not turn on and/or start when this happens. Also, the spring-loaded start position could malfunction, in which case the starter will not engage unless the key is manually turned back to the on position.

When the lock cylinder malfunctions, however, the operation of the key itself will become problematic. If the tumblers become stripped, the lock cylinder may be able to turn with any key, or you may be able to remove the key when the car is on. If the tumblers begin to shift, the lock cylinder may not turn. Sometimes the key can be wiggled until the lock cylinder turns, but it is important to remember that this is only a temporary fix

DC Motor

SRTIST 52

Page 53: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

DC motors are configured in many types and sizes, including brush less,

servo, and gear motor types. A motor consists of a rotor and a permanent magnetic field

stator. The magnetic field is maintained using either permanent magnets or

electromagnetic windings. DC motors are most commonly used in variable speed and

torque.

Motion and controls cover a wide range of components that in some way

are used to generate and/or control motion. Areas within this category include bearings

and bushings, clutches and brakes, controls and drives, drive components, encoders and

resolves, Integrated motion control, limit switches, linear actuators, linear and rotary

motion components, linear position sensing, motors (both AC and DC motors),

orientation position sensing, pneumatics and pneumatic components, positioning stages,

slides and guides, power transmission (mechanical), seals, slip rings, solenoids, springs.

Motors are the devices that provide the actual speed and torque in a drive

system.  This family includes AC motor types (single and multiphase motors, universal,

servo motors, induction, synchronous, and gear motor) and DC motors (brush less, servo

motor, and gear motor) as well as linear, stepper and air motors, and motor contactors and

starters.

In any electric motor, operation is based on simple electromagnetism. A

current-carrying conductor generates a magnetic field; when this is then placed in an

external magnetic field, it will experience a force proportional to the current in the

conductor, and to the strength of the external magnetic field. As you are well aware of

from playing with magnets as a kid, opposite (North and South) polarities attract, while

like polarities (North and North, South and South) repel. The internal configuration of a

DC motor is designed to harness the magnetic interaction between a current-carrying

conductor and an external magnetic field to generate rotational motion.

Let's start by looking at a simple 2-pole DC electric motor (here red represents a

magnet or winding with a "North" polarization, while green represents a magnet or

winding with a "South" polarization).

SRTIST 53

Page 54: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Fig 25: Block Diagram of the DC motor

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator,

commutator, field magnet(s), and brushes. In most common DC motors (and all that

Beamers will see), the external magnetic field is produced by high-strength permanent

magnets1. The stator is the stationary part of the motor -- this includes the motor casing,

as well as two or more permanent magnet pole pieces. The rotor (together with the axle

and attached commutator) rotates with respect to the stator. The rotor consists of

windings (generally on a core), the windings being electrically connected to the

commutator. The above diagram shows a common motor layout -- with the rotor inside

the stator (field) magnets.

The geometry of the brushes, commutator contacts, and rotor windings are such

that when power is applied, the polarities of the energized winding and the stator

magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the

stator's field magnets. As the rotor reaches alignment, the brushes move to the next

commutator contacts, and energize the next winding. Given our example two-pole motor,

the rotation reverses the direction of current through the rotor winding, leading to a "flip"

of the rotor's magnetic field, and driving it to continue rotating.

In real life, though, DC motors will always have more than two poles (three

is a very common number). In particular, this avoids "dead spots" in the commutator.

You can imagine how with our example two-pole motor, if the rotor is exactly at the

middle of its rotation (perfectly aligned with the field magnets), it will get "stuck" there.

Meanwhile, with a two-pole motor, there is a moment where the commutator shorts out

the power supply (i.e., both brushes touch both commutator contacts simultaneously).

SRTIST 54

Page 55: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

This would be bad for the power supply, waste energy, and damage motor components as

well. Yet another disadvantage of such a simple motor is that it would exhibit a high

amount of torque” ripple" (the amount of torque it could produce is cyclic with the

position of the rotor).

Fig 26: Block Diagram of the DC motor having two poles only

So since most small DC motors are of a three-pole design, let's tinker with the

workings of one via an interactive animation (JavaScript required):

Fig 27: Block Diagram of the DC motor having Three poles

You'll notice a few things from this -- namely, one pole is fully energized at a

time (but two others are "partially" energized). As each brush transitions from one

commutator contact to the next, one coil's field will rapidly collapse, as the next coil's

field will rapidly charge up (this occurs within a few microsecond). We'll see more about

SRTIST 55

Page 56: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

the effects of this later, but in the meantime you can see that this is a direct result of the

coil windings' series wiring:

Fig 28: Internal Block Diagram of the Three pole DC motor

There's probably no better way to see how an average dc motor is put together,

than by just opening one up. Unfortunately this is tedious work, as well as requiring the

destruction of a perfectly good motor. This is a basic 3-pole dc motor, with 2 brushes

and three commutator contacts.

SRTIST 56

Page 57: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

LINEAR KEYPAD

This section basically consists of a Linear Keypad. Basically a Keypad can be classified

into 2 categories. One is Linear Keypad and the other is Matrix keypad.

1. Matrix Keypad.

2. Linear Keypad.

1. Matrix Keypad: This Keypad got keys arranged in the form of Rows and

Columns. That is why the name Matrix Keypad. According to this keypad, In

order to find the key being pressed the keypad need to be scanned by making

rows as i/p and columns as output or vice versa.

This Keypad is used in places where one needs to connect more

no. of keys with less no. of data lines.

2. Linear Keypad: This Keypad got ‘n’ no. of keys connected to ‘n’ data lines of

microcontroller.

This Keypad is used in places where one needs to connect less no.

of keys.

Generally, in Linear Keypads one end of the switch is connected to Microcontroller

(Configured as i/p) and other end of the switch is connected to the common ground.

So whenever a key of Linear Keypad is pressed the logic on the microcontroller pin

will go LOW.

Here in this project, a linear keypad is used with switches connected in a serial

manner. Linear keypad is used in this project because it takes less no. of port pins. The

Linear Keypad with 4 Keys is shown below.

SRTIST 57

Page 58: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

IR transmitter:IR LED:

Here the IR transmitter is nothing but the IR LED. It just looks like a normal LED but

transmits the IR signals. Since the IR rays are out of the visible range we cannot observe

the rays from the transmitter.

SRTIST 58

Page 59: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

These are infrared LEDs; the light output is not visible by our eyes. They can be used as

replacement LEDs for remote controls, night vision for camcorders, invisible beam

sensors, etc.

Fig 30: IR LED

Advantages:

Infrared LEDs are ideal light sources for use with night vision goggles,

surveillance cameras, medical imaging, recognition and calibration

systems.

Due to their resistance to ambient-light impediments and electromagnetic

interference (EMI), Infrared LEDs enhance the performance of wireless

computer-to-PDA links, collision avoidance systems, automation

equipment, biomedical instrumentation, and telecommunications

equipment.

Solid-state design renders Infrared LEDs impervious to electrical and

mechanical shock, vibration, frequent switching and environmental

extremes. With an average life span of 100,000-plus hours (11 years),

Infrared LEDs operate reliably year-after-year.

Photo diode:

A photodiode is a type of photodetector capable of converting light into either

current or voltage, depending upon the mode of operation.

SRTIST 59

Page 60: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Photodiodes are similar to regular semiconductor diodes except that they may be

either exposed (to detect vacuum UV or X-rays) or packaged with a window or optical

fibre connection to allow light to reach the sensitive part of the device. Many diodes

designed for use specifically as a photodiode will also use a PIN junction rather than the

typical PN junction.

Principle of operation

A photodiode is a PN junction or PIN structure. When a photon of sufficient

energy strikes the diode, it excites an electron thereby creating a mobile electron and a

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

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

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

electrons toward the cathode, and a photocurrent is produced.

Photovoltaic mode

When used in zero bias or photovoltaic mode, the flow of photocurrent out of the

device is restricted and a voltage builds up. The diode becomes forward biased and "dark

current" begins to flow across the junction in the direction opposite to the photocurrent.

This mode is responsible for the photovoltaic effect, which is the basis for solar cells—in

fact, a solar cell is just an array of large photodiodes.

Photoconductive mode

In this mode the diode is often (but not always) reverse biased. This increases the

width of the depletion layer, which decreases the junction's capacitance resulting in faster

response times. The reverse bias induces only a small amount of current (known as

saturation or back current) along its direction while the photocurrent remains virtually the

same.

Although this mode is faster, the photovoltaic mode tends to exhibit less

electronic noise. (The leakage current of a good PIN diode is so low – < 1nA – that the

Johnson–Nyquist noise of the load resistance in a typical circuit often dominates.)

SRTIST 60

Page 61: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Other modes of operation

Avalanche photodiodes have a similar structure to regular photodiodes, but they are

operated with much higher reverse bias. This allows each photo-generated carrier to be

multiplied by avalanche breakdown, resulting in internal gain within the photodiode,

which increases the effective responsivity of the device.

Phototransistors also consist of a photodiode with internal gain. A phototransistor is in

essence nothing more than a bipolar transistor that is encased in a transparent case so that

light can reach the base-collector junction. The electrons that are generated by photons in

the base-collector junction are injected into the base, and this current is amplified by the

transistor operation. Note that although phototransistors have a higher responsivity for

light they are unable to detect low levels of light any better than photodiodes.

Phototransistors also have slower response times.

Materials

The material used to make a photodiode is critical to defining its properties, because only

photons with sufficient energy to excite electrons across the material's bandgap will

produce significant photocurrents.

Materials commonly used to produce photodiodes include:

Material Wavelength range (nm)

Silicon 190–1100

Germanium 400–1700

Indium gallium arsenide 800–2600

Lead sulfide <1000-3500

SRTIST 61

Page 62: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Because of their greater bandgap, silicon-based photodiodes generate less noise

than germanium-based photodiodes, but germanium photodiodes must be used for

wavelengths longer than approximately 1 µm.

Since transistors and ICs are made of semiconductors, and contain P-N junctions,

almost every active component is potentially a photodiode. Many components, especially

those sensitive to small currents, will not work correctly if illuminated, due to the induced

photocurrents. In most components this is not desired, so they are placed in an opaque

housing. Since housings are not completely opaque to X-rays or other high energy

radiation, these can still cause many ICs to malfunction due to induced photo-currents.

Features

Critical performance parameters of a photodiode include:

Responsivity:

The ratio of generated photocurrent to incident light power, typically expressed in

A/W when used in photoconductive mode. The responsivity may also be

expressed as a quantum efficiency, or the ratio of the number of photogenerated

carriers to incident photons and thus a unitless quantity.

Dark current:

The current through the photodiode in the absence of light, when it is operated in

photoconductive mode. The dark current includes photocurrent generated by

background radiation and the saturation current of the semiconductor junction.

Dark current must be accounted for by calibration if a photodiode is used to make

an accurate optical power measurement, and it is also a source of noise when a

photodiode is used in an optical communication system.

Noise-equivalent power:

(NEP) The minimum input optical power to generate photocurrent, equal to the

rms noise current in a 1 hertz bandwidth. The related characteristic detectivity (D)

is the inverse of NEP, 1/NEP; and the specific detectivity () is the detectivity

normalized to the area (A) of the photodetector,. The NEP is roughly the

minimum detectable input power of a photodiode.

SRTIST 62

Page 63: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

When a photodiode is used in an optical communication system, these parameters

contribute to the sensitivity of the optical receiver, which is the minimum input power

required for the receiver to achieve a specified bit error ratio.

Applications

Photodiode schematic symbol. P-N photodiodes are used in similar applications to other

photodetectors, such as photoconductors, charge-coupled devices, and photomultiplier

tubes.

Fig 31: Photo Diode

Photodiodes are used in consumer electronics devices such as compact disc players,

smoke detectors, and the receivers for remote controls in VCRs and televisions.

In other consumer items such as camera light meters, clock radios (the ones that dim the

display when it's dark) and street lights, photoconductors are often used rather than

photodiodes, although in principle either could be used.

Photodiodes are often used for accurate measurement of light intensity in science and

industry. They generally have a better, more linear response than photoconductors.

They are also widely used in various medical applications, such as detectors for

computed tomography (coupled with scintillators) or instruments to analyze samples

(immunoassay). They are also used in blood gas monitors.

PIN diodes are much faster and more sensitive than ordinary p-n junction diodes, and

hence are often used for optical communications and in lighting regulation.

SRTIST 63

Page 64: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

P-N photodiodes are not used to measure extremely low light intensities. Instead, if high

sensitivity is needed, avalanche photodiodes, intensified charge-coupled devices or

photomultiplier tubes are used for applications such as astronomy , spectroscopy, night

vision equipment and laser range finding.

Circuit Description:

The power supply is used drive all the hardware components, which are work at the

maximum voltage of +5V DC. The 230V AC is a power supply, which is used for,

operate our general home appliance. But our hardware components which requires just

+5V DC voltage. A step-down transformer is used to step down the 230V AC to the

required AC voltage and thereafter it is meant for filtering with the help of a capacitor.

Thereby, the circuit is meant for the regulation to get the constant +5V DC. This output

+5V DC power supply is getting at the load ie., may be a capacitor for rectification

purpose, ie., any AC ripples should be minimized with the help of this capacitor at the

load.

The APR9600 device offers true single-chip voice recording, non-volatile storage,

and playback capability for 40 to 60 seconds. The device supports both random and

sequential access of multiple messages. Sample rates are user- selectable, allowing

designers to customize their design for unique quality and storage time needs. Integrated

output amplifier, microphone amplifier, and AGC circuits greatly simplify system design.

The device is ideal for use in portable voice recorders, toys, and many other consumer

and industrial applications.

SRTIST 64

Page 65: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

In our project, the Voice IC is used for storing the voice at the message pins (m1-

m8) through the MIC and also used for generating the voice alert through the speaker.

Whenever the bus reaches the station at the stop, the reflection sensors send the signals to

the Micro controller. Then the controller gives to signals to Voice IC to produce voice

for corresponding message pins. Through that message pins the voice will be outputted

through the speaker.

The LCD display will acts as an output source in this project that will be helpful

to display the location name on this display. The RS, R/W. and EN pins are the control

pins, which are used for controlling purpose. The RS pin is used to select either data

mode or command mode. The R/W is used to indicate that the LCD will acts as a either

read or write mode. The EN pin is used to enable the data. D0-D7 are data pins used to

get the data from the micro controller. To operate the LCD display, which requires

maximum of +5V DC power supply.

Whenever if any parameter like temperature occurs in a vehicle, it detects and

gives the voice instruction like “over heat” through the speaker and at the same time the

status will be displayed on the LCD.

The IR sensor is placed at the door to find the status of the door either it is

opened or closed. whenever the IR sensor finds if the door is partially closed it will sends

the signals to the micro controller, then voice alert like ‘door is opened’ will be

announced through by activating the voice IC. At the same time status also displays on

the LCD.

There is another sensor called fuel sensor, which detects the level of the fuel

present in the tank. If it finds less, the voice alert and status should be outputted.

In this project, there are different switches to perform various operations. One

switch vehicle is called start/stop switch, which is used for start or stop the vehicle.

SRTIST 65

Page 66: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

There is another switch, which is an Ignition switch that is used for the operation

of the engine. There is one Read switch, which is placed at the seat belt to find out

whether the person is wear the seat belt or not.

There is a switch, which is used to represent the hand brake switch whether the

hand brake is removed, or not. If the hand brake is not removed the concerned voice alert

should be given out.

In our project we are using AT 89C51 Micro controller. This micro controller

controls the output on the basis of the input given to it. There is a voice IC that stores the

different voice messages at the message pins on the voice IC. These voice alerts are

stored in the IC with the help of the MIC. The voice should be retrieved through the

speaker. There is a LCD display is used for displaying the status. For the circuit

operation, it requires maximum 5v DC power supply.

SRTIST 66

Page 67: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Software Used

Introduction to Embedded ‘C’:

Data Types:

U people have already come across the word “Data types” in C- Language. Here

also the functionality and the meaning of the word is same except a small change in the

prefix of their labels. Now we will discuss some of the widely used data types for

embedded C- programming.

Data Types Size in Bits Data Range/Usage

unsigned char 8-bit 0-255

signed char 8-bit -128 to +127

unsigned int 16-bit 0 to 65535

signed int 16-bit -32,768 to +32,767

sbit 1-bit SFR bit addressable only

bit 1-bit RAM bit addressable only

sfr 8-bit RAM addresses 80-FFH

only

Unsigned char:

The unsigned char is an 8-bit data type that takes a value in the range of 0-255(00-

FFH). It is used in many situations, such as setting a counter value, where there is no

need for signed data we should use the unsigned char instead of the signed char.

SRTIST 67

Page 68: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Remember that C compilers use the signed char as the default if we do not put the key

word.

Signed char:

The signed char is an 8-bit data type that uses the most significant bit (D7 of D7-

D0) to represent the – or + values. As a result, we have only 7 bits for the magnitude of

the signed number, giving us values from -128 to +127. In situations where + and – are

needed to represent a given quantity such as temperature, the use of the signed char data

type is a must.

Unsigned int:

The unsigned int is a 16-bit data type that takes a value in the range of 0 to 65535

(0000-FFFFH).It is also used to set counter values of more than 256. We must use the int

data type unless we have to. Since registers and memory are in 8-bit chunks, the misuse

of int variables will result in a larger hex file. To overcome this we can use the unsigned

char in place of unsigned int.

Signed int:

Signed int is a 16-bit data type that uses the most significant bit (D15 of D15-D0)

to represent the – or + value. As a result we have only 15 bits for the magnitude of the

number or values from -32,768 to +32,767.

Sbit (single bit):

The sbit data type is widely used and designed specifically to access single bit

addressable registers. It allows access to the single bits of the SFR registers.

(II) I/O PROGRAMMING IN EMBEDDED “C”:

SRTIST 68

Page 69: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

In this topic we look at C- programming of the I/O ports and also both byte

and bit I/O programming.

Byte size I/O

As we know that ports P0-P3 are byte accessible, we use the P0-P3 labels as

defined in the header file.

Bit – addressable I/O programming

The I/O ports of P0-P3 are bit- addressable, so we can access a single bit without

disturbing the rest of the port. We use the sbit data type to access a single bit of P0-P3.the

format is Px^y where x is the port and y is the bit.

Accessing SFR addresses 80-FFH

Another way to access the SFR RAM space 80-FFH is to use the sfr data type.

This is shown in the below example .Both the bit and byte addresses for the P0-P3 ports

are given in the table. Notice in the given example that there is no #include<reg51.h>

statement which allows us to access any byte of the SFR RAM space 80-FFH.

Single Bit Addresses of Ports

P0 Addr P1 Addr P2 Addr P3 Addr Ports

Bit

P0.0 80H P1.0 90H P2.0 A0H P3.0 B0H D0

P0.1 81H P1.1 91H P2.1 A1H P3.1 B1H D1

P0.2 82H P1.2 92H P2.2 A2H P3.2 B2H D2

P0.3 83H P1.3 93H P2.3 A3H P3.3 B3H D3

P0.4 84H P1.4 94H P2.4 A4H P3.4 B4H D4

SRTIST 69

Page 70: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

P0.5 85H P1.5 95H P2.5 A5H P3.5 B5H D5

P0.6 86H P1.6 96H P2.6 A6H P3.6 B6H D6

P0.7 87H P1.7 97H P2.7 A7H P3.7 B7H D7

(III) DATA CONVERTION PROGRAMS IN EMBEDDED C

Many micro-controllers have a real time clock (RTC) where the time and date are

kept even when the power is off. These time and date are often in packed BCD by RTC.

To display them they must be converted to ASCII. So, in this topic we are showing

application of logic and instructions in the conversion of BCD and ASCII.

ASCII numbers

On ASCII key boards, when the key “0” is activated, “0110000” (30h) is

provided to the system. Similarly 31h (0110001) is provided for the key “1”, and so on as

shown in the table

Packed BCD to ASCII conversion

The RTC provides the time of day (hour, minutes, seconds) and the date (year,

month, day) continuously, regardless of whether the power is ON or OFF. In the

conversion procedure the packed BCD is first converted to unpacked BCD. Then it is

tagged with 0110000 (30h).

ASCII code for Digits 0-9

Key ASCII (hex) Binary BCD (unpacked)

0 30 011 0000 0000 0000

1 31 011 0001 0000 0001

2 32 011 0010 0000 0010

3 33 011 0011 0000 0011

4 34 011 0100 0000 0100

SRTIST 70

Page 71: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

5 35 011 0101 0000 0101

6 36 011 0110 0000 0110

7 37 011 0111 0000 0111

8 38 011 1000 0000 1000

9 39 011 1001 0000 1001

ASCII to packed BCD conversion

To convert ASCII to packed BCD it is first converted to unpacked and then

combined to make packed BCD. For example 4 and 7 on the keyboard give 34h and 37h

respectively the goal is to produce 47h or “0100 0111” which is packed BCD.

Key ASCII unpacked BCD packed BCD

4 34 00000100

7 37 00000111 01000111 or 47h

Checksum byte in ROM

To ensure the integrity of ROM contents, every system must perform the

checksum calculation. The process of checksum will detect any corruption of the contents

of ROM. One of the cause of the ROM corruption is current surge either when the system

is turned on or during operation. To ensure data integrity in ROM the checksum process

uses, what is a checksum byte. There is an extra byte that is tagged to the end of the

series of data.

To calculate the checksum byte of a series of bytes of data, the following steps can be

used

1) Add the bytes together and drop the carries.

2) Take the 2’s complement of the total sum. This is the checksum byte , which

becomes the last byte of the series

Binary (hex) to decimal and ASCII conversion in embedded C

SRTIST 71

Page 72: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

In C-language we use a function call “printf” which is standard IO library

function doing the conversions of data from binary to decimal, or vice versa. But here we

are using our own functions for conversions because it occupies much of memory.

One of the most commonly used is binary to decimal conversion. In devices such

as ADC chips the data is provided to the controller in binary. In order to display binary

data we need to convert it to decimal and then to ASCII. Since the hexadecimal format is

a convenient way of representing binary data we refer to binary data as hex. The binary

data 00-FFH converted to decimal will give us 000 to 255.

One way to do this is to divide it by 10 and keep the remainder, for example

11111101 or FDH is 253 in decimal. The following is one version of the algorithm for

conversion of hex (binary) to decimal.

Quotient Remainder

FD/0A 19 3(low digit) LSD

19/0A 2 5(middle digit)

2(high digit) (MSD)

SRTIST 72

Page 73: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

ABOUT SOFTWARE

Software’s used are:

*Keil software for c programming

*Express PCB for lay out design

*Express SCH for schematic design

What's New in µVision3?

µVision3 adds many new features to the Editor like Text Templates, Quick Function

Navigation, and Syntax Coloring with brace high lighting Configuration Wizard for

dialog based startup and debugger setup. µVision3 is fully compatible to µVision2 and

can be used in parallel with µVision2.

What is µVision3?

µVision3 is an IDE (Integrated Development Environment) that helps you write, compile,

and debug embedded programs. It encapsulates the following components:

A project manager.

A make facility.

Tool configuration.

Editor.

A powerful debugger.

To help you get started, several example programs (located in the \C51\Examples, \

C251\Examples, \C166\Examples, and \ARM\...\Examples) are provided.

HELLO is a simple program that prints the string "Hello World" using the Serial

Interface.

MEASURE is a data acquisition system for analog and digital systems.

TRAFFIC is a traffic light controller with the RTX Tiny operating system.

SIEVE is the SIEVE Benchmark.

DHRY is the Dhrystone Benchmark.

SRTIST 73

Page 74: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

WHETS is the Single-Precision Whetstone Benchmark.

Additional example programs not listed here are provided for each device architecture.

Building an Application in µVision2

To build (compile, assemble, and link) an application in µVision2, you must:

1. Select Project -(forexample,166\EXAMPLES\HELLO\HELLO.UV2).

2. Select Project - Rebuild all target files or Build target.

µVision2 compiles, assembles, and links the files in your project.

Creating Your Own Application in µVision2

To create a new project in µVision2, you must:

1. Select Project - New Project.

2. Select a directory and enter the name of the project file.

3. Select Project - Select Device and select an 8051, 251, or C16x/ST10 device from

the Device Database™.

4. Create source files to add to the project.

5. Select Project - Targets, Groups, Files. Add/Files, select Source Group1, and add

the source files to the project.

6. Select Project - Options and set the tool options. Note when you select the target

device from the Device Database™ all special options are set automatically. You

typically only need to configure the memory map of your target hardware. Default

memory model settings are optimal for most applications.

7. Select Project - Rebuild all target files or Build target.

Debugging an Application in µVision2

To debug an application created using µVision2, you must:

1. Select Debug - Start/Stop Debug Session.

2. Use the Step toolbar buttons to single-step through your program. You may enter

G, main in the Output Window to execute to the main C function.

3. Open the Serial Window using the Serial #1 button on the toolbar.

Debug your program using standard options like Step, Go, Break, and so on.

Starting µVision2 and Creating a Project

SRTIST 74

Page 75: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

µVision2 is a standard Windows application and started by clicking on the program icon.

To create a new project file select from the µVision2 menu.

Project – New Project…. This opens a standard Windows dialog that asks you

for the new project file name.

We suggest that you use a separate folder for each project. You can simply use the icon

Create New Folder in this dialog to get a new empty folder. Then select this folder and

enter the file name for the new project, i.e. Project1. µVision2 creates a new project file

with the name PROJECT1.UV2 which contains a default target and file group name. You

can see these names in the Project.

Window – Files.

Now use from the menu Project – Select Device for Target and select a CPU for your

project. The Select Device dialog box shows the µVision2 device database. Just select the

micro controller you use. We are using for our examples the Philips 80C51RD+ CPU.

This selection sets necessary tool options for the 80C51RD+ device and simplifies in this

way the tool Configuration.

Building Projects and Creating a HEX Files

Typical, the tool settings under Options – Target are all you need to start a new

application. You may translate all source files and line the application with a click on the

Build Target toolbar icon. When you build an application with syntax errors, µVision2

will display errors and warning messages in the Output Window – Build page. A double

click on a message line opens the source file on the correct location in a µVision2 editor

window. Once you have successfully generated your application you can start debugging.

After you have tested your application, it is required to create an Intel HEX file to

download the software into an EPROM programmer or simulator. µVision2 creates HEX

files with each build process when Create HEX files under Options for Target – Output is

enabled. You may start your PROM programming utility after the make process when

you specify the program under the option Run User Program #1.

CPU Simulation

SRTIST 75

Page 76: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

µVision2 simulates up to 16 Mbytes of memory from which areas can be mapped for

read, write, or code execution access. The µVision2 simulator traps and reports illegal

memory accesses.

In addition to memory mapping, the simulator also provides support for the integrated

peripherals of the various 8051 derivatives. The on-chip peripherals of the CPU you have

selected are configured from the Device.

Database selection

you have made when you create your project target. Refer to page 58 for more

Information about selecting a device. You may select and display the on-chip peripheral

components using the Debug menu. You can also change the aspects of each peripheral

using the controls in the dialog boxes.

Start Debugging

You start the debug mode of µVision2 with the Debug – Start/Stop Debug Session

command. Depending on the Options for Target – Debug Configuration, µVision2 will

load the application program and run the startup code µVision2 saves the editor screen

layout and restores the screen layout of the last debug session. If the program execution

stops, µVision2 opens an editor window with the source text or shows CPU instructions

in the disassembly window. The next executable statement is marked with a yellow

arrow. During debugging, most editor features are still available.

For example, you can use the find command or correct program errors. Program source

text of your application is shown in the same windows. The µVision2 debug mode differs

from the edit mode in the following aspects:

_ The “Debug Menu and Debug Commands” described on page 28 are Available. The

additional debug windows are discussed in the following.

_ The project structure or tool parameters cannot be modified. All build Commands are

disabled.

Disassembly Window

The Disassembly window shows your target program as mixed source and assembly

program or just assembly code. A trace history of previously executed instructions may

SRTIST 76

Page 77: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

be displayed with Debug – View Trace Records. To enable the trace history, set Debug –

Enable/Disable Trace Recording.

If you select the Disassembly Window as the active window all program step commands

work on CPU instruction level rather than program source lines. You can select a text line

and set or modify code breakpoints using toolbar buttons or the context menu commands.

You may use the dialog Debug – Inline Assembly… to modify the CPU

instructions. That allows you to correct mistakes or to make temporary changes to the

target program you are debugging.

Steps for executing the Keil programs:

1. Click on the Keil uVision Icon on Desktop

2. The following fig will appear

3. Click on the Project menu from the title bar

4. Then Click on New Project

SRTIST 77

Page 78: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

5. Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\

6. Then Click on Save button above.

7. Select the component for u r project. i.e. Atmel……

8. Click on the + Symbol beside of Atmel

SRTIST 78

Page 79: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

9. Select AT89C51 as shown below

10. Then Click on “OK”

11. The Following fig will appear

SRTIST 79

Page 80: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

12. Then Click either YES or NO………mostly “NO”

13. Now your project is ready to USE

14. Now double click on the Target1, you would get another option “Source

group 1” as shown in next page.

15. Click on the file option from menu bar and select “new”

SRTIST 80

Page 81: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

16. The next screen will be as shown in next page, and just maximize it by double

clicking on its blue boarder.

17. Now start writing program in either in “C” or “ASM”

18. For a program written in Assembly, then save it with extension “. asm” and

for “C” based program save it with extension “ .C”

SRTIST 81

Page 82: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

19. Now right click on Source group 1 and click on “Add files to Group Source”

20. Now you will get another window, on which by default “C” files will appear.

SRTIST 82

Page 83: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

21. Now select as per your file extension given while saving the file

22. Click only one time on option “ADD”

23. Now Press function key F7 to compile. Any error will appear if so happen.

24. If the file contains no error, then press Control+F5 simultaneously.

SRTIST 83

Page 84: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

25. The new window is as follows

26. Then Click “OK”

27. Now Click on the Peripherals from menu bar, and check your required port as

shown in fig below

28. Drag the port a side and click in the program file.

SRTIST 84

Page 85: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

29. Now keep Pressing function key “F11” slowly and observe.

30. You are running your program successfully

SRTIST 85

Page 86: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Source Code

SRTIST 86

Page 87: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Conclusion

The project “VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK”

has been successfully designed and tested.

It has been developed by integrating features of all the hardware components

used. 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 and with the help of growing technology

the project has been successfully implemented.

SRTIST 87

Page 88: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Future Aspects

This project is further enhanced with by placing some security modules to this project

and also provide with wireless technology to give the information if anyone wants to theft

the vehicle.

SRTIST 88

Page 89: 84.Vehicle Superintending System With Voice Feedback Docu

SRTIST VEHICLE SUPERINTENDING SYSTEM WITH VOICE FEEDBACK

Bibliography

The 8051 Micro controller and Embedded Systems

-Muhammad Ali Mazidi

Janice Gillispie Mazidi

The 8051 Micro controller Architecture, Programming & Applications

-Kenneth J. Ayala

Fundamentals Of Micro processors and Micro computers

-B. Ram

Micro processor Architecture, Programming & Applications

- Ramesh S. Gaonkar

Electronic Components

-D.V. Prasad

Wireless Communications

- Theodore S. Rappaport

Mobile Tele Communications

- William C.Y. Lee

SRTIST 89