Project report Soldier Monitoring System BY HARI K S

May 11, 2017 | Author: Hari Shanmughan | Category: N/A
Share Embed Donate


Short Description

Project Report: Soldier Monitoring System BY Hari K S...

Description

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010 2010-11

SOLDIER MONITORING S SYSTEM YSTEM PROJECT REPORT SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE AWARD OF THE DEGREE OF

MASTER OF SCIENCE IN ELECTRONICS FROM UNIVERSITY OF CALICUT SUBMITTED BY

HARI.K.S (Reg.No-ASAJMEL004)

JUNE 2011

(AFFILIATED TO UNIVERSITY OF CALICUT MANAGED BY IHRD, KERALA)

DEPT. OF ELECTRONICS

1

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010 2010-11

(MANAGED BY IHRD, AFFILIATED TO UNIVERSITY OF CALICUT)

CERTIFICATE

This is to certify that the Project Report entitled

“SOLDIER MONITORING S SYSTEM YSTEM” submitted to College of Applied Science, Vadakkencherry in partial fulfillment of the requirement for the award of the degree of

MASTER OF SCIENCE IN ELECTRONICS is a record of project done by

HARI.K.S Reg.No-ASAJMEL00$ during the period of study under our supervision and guidance. HEAD OF DEPARTMENT

PROJECT COORDINATOR

MR.SUBI.T.S

MR.MADHAVADAS.C

(H.O.D, dept.of Electronics)

(Lecturer in Electronics)

INTERNAL GUIDE

(Lecturer in Electronics)

Certified that the candidate was examined by us in the viva viva-voce voce examination held at College of Applied Science, Vadakkencherry held on

Internal Examiner: DEPT. OF ELECTRONICS

External Examiner: 2

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

ACKNOWLEDGEMENT

It is a pleasant task to express my thanks to all the persons who had assisted in the successful completion of this project. First of all, I express my sincere gratitude to Mr.Pradip Somasundaran, the principal of the college, for providing me all the facilities with which I was able to do this project. I express my profound thanks to my project coordinator, Mr.Subi.T.S (H.O.D,dept.of Electronics) and Mr.Madhavadas.C (Lecturer in Electronics)for providing my information on contemporary developments in the vast field of electronics. I would like to thank my project guide, Mr.JAYAKRISHNAN, (embedded system engineer), KELTRON, Kuttipuram, who helped me throughout the project with valuable information and excellent guidance.

And above all I express my deep sense of gratitude to almighty GOD who gave me immense strength and showed me the path to make this project victorious.

HARI.K.S

DEPT. OF ELECTRONICS

3

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

INTRODUCTION In today's world enemy warfare is an important factor in any nation's security. The national security mainly depends on army (ground), navy (sea), air-force (air). The important and vital role is played by the army soldier's. There are many concerns regarding the safety of these soldiers. The defense department of a country must be effective for the security of that country for this the soldiers also must be effective for this we are introducing a “SOLDIER MONITORING SYSTEM”. This system will be use full for soldiers, who involve in special operations or mission. This system enables GPS Tracking of these soldiers and also enables the telemedicine. It is possible by M-Health. The M-Health can be defined as Mobile computing, medical sensors and communication technologies for health care. In a SOLDIER MONITORING SYSTEM, smart sensors are attached to the jacket of soldiers. These are implanted with a personal server for complete mobility. This personal server will provide connectivity to the server

at the base station using a

wireless connection. A GPS Tracking system is also attached with the jacket, which provides the tracking of the position of each soldier. Here also providing a helmet with video. This may help the control station to know about the situation at the mission field. Each soldier has a GSM enabled phone which enables the communication between both ends. There by it is possible to backup a soldier or cover a soldier and makes the mission accomplished. As soon as any soldier enters the enemy lines it is very vital for the army base station to know the location as well as the health status of all soldiers. In our project we have come up with an idea of tracking the soldier as well as to give the health status of the soldier during the war, which enables the army personnel to plan the war strategies.

DEPT. OF ELECTRONICS

4

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

FEATURES

v Provide more security v Provide more safety to soldiers v Can be implement in any conditions v Telemedical records of each soldiers can be stored v Continuous communication is possible v Continuous tracking is possible v Real time monitoring and image capturing v Faster communication over GSM network v Fewer components, so easy to maintain v Less complex circuit v Low power consumption

DEPT. OF ELECTRONICS

5

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

BLOCK DIAGRAM SOLDIER UNIT

TEMERATURE SENSOR

GPS RECEIVER

ADC

LEVL CONVERTOR

MICROCONTROLLER

LEVL CONVERTOR

HEAR BEAT SENSOR ZIGBEE POWER SUPPLY

CAMERA

GSM ENABLED PHONE

TO SERVER BASE UNIT

GSM MODEM

ZIGBEE

SERVER

DEPT. OF ELECTRONICS

6

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

BLOCK DISCRIPTION The above figure shows the complete working block diagram of the Soldier Monitoring System. It has two main parts, a soldier unit and base unit. Soldier unit consists of a microcontroller; heart beat sensor, temperature sensor, a GPS receiver, a mobile phone, a video camera

and a ZIGBEE module. Base unit includes a server, a

GSM modem, and a ZIGBEE module. SOLDIER UNIT

Microcontroller: Microcontrollers are one of the major components in any embedded system. A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Microcontrollers work according to the program written inside its program memory. The major use of these single chip computers are in automatic responding devices. PIC18F452 microcontroller is used as the brain of SMS. The PIC-Programmable Interface Controller

is a family of Harvard architecture microcontrollers made

by Microchip. The function of this section is to collect the information about heart beat of the soldier, atmospheric temperature and location of the soldier in each minute. Then it sends this information to the base unit.

Power Supply: The most important section in every electronic circuit is the power supply. For the proper working of all components an unaltered power supply is needed. The supply must be capable of providing the necessary power for each component. At the same time the protection from over voltage must be there. DEPT. OF ELECTRONICS

7

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

I/P

Rectifier

Filter

Regulator

O/P

Here for the working of controller a 5V constant power supply is needed. To provide this the supply from the mains is reduced to 12V using a transformer. Then after rectification, it is regulated to 5V. Similarly for controlling the relay a 12V is needed. This also provided by the power supply section. Since the regulator used for regulation of the power supply have built in over voltage cut-off circuitry, over load cut-off and over temperature cut-off circuitry, all the other components are safe from all these problems.

LM35 SENSOR The LM35 are Precision integrated circuit temperature sensor whose output voltage is linearly proportional to oc. The LM35 thus has an advantage their linear temperature sensor calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient centigrade scaling low cost is assured by trimming calibration at water level. The LM35’s Low Output impedance, linear output precise inherent calibration make interfacing to readout. It can be used as single power supplier or with I supplies. The LM35 series is available packaged in hermetric to 46 transistor package while the LM 35C, LM35w also available in the plastic To-92 transistor package. The function of LM35 in this project is to monitor the atmospheric temperature

DEPT. OF ELECTRONICS

8

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

HEART BEAT SENSOR In this project we use polar heart rate transmitter and RMC01 receiver as a heart beat sensor. The use of heart beat sensor in this project is to measure the heart beat of soldier to know about the physical status of the soldier. The Polar heart rate receiver component receiver wirelessly receives the heart rate signal from Polar transmitter belt. The complete heart rate measurement system consists of three different parts; transmitter, receiver and electronics and/or display device that is outputting the heart rate value. The transmitter, worn around the chest, electrically detects the heart beat and starts transmitting a pulse corresponding to each heart beat. The receiver that is installed on end user equipment receives the signal and generates a corresponding digital pulse that is operated on by the end user equipment electronics

GPS MODEM A GPS modem is used to get the signals and receive the signals from the satellites. The function of GPS modem in this project is used to send the position (Latitude and Longitude) of the soldier from a remote place. The GPS modem will continuously give the data i.e. the latitude and longitude indicating the position of the soldier. The GPS modem gives many parameters as the output, but only the NMEA data coming out is read and sent to the base station at the other end.

MAX232 MAX232 is used for level conversion to convert TTL voltage level to CMOS voltage level. The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver. The MAX232 converts the information given by the RF reader and is given to the PIC microcontroller. DEPT. OF ELECTRONICS

9

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

VIDEO CAMERA The video camera is a kind of transducer, which produces electrical energy from light energy. I.e., the input to the video camera is light energy and this light energy is converted into electrical signals. Video converting the complete spectrum of visible light into electrical frequencies. The function of video camera in this project is to provide the real time videos to the base station.

MOBILE PHONE A mobile phone (also called mobile, cell phone or hand phone) is an electronic device used for mobile telecommunications over a cellular network of base stations known as cell sites. A mobile phone allows its user to make and receive telephone calls to and from the public telephone network which includes other mobiles and fixed line phones across the world. In addition to being a telephone, modern mobile phones also support many additional services, and accessories, such as SMS (or text) messages, email, Internet access etc.

ZIGBEE MODULE ZigBee is a protocol that uses the 802.15.4 standard as a baseline and adds additional routing and networking functionality. ZigBee is designed to add mesh networking to the underlying 802.15.4 radio. The ZIGBEE module used here is XBee-PRO. XBee-PRO is a low power, low cost wireless device. 802.15.4 was developed with lower data rate, simple connectivity and battery application in mind. The 802.15.4 standard specifies that communication can occur in the 868-868.8 MHz, the 902-928 MHz or the 2.400-2.4835 GHz Industrial Scientific and Medical(ISM) bands. In this project we use the zigbee technology for providing the wireless communication between soldier and base station. Here the zigbee technology transmits data wirelessly. Here we are using XBee-PRO 802.15.4 modules to provide communication. DEPT. OF ELECTRONICS

10

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 SERVER Unit SERVER

The server is equipped with software called Visual Basic6.0. This creates a data base that contains information about the soldier. Server is used to monitor the status of the soldier. And if there is any abnormality in the status of soldier it indicate a a message .

GSM MODEM A GSM modem is a specialized type of modem which accepts a SIM card, and operates over a subscription to a mobile operator, just like a mobile phone. From the mobile operator perspective, a GSM modem looks just like a mobile phone. A GSM modem can be a dedicated modem device with a serial or USB connection, or it may be a mobile phone that provides GSM modem capabilities. Most of the GSM cellular modems come with an integrated SIM card holder. AT or attention commands are used to interface GSM modem with PIC microcontroller. In this project we use the GSM modem at base station to communicate with soldier.

ZIG-BEE MODULE ZIG-BEE module is used here for wireless transmission between the PIC microcontroller and the server. For that two ZIG-BEE modules is required. One at soldier end and other at the server end. The function of the ZIG-BEE module at this end is to receive information about ID & location of soldier and atmospheric temperature to the server.

DEPT. OF ELECTRONICS

11

IHRD, CASVDY

5V

12

100E

R3

0.1uf

C11

IN

C5 33PF

C4 33PF

5V 1

1

J1 R2 10K

R1 1M

2

1

390E

R4

3 LM317 2

12MZ

C6 100nf +5v

OUT

LM35

2

GN D 3

RB6/PGC RB5/PGM RB4 RB3/CCP2*

RB7/PGD

6803

1uf

c12

3V

C12 10pF

RB2/INT2 RB1/INT1 RA4/T0CKI RA5/AN4/SS/LVDIN RB0/INT0 VDD2 VSS RE0/RD/AN5 RD7/PSP7 RE1/WR/AN6 RD6/PSP6 RE2/CS/AN7 RD5/PSP5 VDD RD4/PSP4 VSS RC7/RX/DT OSC1/CLKI OSC2/CLKO/RA6 RC6/TX/CK RC0/T1OSO/T1CKI RC5/SDO RC4/SDI/SDA RC1/T1OSI/CCP2* RD3/PSP3 RC2/CCP1 RC3/SCK/SCL RD0/PSP0 RD2/PSP2 RD1/PSP1

VREFRA3/

RA2/AN2/VREF

MCLR/VPP RAO/ANO RA1/AN1

U1

270E +

R5

8 9 10 11 12 13 14 15 16 17 18 19 20

6 7

5

4

1 2 3

PIC18F452

+5v

R6 1K

C13 10pF

32KHz

21

35 34 33 32 31 30 29 28 27 26 25 24 23 22

39 38 37 36

40

C7 100nf

C10 .1uf

C11 .1uf

OSC_ON VCC

V-

V+

RMCM01

GND

8

14 7 13

6

2

C15 0.1uF

11

9 10

7 8

MAX232

C2+ T1OUT C2- T2OUT R1IN T2IN T1IN R1OUT R2IN R2OUT

C1-

C+

RESET FPLS WIDB_DET HR OSC LX2 F32KIN LX1

U6

C14 0.1uF

2 1

3

6 5 4

RX

TX

4 5 10 11 12 9

3

1

5V

16 VC C GN D

DEPT. OF ELECTRONICS 15

5V

5

3

2

ZIGBEE

GPS

CONNECTOR DB9

CONNECTOR DB9

5

3

2

C9 .1UF

PROJECT REPORT 2010-11 SOLDIER MONITORING SYSTEM

CIRCUIT DIAGRAM

T31 Polar transmitter

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

WORKING The circuit diagram of a Soldier Monitoring system is shown in figure. The heart of this circuit is a peripheral interface controller 18f452. Other important components used in this circuit are LM35, polar belt heart rate transmitter and its receiver, GSM modem, GPS modem, driver IC max232, camera and some discrete components. PIC 18F452 controls and co-ordinate the working of the circuit. It consist of 40 pins. It is equipped with the necessary circuits such as power supply, clock and reset circuits for its efficient operation.. Two 22pF capacitors are connected to it for avoiding the damping of the clock signal. Quartz crystal is connected to pin 13 and 14 of the microcontroller. The power supply used in this circuit is a 5V dc source, positive terminal is connected to the pin 12 & 32 and ground terminal is connected to the pin 11 and 31. The reset circuit consists of a resistor and switch. Resistor is connected to VCC and pin 1 MCLR and a push button switch is connected between pin 1 and ground. When the switch is closed pin 1 that is the master clear pin goes to ground potential and the system terminates all the activities, microcontroller will start program execution from the beginning. PIC works according to the program written on to it. The program is written in C language , The function of the PIC18f452 in this project is to collect information from temperature sensor LM35, heart beat sensor, GPS modem and sent this information to the base station using ZIGBEE module. The LM35 is a temperature sensor that senses the temperature and converts it into typical voltage. This voltage is given to an analog to digital converter(ADC) of the microcontroller which converts the analog value in its input to a digital value ranging from 0 to 255.It is connected to the port1 (port A) of PIC, i.e. to the 2nd pin. Temperature DEPT. OF ELECTRONICS

13

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

sensor measure the atmospheric temperature. This helps to know the temperature variation by weather changes, bomb blasts etc. And this information is transmitting to PIC. Heart beat sensor used in this project is polar belt heart rate transmitter and a RMC01 heart beat receiver. A complete heart rate measuring system consists of a Polar Transmitter worn around the chest and Polar RMCM-01 receiver built into the end user equipment. The Polar Transmitter detects every heartbeat through two electrodes with ECG accuracy and transmits the heart rate information wirelessly to Polar RMCM-01 receiver with the help of a low frequency electromagnetic field. The RMCM-01 receiver receives the transmission, and passes a digital pulse corresponding to each heartbeat to the end user equipment electronics. The coils in the Polar Transmitter and Polar RMCM-01 receiver must be aligned parallel in order to gain optimum performance. The end user equipment contains a microprocessor that calculates current heart rate value based on the time interval between the pulses sent by the Polar RMCM-01 receiver to the microprocessor. This help to know about the physical status of the soldier. Decreasing in heart beat may be of the injury by a gunshot, bomb blast or any other causes. It also helps to know the soldier is alive or dead during the time of mission. Heart beat receiver is connecting to 15th pin of PIC18f452. The GPS unit calculates the position of the soldiers and then sent the latitudinal longitudinal values corresponding to the position of soldier to the microcontroller. The GPS unit is connecting to the MAX232 via a DB9 connector. 2ND PIN of the DB9 is connected to 13th pin (R1IN) of MAX232. 12th pin(R1OUT) MAX232 is connected to Rx pin PIC. MAX232 change the voltage level and PIC receive this data using Rx pin

DEPT. OF ELECTRONICS

14

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals. The drivers provide RS-232 voltage level outputs (approx. ± 7.5 V) from a single + 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V to + 5 V range, as power supply design does not need to be made more complicated just for driving the RS-232 in this case. Similarly reverse conversion too possible using MAX232. In the transmitter the MAX232 converts the TTL logical level to RS232 level and in receiver the RS232 level will be converted into TTL level. For the proper working a 5V power supply and some capacitors of certain values as recommended by the manufactures are needed to be connected externally. After collecting this data microcontroller sent this data to base station using ZIGBEE module in each minute.

ZIGBEE unit is connecting to the MAX232 via a DB9

connector. Tx pin of the PIC is connected to the 11th pin(T1IN) MAX232 .14th PIN (T1OUT) of the MAX232 is connected 2ND PIN of the DB9. PIC transmits data using Tx pin. Then MAX232 convert voltage levels and sent data using ZIGBEE. Each soldier has a video camera. This helps to capture real time videos and sent to base station from the mission area. By analyzing this video they can prepare for further action. At server a software Visual Basic6.0 is used. Using this software, a database is created which contains the details about the soldiers. Server receives this data using ZIGBEE . The received data is extracted by the Visual Basic to gather the heart beat, atmospheric temperature and latitude and longitude of the position.. After receiving this data server display these data. Server displays soldier name, ID, position, heartbeat, temperature, and DEPT. OF ELECTRONICS

15

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

real time videos from mission location. If the heart beat increase above a specific value or decrease below a specific value server give a message. This message contains soldier name, ID, and heart beat. This help to know about physical problems of the soldiers. A GSM modem in server provides facility to call each soldier. This help to give instructions to each soldier.

DEPT. OF ELECTRONICS

16

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

HARDWARE OVERVIEW

The components used to implement SMS are: v PIC18F452 - Microcontroller v LM35 – Temperature sensor v MAX232 – TTLóRS232 level converter v GSM modem – Communication v Camera – Capturing video v LM7805 – 5V regulator v GPS Receiver v Polar heart beat transmitter and RMC01 heart rate receiver v Resistors and Capacitors

DEPT. OF ELECTRONICS

17

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

PIC18F452:

Pin out

Specifications: OPERATING VOLATAGE

2V-5.5V

PROGRAM MEMORY

32K

RAM

1536 bytes

PORTS

Three 8bit ports, one 7bit port and one 3bit port

INTERRUPTS

18

ADC

8 channel 10bit ADC

DEPT. OF ELECTRONICS

18

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 CCP MODULES

2

TIMERS

Two 8 bit timers, two 16bit timer

18F is a high-end series of PIC from Microchip. This powerful 10 MIPS (100 nanosecond instruction execution) yet easy-to-program (only 77 single word instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC® architecture into an 40 pin package and is upwards compatible with the PIC16C5X, PIC12CXXX, PIC16CXX and PIC17CXX devices and thus providing a seamless migration path of software code to higher levels of hardware integration. The PIC18F452 features a 'C' compiler friendly development environment, 256 bytes of EEPROM, Selfprogramming, an ICD, 2 capture/compare/PWM functions, 8 channels of 10-bit Analogto-Digital (A/D) converter, the synchronous serial port can be configured as either 3-wire Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus and Addressable Universal Asynchronous Receiver Transmitter (AUSART). And wide range of operating clock frequency (DC-40MHz). All of these features make it ideal for manufacturing equipment, instrumentation and monitoring, data acquisition, power conditioning, environmental monitoring, telecom and consumer audio/video applications PIC18F452 has a total of 40 pins (in PDIP package, 44 in QFN package). In these 34 pins are used for peripheral interfacing and other pins are used for the necessary circuitry needed for the working of controller. The I/O pins are divided into 5 different ports (Port A-E). Also 8 channel ADC of 10bit resolution and 18 interrupt sources are the advantage of this controller. In 18 interrupt sources, 3 external interrupts with different priority levels is there. It is characterized by the following features: v Separate code and data spaces (Harvard architecture). v A small number of fixed length instructions.

DEPT. OF ELECTRONICS

19

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

v Most instructions are single cycle execution (4 clock cycles), with single delay cycles upon branches and skips. v A single accumulator (W), the use of which (as source operand) is implied (i.e. is not encoded in the opcode). v All RAM locations function as registers as both source and/or destination of math and other functions. v A hardware stack for storing return addresses. v A fairly small amount of addressable data space (typically 256 bytes), extended through banking. v Data space mapped CPU, port, and peripheral registers. The program counter is also mapped into the data space and writable (this is used to implement indirect jumps).

Peripheral Features: .High current sink/source 25 mA/25 mA • Three external interrupt pins • Timer0 module: 8-bit/16-bit timer/counter with 8-bit programmable prescaler • Timer1 module: 16-bit timer/counter • Timer2 module: 8-bit timer/counter with 8-bit period register (time-base for PWM) • Timer3 module: 16-bit timer/counter • Secondary oscillator clock option - Timer1/Timer3 • Two Capture/Compare/PWM (CCP) modules. CCP pins that can be configured as: - Capture input: capture is 16-bit, DEPT. OF ELECTRONICS

20

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 max. resolution 6.25 ns (TCY/16)

- Compare is 16-bit, max. resolution 100 ns (TCY) - PWM output: PWM resolution is 1- to 10-bit, max. PWM freq. @: 8-bit resolution = 156 kHz 10-bit resolution = 39 kHz • Master Synchronous Serial Port (MSSP) module, Two modes of operation: - 3-wire SPI™ (supports all 4 SPI modes) - I2C™ Master and Slave mode

Analog Features: • Compatible 10-bit Analog-to-Digital Converter module (A/D) with: - Fast sampling rate - Conversion available during SLEEP - Linearity ≤ 1 LSb • Programmable Low Voltage Detection (PLVD) - Supports interrupt on-Low Voltage Detection • Programmable Brown-out Reset (BOR)

Special Microcontroller Features: • 100,000 erase/write cycle Enhanced FLASH program memory typical • 1,000,000 erase/write cycle Data EEPROM memory • FLASH/Data EEPROM Retention: > 40 years DEPT. OF ELECTRONICS

21

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 • Self-reprogrammable under software control

• Power-on Reset (POR), Power-up Timer (PWRT) and Oscillator Start-up Timer (OST) • Watchdog Timer (WDT) with its own On-Chip RC Oscillator for reliable operation • Programmable code protection • Power saving SLEEP mode • Selectable oscillator options including: - 4X Phase Lock Loop (of primary oscillator) - Secondary Oscillator (32 kHz) clock input • Single supply 5V In-Circuit Serial Programming™ (ICSP™) via two pins • In-Circuit Debug (ICD) via two pins

I/O Ports: Port A is a 7 bit wide bidirectional port. This port is also used for analog inputs. The corresponding Data Direction register is TRISA. The RA4 pin is multiplexed with the Timer0 module clock input to become the RA4/T0CKI pin. The other PORTA pins are multiplexed with analog inputs and the analog VREF+ and VREF- inputs. The operation of each pin is selected by clearing/setting the control bits in the ADCON1 register (A/D Control Register1). On a Power-on Reset, RA5 and RA3:RA0 are configured as analog inputs and read as ‘0’. RA6 and RA4 are configured as digital inputs. PORTB is an 8-bit wide, bi-directional port. The corresponding Data Direction register is RISB. Each of the PORTB pins has a weak internal pull-up. A single control bit can turn on all the pull-ups. This is performed by clearing bit RBPU (INTCON2). The weak pull-up is automatically turned off when the port pin is configured as an output. The pull-ups are disabled on a Power-on Reset. On a Power-on Reset, these pins are DEPT. OF ELECTRONICS

22

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

configured as digital inputs. Four of the PORTB pins, RB7:RB4, have an interruptionchange feature. Only pins configured as inputs can cause this interrupt to occur (i.e., any RB7:RB4 pin configured as an output is excluded from the interruption-change comparison). This interrupt can wake the device from SLEEP. RB3 can be configured by the configuration bit CCP2MX as the alternate peripheral pin for the CCP2 module (CCP2MX=’0’). PORTC is an 8-bit wide, bi-directional port. The corresponding Data Direction register is TRISC. PORTC is multiplexed with several peripheral functions. Some peripherals override the TRIS bit to make a pin an output, while other peripherals override the TRIS bit to make a pin an input. The pin override value is not loaded into the TRIS register. This allows read-modify-write of the TRIS register, without concern due to peripheral overrides. RC1 is normally configured by configuration bit, CCP2MX, as the default peripheral pin of the CCP2 module (default/erased state, CCP2MX = ’1’). RC0 is multiplexed with Timer1 oscillator output/Timer1 clock input. RC1 can be used as input/output port pin, Timer1 oscillator input, or Capture2 input/ Compare2 output/PWM output when CCP2MX configuration bit is set. RC2 is an input/output port pin. This can also be used for Capture1 input/Compare1 output/PWM1 output. RC3 can also be the synchronous serial clock for both SPI and I2C modes. RC4 can also be the SPI Data In (SPI mode) or Data I/O (I2C mode). RC5, the input/output port pin also used as Synchronous Serial Port data output. RC6 input/output port pin is also Addressable USART Asynchronous Transmit, or Addressable USART Synchronous Clock. RC7 input/output port pin can be the Addressable USART Asynchronous Receive, or Addressable USART Synchronous Data. PORTD is an 8-bit wide, bi-directional port. The corresponding Data Direction register is TRISD. PORTD is an 8-bit port with Schmitt Trigger input buffers. Each pin is individually configurable as an input or output. PORTD can be configured as an 8-bit DEPT. OF ELECTRONICS

23

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

wide microprocessor port (parallel slave port) by setting control bit PSPMODE (TRISE). In this mode, the input buffers are TTL. On a Power-on Reset, these pins are configured as analog inputs. PORTD operates as an 8-bit wide Parallel Slave Port, or microprocessor port when control bit, PSPMODE (TRISE) is set. It is asynchronously readable and writable by the external world through RD control input pin, RE0/RD and WR control input pin, RE1/WR. It can directly interface to an 8-bit microprocessor data bus. The external microprocessor can read or write the PORTD latch as an 8-bit latch. PORTE is a 3-bit wide, bi-directional port. The corresponding Data Direction register is TRISE. PORTE has three pins (RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7) which are individually configurable as inputs or outputs. These pins have Schmitt Trigger input buffers. PORTE pins are multiplexed with analog inputs. When selected as an analog input, these pins will read as '0's. TRISE controls the direction of the RE pins, even when they are being used as analog inputs. ADC: The Analog-to-Digital (A/D) converter module has eight inputs for the PIC18F452 devices. This module has the ADCON0 and ADCON1 register definitions that are compatible with the mid-range A/D module. The A/D allows conversion of an analog input signal to a corresponding 10-bit digital number. The A/D module has four registers. These registers are: v A/D Result High Register (ADRESH) v A/D Result Low Register (ADRESL) v A/D Control Register 0 (ADCON0) v A/D Control Register 1 (ADCON1)

DEPT. OF ELECTRONICS

24

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

The analog reference voltage is software selectable to either the device’s positive and negative supply voltage (VDD and VSS) or the voltage level on the RA3/AN3/ VREF+ pin and RA2/AN2/VREF- pin. The A/D converter has a unique feature of being able to operate while the device is in SLEEP mode. To operate in SLEEP, the A/D conversion clock must be derived from the A/D’s internal RC oscillator. The output of the sample and hold is the input into the converter, which generates the result via successive approximation. The ADRESH and ADRESL registers contain the result of the A/D conversion. When the A/D conversion is complete, the result is loaded into the ADRESH/ADRESL registers, the GO/DONE bit (ADCON0) is cleared, and A/D interrupt flag bit, ADIF is set. For the A/D converter to meet its specified accuracy, the charge holding capacitor (CHOLD) must be allowed to fully charge to the input channel voltage level.

Analog input model

The source impedance (RS) and the internal sampling switch (RSS) impedance directly affect the time required to charge the capacitor CHOLD. The sampling switch (RSS) impedance varies over the device voltage (VDD). The source impedance affects the offset voltage at the analog input (due to pin leakage current). The maximum recommended impedance for analog sources is 2.5 kΩ. After the analog input channel is selected (changed), this acquisition must be done before the conversion can be started.

DEPT. OF ELECTRONICS

25

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

Interrupt: The PIC18F452 devices have 18 interrupt sources and an interrupt priority feature that allows each interrupt source to be assigned a high priority level or a low priority level. The high priority interrupt vector is at 000008h and the low priority interrupt vector is at 000018h. High priority interrupt events will override any low priority interrupts that may be in progress. There are ten registers which are used to control interrupt operation. These registers are: v RCON v INTCON, INTCON2, INTCON3 v PIR1, PIR2 v PIE1, PIE2 v IPR1, IPR2

Each interrupt source, except INT0, has three bits to control its operation. The functions of these bits are: v Flag bit to indicate that an interrupt event occurred v Enable bit that allows program execution to branch to the interrupt vector address when the flag bit is set v Priority bit to select high priority or low priority When an interrupt is responded to, the Global Interrupt Enable bit is cleared to disable further interrupts. If the IPEN bit is cleared, this is the GIE bit. If interrupt priority levels are used, this will be either the GIEH or GIEL bit. High priority interrupt sources can interrupt a low priority interrupt. Once in the Interrupt Service Routine, the source(s) of the interrupt can be determined by polling the interrupt flag bits. The interrupt flag bits must be cleared in software before re-enabling interrupts to avoid recursive interrupts. For external interrupt DEPT. OF ELECTRONICS

26

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

events, such as the INT pins or the PORTB input change interrupt, the interrupt latency will be three to four instruction cycles.

USART: The Universal Synchronous Asynchronous Receiver Transmitter (USART) module is one of the two serial I/O modules. (USART is also known as a Serial Communications Interface or SCI.) The USART can be configured as a full duplex asynchronous system that can communicate with peripheral devices, such as CRT terminals and personal computers, or it can be configured as a half-duplex synchronous system that can communicate with peripheral devices, such as A/D or D/A integrated circuits, serial EEPROMs, etc. The USART can be configured in the following modes: v Asynchronous (full-duplex) v Synchronous - Master (half-duplex) v Synchronous - Slave (half-duplex) In order to configure pins RC6/TX/CK and RC7/RX/DT as the Universal Synchronous Asynchronous Receiver Transmitter, bit SPEN (RCSTA) must be set (= 1), bit TRISC must be cleared (= 0), and bit TRISC must be set (=1). The BRG supports both the Asynchronous and Synchronous modes of the USART. It is a dedicated 8-bit baud rate generator. The SPBRG register controls the period of a free running 8-bit timer. In Asynchronous mode, bit BRGH (TXSTA) also controls the baud rate. In Synchronous mode, bit BRGH is ignored. Desired Baud Rate = FOSC / (64 (X + 1)) It may be advantageous to use the high baud rate (BRGH = 1) even for slower baud clocks. This is because the FOSC/(16(X + 1)) equation can reduce the baud rate error in some cases. Writing a new value to the SPBRG register causes the BRG timer to be reset (or cleared). This ensures the BRG does not wait for a timer overflow before outputting the new baud rate. The data on the RC7/RX/DT pin is sampled three times by a majority detect circuit to determine if a high or a low level is present at the RX pin. DEPT. OF ELECTRONICS

27

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

In PIC18F452 only one USART module is present. If need user can define software USART.

MAX232:

MAX232 Pin out

The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply TIA/EIA-232-F voltage levels from a single 5V supply. Each receiver converts TIA/EIA-232-F inputs to 5V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept ±30-V inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232-F levels.

DEPT. OF ELECTRONICS

28

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

Application diagram

Features: v Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V.28 v Operates From a Single 5-V Power Supply With 1.0-_F ChargePump Capacitors v Operates Up To 120 kbit/s v Two Drivers and Two Receivers v ±30-V Input Levels v Low Supply Current . . . 8 mA Typical The MAX232 from Maxim was the first IC which in one package contains the necessary drivers (two) and receivers (also two), to adapt the RS-232 signal voltage levels to TTL logic. It became popular, because it just needs one voltage (+5V) and generates the necessary RS-232 voltage levels (approx. -10V and +10V) internally. This DEPT. OF ELECTRONICS

29

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

greatly simplified the design of circuitry. Circuitry designers no longer need to design and build a power supply with three voltages (e.g. -12V, +5V, and +12V), but could just provide one +5V power supply. MAX232 is just a driver/receiver. It does not generate the necessary RS-232 sequence of marks and spaces with the right timing, it does not decode the RS-232 signal, it does not provide a serial/parallel conversion. All it does is to convert signal voltage levels. Generating serial data with the right timing and decoding serial data has to be done by additional circuitry. The MAX232 and MAX232A need external capacitors for the internal voltage pump, while the MAX233 has these capacitors built-in. The MAX232 has two receivers (converts from RS-232 to TTL voltage levels) and two drivers (converts from TTL logic to RS-232 voltage levels). This means only two of the RS-232 signals can be converted in each direction. The old MC1488/1498 combo provided four drivers and receivers. Typically a pair of a driver/receiver of the MAX232 is used for: v TX and RX the second one for v CTS and RTS. The MAX232 contain four sections: dual charge-pump DC-DC voltage converters, RS-232 drivers, RS-232 receivers, and receiver and transmitter enable control inputs. The MAX220–MAX249 has two internal charge-pumps that convert +5V to ±10V (unloaded) for RS-232 driver operation. The first converter uses capacitor C1 to double the +5V input to +10V on C3 at the V+ output. The second converter uses capacitor C2 to invert +10V to -10V on C4 at the V- output. A small amount of power may be drawn from the +10V (V+) and -10V (V-) outputs to power external circuitry

DEPT. OF ELECTRONICS

30

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

The typical driver output voltage swing is ±8V when loaded with a nominal 5kΩ RS-232 receiver and VCC =+5V. Output swing is guaranteed to meet the EIA/TIA-232E and V.28 specification, which calls for ±5V minimum driver output levels under worstcase conditions. Input thresholds are both TTL and CMOS compatible. The inputs of unused drivers can be left unconnected since 400kΩ input pull-up resistors to VCC are built in. The pull-up resistors force the outputs of unused drivers low because all drivers invert. The internal input pull-0up resistors typically source 12µA. EIA/TIA-232E and V.28 specifications define a voltage level greater than 3V as logic 0, so all receivers invert. Input thresholds are set at 0.8V and 2.4V, so receivers respond to TTL level inputs as well as EIA/TIA-232E and V.28 levels. The receiver inputs withstand an input overvoltage up to ±25V and provide input terminating resistors with nominal 5kΩ values. The receiver input hysteresis is typically 0.5V with a guaranteed minimum of 0.2V. This produces clear output transitions with slow-moving input signals, even with moderate amounts of noise and ringing. The receiver propagation delay is typically 600ns and is independent of input swing direction. The receivers have three modes of operation: full-speed receive (normal active)‚ three-state (disabled)‚ and low-power receive (enabled receivers continue to function at lower data rates). The receiver enables inputs control the full-speed receive and threestate modes. The transmitters have two modes of operation: full-speed transmits (normal active) and three-state (disabled). The transmitter enable inputs also control the shutdown mode. The device enters shutdown mode when all transmitters are disabled. Enabled receivers function in the low-power receive mode when in shutdown.

DEPT. OF ELECTRONICS

31

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

THE LM35

The LM35 are Precision integrated circuit temperature sensor whose output voltage is linearly proportional to oc. The LM35 thus has an advantage their linear temperature sensor calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient centigrade scaling low cost is assured by trimming calibration at water level. The LM35’s Low Output impedance, linear output precise inherent calibration make interfacing to readout. It can be used as single power supplier or with I supplies. The LM35 series is available packaged in hermetric to 46 transistor package while the LM 35C, LM35w also available in the plastic To-92 transistor package.

FEATURES : • Calibrated directly in degree celcius. •

Linear to +10.0mu/oc scale factor.



0.5 oc accuracy guarantable.

DEPT. OF ELECTRONICS

32

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 •

Rated for full-0.55 oc to 150 oc range.

• Suitable for full-0.55oc to remote application. •

Low cost due to water level trimming.



Less than 60mA current drain.



Low self heating 0.08 oc in still air.



Non linearity only ± ¼ oc typical.

DEPT. OF ELECTRONICS

33

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

GPS AN OVERVIEW The GPS (Global Positioning System) is a “constellation” of 24 well-spaced satellites that orbit the earth and make it possible for people with ground receivers to pinpoint their geographic location. The location accuracy is anywhere from 100 to 10 meters for most equipment. Accuracy can be pinpointed to within 1 meter with special military-approved equipment .GPS equipment is widely used in science and has now become sufficiently low-cost so that almost anyone can own a GPS receiver.

The GPS has three components namely: 1. The space segment: consisting of 24 satellites orbiting the earth at an altitude

of

11000 nautical miles. 2. The user segment: consisting of a receiver, which is mounted on the unit whose location has to be determined? 3. The control segment: consists of various ground stations controlling the satellites. The GPS is owned and operated by the U.S Department of Defense but is available for general use around the world. Briefly, here’s how it works: 1. 21 GPS satellites and 3 spare satellites are in orbit at 10,600 miles above the earth. The satellites are spaced so that from any point on earth, 4 satellites will be above the horizon.

DEPT. OF ELECTRONICS

34

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

2. Each satellite contains a computer, an atomic clock and a radio. With an understanding of its own orbit and the clock, it continually broadcasts its changing position and time. (Once a day, each satellite checks its own sense of time and position with a ground station and makes any minor correction). 3. On the ground, any GPS receiver contains a computer that “triangulates” its own position by getting bearings from 3 or 4 satellites. The result is provided in the form of a geographic position- Longitude and latitude, for most of the receivers, within 100 meters. 4. If the receiver is also equipped with a display screen that shows a map, the position can be shown on the map. 5. If the 4th satellite can be received, the receiver/computer can figure out the altitude as well as the geographic position. 6. If you are moving, your receiver may also be able to calculate your speed and direction of travel and give the estimated times of arrival to specified destinations.

For a GPS receiver to function, it needs to lock onto satellite signals. Each satellite broadcasts two signals at 1.57542GHz and 1.2276GHz, denoted as L1 and L2, respectively. A satellite specific code, known as the course acquisition (C/A) code, is used DEPT. OF ELECTRONICS

35

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

to discern satellites. Correlation of the transmitted codes against local codes is needed to locate satellites in frequency space. The 1023 bit C/A code modulates the L1 at 1.023MHz, repeating every millisecond. Accumulation of this 1000Hz data is required for a receiver to operate. Once the GPS receiver made the calculation, it can tell the latitude, the longitude and the altitude of its’ current position. This doesn’t tell much to the average user. So in order to make use of the GPS receiver more user-friendly many receivers send this data to a program which displays a map and can show the position on it. Geographical Information System (GIS) is a computer-based software capable of handling maps and various details given on the map. Data generated by the GPS use spatial data referenced to the earth. In other words this data is the coordinates of its own position expressed in latitude and longitude. This data needs to be positioned on a map of the area for any useful analysis. GPS is being used in science to provide data that has never been available before in the quantity and degree of accuracy that the GPS makes possible. GPS receivers are becoming consumer products. In addition to their outdoor use, receivers can be used in cars to relate the driver’s location with traffic and weather information. THE GPS UNIT:

The GPS unit contains a GPS module along with a GPS receiver antenna. The module functions according to its built and the antenna receives the information from the GPS satellite in NMEA (National Marine Electronics Association) format. This data is then sent to the microcontroller wherein it is decoded to the required format and sent further. GPS ANTENNA:

The AGA Series GPS antenna is a standard product for the GPS system. The circular polarization improves reception ability. The built-in low noise amplifier with very low DC

DEPT. OF ELECTRONICS

36

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

power consumption enhances an already high performance patch array. The antenna has the following features: •

Low noise figure



High gain



Ceramic patch antenna



Water-tight housing



Temperature and vibration qualified



Compact size



Low cost

GPS MODULE:

CPIT GPS module SA3618/SA3618P (patch on top) is a high sensitivity ULTRA LOW power consumption cost efficient, compact size; plug & play GPS module board designed for a broad spectrum of OEM system applications.

The GPS module receiver will track up to 16 satellites at a time while providing fast time-to-first-fix and 1Hz navigation updates. Its superior capability meets the sensitivity & accuracy requirements of car navigation as well as other location-based applications, such as AVL system. Handheld navigator, PDA, pocket PC, or any battery operated navigation system. The module communicates with application system via RS232 (TTL level) with NMEA0183 protocol. DEPT. OF ELECTRONICS

37

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 Main Features: • Built-in high performance NMEX chipset. • Average Cold Start in 60 seconds.

• Ultra Low power consumption.( SA3618 27mA typ @ 3.3V ) • 16 channels All-in-View tracking. • On chip 4Mb flash memory. • TTL level serial port for GPS receiver command message Interface. • Compact Board Size Serial Interface

Communication to the SA3618 is provided via a serial interface. A 10-pin 1.27mm whole connector is used. Pin 6 (Reset) is the active-low reset input. The SA3618 always requires a reset at power-up, or it will not start properly. An optional onboard reset circuit can be provided. A reset forces the SA3618 processor to reboot, but will not influence other parameters such as hot or cold start. Pin 1 (GPIO [4]) and pin 10 (GPIO [0]) are spare pins that can be used e.g. to control power modes, to indicate SA3618 status, or to force a cold start.

They

can

be

left

unconnected

if

desired.

I/O voltage level is set to 2.7V.

DEPT. OF ELECTRONICS

38

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

GETTING GPS DATA:

After the GPS Module computes the positioning and other useful information, it then transmits the data in some standard format. With differential GPS signal input the accuracy ranges from 1 to 5 m; however, without differential input, the accuracy can be 25 m. About 60 s after the GPS module is cold booted it begins to output a set of data (according to the NMEA format) though port C once every second at 9600 bps, 8 data bits, one stop bit, and no parity. NMEA GPS messages include six groups of data sets: GGA, GGL, GSA, GSV, RMC, and VTG. We use only the most useful RMC message- Recommended Minimum Specific GNSS Data-which contains all of the basic information required to build a navigation system. We only need position and time data, so the UTC position, longitude with east west indicator, and latitude with north/south indicator are picked out from the RMC message. All of this data will be formatted into a standard fixed length packet with some other helpful information. Next, this data packet will be transmitted to the control center and stored in the micro controller. DEPT. OF ELECTRONICS

39

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

Here’s a sample of how the GPS receiver antenna receives information from the GPS satellite in NMEA format: NMEA format sample:

The GPS module that we are using in this unit is SA3618 and the GPS receiving antenna used is G-501. SA3618 NMEA Protocol

The SA3618 software is capable of supporting the following NMEA message Formats:

* (1): 1sec output 1msg, (3): 3sec output 1msg, 9600 baud rate (Standard output) General NMEA Format:

The general NMEA (National Marine Electronics Association) format consists of an ASCII string commencing with a. $. Character and terminating with a sequence. NMEA standard messages commence with .GP. then a 3-letter message identifier. NemeriX specific messages commence with $PNMRX followed by a 3 digit number. The message header is followed by a comma delimited list of fields optionally terminated with a checksum consisting of an asterix .*. and a 2 digit hex value DEPT. OF ELECTRONICS

40

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

representing the checksum. There is no comma preceding the checksum field. When present, the checksum is calculated as a bitwise exclusive of the characters between the. $. and.*.. As an ASCII representation, the number of digits in each number will vary depending on the number and precision, hence the record length will vary. Certain fields may be omitted if they are not used, in which case the field position is reserved using commas to ensure correct interpretation of subsequent fields. The tables below indicate the maximum and minimum widths of the fields to allow for buffer size allocation.

DEPT. OF ELECTRONICS

41

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010 2010-11 GSM Modem:

GSM modem

GSM (Global Global System for Mobile Communications Communications:: originally from Groupe Spécial Mobile)) is the most popular standard for mobile telephony systems in the world. Its

ubiquity

enables

international roaming arrangements

between mobile

phone

operators, providing subscribers the use of their phones in many parts of the world. GSM differs ffers from its predecessor technologies in that both signaling and speech channels are digital, and thus GSM is considered a second generation (2G) mobile phone system. This also facilitates the wide wide-spread spread implementation of data communication applications into the system. The ubiquity of implementation of the GSM standard has been an advantage to both consumers, who may benefit from the ability to roam and switch carriers without replacing phones, and also to network operators, who can choose equipment fro from m many GSM equipment vendors. GSM also pioneered low-cost cost implementation of the short message service (SMS), also called text messaging, which has since been supported on other mobile phone standards as well. GSM networks operate in a number of different carrier frequency ranges. With most 2G GSM networks operating in the 900 MHz or 1800 MHz bands. Where these bands were already allocated, the 850 MHz and 1900 MHz bands were used instead. In rare cases the 400 and 450 MHz frequency bands are assigned in so some me countries because DEPT. OF ELECTRONICS

42

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

they were previously used for first-generation systems. Most 3G networks in Europe operate in the 2100 MHz frequency band. Regardless of the frequency selected by an operator, it is divided into timeslots for individual phones to use. This allows eight fullrate or sixteen half-rate speech channels per radio frequency. These eight radio timeslots (or eight burst periods) are grouped into a TDMA frame. Half rate channels use alternate frames in the same timeslot. The channel data rate for all 8 channels is 270.833 kbit/s, and the frame duration is 4.615 ms. The transmission power in the handset is limited to a maximum of 2 watts in GSM850/900 and 1 watt in GSM1800/1900. One of the key features of GSM is the Subscriber Identity Module, commonly known as a SIM card. The SIM is a detachable smart card containing the user's subscription information and phone book. This allows the user to retain his or her information after switching handsets. Alternatively, the user can also change operators while retaining the handset simply by changing the SIM. GSM was designed with a moderate level of service security. The system was designed to authenticate the subscriber using a pre-shared key and challenge-response. Communications between the subscriber and the base station can be encrypted. The development

of UMTS

introduces

an

optional Universal

Subscriber

Identity

Module (USIM), that uses a longer authentication key to give greater security, as well as mutually authenticating the network and the user - whereas GSM only authenticates the user to the network (and not vice versa). The security model therefore offers confidentiality and authentication, but limited authorization capabilities, and no nonrepudiation.

Initial setup AT commands: We are ready now to start working with AT commands to setup and check the status of the GSM modem.

DEPT. OF ELECTRONICS

43

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 AT

Returns a "OK" to confirm that modem is working

AT+CPIN="xxxx"

To enter the PIN for your SIM ( if enabled )

AT+CREG?

A "0,1" reply confirms your modem is connected to GSM network

AT+CSQ

Indicates the signal strength, 31.99 is maximum.

Sending SMS using AT commands: We suggest try sending a few SMS using the Control Tool above to make sure your GSM modem can send SMS before proceeding. Let's look at the AT commands involved AT+CMGF=1

To format SMS as a TEXT message

AT+CSCA="+xxxxx"

Set your SMS center's number. Check with your provider.

To send a SMS, the AT command to use is: AT+CMGS AT+CMGS="+yyyyy" Your SMS text message here

The "+yyyyy" is your recipient’s mobile number. Next, we will look at receiving SMS via AT commands.

Receiving SMS using AT commands: The GSM modem can be configured to response in different ways when it receives a SMS. AT+CMGF=1 To format SMS as a TEXT message

DEPT. OF ELECTRONICS

44

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

AT+CMGR=’x’ AT command to send read the received SMS from modem AT+CMGD=’x’

To clear the SMS receive memory location in the GSM

modem. ‘x’ denotes the position of SMS received in memory. Redial last telephone number ATDL Description:

This command redials the last number used in the ATD command. The last number dialed is displayed followed by “;” for voice calls only Syntax:

Command syntax: ATDL Hang-Up command H Description:

The ATH (or ATH0) command disconnects the remote user. In the case of multiple calls, all calls are released (active, on-hold and waiting calls). The specific Wavecom ATH1 command has been appended to disconnect the current outgoing call, only in dialing or alerting state (ie. ATH1 can be used only after the ATD command, and before its terminal response (OK, NO CARRIER, ...). It can be useful in the case of multiple calls. Syntax:

Command syntax: ATH Answer a call A Description:

When the product receives a call, it sets the RingInd signal and sends the ASCII “RING” or “+CRING: ” string to the application (+CRING if the cellular result code +CRC is enabled). Then it waits for the application to accept the call with the ATA command. Syntax:

Command syntax: ATA DEPT. OF ELECTRONICS

45

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010 2010-11 Dial command D

ATD where is the destination phone number. Please note that for an international number number,, the local international prefix does not need to be set (usually 00) but does need to be replaced by the ‘+’ character. Example: to set up a voice call to Wavecom offices from another country, the AT command is: “ATD+33146290800;” Note that some countries may have specific numbering rules for their GSM handset numbering. The response to the ATD command is one of the following

THE DB9 CONNECTOR RS232 can be found on different co connectors. nnectors. There are special specifications for this. The CCITT only defines a Sub Sub-D D 25 pins version where the EIA/TIA has two versions RS232C and RS232D which are resp. on a Sub Sub-D25 D25 and a RJ45. Next to this IBM has added a Sub-D D 9 version which is found an almost all Personal Computers and is described in TIA 457.

DEPT. OF ELECTRONICS

46

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010 2010-11

MALE

FEMALE

The RS-232 232 signal on a single cable is impossible to screen effectively for noise. By screening the entire cable we can reduce the influence of outside noise, but internally generated noise remains a problem. As the baud rate and line length increase, the effect of capacitance between the different lines introduces serious crosstalk (this especially true on synchronous data - because of the clock lines) until a point is reached DEPT. OF ELECTRONICS

47

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010 2010-11

where the data itself is unreadable. Signal Crosstalk can be reduced by using lo low capacitance cable and shielding each pair

PIN DESCRIPTION

POLAR HEART BEAT TRANSMITTER AND RMC01 HEART RATE RECEIVER The Polar heart rate receiver component receiver wirelessly receives the heart rate signal from Polar transmitter belt. The complete heart rate measurement system consists of three different parts; transmitter, receiver and electronics and/or display device that is outputting the heart rate value. The transmitter, worn around the chest, electrically detects the heart beat and starts transmitting nsmitting a pulse corresponding to each heart beat. The receiver that is installed on end user equipment receives the signal and generates a corresponding digital pulse that is operated on by the end user equipment electronics. Following picture illustrates the structure of measurement

DEPT. OF ELECTRONICS

48

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

KEY BENEFITS •

Designed to be used in constant noise environment

• Small size, easy to find a place inside end user equipment •

Working with all Polar transmitter belts



SMD component for Pick & Place machine



Coded and noncoded receiver

System Description A complete heart rate measuring system consists of a Polar Transmitter worn around the chest and Polar RMCM-01 receiver built into the end user equipment. The Polar Transmitter detects every heartbeat through two electrodes with ECG accuracy and transmits the heart rate information wirelessly to Polar RMCM-01 receiver with the help of a low frequency electromagnetic field. The RMCM-01 receiver receives the transmission, and passes a digital pulse corresponding to each heartbeat to the end user equipment electronics. The coils in the Polar Transmitter and Polar RMCM-01 receiver must be aligned parallel in order to gain optimum performance.

DEPT. OF ELECTRONICS

49

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

The end user equipment contains a microprocessor that calculates current heart rate value based on the time interval between the pulses sent by the Polar RMCM-01 receiver to the microprocessor. This calculation contains certain amount of averaging, and other techniques, known as an algorithm, to ensure a reliable and stable heart rate reading.

Placement of the receiver component The following rules and advice apply to the placement of the Polar receiver components. This verifying measurement should be performed before the release of final circuit board •

The distance from the transmitter to the receiver should not exceed 80 cm.



The orientation of the receiver is very important. The coil axis of the receiving coil has to be parallel with the magnetic flow created by transmitter in order to get optimum gain for successful heart rate measuring. In normal cases this means that the axis of the transmitting and receiving coils must to be parallel. This is also illustrated in the following picture. Coil is placed on the edge of right hand side along the long side of the RMCM01



Metal casing may form a Faraday case around the receiver thus attenuating the signal and shortening the reception range. There may also be an effect twisting the direction of the magnetic field, thus possibly changing the rule of parallel coil axis



Interference may be created by i.e. electric motors and their control circuitry, multiplexed display units, switching power supplies, monitors or TV equipment causing difficulties to heart rate measuring. Most disturbances are both directional and distance related. An optimum location for the receiver is where the heart rate signal is maximized and the disturbances are minimized. The best cure is to maximize the distance between Polar receiver and the source of disturbance, and at the same time minimize the distance between Polar Receiver and the Polar Transmitter. Practical solutions can be discussed with Polar engineering staff. Polar engineering also can, using special equipment, find out the nature of the disturbance, thus helping to cope with it.

DEPT. OF ELECTRONICS

50

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

Detailed pin descriptions of RMC01 HR – Outputs heart rate value as positive pulse on each heart beat. Startup delay 5 seconds on coded signal, 15 seconds on non-coded signal Reset – Pulling down this pin causes the heart rate receiver reset itself. Recommendable pull down resistor value is 1k". OSC – Crystal terminal. This pin is used if external 32kHz crystal is used. F32KIN – Crystal terminal or clock input. If 32kHz clock is available on the end user board, the clock signal can be inputted on this pin. Note that signal has to be DC blocked. OSC_ON – Connect pin to ground if external clock is used. Connect to Vcc if crystal is used. WIDB_DET – This pin is connected to 3V. FPLS – Detector output. On this pin all the detected pulses are shown. No startup delays on outputting. LX2 – Antenna coil terminal. If range is too high, a resistor is connected between this pin and LX1 pin. LX1 – Antenna coil terminal. If range is too high, a resistor is connected between this pin and LX2 pin. GND – Power supply ground pin. VCC – Power supply voltage pin. DEPT. OF ELECTRONICS

51

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010 2010-11 Camera:

A camera is a device that records images. These images may be still photographs or moving images such as videos or movies. The term camera comes from the camera obscura (Latin for "dark chamber"), an early mechanism for projecting images. The modern camera evolved from the camera obscura. Cameras may work with the light of the visible spectrum or with other portions of the electromagnetic spectru spectrum. m. A camera generally consists of an enclosed hollow with an opening (aperture) at one end for light to enter, and a recording or viewing surface for capturing the light at the other end. A majority of cameras have a lens positioned in front of the camera'ss opening to gather the incoming light and focus all or part of the image on the recording surface. Most 20th century cameras used photographic film as a recording surface, while modern ones use an electronic camera sensor. The diameter of the aperture is often controlled by a diaphragm mechanism, but some cameras have a fixedfixed size aperture.

Camera basic blocks

DEPT. OF ELECTRONICS

52

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

A typical still camera takes one photo each time the user presses the shutter button. A typical movie camera continuously takes 24 film frames per second as long as the user holds down the shutter button, or until the shutter button is pressed a second time. There are basically two different types of cameras- analog and digital. Analog cameras use plastic films coated with photo resistant materials while digital camera uses CCD or some other image sensors for capturing images. The camera's sensor is exposed to the light passing through the camera lens. Single-shot capture systems use either one CCD with a Bayer filter mosaic, or three separate image sensors (one each for the primary additive colors red, green, and blue) which are exposed to the same image via a beam splitter. The image sensor (CCD) produces electric signals with respect to the intensity of the light falling on its surface. These signals are then processed with Digital Signal Processors and encoded. The encoded signals are then stored in the memory and later transferred to mass storage devices for permanent storage.

ZIGBEE ZigBee is a specification for a suite of high level communication protocols using small, low –power digital radios based on the IEEE 802.15.4-2003 standard for wireless personal area networks(WPANs), such as wireless headphones connecting with cell phones via short-range radio. The technology defined by the ZigBee specification is intended to be simpler and less expensive than other WPANs, such as Bluetooth. ZigBee is targeted at radio frequency (RF) application that requires a low data rate, long battery life, and secure networking. The ZigBee Alliance is a group of companies that maintain and publish the Zigbee standard. ZigBee is a a low cost, low power, wireless mesh networking proprietary standard. The low cost allows the technology to be widely deployed in wireless control

DEPT. OF ELECTRONICS

53

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010 2010-11

and monitoring applications, th the low power usage allows longer life with smaller batteries, and the mesh networking provides high reliability and larger range. The ZigBee Alliance, the standards body that defines ZigBee , Also publishes application profiles that allow multiple EM vendors to create interoperable products. products Serial Communications PRO OEM RF Modules interface to a host device through a logic logic-level The XBee-PRO asynchronous serial port. Through its serial port, the module can communicate with any logic and voltage compatible UART; or through a level translator to any serial device ART Data Flow Devices that have a UART interface can connect directly to the pins of the RF module as shown in the figure below. System Data Flow Diagram in a UART UART‐interfaced environment (Low‐asser asserted signals distinguished with horizontal line over signal name.)

DEPT. OF ELECTRONICS

54

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 Serial Data

Data enters the module UART through the DI pin (pin 3) as an asynchronous serial signal. The signal should idle high when no data is being transmitted. Each data byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit (high). FEATURES • High performance, Low cost and low power. • Long Range Data Integrity. • Indoor/Urban: up to 300’ (100 m) • Outdoor line-of-sight: up to 1 mile (1500 m) • Transmit Power: 100 mW (20 dBm) EIRP • Receiver Sensitivity: -100 dBmRF Data Rate: 250,000 bps. • TX Current: 270 mA (@3.3 V) • RX Current: 55 mA (@3.3 V) • Power-down Current: < 10 µA

PIN DIAGRAM

DEPT. OF ELECTRONICS

55

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010 2010-11

PIN DISCRIPTION

Description The MC78XX/LM78XX/MC78XXA series of three terminal positive regulators are available in the TO-220/D-PAK PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable stable voltages and currents.

DEPT. OF ELECTRONICS

56

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

THE POWER SUPPLY BLOCK DIAGRAM

The main parts of a regulated dc power supply are shown in the above block diagram. The transformer is to step down the 230v ac into 12v ac. The rectifier section is to reduce the ripples in the transformer output. The filter is to provide a smoother dc output. The voltage regulator is to restrict any variation in the output voltage.

TRANSFORMER The transformer is a device used to transfer electric power from one circuit to another. This is done without any change in frequency. It has two windings on an iron core, primary and secondary windings. A step-up transformer us one which have more secondary windings than primary, if the reverse happens it is called a step-down transformer. Here a step-down transformer is used.

DEPT. OF ELECTRONICS

57

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 RECTIFIER

The full wave bridge rectifier is the most frequently used one. It requires 4 diodes. Center tapped transformer is not necessary. This rectifier is available in three distinct form- four discrete diodes, one device inside a four terminal case and as a part of an array of diodes in an IC.

Form factor (f) = rms value/ average value = Irms/Idc =0.707Im/0.636Im F= 1.11 Ripple factor (γ) = Vrms/Vdc = 0.482 for bridge rectifier Efficiency (η) = Pout/Pin =(Idc)^2.Rl/Irms(rd+Rl)= 81.2%

FILTER The capacitor filter is mostly used. This is the simplest and chepest filter. We connect a large value capacitor (C) in shunt with the load resistor Rl. The capacitance offers a low resistance path to the ac components of current. To dc this is an open circuit. All the dc current passes through the load resistor. DEPT. OF ELECTRONICS

58

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

VOLTAGE REGULATOR The voltage regulator is a device, which maintains the output voltage constant irrespective of the change in supply variations, load variations and temperature variations. Regulator IC units contain the circuitry for reference source, comparator, amplifier, control device and overload protection, all in a single IC. Although the internal construction, if the IC is somewhat different for discrete voltage regulator circuits the external operation is the same. IC units provide regulated output of either positive or negative voltages.

Features • Output Current up to 1A • Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V • Thermal Overload Protection • Short Circuit Protection • Output Transistor Safe Operating Area Protection

DEPT. OF ELECTRONICS

59

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

SOFTWARE OVERVIEW HI-TECH ‘C’ AND MPLAB – AN OVERVIEW

HI-TECH software makes industrial-strength development tools and C compilers that help software developers write compact, efficient embedded processor code. HI-TECH PICC-18™ is a powerful C compiler for the Microchip PICmicro® PIC18 family of microcontrollers. HI-TECH PICC-18 delivers unrivalled code density combined with excellent reliability. Tightly tuned to the PIC18 architecture, it allows firmware development in a fraction of the time, but with no greater use of RAM or ROM, required for conventional assembly language programming. It is also a USER FRIENDLY language. HI-TECH PICC-18™ Compiler Features:

• ANSI C – full featured and portable • Efficient – equals or betters hand-written assembler code • Reliable – mature, field-proven technology • Modular – includes full object code linker and library manager • Cost-effective – productivity gains rapidly repay purchase cost • Compatible – integrates into the MPLAB® IDE, MPLAB ICE2000 and 4000, ICD2 and most 3rd-party development tools • Library source – for standard libraries and sample code for various peripherals and applications • Complete – includes macro assembler, preprocessor and one-step driver

DEPT. OF ELECTRONICS

60

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 MPLAB IDE – AN OVERVIEW

MPLAB is a Windows program package that makes writing and developing a program easier. It could best be described as developing environment for a standard program language that is intended for programming a PC. MPLAB allows you to write, debug, and optimize the PICmicro MCU applications for firmware product designs. Integrated Development Environment (IDE) is an application that has multiple functions for software development. MPLAB IDE an executable program that integrates a compiler, an assembler, a project manager, an editor, a debugger, simulator, and an assortment of other tools within one Windows application. A user developing an application should be able to include a host of free software components for fast application development and super- charged debugging. Write code, compile, debug and test and application without leaving the MPLAB IDE desktop. MPLAB IDE runs as a 32-bit application on MS Windows, is easy to use and includes a host of free software components for fast application development and super- charged debugging.

MPLAB ICD 2 – AN OVERVIEW

Traditionally, embedded systems engineers use in-circuit emulators (ICE) to develop and debug their designs and then programmers to transfer the code to the devices. The incircuit debugging logic, when implemented, is part of the actual microcontroller silicon and provides a low-cost alternative to a more expensive ICE. In-circuit debugging offers these benefits:

DEPT. OF ELECTRONICS

61

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 •

Low cost



Minimum of extra hardware



Expensive sockets or adapters are not needed



Debugging and programming a production line board is possible.

An ICE uses custom hardware to emulate the target microcontroller. An ICD uses hardware on the target microcontroller to do some of the functions of an ICE. An ICD also employs software running on the target to do ICE-like functions and, as a result, relies upon the target microcontroller for some memory space, CPU control, stack storage and I/O pins for communication. The MPLAB ICD 2 (In-Circuit Debugger 2) allows debugging and programming of PIC microcontrollers using the powerful graphical user interface of the MPLAB Integrated Development Environment (IDE). The MPLAB ICD 2 is connected to the design engineer’s PC using USB or RS-232 interface and can be connected to the target via an ICD connector. MPLAB ICD 2 SYSTEM COMPONENTS:

In addition to the MPLAB ICD 2 module, the following components are required: •

MPLAB IDE software (version 6.20 or later) – Installed on the PC to control MPLAB ICD 2.



RS-232 or USB cable – To connect the MPLAB ICD 2 module to a COM or USB port on the PC.



Modular interface cable – To connect the MPLAB ICD 2 module to a demo board or the user’s application.



Demo board or target application – To connect the PICmicro MCU with on- board debug capabilities to the modular interface (and the MPLAB ICD 2). Although the serial or USB communications from the MPLAB IDE to the target via an ICD connector.

DEPT. OF ELECTRONICS

62

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 VISUAL BASIC 6.0

Visual Basic (VB) is the third-generation event-driven programming language and integrated development environment (IDE) from Microsoft for its COM programming model. VB is also considered a relatively easy to learn and use programming language, because of its graphical development features and BASIC heritage. Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects. Scripting languages such as VBA and VBScript are syntactically similar to Visual Basic, but perform differently.[2] A programmer can put together an application using the components provided with Visual Basic itself. Programs written in Visual Basic can also use the Windows API, but doing so requires external function declarations. VISUAL BASIC is a high level programming language which was evolved from the earlier DOS version called BASIC. BASIC means Beginners' All-purpose Symbolic Instruction Code. It is a very easy programming language to learn. The codes look a lot like English Language. Different software companies produced different version of BASIC, such as Microsoft QBASIC, QUICKBASIC, GWBASIC, and IBM BASICA and so on. However, it seems people only use Microsoft Visual Basic today, as it is a well developed programming language and supporting resources are available everywhere. Now, there are many versions of VB exist in the market, the most popular one and still widely used by many VB programmers is none other than Visual Basic 6. We also have VB.net, VB2005 and the latest VB2008, which is a fully object oriented programming (OOP) language. It is more powerful than VB6 but looks more complicated to master. If you wish to learn VB2008, click on the

DEPT. OF ELECTRONICS

63

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

VISUAL BASIC is a VISUAL and events driven Programming Language. These are the main divergence from the old BASIC. In BASIC, programming is done in a text-only environment and the program is executed sequentially. In VB, programming is done in a graphical environment. In the old BASIC, you have to write program codes for each graphical object you wish to display it on screen, including its position and its color. However, In VB , you just need to drag and drop any graphical object anywhere on the form, and you can change its color any time using the properties windows. On the other hand, because users may click on a certain object randomly, so each object has to be programmed independently to be able to response to those actions (events). Therefore, a VB Program is made up of many subprograms, each has its own program codes, and each can be executed independently and at the same time each can be linked together in one way or another.

MS ACCESS DATABASE

Microsoft Office Access, previously known as Microsoft Access, is a relational database management system from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software development tools. It is a member of the Microsoft Office suite of applications, included in the Professional and higher editions or sold separately. Access stores data in its own format based on the Access Jet Database Engine. It can also import or link directly to data stored in other Access databases, Excel, SharePoint lists, text, XML, Outlook, HTML, dBase, Paradox, Lotus 1-2-3, or any ODBC-compliant data container, including Microsoft SQL Server, Oracle, MySQL and PostgreSQL. Software developers and data architects can use it to develop application software, and "power users" can use it to build simple applications[citation needed]. Like other Office DEPT. OF ELECTRONICS

64

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

applications, Access is supported by Visual Basic for Applications, an object-oriented programming language that can reference a variety of objects including DAO (Data Access Objects), ActiveX Data Objects, and many other ActiveX components. Visual objects used in forms and reports expose their methods and properties in the VBA programming environment, and VBA code modules may declare and call Windows operating system functions.

DEPT. OF ELECTRONICS

65

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

PROGRAM A microcontroller is a programmable integrated circuit. The controller itself has built in ALU, control unit and memory. There are three different types of memories in the controller- program memory, data memory and Random Access Memory. Controller fetches and decodes the instruction written in the form of program keywords and executes the functions by fetching the necessary variables from RAM and data from data memory. Data memory is used for the permanent storage of information, while the RAM is used for temporary registers, flags and variables. Microcontroller programs must fit in the available on-chip program memory, since it would be costly to provide a system with external, expandable, memory. Compilers and assemblers are used to turn high-level language and assembler language codes into a compact machine code for storage in the microcontroller's memory. Depending on the device, the program memory may be permanent, read-only memory that can only be programmed at the factory, or program memory may be field-alterable flash or erasable read-only memory. The designer can write programs in high-level, assembly or in machine language. A high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or be more portable across platforms. Such languages hide the details of CPU operations such as memory access models and management of scope. Assembly languages are a type of low-level languages for programming computers, microprocessors, microcontrollers, and other (usually) integrated circuits. They implement a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture. This representation is DEPT. OF ELECTRONICS

66

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

usually defined by the hardware manufacturer, and is based on abbreviations (called mnemonics) that help the programmer remember individual instructions, registers, etc. An assembly language family is thus specific to a certain physical (or virtual) computer architecture. Machine code or machine language is a system of instructions and data executed directly by a computer's central processing unit. Machine code may be regarded as a primitive (and cumbersome) programming language or as the lowest-level representation of a compiled and/or assembled computer program. A compiler is a computer program (or set of programs) that transforms source code written in a computer language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program. Compiler is primarily used for programs that translate source code from a high-level programming language to a lower level language A utility program called an assembler is used to translate assembly language statements into the target computer's machine code. The assembler performs a more or less isomorphic translation (a one-to-one mapping) from mnemonic statements into machine instructions and data. Thus a program written in high-level language will be converted into low-level language using compilers and then to machine language using assemblers. This machine language program is then fused into the controller's program memory using some type of programmers. The controller then can be implemented in an embedded circuit. The compiler used for writing the program to be fused in the program memory of the controller is HITECH C. HITECH C compiler itself contain an assembler. When the program is compiled, a hex code file will be produced. This file contains the machine language program which is to be fused into the program memory. Then using Micro Pro, DEPT. OF ELECTRONICS

67

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

software used to interface the PIC programmer device with the computer, the machine language programs will be fused into the controller memory.

Algorithm: An algorithm is an effective method for solving a problem expressed as a finite sequence of instructions. Each algorithm is a list of well-defined instructions for completing a task. Starting from an initial state, the instructions describe a computation that proceeds through a well-defined series of successive states, eventually terminating in a final ending state. The algorithm tells the steps involved in functioning the task of microcontroller. The use of algorithm helps the designer to write the program easily. Algorithm of the program written in the controller used in ACS is as follows. 1. Initialize the controller. 2. Declare the necessary variables, flags and macros. 3. Enable interrupts and ADC. 4. Select ADC channel 5. Set the timer for 1 min to count heart beat 6. Start the counter for counting heart beat 7. Read the value from ADC for temperature measurement 8. Read the location from GPS receiver 9. Set timer for sending data in 1 min 10. Sent data to the server in each min Using algorithm anyone can easily understand the working of the system. Another method used to represent the flow program and the steps involved in the working of the system is flow charts. DEPT. OF ELECTRONICS

68

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 Flow chart:

A flowchart is a common type of diagram that represents an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting these with arrows. This diagrammatic representation can give a step-by-step solution to a given problem. Data is represented in these boxes, and arrows connecting them represent flow / direction of flow of data. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields. A typical flowchart from older Computer Science textbooks may have the following kinds of symbols:

Start and end symbols: Represented as circles, ovals or rounded rectangles, usually containing the word "Start" or "End", or another phrase signaling the start or end of a process, such as "submit enquiry" or "receive product".

Arrows: Showing what's called "flow of control" in computer science. An arrow coming from one symbol and ending at another symbol represents that control passes to the symbol the arrow points to.

Processing steps: Represented as rectangles (or oblongs). Examples: "Add 1 to X"; "replace identified part"; "save changes" or similar.

Input/Output: Represented as a parallelogram. Examples: Get X from the user; display X.

Conditional or decision: Represented as a diamond (rhombus). These typically contain a Yes/No question or True/False test.

DEPT. OF ELECTRONICS

69

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

FLOW CHART START

INITIALIZE CONTROLLER

DECLARE VARIABLES

ENABLE INTERRUPTS

ENABLE SERIAL COMMUNICATION

CONFIGURE ADC FOR TEMPERATURE MEASUREMENT

PULSE= VALUE FROM TMR3L ACTUAL=PULSE

NO

IS TEMP!= ACTUAL

YES CK=CK+1

D A

DEPT. OF ELECTRONICS

70

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11 A

NO

IS h=1,t=1 & rsf=1 YES

C CREN=0,h=0,t=0,rsf=0

LOW BAUDRATE

TRANSMIT ID

CONVERT [TEP TO CHARACTER]

TRANSMIT

CONVERT [HEART BEAT TO CHARACTER] TRANSMIT

HB=0

GPS TRANSMIT

B DEPT. OF ELECTRONICS

71

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

C

B

D

HIGH BAUDRATE

TEMP=ACTUAL

DEPT. OF ELECTRONICS

72

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

INTERRUPT SUBROUTINE TIMER1 INTERRUPT NO

IS TMR1IF=1

YES

TMR1IF=0

COUNT=COUNT+1;

NO

IS

COUNT>344 YES

TMR1IF=0; bpm=ckt;

TMR3L=0; COUNT=0;

ckt=0; h=1;

TMR2IE=1;

TMR2ON=1;

RETURN DEPT. OF ELECTRONICS

73

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

TIMER2 INTERRUPT NO IS YES

TMR2IF=1? YES

TMR2IF=0

KE=KE+1

ADC

NO

IS KE=15? YES

KE=0

AVG=SUM/15

SUM=0 T=1;

TMR2IE=0

RETURN

DEPT. OF ELECTRONICS

74

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

NO

Is RCIF=1?

YES RS[RSP]=RCREG

NO RS[RSP]=$ YES RSP=0 RS[0]=$

NO

Is RS[0]=$? & RS[RSP-1]=0*0D && RS[RSP]=0*0A?

YES TXREG = '#'

RSF=1

RCIF=0 RCIE=0

RSP=RSP+1

RETURN DEPT. OF ELECTRONICS

75

IHRD, CASVDY

SOLDIER MONITORING SYSTEM

PROJECT REPORT 2010-11

SUBROUTINE CONVERT

unit=p%10,

k=p/10

ten=k%10; hnd=p/100;

a[0]=hnd+0x30; a[1]=ten+0x30;

a[2]=unit+0x30; RETURN

TRANSMIT

i=0

IS i
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF