Home
Untitled - Faculty Home - Universiti Teknologi Malaysia
Contents
1. LI Figure 3 6 Receiver Node Prototypes Finishing Product 3 1 4 Additional Tools Additional tools needed to be developed for supporting the system application Those tools include RS 232 Circuit and ISP Cable 3 1 4 1 RS 232 Circuit The receiver node is connected to the PC for displaying purpose The data is sent in serial due to its simplicity and low hardware overhead compared to parallel communication Rs 232 1s an IEA TIA 232 E specification standard for serial binary data interconnection between a DTE Data Terminal Equipment and DCE Definition of RS 232 from Wikipedia Unlike many standards RS 232 specifies electrical functional and mechanical characteristic of three criteria which are common voltage and signal levels common pin wiring configurations and a minimal amount of control information between the host and peripheral systems 19 RS 232 connector was originally developed to use 25 pins The original MAX232 Driver Receiver and its related parts simply doubled and inverted the input voltage to supply the RS 232 driver circuitry This design enabled much more voltage than actually required it wasted power The EIA 232 levels are defined as 5 into 5k With a new low dropout output stage Maxim introduced RS 232 transceivers with internal charge pumps that provided regulated 5 5V outputs This design allows the transmitter outputs to maintain RS 232 compatible levels with a minimum amount of
2. KI lt _ CATATAN Potong yang tidak berkenaan Jika tesis ini SULIT atau TERHAD sila lampirkan surat daripada pihak berkuasa organisasi berkenaan dengan menyatakan sekali sebab dan tempah tesis ini perlu dikelaskan sebagai SULIT atau TERHAD Tesis dimaksudkan sebagai tesis bagi Ijazah Doktor Falsafah dan Sarjana secara penyelidikan atau disertai bagi pengajian secara kerja kursus dan penyelidikan atau Laporan Projek Sarjana Muda PSM hereby declared that I have read the content of this thesis and in my opinion it is suitable in terms of scope and quality for the purpose of awarding a Bachelor Degree in Electrical Engineering Telecommunication Signature Name PROF DR NORSHEILA BINTI FISAL Date 30 NOVEMB WATER SENSOR SYSTEM RECEIVER DIYANA BINTI MUHAMAD Project Report Submitted as Partial Fulfilment of the Requirement for the Degree in Bachelor of Electrical Engineering Telecommunication FACULTY OF ELECTRICAL ENGINEERING UNIVERSITI TEKNOLOGI MALAYSIA NOVEMBER 2006 hereby declared that this thesis entitled Water Sensor System Receiver 15 result of my own research and idea except for works that have been cited clearly in the references Signature gt 7 Name DIY ANA BINTI MUHAMAD Date 30 NOVEMBER 2006 111 Specially Dedicated to My beloved Mother Nik Aeshah Nik Mustapha Father Muhamad Mat Salleh Siblings and Friends F
3. MScomm I EON 221 Timer Labels Label Figure 3 20 Form designed for Water Sensor System CHAPTER 4 RESULTS AND ANALYSIS 4 1 Overview This chapter analyses the simulation result attained for overall system The performance of data transmission between nodes for both wired and wireless transmission 1s compared The result are taken from the Oscilloscope USART terminal and GUI Interfaced 4 3 System Hardware Water Sensor System consists of two parts which are transmitter and receiver end The transmitter end comprises of sensor circuit processing board and radio transmitter module While on the other end the receiver part consists of Processing board RS 232 Interface Circuit and the computer All hardware develops using stripe board Refer to following figure 4 1 Hard wares are build base on the function of receiver node al already discussed in previous chapter 35 Radio Receiver Module a b Figure 4 1 The receiver end prototype a Top view b Side view The Radio receiver module is connected to the processing board through receive USART terminal While the RS 232 interfaces circuit is connected to board through Transmit USART Terminal The RS 232 circuit is then connected to the computer 36 41 System Software After completing developing the hardware module the next stage 1s software development where the communication and data processing function 1s
4. ctr 0 endif KK KK KK Kk kk Ck kk kk kk k kk kCk kck kck ck kk kc k ck k ck kk kk Subroutine for Inrtralized USART kCk Ck k ck kk kk ck k ck kk k kckck ck ck ck kk kk void USART INIT unsigned int UBRR Set rate UCSRA amp Oxfd UBRRH unsigned char gt gt 8 UBRRL unsigned char UBRR Enable receiver and transmitter UCSRB 1 lt lt RXEN 1 TXEN Set frame format 8data no parity 1 stop bit UCSRC 1 lt lt URSEL 1 lt lt UCSZ1 1 lt lt UCSZO KK KK KK IK KK KKK Subroutine for Transmit data through USART 7 f RKCKCKCKCKCk Kk kk KK KK IK kk KAKAK kk kk kck kck ck kk kk kck ck k ck k kc kk ck kk k void USART TX unsigned char data Wait for empty transmit buffer while UCSRA amp 1 lt lt UDRE Start transmission UDR data send least significant byte KK AKK KAKAK AKK KAKAK KAKAK KAKAK AKK ck kk kk ck ck ck k ck kk kk obrounite for Recerve through USART CK Ck Kk Ck KK Kk Kk Kk Kk Kk Ck KAKAK k ck k ck kk ck ck ck k ck kk kk unsigned char USART RX void 4 52 Wait for data to be received while UCSRA 1 lt lt RXC Get return received data from buffer return
5. Oy sky 2 3 le U turnis oft Optimization Note FAQ 3 is not always the best optimization level See avr libc source files here dependencies are automatically generated SRC main c delay c usart_tr_vadib_sairi c ruzaini c 55 tasare Ec DOLEN os adc there is more than source file them above modify and uncomment the following SRC A baric You can also wrap lines by appending a backslash to the end of the line SRC baz c XYZZY C List Assembler source files here Make them always end in capital S Files ending in a lowercase 5 will not be considered source files but generated files assembler f output from the compiler and will be deleted upon make clean Even though the DOS Win filesystem matches both s and S the same it will preserve the spelling of the filenames and gcc itself does care about how the name is spelled on its command line ASRC List any extra directories to look for include files here Each directory must be seperated by a space EXTRAINCDIRS Optional compiler flags cg generate debugging information for GDB or for COFF conversion m optimization level gt a aes tuning see manual and avr libc documentation 11 warning level tell GCC to pass this to the assembler
6. ahlms create assembler listing CFLAGS g OS OPT funsigued bittields fpack strucet tshorteenums X Wall Wstrict prototypes 4 Wa adhlns c lst S patsubst I 5 EXTRAINCDIRS Set a language standard compiler flag T Unremark just one line below to set the language standard to use gnu99 C99 GNU extensions See GCC manual for more information CFLAGS std c89 CFLAGS std gnu89 CFLAGS std c99 CFLAGS std gnu99 Optional assembler flags tell GCC to pass this to the assembler ahlms create listing 56 gstabs have the assembler create line number information note that tOr use CORP 221285 acgditiopnel qdintormatron about filenames and function names needs to be present in the assembler source files see avr libc docs FIXME not yet described there ASFLAGS Wa adhlns S 1st gstabs Optional linker flags tell to pass this to linker create map file cref add cross reference to map file LDFLAGS Wl Map TARGET map cref Additional libraries Minimalistic printf version LDFLAGS Wl u vfprintf lprintf min Floating point printf version requires below LDFLAGS Wl u vfprintf lprintf flt lm math library LDFLAGS sim Programming support using avrdude Settings and variables Programming hard
7. SUDEOULLHe RUN KK KK KK KK Kk Kk KK KK Kk Ck Ck kCk Ck k ck k ck ck ck ck ck ck k ck ck ck kk kk void USART INIT unsigned int UBRR void USART TX unsigned char data unsigned char USART RX void void delay unsigned char 1 f RKCKCKCKCKCk Kk RK KK KK IK KK KK Kk KAKAK AKK k ck kk kck kck ck kk kk ck k ck k ck kk kk KK KK KKK Main Program KK IK eK OK KK k ck IK KK KK ck ck kK KK KKK KK IK RK KK IK KK KK KK IK KK KK IK KK KK kck kck KK KK kK KK int main void if TX 0 warning TRANSMITTER unsigned char sen_data else warning RECEIVER unsigned char x data cer Sensor ohksum endif unsigned char hdr 2 unsigned char add 2 12 unsigned char chksum KK KK ck k kk kk Initialize Timer0 amp USART KAKAK KAKAK KK KK KK KK KK KK KK kck kck ck kk kk ck ck ck kk kk USART INIT baudrate f ROKCKCKCKCKCk Kk Ck kk kCkCk Ck KAKAK KK ck k kk kk kk ck ck ck ck ck kk kk PNE PROG Gam Tor Transmitter KKK KK KK KK KK KK KK IK KK KK KK IK KK KK KK KK KK if TX 0 Initialize ADC DDRA OxFO0 while 1 4 read port sen data PINA calculate checksum sum up all bytes in dataframe then invert 1 scomplement chksum sen data hdr 0 hdr 1 0 11 chksum chksum Send 2 bytes header USART_TX hdr 01 Tx hdr
8. 8C B9 Address 000090 68 68 91 008088 08 8B 088888 SF 88808C8 FE 888808 48 1 8888F8 02 888188 9C 800118 11 880128 17 888138 81 8800158 FE 888158 800168 88 8800178 FE 880188 FF 880198 FF 8801608 FF 088188 FF 8801C8 088108 88601E8 8881 8 000200 000210 880228 800238 FF 8802580 FF 000250 000260 FF 000270 FF 8800288 FF 880298 FF 888288 FF 8080288 FF 8880268 FF PonyProg2000 Figure 3 14 EF 8A 01 E9 F4 FE F8 2B 2F 9F 81 89 30 11 30 11 8B CF 8 E2 28 95 88 CF 85 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ATmega8535 83 BB OF 01 OF F4 F4 BB B1 50 E8 B1 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 29 B9 88 08 61 9C 9B F1 33 94 81 83 8F 82 99 38 86 99 gy E1 88 B9 86 E8 8 95 CB E5 D2 08 89 83 9A 83 DC DF 8F BB 5F 9B FE CF 2C 10 81 81 CO 89 96 E9 OF F1 1D 32 30 11 F4 12 2F 63 CF 89 81 9A 81 89 OF 80 GF SF A9 8D C8 13 30 11 85 CO 1F 38 11 C8 8F EF A2 DF 90 27 08 95 81 58 48 9F EF 2F 3F 39 B9 84 E2 87 B9 08 27 88 9
9. Wednesday 11 1 2066 1 07 12 Water Level Level Water is Low Water Sensor System o x Wednesday 1i1 1 2806 1 88 16 PH Water Level Level Meter b Water Sensor System Wednesday 11 1 2006 1 69 62 Water Level Level 2 Meter 44 HH Water Sensor System Wednesday 11 1 2006 1 69 56 PH Water Level Level 3 Meter d Water Sensor System D Wednesday 11 1 26066 1 11 39 Water Level Level 4 Meter Critical e Figure 4 9 GUI result a No level b Level c level 2 d level and level 4 CHAPTER 5 CONCLUSION AND FUTURE WORK 5 1 Conclusions The main purpose of this project 16 to implement the application of wireless sensor system This project was designed based on ideas and theory of wireless sensor network Water detector has been chosen as a sensor detecting flood In general this project is has successful in achieving all the objectives The communication between nodes using non standard protocol is met It is shown that the receiver node can receive data from transmitter and display on LED and PC Besides early warning flood detection water sensor system 15 also suitable to be use for measuring water level in the dam Klang valley always has a problem related to water supply shortage due to decrement of water in the dam during drought Sometimes there 1s no notice or any
10. send 2 bytes address USART TX add 0 USART TX add 1 send data USART TX sen data send checksum USART TX chksum KK Kk kk Ck kk kk IK KK KK KK kck ck kk kc k ck ck ck kk kk Program f ROKCKCKCKCKCk Kk Ck kk KAKAK ck kck kk kck kck ck kk kk ck k ck kk kk else ctr 0 Set PortA output connected to LED DDRA Oxff PORTA 0 while 1 wait for incoming data if UCSRA amp 1 lt lt rx data UDR Check 2 bytes header if ctr lt 2 if rx data hdr ctr 1 else ctr 0 Check 2 byte Address else if gt 1 amp amp ctr lt 4 4 if rx data add ctr 21 CURT else ctr 0 save data else if ctr 4 sensor data rx data Ceri JK Copy check sum y else if ctr 5 chksum rx_data CUTS Ts Check wheter data contained any error else chksum hdr 0 hdr 1 add 0 add 1 sensor data chksum 51 data is error free display on LED and send Ut if chksum Oxff USART TX sensor data if sensor data 0x1 PORTA 0x3 else if sensor data 0x3 PORTA 0x7 else if sensor data 0x7 PORTA Oxf else if sensor data Oxf PORTA Ost else PORTA 0 1 TIf data error send ff to poc alert Ser else USART
11. terminating connections Data Link Provide for the reliable transfer of information across the physical link sends blocks frame with necessary synchronization error control and flow control Physical Concern with transmission of unstructured bit stream over physical medium deals with mechanical electrical functional and procedural characteristics to access the physical medium Figure 2 1 The OSI layer Water sensor system only deploys the two bottom layer of the model which is data link and physical The standard protocol is implemented for the system for communication The main task of the data link layer for this project 15 to take a raw transmission facility and transform it into a line that appears free of transmission errors in the network layer The task 1s accomplished by input the data into data frames insert the error detection sequence bit and transmit the frames sequentially since the physical layer merely accepts and transmits a stream of bits without any regard to meaning of structure it is up to the data link layer to create and recognize frame boundaries This can be accomplished by attaching special bit patterns to the beginning and end of the frame On the other hand the service offered by physical layer 1s to provide the electrical and mechanical interface to the network medium wireless link This layer gives the data link layer layer 2 its ability to transport a stream of serial data bits betwe
12. 15 another important aspect in data communication Wireless system application are likely interferes by noise Regardless of the transmission system designed there will be errors resulting 1n the change of one or more bits in a transmitted frame There are two types of error detection scheme existed in data communication The simplest approach 1s Parity check where parity bit is appended to the end of the block of data However when there are two or any even number of bits are inverted due to error an undetected error occurs 1 Another most common and powerful method is the Cyclic Redundancy Check CRC For a k bit block of bits or message the transmitter will generate a n k bit sequence known as a frame check sequence FCS which is used later for receiver to detect error Nevertheless this error detection scheme require complex program to be implemented The easiest way to employ error detection which is used in Water Sensor System is Checksum It 1s an error detecting code based on a summation operation performed on the bits to be check The formula to generate Checksum Code is Checksum Headerl Header2 Address1 Address2 Data This sequence code is then will be add up to the frame and transmit to the other end At the receiver some calculation will be made to detect error Processor will Sum up all bytes including the Checksum value For free error transmission the expected summation result should be Ox IFF If ther
13. 2000 amp NT and Intel Linux Its purpose is reading and writing every serial device At the moment it supports Bus Microwire SPI EEPROM the Atmel AMR and Microchip PIC micro For more details visit http www lancos com e2p ponyprog2000 html How to install Run the setup exe file Preparation 1 Supply proper power to the CPU board 2 Connect the downloading adapter to the PC printer port Then connect the downloading adapter and the board with the flat cable 3 Turn on the power switch on the board Power LED turns on when applicable Compile the source file you want to download How to download a program using PonyProg2000 Run the PonyPorg2000 program 65 BDO Click OK following window appears Matice Click on OK Select Setup gt Calibration Click on Yes button The following window appears 1 Click Select Setup gt interface Setup set up as shown below Parallel Avr ISP I O LPT1 and click on Probe message appears Click on OK Click OK 66 Interface board Setup 1 0 port setup C Serial G Parallel Avr ISP IC COM cgM2 Select Polarity of the Control lines Invert Reset DAN Invert SOL Invert D DUT Notice Select the device you want Device gt AVR micro gt XXX XXX is the device you want Select Co
14. 512 bytes SRAM 32 I O line and six sleep mode and can operate in 4 5 to 5 5 Volts This microcontroller is very suitable to be used for embedded system 3 1 2 RF Module The data that 1s send from transmitter node is not critical like sending the text message or picture or video file where the data must be accurate and error free If those data are spoiled retransmission will be needed However for this application the data send to receiver end 15 fixed to only five values which are below level level level 2 level 3 and level 4 of the water Therefore the type of communication that 1s suitable to be implemented for water sensor system 1s simplex communication This type of communication is where transmitter node will continuously send data to the receiver without any concern whether the data is safely received at the receiver node 16 On the other hand the receiver accepts data without sending any response to the transmitter Hence in this project RF transmitter and receiver module is use to transfer data from sensor node to receiver node wirelessly Both RF modules are operating in free licensed frequency which is 433MHz The modulation scheme use for the system is OOK AM modulation The receiver uses Superheterodyne receiver The maximum distance that can be implemented for the system 1s 100 meter While the operating voltage range for the receiver module 1s 4 5 to 5 5 Volts Therefore this module is compatible to be co
15. R eeprom UIPslip elf UIPslip hex Pro amming 1m unsigned char i IT void Creating load file for EEPROM UIPslip eep window N avr objcopy j eeprom set section flags eeprom alloc load char ADC READ void change section lma eeprom 0 0 ihex UIPslip elf size INIT void J warning TRANSMITTER unsigned char sen data else warning RECEIVER Creating Extended Listing UIPslip 1ss avr objdump h 5 UIPslip elf gt UIPslip 1ss isplay int main void Creating Symbol Table UTPelin if TX 0 TM 8388704 unsigned char rx data ctr se bss 6365710 endif noint 0 8388710 eeprom 0 8454144 debug aranges 20 0 unsigned char hdr 2 hf ebug 1nTO unsigned char add 2 12 debia 225 0 unsigned char chksum debug line 581 0 debug str 192 0 otal Initialize PORTC El DDRC Oxff PORTC 0 Set ID gt Process Exit Code 0 matn 4 1 1 191 ANS INS Figure 4 2 Output Window resulting from compilation Then the hex file produced is uploaded into the AVR microcontroller using PonyProg 2000 Figure 4 3 proved the hex code 15 successfully embedded into the microcontroller It would be better to erase the microcontroller s memory before writing the codes to the target device especially if device is already contained any 37 program The n
16. TTT BBBBEB FF FF FF FF FF FF FF FF BU UU YUL FF FF FF FF FF FF FF FF 7 45 ddgi B FF FF FF FF FF FF FF FF 110 FF FF FF FF FF FF FF FF I OR gu BBHB12H FF FF FF FF FF FF FF LULU 380130 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF UU 880458 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF itil AANTAY FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Figure 4 3 Porting Hex code using Ponyprog200 software 4 2 Measured Voltage The supply voltage VCC which is connected to the AVR microcontroller must be stable The stability of the supply will affect the performance of the system especially for wireless communication The DC power supply unit was used for testing where the value can be easily verified Figure 4 4 shows the signal taken from VCC pin of ATmega8535 at oscilloscope The value is 5 35 Volts which still in the range of microcontroller s operating voltages Although there are little spikes existed it is tolerable since spiking voltage are below 5 5 Volts 38 5 35Volt acceptable range Odd d bbb ddbbhedd bd dibdddldeda ddd m ns T bean al E E 4 Figure 4 4 Measured Supply voltage for input processor board 4 3 Data Transmission Thi
17. enable the receiver node to perform tasks such as receive data frame from transmitter check header address and checksum extract data from the frame display on LED and send data to PC Graphical User Interface 15 also developed as additional feature to the system All programming are written in C language accept for GUI which written in Visual Basic 6 0 CHAPTER 2 LITERATURE REVIEWS There are many relevant and similar projects on wireless sensor system In this section the discussion will be made on the wireless sensor network WSN OSI network modeling and OOK amplitude modulation scheme which are relevant to the project 2 1 Introduction to Wireless Sensor Network The advances in science and technology are deeply intertwined This has lead to next evolutionary development of wireless sensor network application in building utilities industrial and home shipboard and transportation systems automation The concept of wireless sensor networks 15 based on a simple equation Sensing CPU Radio Thousands of potential applications As soon as people understand the capabilities of a wireless sensor network hundreds of applications spring to mind It 15 a straightforward combination of modern technology 4 The most important element in the WSN 15 sensory data from the real word Sensory data comes from multiple sensors of different modalities in distributed locations The application of WSN can divided into three clas
18. performed by receiver node which are receive data from transmitter error detection and display The flowchart is constructed based on the task before writing the codes This is important in order to ease the code writing and can ensure that the program is not away from main system application Refer to the figure 3 15 the program starts with initializing the USART interrupt function Those codes can be found in the ATmega8535 Datasheet Water Sensor System use Serial Communication to transfer between two microcontrollers and PC The sensor data is sent in a form of frame as shown in figure 3 16 Header is used for frame synchronization When receiver node receives first 2bytes data it will check whether it 1s a header or not 29 Then it will obtain the next coming data if the header 1s found lt gt Y es Check Header Y es Check Address Y es Store Data Send to PC Display on LED Figure 3 15 Flowchart for Receiver Node Address Data Checksum 2 Bytes 2Bytes 1Byte 1Bytes Figure 3 16 Frame Format The second element in the frame 15 Address It indicates the receiver port name Since this project only have two nodes with one sensor application Therefore the source port address will be less important 30 However for many nodes and sensor application the source address will be significant to differentiate which sensor and node are the data refer to Error detection
19. supply current 8 MAX232 has two TTL CMOS inputs RS 232 inputs two TTL CMOS outputs and RS 232 outputs figure 3 7 One of the TTL CMOS input pin 10 or 11 1s connected to the Rx pin of AVR microcontroller While one of the RS232 input and output is connected to the RS232 connector refer to figure 3 8 Four capacitances are required to be connected table in figure 3 7 The overall schematic 15 shown in figure 3 8 This circuit is then implemented using strip board figure3 9 VIEW m TO 10 y AN VOLTAGE NVERIER 4 AT INPUTS OUTPUTS 50 CAPACITANCE TET 2 C3 4 05 E Ban 1 MAKNA O1 0i 01 Figure 3 7 Pin Configuration and Block Diagram of Max232 20 E D Connector 9 t C1 II C31 uF Cl 2 Eh c e Iw MCL T20UT RIOUT RIIN R2OUT R2IN C4 104 GND VEE MAXxZ3Z2ACPE Figure3 8 RS 232 Schematic Figure 3 9 5 232 Interface Cable 21 3 1 4 2 ISP In System Programmer Cable One of the advantages using AVR microcontroller the available software package called the Atmel AVRISP This software enable user to upload the source code into microcontroller directly on board Figure 3 10 show the ISP cable developed using donut board Figure 3 10 ISP Cable There a
20. 5 68 66 88 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Size 8704 Bytes CRC 1580h 08 CD 63 DD 92 82 86 95 9B 81 87 8F BC 49 D1 36 32 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Hex code AVR micro 8535 95 5D BF 86 08 90 DF 98 30 28 50 82 81 28 30 19 81 89 2F B7 89 E1 81 CF 5F F8 27 F7 F4 98 36 08 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 9B 91 91 FF FF FF FF FF FF FF FF FF FF BM D Ne c 8E30 b 6 lt 37 3 8 6 p 6 f AN EPEG 2 AS ANG 6 ANG 6 WAAAHH E RT 266 5 M H H N NGING Em 3 4 ASCII codes Unused memory PonyProg2000 Window Application 27 l x L Figure 3 14 shows the machine codes hex file resulting from compiling source code Some configuration need to be done before usin
21. 68 0x66 0x31 0x32 0x00 OxCE 0x68 0x66 Received 0x07 Hecerveed 0x07 Received 0x07 0507 e Le Send Receive CTS DSR e e Lag Files Log Files Read from Read from a 3 i Write to a n DRconnectegfram COM to Create file Append to file automatically Frame receive from RF module Figure 4 7 Result taken from Usart Terminal wireless connection 41 Result from USART terminal shows two windows figure 4 7 The right window illustrate the receive frame taken from data out pin of RF module The frame consists of 6 bytes data which 0x68 0x66 0x31 0x32 0x00 and OxCE The first two byte is the frame header ASCII code While the next two bytes data are the address ASCIIZ 12 followed by water level 0x00 This value indicates that there is no water sensed by water sensor Finally the last byte 15 the checksum 0 68 0x66 0x3 1 0x32 0x00 OxCE The left window show the data sent to the PC taken from TX Usart pin This time the data is sent without a frame Please note that both windows are captured at different time That 1s why the data in the frame right window 1s not the same as data sent to PC left window The 0x07 signify that water 1s now at level 3 More clear result can be obtained by using oscilloscope Referring to figure 4 8 there are three signals taken which are from transmitter node USART TX receiver node
22. AVR Microcontroller ATmega8535 receiver module with 433MHz operating frequency and RS 232 Interface Circuit Figure 3 3 shows the block diagram of the receiver node ATmega8535 has four I O ports Port A is connected to the LEDs and Buzzer Port B is connected to ISP cable for uploading the hex file While RF receiver module and RS 232 are connected to the Rx and Tx pin respectively at Port C LEDs ISP Cable and Buzzer AVR Microcontroller A Tmega 535 RS 232 RF Interface Receiver Circuit Module Figure 3 3 Block Diagram for Receiver node 15 3 1 1 Processor Microcontroller plays important role in water sensor system It 1s the main unit of the node device Basically all programs will be run in this unit Microcontroller responsible for receiving data and check whether the data is free from error Other than that it also responsible to on and off the LEDs according to the data and pass to the PC Choosing a microcontroller is very important Nowadays there are many types of microcontroller available in the market such as PIC from microchip microcontroller from Motorola Intel Rabbit 2000 and etc In Wireless Sensor System power consumption and memory utilization is the significant element when deciding the right processor 7 Many WSN applications used 8 bit AVR RISC microcontroller as it processor ATmega8535 is one of the AVR microcontroller families with 8K bytes Flash Memory It also has 512 bytes EEPROM
23. PSZ 19 16 Pind 1 97 UNIVERSITI TEKNOLOGI MALAYSIA BORANG PENGESAHAN STATUS TESIS JUDUL WATER SENSOR SYSTEM RECEIVER SESI PENGAJIAN 2006 2007 Saya DIYANA BINTI MUHAMAD HURUF BESAR mengaku membenarkan tesis PSM Sarjana Doktor Faisafah ini disimpan di perpustakaan Universiti Teknologi Malaysia dengan syarat syarat kegunaan seperti berikut 1 Tesis adalah hakmilik Universiti Teknologi Malaysia 2 Perpustakaan Universiti Teknologi Malaysia dibenarkan membuat salinan untuk tujuan pengajian sahaja 3 Perpustakaan dibenarkan membuat salinan tesis ini sebagat bahan pertukaran antara institusi pengajian tinggi 4 Sila tandakan 4 kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972 SULIT Mengandungi maklumat yang berdarjah keselamatan atau TERHAD Mengandungi maklumat TERHAD vang telah ditentukan oleh organisasi badan di mana penyelidikan dijalankan TIDAK TERHAD Disahkan o PENULIS TANDATANGAN PENYELIA Alamat Tetap NO 2 JLN 1 3G PROF DR NORSHEILA BINTI FISAL BANDAR BARU BANGI Nama Penyelia 43650 SELANGOR Tarikh 30 NOV 2006 Tarikh 30 NOV 2006 PARURE NER GUERRE EE AERE UE OG m Af s
24. S End If If x Then Label3 Caption meter Labell BackColor amp HFFO0000 Label2 BackColor amp HFFOOS amp Label4 BackColor amp HFFFFFF Label5 BackColor amp HFFFFFF Label6 BackColor amp HFFFFFF ElseIf x amp H3 Then Label3 Caption 2 meter Labell BackColor amp HFFO0000 Label2 BackColor amp HFFOO amp Label4 BackColor amp HFFFF amp Labelb BackColor amp HFFFFFF Label6 BackColor amp HFFFFFF Elself Then Label3 Caption 3 meter Labell BackColor amp HFFO0000 Label2 BackColor amp HFFOO amp Label4 BackColor amp HFFFF amp Label5 BackColor amp H80FF amp Label6 BackColor amp HFFFFFF Elself x Then Label3 Caption 4 meter Labell BackColor amp HFFO0000 Label2 BackColor amp HFFOOS amp Label4 BackColor amp HFFFF amp Label5 BackColor amp HS80FF amp Label6 BackColor amp HFF amp Else Label3 Caption WATER LOW Labell BackColor amp HFFO0000 Label2 BackColor amp HFFFFFF Label4 BackColor amp HFFFFFF Label5 BackColor amp HFFFFFF Label6 BackColor amp HFFFFFF End If End Sub APPENDIX D PONYPROG2000 USER MANUAL 64 How to use PonyProg2000 for the Microrobot AVR Products Rev 0 3 Contents What is PonyProg2000 How to install Preparation How to download a program using PonyProg2000 What is PonyProg2000 PonyProg is a serial device programmer software with a user friendly GUI framework available for Windows95 98
25. T hex ELFSIZE 5 512 S TARGET elf Define Messages English MSG ERRORS NONE Errors none MSG BEGIN begin MaG ND eS a a a end MSG SIZE BEFORE Size before MSG SIZE AFTER Size after MSG COFF Converting to AVR MSG EXTENDED COFF Converting to AVR Extended COFF MSG FLASH Creating load file for Flash 58 MSG Creating load file for EEPROM MSG EXTENDED LISTING Creating Extended Listing MSG SYMBOL TABLE Creating Symbol Table MSG LINKING Linking MSG COMPILING Compiling MSG ASSEMBLING Assembling MSG CLEANING Cleaning project Define all object files OBJ S ASFC r Define all listing files Lol e c ASRONISeE JE Combine all necessary flags and optional flags Add target processor to flags ALL CFLAGS mmcu S MCU CFLAGS ALL ASFLAGS mmcu MCU I x assembler with cpp 5 ASFLAGS Default target all begin gccversion sizebefore S TARGET elf S TARGET hex TARGET eep TARGET lss S TARGET sym sizeafter finished end Eye candy AVR Studio 3 x does not check make s exit code but relies the following magic strings to be generated by the compile job begin echo echo 5 5 BEGIN finished echo MSG ERRORS NONE end echo MSG END echo Display size of file sizebefore if S TARGET elf t
26. UDR KK KK KK kk KAKAK kk kk ck kk kCk ck k k kk kk ck ck ck k ck kk kk ck ck kk f ROKCKCKCKCKCk Kk Ck kk kCk Ck ck ck kk kk kck ck k ck kk kk ck ck ck ck ck kk kk void delay 1m unsigned char 1 DIE dO while i 1 11415 8Mhz Exteranl Crystal CKSEL3 0 1 1 1 1 while j 53 APPENDIX B MAKE FILE FOR AVR MICROCONTROLLER WinAVR Sample makefile written by Eric B Weddington al make make H H H H H H make VMLAB make DL ugs make Please make only 54 Jorg Wunsch et Released to the Public Domain Please read the make user manual Additional material for this makefile was submitted by Tim Henigan Peter Fleury Reiner Patommel Sander Pool Frederik Rouleau Markus Pfaff On command line all Make software clean Clean out built project files Convert ELF to AVR COFF for use with AVR Studio 3 x extcoff Convert ELF to AVR Extended COFF for use with AVR 4 07 or greater program Download the hex file to the device using avrdude customize the avrdude settings below first filename s Just compile filename c into the assembler code To rebuild project do make clean then make all it MCU name MCU atmega8535 Output format can be srec ihex binary FORMAT ihex Target file name without extension TARGET wlevel T Optimization level cas
27. USART RX and receiver node USART TX It 1s observed that transmitted bits frame is exactly the same as received bits frame Also notice that the time interval between transmit and receive frame is very small which nearly Osec The purple signal indicates the water level value This data will be used by the PC to display the real value 42 Transmitted Bits Frame taken from qp qme mmm TX node me p Received Data taken Transmitted from RX Datafrom RX node to PC node to PC pin pin USART USART TX RX EM Autoset 412 1 2 1777 pp Wawi eS WW f D Figure 4 8 taken from Oscilloscope Wireless connection 4 4 Result from Graphical User Interface The Graphical User Interface was developed as additional features to the system When the sensor did not sense any water it considers as low water level Therefore the first level 15 assigned with blue color figure 4 9 a The message also wills popup in the water level section Then when the sensor sense the first level of the water the second level in GUI will assigns green color This process will continue until the water reached the highest level where the message 4 meter critical will appear on screen figure 4 9 e The following figures have summarized the operation of GUI for this system 43 Water Sensor System E
28. afik turut dibangunkan sebagai ciri tambahan kepada sistem menggunakan VB 6 0 Keputusan yang diperolehi diambil dengan menggunakan terminal USART osiloskop dan antaramuka pengguna bergrafik D1 dapati bingkai yang di hantar berjaya diterima oleh stesen penerima Perbezaan masa diantara bingkai yang dihantar and bingkai yg diterima adalah sangat kecil CHAPTER TABLE OF CONTENT TITLE TITLE DECLARATION DEDICATION ACKNOWLEDGMENTS ABSTRACT ABSTRAK TABLE OF CONTENTS LIST OF FIGURES LIST OF TABLE LIST OF ABBREVIATIONS LIST OF APPENDICES INTRODUCTION 1 1 Project Background 1 2 Problem Statement 1 3 Project Objectives 1 4 Scope of Works LIERATURE REVIEWS 21 Introduction to Wireless Sensor Network 2 2 Network Modeling Vil PAGE 111 1V vi Vil xli xiii UJ 52 N ma 2 3 Wireless and RF Communication System RECEIVER NODE DEVELOPMENT J l Introduction 3 2 Hardware Development 22221 Processor 3 2 2 RF Module 342 9 Circuit Design 3 2 4 Additional Tools 3 2 4 1 RS 232 Circuit 3 2 4 2 Cable 3 3 Software Development 3 3 1 Software Tools 3 3 1 1 Programmer Notepad WINAVR 3 3 1 2 PonyProg 2000 2 2423 Microsoft Visual Basic 3 3 2 Main Program 22223 Graphical User Interface RESULT AND DISCUSSIONS 4 1 Overview 4 2 System Hard wares 4 3 System Software 4 4 Measured Voltage 4 5 Data Transmission 4 5 1 Wired Connection 4 5 2 Wireless Connection 4 6 Result from Graphical U
29. at is shipped with inAVR See the SHELL variable defined above Ihis may not work with other shells or other seds oO gt out dt oco set 5 MM S ALL CFLAGS lt Bed VS P qe x loo NIS m cU Sie N k sl ei St Se t Remove the if you want to see the dependency files generated include SRC c d Listing of phony targets PHONY all begin finish end sizebefore sizeafter gccversion coff SECOLI A clean clean_list program APPENDIX C SOURCE CODES FOR GRAPHICAL USER INTERFACE 62 Private Sub Timerl Timer masa Refresh masa Caption Time End Sub Private Sub Form Load MSComml RThreshold 1 MSComml InputLen MSComm1 CommPort MSComml Settings Nooo ye MSComml DTREnable False MSComml PortOpen True Tarikh Date N II masa Time Hari WeekdayName Weekday Date vbSunday End sub Private Sub Form Unload Cancel As Integer MSComml PortOpen False End Sub Private Sub MSComml1 OnComm Dim x As Long Dim y As Long Dim r As Long Dim sData String Holds Our incoming data Dim lHighByte As Integer Dim Wordl As Long Holds the Word result If MSComml CommEvent comEvReceive Then comEvReceive Event then get data and display sData MSComml Input lHighByte Asc 195 sData 1 1 get 1st byte Wordl lHighByte End If x l HighByte If lHighByte 46 amp lHighByte 57 Then MsgBox THIS FRAME IS NOT FOR U
30. e is an error occurs the data will be discarded Figure below shows the flowchart for error detection 31 Chksum2 Header2 Addrl Addr2 data Chksum Data Error Data Ok Figure 3 17 Flow chart to detect error at Receiver End 3 2 3 Graphical User Interface GUI 15 used to display the water level at computer It was developed using Microsoft visual Basic 6 0 This software provide user friendly environment platform which simplify the development process Add function Figure 3 18 Flowchart for GUI development Figure 3 18 shows the flow processes of developing the GUI First step the form is designed accordingly to the need of the system as shown in figure 3 20 It 1s created using drag and drop techniques A tool is used to place controls e g text 32 boxes buttons etc on the window form refer to figure 3 18 Controls used for this GUI are labels frame Mscomm and timer All controls have attributes and event handlers associated with them The values provided for each control is changed to the suitable value e g high width font background color caption etc This value can be changed at the window properties figure 3 18 The main control in the GUI is Mscomm which allowed the reading function from PC com port The control timer is used to generate the current time when the application 1s run There are nine labels on the window form One label used to display message indicati
31. ective non structural measure to minimize the losses of properties and human lives due to floods As mention before water sensor system can be implement for this purpose Beside it low costs this system 15 also easy to be installed and maintained in a very short time 1 2 Project Objectives The objectives of this project include e To develop receiver node that will receive data from the sensor node using wireless transmission and processing e implement nonstandard protocol for communication between sensor and receiver node at data link and physical layer e display the level of the water level using LED on receiver board e monitor the changes of water level remotely on computer in a very small time interval 1 3 Scope of Works The works involve in this project includes Hardware and Software development This project will developed receiver node using ATmega8535 as processor and RF receiver module with frequency range 433MHz as communication device Since the computer will be used to display the data value an interface circuit between receiver node and computer need to be built RS 232 circuit In addition ISP cable is developed as a utility to load the hex file to the microcontroller The most important element of wireless sensor system is communication between nodes and data processing This function can be implemented on the nodes through programming Software developments involve some programmings which
32. el police can alarm resident low lying area to be prepared 1 1 Problem Statement Malaysia is tropical country Generally the country 15 frequently hits by heavy rain all year around cause by north east monsoon and south west monsoon which later lead to floods Usually major floods occur at the east coast and north side of the country during the north east monsoon However nowadays the scenario is slightly different where flood can happened anytime and anywhere whenever heavy rains occur Flash flood 15 a new type of flood that strike urban area like Johor Bharu and Kuala Lumpur in a very short period Without any warning this catastrophic may cause a lot of negative impact such as damaged properties public utilities cultivation loss of lives and also caused hindrance to social and economic activities Average annual flood damage 15 reported as high as RM100 millions 3 http kimitheshooter fotopages com Figure 11 Flash Flood that strike Kuala Lumpur The government of Malaysia has developed many strategies to reduce the 1mpact and the negative effect of the floods The floods control strategies include construction of multi purpose dam properly plan and designed the urban drainage system river bed deepening and widening etc The development of all above strategies 1s very costly and will take longer time to be finished Therefore at a mean time flood forecasting and warning system is being considered as the most eff
33. elopment processes are based on the objective of the project which is to produce receiver node that has an ability to receive data do some processing and display on LEDs and Computer Figure 3 2 has shown the works flow in developing the hardware and the software of receiver node It start by choosing the right component to used for node s processor RF module and other components that will used to indicate the water level such as LEDs and Buzzer The receiver node block diagram was constructed to simplify the schematic drawing After finished designing the schematic the hardware was implemented This hardware will encounter several tests to ensure the reliability of the system 13 The nonstandard protocol that will be embedded to the system 15 clarified Software developments mostly concentrate in codes writing Then those programs is burned and run test The programming and correction is continued until successful result 1s obtained Choose Component Block diagram Design Schematic Implement Hardware Test Hardware Circuit Correction Setup Protocol that will be used Software Development NO OK Figure 3 2 Flow chart of developing the receiver node 14 3 1 Hardware Development Choosing components are very important element in implementing the hardware for every system The components are chosen based on the function and suitability for the system The components used for the receiver node are
34. embedded in the microcontrollers The source code 15 written the Programmer Notepad WIN AVR Then the code was compiled to produce the hex file list file and object file However only hex file will be used to be uploaded Figure 4 2 shows the successful compiled result on WINAVR window The left window shows the source code while the right shows the output window The total memory size used for this system 1s 1989 bytes Output window Programmers Notepad 2 main c File Edit View Tools Window Help 1 main define Fosc 8000000 Clock Speed define BAUD 1200 Compiling main c define baudrate FOSC 16 BAUD 1 avr gcc c mmcusatmega8535 I g 0s funsigned char funsigned bitfields fpack struct f main c 24 3 warning warning RECEIVER main c 34 2 warning within comment main c 36 2 warning within comment x n include lt avr io h gt include lt stdio h gt main c In function main main c 25 warning sensor data might be used uninitialized in this function define TX 1 main c 30 warning chksum might be used uninitialized in this function Linking UIPslip elf void USART_INITCunsigned int UBRR avr gcc mmcu atmega8535 I g 0s funsigned char funsigned bitfields fpack struct fsho void TX unsigned char data Creating load file for Flash UIPslip hex char UsART RX void avr objcopy 0 ihex
35. en two nodes in the system it conveys the bits that move along the link It is also responsible for making sure that the raw bits get from one place to another by modulation technique and deals with the electrical and mechanical characteristics of the wireless link such as frequency used type of modulation communication device etc 222 Introduction Wireless Communication System The area of wireless communication 15 fairly broad especially in technological research and development It 1s deal with transmitting data via some form of air waves Wireless communication can de defined as any transfer of data from one point to another using no wires Radios cell phones satellite TVs and remote controls are just a few of the many technologies currently being used and developed in the area of wireless communication The Water Sensor System use Amplitude Modulation scheme to transmit data wirelessly to the receiver It works by varying the strength of the transmitted signal in relation to the information being sent Hence the amplitude demodulator is used at the receiver end to converse back the AM signal into digital output Receiver node in system 15 using super heterodyne receiver The super heterodyne principle as used in radio receivers allows certain obstacles in high performance radio design to be overcome 5 All signal frequencies are converted typically to a constant lower frequency before detection This constan
36. evelopment of water sensor system starting from writing the source code to upload the hex file to the microcontroller Those soft wares are free and can be downloaded from internet accept for software to develop GUI The soft wares that utilized in this project includes Programmer Notepad WINAVR PONY PROG and Microsoft Visual Basic 6 0 3 2 1 1 Programmer Notepad WINAVR Programmer Notepad WINAVAR is an open source window based platform to write the source code for the ATMEL series of RICS microcontroller It is operate in user friendly environment which make the application easy to use The WINAVR are supported only in DOS command line platform 10 The user needs to setup the Makefile before compiling the program Figure 3 13 shows the programmer Notepad window in WINAVR The most right window is the source codes while the left window 1s output file generated after compiling the program Programmers Notepad 2 main c x 3 File Edit View Tools Window Help 2 x 4 e h vo X amp 3 z Find main define Fosc 8000000 Clock speed define BAUD 1200 define baudrate FOSC 16 BAUD 1 GCC 3 4 3 2004 ee Foundation 5 Thi software he rce fo opy1 n conditions include avr io h warranty ot even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE include lt stdio h gt Size petore define TX 1 UIPslip elf Section
37. g the software to uploading the codes At the beginning user need to setup the interface by specify the connector used serial or parallel between microcontroller and PC Next calibrate the bus timing define the device used e g ATmega8535 PIC16xx83 etc and setup the configuration and security bits Then the hex file is opened and programmed to the target device The hex file consist of memory address machine code presented in the form of hexadecimal and ASCII PonyProg also verify filled 0XFF in the unused memory 28 3 2 1 3 Microsoft Visual Basic 6 0 Visual Basic VB 1s an event driven programming language and associated development environment from Microsoft The language is rather very simple and easy to understand where the codes are written using simple English like words and syntax Its not only allows programmers to easily create simple GUI applications but also has the flexibility to develop fairly complex applications Definition of Visual Basic from Wikipedia Programming in VB is a combination of visually arranging components or controls on a form specifying attributes and actions of those components and writing additional lines of code for more functionality Since default attributes and actions are defined for the components a simple program can be created without the programmer having to write many lines of code 12 3 2 2 Main Program Generally there are three significant tasks need to be
38. ge URL http ww avrfreaks net AVRGCC Ponyprog2000 Web page URL www lancos com prog html Visual Basic Wikipedia Web page URL http en wikipedia org wiki Visual Basic Wikipedia Web page URL http en wikipedia org wiki Main Page ATMEL Corporation Web page URL http www Atmel com Cplusplus resources Web page URL http www cplusplus com VB Forums Web page URL http www vbforums com APPENDIX A SOURCE CODE OF WATER SENSOR SYSTEM 50 f RKCKCKCKCKCk Kk KAKAK KAKAK KK KC AKK KAKAK AKK k kk kk kck kck ck kck kk kck kck ck k kc ko k ck kk k Prete Le Water Sensor System with Non standart Protocol Description Basically this protocol only involve datalink layer The purpose of this protocol is to ensure the reliability of datatransmission between 2 entities point to point Below are the details used in Ehre protocol Error detection Checksum Frame Structure Flag Address Data Chcksum eese p esses oet 2 2 1 gt Bytes where Flags hf Address 12 KK KK Kk kk Kk Ck Ck KK Kk KAKAK KAKAK kk kCk kck k ck ck kk kck kck ck k ck kk kck ck kk kk define FOSC 8000000 Clock Speed define BAUD 1200 define baudrate FOSC 16 BAUD 1 include avr io h include lt stdio h gt define TX 1 Ji set tx 1 Receiver while tx 0 receiver kk Kk Kk KK Kk Kk Ck KAKAK KAKAK kk kck kck ck kk kk ck kk k a
39. hen echo echo MSG SIZE BEFORE SOELESIZE echo i sizeafter aif f S TARGET elf then echo echo MSG SIZE AFTER echos I1 Display compiler version information 59 gccversion GS Ce e verslon Convert ELE to COFF ior Use in debugging simulsting in AVR Studio or VMLAB COFFCONVERT S OBJCOPY debugging change section address data 0x800000 change section address bss 0x800000 change section address noinit 0x800000 change section address eeprom 0x810000 coff S TARGET elf echo echo S MSG COFF S TARGET cof S COFFCONVERT O coff avr 5 lt S TARGET cof extcoff S TARGET elf echo echo 5 5 EXTENDED COFF S TARGET cof 5 COFFCONVERT O coff ext avr lt S TARGET cof Program the device program 5 5 TARGET 5 AVRDUDE S AVRDUDE FLAGS AVRDUDE WRITE FLASH 5 AVRDUDE WRITE EEPROM Create final output files hex eep from ELF output file hex elf echo echo 5 FLASH 564 5 O 5 R eeprom Q cep elf echo S MSG EEPROM SQ S OBJCOPY 3 eeprom set section flags eeprom alloc load change section l1ma eeprom 0 O FORMAT lt 56 Create extended listing file from ELF output file lss elf echo echo MSG EXTENDED LISTING 544 S OBJDUMP 5 lt gt 66 Create a symbol
40. impossible to observe start bit of the data frame yellow and pink signal because the oscilloscope shows the continuous display 4 3 2 Wireless Connection After the wired transmission has been successfully implemented the test for wireless connection was made Fortunately the result obtained using wireless 15 actually same as wired This has been proven in the following figure Water level sends to pc Q5 58746 Ap 45 x x SENSOR 01 25 Communication Terminal Settings Communicatiorr var Com Port COMI program SENSOR 01 Baud 1200 Append CR Communication Terminal kiki Stop Bits One Stop Bit LF Settings Communication Parity Nore Format gt Rom For 21 Send File C Check Parity ASCII Baud Append CR C Send as typing Data bits Eight Stop Bits One StopBit xl fia LF C Send as number t C ASCII Commands O RIS Data bits Received 0x31 Dl UKUD 0x68 0x66 0x31 Of Dn Commands On RTS DTR Received 0x07 G Off Off 3 On C On eceived 0x31 0x32 0x00 OxCE 0x68 Ox66 0x31 0432 eet ae Received 0x00 OxCE 0468 0 66 0x31 032 0900 OxCE Status Received Oud _Disconnect_ 0421 0132 ONCE 0466 091 0039 Send Receive CTS D5R Received 0507 Status Received 0x00 0x68 066 0x31 0x32 0x00 O CE Received 0x
41. mmand gt Program Options and check as shown below Reload Files Erase Write Program memory Click on OK Program Options K Some devices require Flash Fuse Bits Setting for the desired clock source setting For example CKSEL3 0 bits of the ATmega8535 and Atmega8515 devices need to be set 1 to 67 select the External Crystal clock source mode Refer to Clock Options of the device sheet for the detailed bit setting If you need to set the bits select Command gt Security and Configuration Bits Click on Read button uncheck the CKSEL3 0 bits and then click on Write button Fig 1 6 shows a Security and Configuration Bits dialog box as an example Configuration and security bits 5 2 Bomback 58 wOTONT SPES 7 P EESAVE BODTSET 2 1 1 1 1 Uncheck 1 Refer tn device datasheet pease Cancel Clear i wite Fead Note If the board has AT90S type CPU instead of ATmega type the setting is not required Select File gt Open Program File and load the rom or hex file Select Command gt Program or press Ctrl P to start the downloading If no Program Failed message appears the downloading has been completed successfully Www microrobot com
42. nd Receive CTS DSR Disco Zr hen amp a ENS Write to Create file Append to automatically Water level sends to Frame receive taken pc from USART RX Figure 4 5 Result taken from Usart Terminal wired connection Referring to figure 4 5 the red circle indicates the frame received at the receiver end pin USART RX Then this frame is processed by checking the error If the frame 15 free from error processor will then extracts data from the frame Afterward this data will be send to the PC through pin USART TX green circle Transmitted Bits Frame from TX node Received Bits Frame Pin USART RX Tint SEEN Transmitted dat from RX node to PC pin USART TX Start bit is 0 Trigered Stop bit is 0 from 1 gt 0 and the next Triggered from 0 to 1 bit is data indicate the bit data finished Figure 4 6 Result taken from Oscilloscope Wired connection 40 The result taken from oscilloscope has shown three different output which are from transmitter node USART transmit pin Receiver node USART receive and transmit pin refer to figure 4 6 ATmega8535 has USART function which automatically generates the start and the stop bit for every byte transmitted The start Bit and the stop bit is 0 The bit will remain 1 when the line is idle This is clearly proven at the generated green signal It is nearly
43. nd network vendors many large customers and most governments including the United States Definition of OSI Model from Wikipedia The concept is to describe how data communications should take place It divides the process into seven groups called layers The layers in the OSI model are physical data link network transport session presentation and application Each layer performs a related subset of the function required to communicate with another system refer to figure 2 1 It relies on the next lower layer to perform more primitive functions and to conceal the details of those layers 1 Each layer also provides service to the next higher layer The function of each layer is well defined therefore any changes in one layer will not required changes in any other layer Application Provide access to the OSI environment for user and also provides distributed information services Presentation Provide independence to the application process from difference in data representation syntax Session Provide the control structure for communication between applications establish manage terminate the connection between cooperating systems Transport Provide reliable transparent transfer of data between end points provide end to end error recovery and flow control Network Provide upper layers with independence from the data transmission and switching technologies used to connect system responsible for establishing maintaining and
44. ng the water level three of the label is used to display day date and time and others for animated graph Afterward function 1s added for each of the control component on the window form through coding Since VB 6 0 15 widely used software hence the source code for certain functions are available from Internet However some modification need to be done depend on application The program for this GUI 15 presented the Appendix Next the source codes are compiled Whenever error occurs Visual basic will automatically highlight the line in the program which contained error DiyanaGUl Microsoft Visual Basic design DiyanaGUI Form1 Form 15 x amp File Edit View Project Format Debug Run Query Diagram Tools Add Ins Window Help B eR 705GE S854 s RFSVERAD 12 6150 x 3690 Ge aim E ES C3 zn 86 DiyanaGUI DiyanaGUI vbp A Properties Form x fm Water Level Sensor System Formi Form Alphabetic Catego ized Formi 1 3D False amp HooFFFFFF amp 2 Sizable Water Level Sensor System True True 13 Copy Pen D Solid 1 pt 0 True Fillcolor 000000008 illStyle 1 Transparent Pant MS Sans Serif Water Level eeu Controls Tool Attributes Value ame Window rorm Layout x Window Properties x form Figure 3 19 Visual Basic 6 0 window environment 33 4 Water Sensor Syste as Labels gsx de
45. nnected directly to the AVR Microcontroller Eo am ur m Figure 3 4 Pin Connection RF Receiver Module 3 1 3 Circuit Designed The circuit 1s designed based on the block diagram Figure 3 5 shows the schematic for Receiver Node The microcontroller used 8 MHz external crystal oscillator Since the voltage range of ATmega 8535 16 4 5Volts to 5 5Volts Therefore the circuit cannot get direct supply from the Battery In order to avoid any harm to the microcontroller Voltage Regulator is used to step down the voltage to appropriate value 17 VCC E EF 220 220 220 220 iu 1 yy pena LI 1 T ER z T MES aj zn X 11 TARI ara wy ow T TIH bF ao in d m A eh 1 zW PB 30pF Aline p73 LiPC Figure 3 5 Receiver Node Schematic diagram PortAO until PortA4 of microcontroller is connected to the LED which indicates the level of the water LEDO specify water below all level While LED1 for level 1 LED2 for level 2 and so on 15 also connected to the Buzzer so that when the water level exceeds level 4 the LED 4 and the buzzer will on The circuit was implemented using the strip board figure 3 6 18 LI p amp
46. nto the microcontroller and writing codes to display the data on the computer Figure 3 12 shows the flow chart of software development All source code was developed in C language except for GUI 24 Develop Flow Chart C Programming Setup Make File Compile es Upload Program Figure 3 12 Flow of Software development C code 15 the high level programming language which is easy to understand and suitable for many systems programming applications that had traditionally been implemented in assembly language The design goal are it could be compiled in a straightforward manner using a relatively simple compiler provide low level access to memory generate only a few machine language instructions for each of its core language elements and not require extensive run time support 9 The language can be used widely from embedded microcontrollers to supercomputers The source code 15 composed of the flow chart of the system Then those code need to be verified and compiled which can be download from ATMEL distributor websites or others 1s one of the compiler which available in DOS and Windows version Others compiler existed such as WINAVR AVRLib CodeVision AVR and etc Next the hex file produce is uploaded into the microcontroller The application 1s considered success when the target device works according to the plan 25 3 2 1 Software Tools There are many software tools needed to support the d
47. og 2000 s User Manual PAGE 50 54 62 64 CHAPTER 1 INTRODUCTION 1 1 Project Background Water sensor system 15 another application of Wireless Sensor Network WSN This system enable user to monitor four increment of water level remotely at PC or LEDs on receiver board For a prototype this project only develops two nodes which are transmitter node and receiver node Transmitter node consists of water sensor board connected to processing board contain microcontroller RF module Meanwhile at the receiver end there are processing board contain microcontroller and RF module connected to the computer The nonstandard communication protocol was implemented in the system The error detection codes and addresses are attached to the data before transmitted This application is using radio signal with frequency of 433MHz to transmit data wirelessly to the receiver The type of communication implemented in the system 1s simplex communication where transmitter node continuously sends data to receiver without waiting for acknowledgement While at the other end a receiver 15 ready to receive data from transmitter Water sensor system is suitable to be used as an early warning system to detect flood The sensor node 15 suitable to be setup near the river banks or drain to sense the increment of the water while the receiver node can be install at the resident house or police station so that whenever water exceed the critical lev
48. or their eternal support motivation encouragement and inspiration throughout my journey of education 1V ACKNOWLEDGMENT Alhamdulillah for His Blessing I finally have completed my final year project for Bachelor Degree of Electrical Engineering Telecommunication There are several people whom I would like to thank for involving in making this project successful Without any help from these people I am sure that 1t would be much difficult for me to accomplish the objectives of the project First of all I would like to take this opportunity to express my deepest appreciation to my supervisor Prof Dr Norsheila Bt Fisal who had guided me giving support and motivation during the project This project is collaboration between me and Zatulfarha Md Yaman Therefore I would like to convey my outmost gratitude to her for giving fully cooperation and always be with me during up and down throughout entire project Most importantly I would like to thank my parents and family for their encouragement and support Last but not least thousand appreciations to Mr Arif Mr Ajis Che Mazru Nordiyana Kamaruddin and all individuals who have directly or indirectly offered help support and suggestions contributing towards the successful completion of water sensor system ABSTRACT Nowadays Wireless Sensor Network WSN has become very popular The availability of low cost high performance and practical usage of the embedded proce
49. otice window will pop up to indicate that the uploading process 15 completed and successful 0 2000 Sorin Programmer No enel ipn Edk Delte Command Soir Setu d BRB M BARANG 14 CH 20 EH CH CO 29 28 77 CU PER HARATA 25 GA 25 GA 25 73 CA EB 71 GA 20 GA CA nf na nh A A HBBH28 1E CO 10 CO 1C CB CB 1 CO 11 2h ES D Ah ha 5 2514 908080 02 DE BF CD BF 10 EB 02 CO 05 Gb 92 35 OF 09 FT 16 EG AG Ed BAHASA 01 1D 92 AA 35 B1 OY EA FY di CH DB s CF ES 07 EH DE HF HF EF 1H BA H7 HH i YN BAHAYA H Hh EH BM EM 45 E4 47 B TH BC jE EG BBBBHB 35 OA 86 99 FE CF 24 B1 35 B1 C9 H1 80 95 98 95 686 pl 5 E 0 0 000000 Ub 95 E7 95 95 95 87 05 B5 BB 2 SF 33 40 11 FE gari mentite JE GERAN AY 98 ED CF A9 EH CF FF FF FF FF FF FF FF g ilsmelugjguguugu FF FF FF FF FF FF FF FF EE Ej ggggguggggggggdgi BABACA FF FF FF FF FF FF FF FF PM BBBBDB FF FF FF FF FF FF FF
50. r provided by this software 1s flexible and can be hosted on many platforms where it can target many different processor or operating systems back end and can be configured in different languages front end This features is ideal for execute the User s Makefile which in turn calls the compiler linker and other utilities used to develop software Programmer Notepad then will capture the output and display on window If there 1s any error user can simply clicked on the error or warning and programmer notepad will automatically open file and go to the error or warning line of the program 3 2 1 2 PonyProg2000 After the source code 1s successfully compiled the next step 1s to upload the program to the AVR microcontroller As mention earlier AVR family allow programmer to upload the source code directly to the microcontroller on board Hence this facility can be done by using AVRISP cable with PonyProg2000 software PonyProg 15 serial device programmer software with a user friendly GUI framework available for Windows95 98 2000 amp NT and Intel Linux Its purpose is reading and writing every serial device At the moment it supports PC Bus Microwire SPI eeprom Atmel AVR and micro 11 PonyProg2000 Serial Device Programmer C waterlevel wlg el hex v File Edit Device Command Script Utility Setup Wind daada e BE PB 20 800078 88 B A B3 By 000088
51. re many types of AVRISP schematic diagrams available in the Internet However figure 3 11 shows the simplest ISP schematic that used for this project This ISP cable is suitable for ATmega8535 7415245 is octal tristate buffer which used to provide the float state after the hex code has been written into the AVR chip Using LED 15 for indicating the PC start up and code 15 written into the chip 22 1 2 3 4 5 ISP CONNECTOR C JT oL TAL3245 Figure 3 11 ISP Schematic There are four signals from microcontroller need to be connected which are MOSI MISO 5 and RESET MISO MOSI pins are used for all the CPUs except ATmegal03 which uses TXD RXD pin instead Warsuzarina Binti Mat Jubadi Nov 2005 Table 3 1 has shown the function of ISP Connector Pin Header 2 Table 3 1 Function of ISP Connector Pin Header Name Function Description Master Out Slave In Data being transmitted to the part being programmed 1S sent on this pin Target MCU Reset Connect to target AVR Target 15 programmed while in Reset State Shift Clock Serial Clock generated by the Programmer Master In Slave Out Data received from the part being programmed 15 sent on this pin ISP Power 5Volts Power supply for ISP ISP header must supply power to the dongle 3 2 Software Development Software development 15 referring to development process in embedded the application i
52. rocessor board Result taken from Usart Terminal wired connection Result taken from Oscilloscope Wired connection Result taken from Usart Terminal wireless connection Result taken from Oscilloscope Wireless connection GUI result a No level b Level 1 c level 2 d level 3 and e level 4 The PCB Design for Receiver module 36 37 38 39 39 40 42 43 46 LIST OF TABLE TABLE NO TITLE PAGE 3 1 Function of ISP Connector Pin Header 23 AM AVR RISC COM CPU EEPROM GUI IF ISP LED MHz OS OSI PC PCB RF RT OS RX SRAM TCP IP TX USART VB WSN xiii LIST OF ABBREVIATIONS Amplitude Modulation AVR GNU Compiler Collection AVR Reduced Instruction Set Computer Serial Communication port Central Processor Unit Electrically Erasable Programmable Read Only Memory Graphical User Interface Intermediate Frequency In Circuit Serial Programmable Light Emitting Diode Megahertz Operating System Open System Interconnection Personal Computer Printed Circuit Board Radio Frequency Real Time Operating System Receiver Static Random Access Memory Transmission Control Protocol Internet protocol Transmitter Universal Synchronous Asynchronous Receiver Transmitter Visual Basic Wireless Sensor Network APPENDIX gt LIST OF APPENDICES TITLE Source Code of Water Sensor System Make file for AVR Microcontroller Source code for GUI Ponypr
53. rval between transmitted and receive frame vi ABSTRAK Rangkaian pengesan tanpa wayar RPTW telah menjadi semakin popular pada masa kini Dengan adanya pemproses terbenam radio dan pengesan yang berharga rendah pertasi tinggi dan juga praktikal untuk digunakan telah membawa kepada penggunaan sistem pengesan tanpa wayar dalam kehidupan manusia Aplikasi RPTW adalah meluas Ianya boleh digunakan sebagai pemerhati habitat pemerhati kesihatan dan pengesan elemen persekitaran seperti suhu kelembapan cahaya air dan sebagainya pada jarak jauh Projek ini adalah bertujuan untuk membina sebuah sistem pengesan yang mampu mencerap takat kenaikan air di komputer Sistem ini terdiri daripada dua nod iaitu stesen pemancar dan penerima Stesen pemancar akan mengesan empat takat kenaikan air dan menghantarnya secara tanpa wayar ke stesen penerima Kemudian stesen penerima akan menangkap isyarat mengubah ke bentuk digital memproses memapar ke LED dan menghantar data ke komputer Sistem ini sesuai digunakan sebagai sistem amaran awal untuk mengesan banjir Laporan ini mengemukakan pembagunan nod penerima termasuk rekaan perkakasan dan rekaan perisian Nod penerima dibina menggunakan ATmega8535 sebagai pemprosess Modul frekuensi radio sebagai alat komunikasi dan komputer untuk paparan Sistem ini menggunakan rekaan protokol bukan standard untuk komunikasi nod ke nod Semua atucara ditulis dalam bahasa pengatucaraan C Selain itu antaramuka pengguna bergr
54. s section will elaborate the result obtained for data communication for the system The data transmission for this system uses the USART with 8 bit frame format Big Indian byte order and baud rate of 1200 bps The same baud rates are set for both nodes for synchronization The result is taken in two different system layouts which are wired and wireless connection 4 31 Wired Connection The data sent from the transmitter node is in the form of frame which includes 2 bytes header 2 bytes address 1 byte data and 1 byte checksum as discussed in previous chapter The following figures show the result taken from USART terminal for both nodes using Usart terminal and Oscilloscope 39 Sa Communication Terminal 2 x ComPot D Baud 120 ee 15 C Send as typing Stat Logging wem 1 Dead Parity None mem E 3 Check Parity ASCII s HEX DEC Rte 2 Data EW Regeered 044 0x10 0x34 0 01 0x15 044 Cie 0x4 RIS DTR Received 0x44 0x10 0x34 0x01 0x15 0x45 G Ott G Off Recevet Received 0x44 0x10 0x34 0x01 0x15 0x45 On On Received 0x48 L Received 0x44 0x10 0x34 0x01 0x15 0x45 AN Received 0x44 0 10 0x34 0x01 0x15 0x45 Status d ceived 0x48 Rec med 0x44 0x10 0x34 0x01 0x15 0x45 Se
55. sense the increment of water remotely at distance In order to do so block diagram for the whole system is developed and the function for each block 1s clarified Figure 3 1 shows the block diagram of the overall system For this project water sensor can only sense four increment of the water level Then this level is send to the microcontroller at transmitter board for processing The processor of transmitter end will process the data by creating a data frame to be transmitted to the receiver node through USART This data frame represent in form of digital signal 0 and 1 In order to be transmitted wirelessly the data must be transformed into analog signal RF Module will modulate the data to analog signal using Amplitude modulation Afterwards this signal will be 12 Micro controller Micro Module controller Figure 3 1 Block Diagram of Water sensors System At the receiver end RF Module will capture the signal and demodulate into the original data This data then will be passed to the microcontroller for further process The process that involve in receiver includes checking whether the data 15 free from error then send to the PC and display on LED If the data contained any error the data will be discarded and alert user through PC Whenever the water exceeds the forth level an alarm will be on The thesis describes in details the methodology that 1s used to develop the receiver node in term of hardware and software The dev
56. ser Interface CONCLUSION AND FUTURE WORKS 5 1 Conclusion viii 11 14 15 15 16 18 18 21 23 25 25 26 28 28 31 34 34 36 37 38 38 40 42 45 222 Future Works REFERENCESS APPENDICE 46 48 50 FIGURE NO 1 1 2 1 2 2 3 1 3 2 3 3 3 4 3 5 3 6 D 3 8 3 9 3 10 3 11 2412 3 13 3 14 3 15 3 16 3 17 3 18 3 19 3 20 4 1 LIST OF FIGURES TITLE Flash Flood that strike Kuala Lumpur The OSI layer Block Diagram of Superheterodyne Receiver Block Diagram of Water Sensors System Flow chart of developing the receiver node Block Diagram for Receiver node Pin Connection of RF Receiver Module Receiver Node Schematic diagram Receiver Node Prototypes Finishing Product Pin Configuration and Block Diagram of Max232 RS 232 Schematic RS 232 Interface Cable ISP Cable ISP Schematic Flow of Software development Window of Programmer Notepad WINAVR PonyProg2000 Window Application Flowchart for Receiver Node Frame Format Flow chart to detect error at Receiver End Flowchart for GUI development Visual Basic 6 0 window environment Form designed for Water Sensor System The receiver end prototype Top view b Side view PAGE 10 12 13 14 16 17 18 19 20 20 21 22 24 25 27 29 29 3 3 32 33 35 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 5 1 Output Window resulting from compilation Porting Hex code using Ponyprog200 software Measured Supply voltage for input p
57. ses which are environmental data collection security monitoring and sensor node tracking 4 majority of wireless sensor network application will fall into one of these classes The environment data collection 15 normally use by research scientist to collect several sensor readings from a set of points in an environment over a period of time in order to detect trends and interdependencies The data need to be collect for analyzing is usually from hundreds of points spread throughout the area Examples of environment sensory data are habitat monitoring humidity temperature etc The application of Water sensor system lies in this class The second class of sensor network application is security monitoring which composed of nodes that are placed at fixed locations throughout an environment that continually monitor one or more sensors to detect any variance A main difference between security monitoring and environmental monitoring is that security networks are not actually collecting any data Each node has to frequently check the status of its sensors then transmit a data report when there is a security violation Therefore the latency of the data communication across the network to the base station has a critical impact on application performance 4 A third class is the tracking of a tagged object through a region of space monitored by a sensor network Example of applications include as distance sensor velocity sensor object
58. size addr void UsART INIT unsigned int UBRR RE 376 D data 6 8388704 void USART_T lt XCunsigned char data bss o 8388710 unsigned char UsART Rx void noinit 8388710 5 eeprom 8454144 void delay 1m Cunsigned char 19 Eb aranges 20 void INIT void debug pubnames 121 unsigned char ADC READ void info 468 s debug 225 o void TMRO INIT void dabo Tine 581 0 debug st 192 int main void Total 1989 E 1 TX 0 warning TRANSMITTER s Size after unsigned char sen data UIPslip elf else section size addr warning RECEIVER PESE 376 data 6 8388704 unsigned char rx data ctr sensor dai hse 0 8388710 endif noinit O 8388710 eeprom o 8454144 unsigned char hdr 2 hf debug_aranges 20 o Iz ug pubnames 121 unsigned char add 2 12 debug info 468 unsigned char chksum debug abbrev 225 debug line 581 debug st 192 o Z Initialize PORTC TERIS d 1989 El DDRC Oxff 0 Errors none ZU rpuW 6 2 4 4 np 35 5 191 ANSI CR LF 5 Ready Figure 3 13 Window of Programmer Notepad WINAVR 26 The development tools for WINAVR includes the GNU compiler for and Assembler Linker Librarian File Converter other file utilities C Library Programmer software Debugger In circuit Emulator software Editor IDE and others support utilities The compile
59. ssor radios and sensor has lead to the used of wireless sensor communication humans life The application of WSN 15 very wide It can be used as habitat monitoring health monitoring and sensing others environmental data such as temperature humidity light water and etc remotely at distance The purpose of this project is to develop a sensor system which able to monitor increments of water level at computer Water sensor system consists of two nodes which are transmitter and receiver Transmitter will sense four levels increment of the water and sent to the receiver end wirelessly Then the receiver will capture the signal demodulate process data display on LEDs and send to PC Water sensor system can be used as an early warning system to monitor flood This report elaborates the development of receiver node that includes the hardware and software design The receiver node 1s built using ATmega8535 as it processor superheterodyne receiver module as it communication tool and computer to display the sensor value This system implements the non standard protocol for point to point communication between two nodes All programming is written in C language GUI 15 also developed as an additional feature to the system using VB 6 0 The results obtained in this project are taken using USART terminal oscilloscope and GUI interface It is observed that the frame sent 15 successfully received and displayed at the receiver end with very small time inte
60. t frequency 15 called the intermediate frequency or IF In typical Medium Wave home receivers that frequency 15 455 kHz for FM receivers it is usually 10 7 MHz 10 RF Amplitier Mixer Filter IF Amplifier Demodulator Audio Amplifier Local Figure 2 2 Block Diagram of Superheterodyne Receiver Heterodyne receivers beat or heterodyne a frequency from a local oscillator within the receiver with all the incoming signals mixer the local oscillator signal will multiplies with the incoming signal producing beat frequencies both above and below the incoming signal The mixer stage produces outputs at both the sum of the two input frequencies and at the difference Either the higher or the lower typically 15 chosen as the IF which 15 amplified and then demodulated 5 The advantage of Superheterodyne receiver is that most of the radio s signal path has to be sensitive to only a narrow range of frequencies Only the front end the part before the frequency converter stage needs to be sensitive to a wide frequency range For example the front end might need to be sensitive to 30 MHz while the rest of the radio might need to be sensitive only to 455 kHz a typical IF frequency Other than that it also has superior characteristics to simpler receiver types in frequency stability and selectivity 5 CHAPTER 3 RECEIVER NODE DEVELOPMENT 3 1 Introduction The purpose of water sensor system is to
61. t has only two nodes It 1s suggested that more then two nodes is used to create a network Function of the receiver node 15 to receive display the water level These features can be enhanced by form a database system so that interested parties can have access to the system through the Internet 48 REFERENCES William Stallings Data and Computer Communication 7 edition Prentice Hall Behrouz A Forouzan Data Communication and Networking 274 edition McGraw Hill International Edition 2000 Permanent Flood Commission Committee Web page URL http agrolink moa my did river r fcom html Jason Lester Hill System Architecture for Wireless Sensor Networks University of California Berkeley Spring 2003 Web page URL www eecs harvard edu mdw course cs263 papers hill thesis pdf Answer com Superheterodyen Web page URL www answer com National Instrument ntroduction to RF amp Wireless Communications Systems Web page URL http zone ni com devzone cda tut p 1d 3541 Warsurina Bt Mat Jubadi Embedded TCP IP in Sensor Nodes SENSORNETS Universiti Teknologi Malaysia November 2005 MAXIM Fundamentals of RS 232 Serial Communications Application notes Web page URL http www maximic com appnotes cfm appnote number 3262 10 11 12 13 14 15 16 49 Brian W Kerninghan Dennis M Ritchie The C programming Language 25 edition Prentice Hall WIN AVR AVRfreaks Web pa
62. table from ELF output file sym elf 60 MSG SYMBOL TABLE SQ avr nm n 5 lt gt S Link create ELF output file from object files SECONDARY 5 TARGET elf PRECIOUS OBJ 54081 echo Qecho S MSG LINKING SQ CC S ALL CFLAGS OBJ output 80 LDFLAGS Compile create object files from C source files aO Uis echo echo MSG COMPILING lt Sd OC DCABD CENAGSO a Compile create assembler files from C source files Se d S CC CFLAGS Assemble create object files from assembler source files Seo a echo echo S MSG ASSEMBLING lt CC S ALL ASPLAGS lt o 504 Large clean begin clean list finished end clean list echo echo S MSG CLEANING 5 REMOVE 5 REMOVE 5 TARGET 5 REMOVE 5 TARGET 0 S REMOVE 5 TARGET S REMOVE 5 TARGET elf S REMOVE TARGET map 5 REMOVE TARGET 0 5 REMOVE 5 TARGET 90 5 REMOVE TARGET sym 5 REMOVE TARGET 1 5 REMOVE 5 TARGET 155 S REMOVE OBJ S REMOVE LST 61 REMOVE REMOVE SRC C Ss 5 5 5 5 5 Automatically generate source code dependencies Code originally taken from the GNU make user manual and modified See README txt Credits Note that this will work with sh bash and sed th
63. tracking etc Unlike sensing or security networks node tracking applications will continually have topology changes as nodes move through the network 4 The second element of wireless sensor system is CPU The purposes of CPU are for data processing and perform standard communication protocol The TCP IP point to point or other non standard protocol may be embedded into the processor to make the communication possible between nodes The concept of wireless sensor system 1s to monitor the sensory data remotely from the actual observable area Therefore the radio frequency communication 15 required for data transmission in long range distance 2 1 Network Modeling The communication protocol is the key element in data transmission for Wireless Sensor System It 1s the set of rules governing the exchange of data between 2 entities It 1s used for communication between entities the system 1 In communication system the task 1s broken up into modules The services offered by the modules are grouped into layers where each layer provide used service to provide by other layers There are two types of standard layering model in data communication which are TCP IP and OSI Model Open System Interconnection OSI model is a set of protocols that attempt to define and standardize the data communications process The OSI model is set by the International Standards Organization ISO The OSI model has the support of most major computer a
64. ware alf avr910 avrisp bascom bsd dt006 pavr picoweb pony stk200 12 stk200 stk500 Type avrdude c tO wet a full H H AVRDUDE PROGRAMMER stk500 AVRDUDE PORT programmer connected to serial device AVRDUDE_PORT programmer connected to parallel port AVRDUDE WRITE FLASH U flash w TARGET hex TfAVRDUDE WRITE EEPROM U eeprom w S TARGET eep AVRDUDE FLAGS p 5 P S AVRDUDE PORT c 5 PROGRAMMER Uncomment the following if you want avrdude s erase cycle counter Note that this counter needs to be initialized first using Yn see avrdude manual AVRDUDE_ERASE y 57 Uncomment the following if you do not wish verification to be performed after programming the device TAVRDUDE FLAGS V Increase verbosity level Please use this when submitting bug reports about avrdude See lt http savannah nongnu org projects avrdude gt to submit bug reports AVRDUDE_ FLAGS v Define directories if needed DIRAVR c winavr DIRAVRBIN S DIRAVR DIBAVBUTILS S DIRAVE Uti bin DIRINC DIRLIB SA DTRAVR avry LID Define programs and commands SHELL sh CC Avr OBJCOPY avr objcopy OBJDUMP avr objdump SIZE avr size Programming support using avrdude AVRDUDE avrdude REMOVE rm f COPY HEXSIZE S SIZE target FORMAT 5 TARGE
65. warning from responsible body to the residence Resulting resident has no opportunity to take a precaution action Stack up water supply 46 5 1 Future work Event though water sensor system 1s considered success however it 1s only a prototype and there are still has some weaknesses that need to be improved In future few modifications can be done for real implementation It is suggested that instead of using transmitter and receiver module transceiver also be used so that communication both ways can be applied This Water sensor system use non standard protocol Hence the application is limited for that system network only This system can be improved by using common standard protocol such as point to point or TCP IP so that the system can be deployed in real network application For TCP IP MicroIP can be used along with operating system application such as TinyOS or RT OS The hardware designed in this project used strip board resulting large module size This size of module can be reduced by using PCB The PCB designed can be done via many tools and one of widely used tool is DXP Protel Figure 5 1 shows the receiver node design Figure 5 1 The PCB Design for Receiver module 47 Other than that water sensor used in this project 1s rather simple and cheap It has the ability to measure only four level of water This feature can be 1mproved by using water sensor with better features Lastly since this projec
Download Pdf Manuals
Related Search
Related Contents
Self contained cubers manual de instruções termo de garantia manual de instruções termo Regmaster Reg6 AVR Manual manual de instruções do alicate terrômetro modelo tr-5700 InviMag Blood DNA Mini Kit/ KFmL User manual Fluke (cat_2005) rev_C.qxp - Bagarel Comercio de Instrumentos Lochinvar SB-1500 User's Manual INSTRUCCIONS SPRINT LOW OK 図 面 1 Copyright © All rights reserved.
Failed to retrieve file