Author’s full name : Date of birth Title : :


Academic Session :


I declare that this thesis is classified as:
(Contains confidential information under the Official Secret Act 1972)* (Contains restricted information as specified by the organisation where research was done)* I agree that my thesis to be published as online open access (full text)

I acknowledged that Universiti Teknologi Malaysia reserves the right as follows: 1. The thesis is the property of Universiti Teknologi Malaysia. 2. The Library of Universiti Teknologi Malaysia has the right to make copies for the purpose of research only. 3. The Library has the right to make copies of the thesis for academic exchange. Certified by:






* 25 APRIL If the 2010 thesis is CONFIDENTIAL or RESTRICTED, please with the letter from Date: Date : 25 attach APRIL 2010
the organisation with period and reasons for confidentiality or restriction.

“I acknowledge that I have studied this piece of work and in my opinion it is in accordance with the scope requirement and quality for the purpose of awarding the Bachelor of Engineering (Electrical – Control and Instrumentation)”

Signature Name of Supervisor Date




A report submitted in partial fulfillment of the requirements for the award of the degree of Bachelor of Engineering (Electrical – Control and Instrumentation)

Faculty of Electrical Engineering Universiti Teknologi Malaysia

JUNE 2012


“I declare that this thesis entitled “Designing Sensor System for Detecting Chicken Movement and Behavior” is the result of my own research except as cited in the references. The thesis has not been accepted for any degree and is not concurrently submitted in candidature of any other degree”

Signature Name Date

: : :

............................................. MOHD FARID BIN ABD AZIZ JUNE 2012

family.iii To my beloved wife. love and encouragement. . I thank you all. and to all my friends for your help and support. family-in-laws. Thank you for your prayer. To all the lecturers who have guided me. brothers and sisters.

the deepest appreciation goes to my family and family-in-laws. Mohd Fauzi bin Othman for his valuable guidance. fortune and health to finish my final year project throughout these two semesters. support and suggestion. this project would not able to be presented here. Without his support and interest.iv ACKNOWLEDGEMENT ‘In The Name of Allah. Firstly.W. . The Most Gracious and The most Merciful’ Alhamdulillah. Thanks for the encouragement. whose have been most tolerant and support I’ve all these years.T for giving me the intelligence. Dr. with all praise and gratitude to Allah S. Also. I would like to express my deepest thanks to my supervisor. strength. love and emotional support that all of you had given me Lastly. I would like to thank to all of my friends for their endless support and assistance at various occasions.

Here. . An unhealthy chicken rarely moves (inactive) and loses its appetite. the movement of a chicken is detected using an accelerometer sensor. The data received by the receiver or base station will be processed and then shown on a gravity graph consisting of a three-axis of accelerometer data. Usually the healthiness of a chicken is related to its movement.v ABSTRACT The development of this sensor system is to detect early sickness of chickens in a real situation. The saved data can be used for non-real time monitoring graph by using MATLAB. The data is then displayed using LabVIEW where it displays the real time data. The wireless communication application is used because a poultry farm covers a very wide area and it can transmit the data more efficiently compared to using wire. The processed data will also be saved for future analysis. The data obtained from the accelerometer sensor is transmitted wirelessly from the chicken to the receiver or base station (monitoring station).

. Data yang diterima oleh stesen penerima atau receiver akan diproses dan kemudian dipaparkan pada graf graviti yang terdiri daripada paksi tiga data pecutan. Aplikasi komunikasi tanpa wayar digunakan kerana ladang ayam meliputi kawasan yang sangat luas dan ia boleh menghantar data lebih lancar berbandingkan dengan komunikasi menggunakan wayar.vi ABSTRAK Pembangunan sistem sensor ini adalah untuk mengesan penyakit awal ayam dalam situasi sebenar. Data yang disimpan boleh digunakan untuk graf bukan masa-sebenar dengan menggunakan MATLAB. Disini. pergerakan ayam dikesan menggunakan sensor accelerometer. Biasanya kesihatan ayam berkaitan dengan pergerakannya. Ayam yang tidak sihat kebiasaannya jarang bergerak (tidak aktif) dan hilang selera makan. Data yang diproses juga akan disimpan untuk analisis masa depan. Data yang diperolehi daripada sensor accelerometer dihantar dengan komunikasi tanpa wayar dari ayam kepada stesen penerima atau receiver (stesen pemantauan). Data kemudiannya dipaparkan menggunakan LabVIEW di mana ia memaparkan graf data masa sebenar.

4 Objective 1.3 Accelerometer 2.6 Summary of Work 1 1 2 2 3 4 2 LITERATURE REVIEW 2.5 Scope 1.1 Positioning Algorithm of Accelerometer 6 6 7 8 .1 Introduction 1.vii TABLE OF CONTENTS CHAPTER DECLARATION DEDICATION TITLE PAGE ii iii iv v vi vii x xi xiii xiv ACKNOWLEDGEMENTS ABSTRACT ABSTRAK TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES LIST OF EQUATIONS LIST OF APPENDICES 1 INTRODUCTION 1.3 Problem Statement 1.1 Introduction 2.3.2 Project Background 1.2 Chicken Sickness Symptoms 2.

4 Hardware Implementation(Receiver) 3.1 Technology Overview 2.3.4 Full System Testing Discussion 30 30 31 32 37 .1 Introduction 5.2 Full System Operation 27 27 5 RESULT AND DISCUSSION 5.4.1 Introduction 4.viii 2.6 Programming Software 3 METHODOLOGY 3.3 Hardware Implementation(Transmitter) 3.2.3 Receiver Testing 5.1 Introduction System Overview 3.4 5V Voltage regulator Interface ADXL335 with Arduino Interface Arduino with X-Bee module Transmitter circuit 3.2 X-Bee wireless module application 2.2 3.5 Communication between Two X-Bee 3.2 Accelerometer application 9 10 11 12 13 14 The methodology flow 15 15 16 19 19 20 20 21 22 22 23 25 3.3 3.4 X-Bee Wireless Protocol 2.5 Arduino Microcontroller Board 2.6 Software Implementation 4 SYSTEM DESIGN 4.1 3.2 Transmitter Testing 5.1 Interface X-Bee shield with Arduino 3.

3 Recommendation 39 39 40 REFERENCES 41 APPENDICES 43 .2 Conclusion 6.1 Introduction 6.ix 6 CONCLUSION AND RECOMMENDATION 6.


8 3.xi LIST OF FIGURES FIGURE NO.2 2.6 3.4 3.9 3.1 2.2 5.1 5.7 3.1 4.5 3.4 TITLE Sample signal of accelerometer Comparison between RF modules Mesh topology Mesh architecture reliability Methodology flow Voltage regulator circuit Connection between Arduino and accelerometer Connection between Arduino and X-Bee Transmitter Circuit Set up for receiver Setting for transmitter Setting for receiver LabVIEW block diagram LabVIEW front panel Full system operation Flow chart for system operation Transmitter testing Receiver testing Transmitter is attached to the chicken’s body Receiver in a standby mode PAGE 9 11 12 13 16 19 20 21 22 23 24 24 26 26 29 30 31 32 33 34 .2 3.3 5.3 2.1 3.2 5.4 3. 2.3 3.10 4.

7 5.9 Result from serial monitor Result from LabVIEW Chicken in static condition Chicken in walking condition Chicken in running condition 34 36 37 37 38 .5 5.xii 5.8 5.6 5.

xiii LIST OF EQUATIONS EQUATION NO.1 TITLE Formula for acceleration and velocity PAGE 8 . 2.

xiv LIST OF APPENDICES APPENDICES A B C D E F TITLE Arduino Coding for Accelerometer Sensor Accelerometer Circuit Diagram Arduino UNO Datasheet Accelerometer Datasheet X-Bee Datasheet X-Bee shield Diagram PAGE 43 45 46 55 59 64 .

The low price compared to meat makes chicken a popular alternative and in demand by customers.2 Project Background Chicken meat is one of best sources of protein required by our society. 1. In addition.1 Introduction This chapter will discuss the project background. scope and summary of work. Furthermore. objective. Usually. the important factor in operating the poultry farm is the health condition factor of the chickens. where it will be very active. the health of the chicken is related to its activeness. Usually.CHAPTER 1 INTRODUCTION 1. problem statement. the cost for operating the chicken stock is cheaper compared to beef cattle. When a chicken is unhealthy. it will not move regularly compared to a healthy chicken. this chapter will lay out the trend of this project in the market. .

this project was designed to detect the early sickness of chickens. many sicknesses and viruses can attack poultry farm industries. This method is more reasonable compared to the wired method. 1. analysis is performed to understand the . The. the early sickness chickens can be detected just by looking at the chicken movement and analyzing its behavior. data from the transmitter is then transmitted wirelessly. The wireless system is more convenient when it comes to a large poultry area. The latest virus is the Avian Influenza (bird flu). Nowadays. By designing this system. Firstly. The advancement in technology can overcome this problem where the sensor is designed to detect sick chickens. In addition.2 Sometimes.3 Problem Statement There are four problem statements for this project. the wireless system also provides the data to be sent wirelessly from the chicken coop to the receiver for monitoring the chicken movement behavior 1. farmers are not aware about the health of their chickens.4 Objective The main objective of the project is to design the system for detecting chicken movement. The greater the number of chickens in the poultry farm the harder for them to detect which chicken is sick. From the chicken movement.

the components for the transmitter consist of accelerometer sensor. Usually an inactive chicken would be considered unhealthy. X-Bee wireless communication technology is implemented as a communication between this transmitter and receiver. In the software part. X-Bee wireless module and voltage regulator. the receiver will process the data and shown on a real time graph. For monitoring signals from the sensor. Arduino microcontroller board. X-Bee wireless module and XBee shield. C language is used for the transmitter.5 Scope The scope of this project is to design a transmitter and receiver pair which can cater the important features for data transmitting and receiving. The Labview will show the real time graph. which are hardware and software parts. There are two categories of chicken behavior. Then. . the storage system data will save the data received for further analysis. In the hardware part. either the chicken is active or inactive. the software used is Labview. 1. Lastly. This project consists of two major parts. The movements’ data from the sensor must be transmitted wirelessly from the chicken to the receiver using X-Bee wireless module. in which the data from the accelerometer sensor will be processed before transmission.3 behavior of the chicken. The receiver consists of Arduino microcontroller board. and the gravity value for data saving.

6 Summary of Work Implementation and work of the project during the first and second semesters are summarized into a Gantt chart as shown in the next page. The range of communication between the transmitter and receiver can be up to 100 meters without blocking and suitable to be applied for a poultry farm with an area of 300x300 meters square.4 At the end of this project. 1. . one transmitter and one receiver are produced.

5 Table 1: Research schedule for FYP-1 Week Task FYP briefing Literature review Investigating of simulation model FYP-1 presentation Writing a report Submit the report 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Table 2: Research schedule for FYP-2 Week Task Hardware part Software part Running the system FYP-2 seminar Complete submit thesis and 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 .

The poultry farmer will detect the sickness of the . 2. In addition. it will reduce its movement activity and its appetite also become poor. When it is sick for a long period. the sensing method of accelerometer sensor and the application of X-Bee wireless module.1 Introduction This chapter includes the study on related projects and the gathering of information from related technical papers and published journals.CHAPTER 2 LITERATURE REVIEW 2. the Arduino microcontroller which uses the ATmega 328 microcontroller. This is to avoid becoming prey any predator.2 Chicken Sickness Symptoms A sick chicken works hard not to show any sign of weakness and sickness. it will not able to hide its condition. there will be a brief introduction on chicken sickness symptoms. Usually.

Static acceleration entangles only tilt sensing while dynamic acceleration involves motion. y-axis and z-axis. Accelerometer has two types of detection which are static acceleration and dynamic acceleration.3 Accelerometer Accelerometer sensors measure the acceleration experienced by the sensor and anything to which the sensor is directly attached [1]. tripe axis accelerometer sensor will be used which consists x-axis. For this chapter. Normally.7 chicken from poultry manure. included healthy chicken ones. shock and vibration sensing. For this project. the unhealthy chicken will produce thin and light poultry manure. Dynamic acceleration allows the changes of gravity values when there are changes in position. the antidote will be given to all chicken in the coop. Then. only dynamic acceleration will be discussed. This application is suitable for measuring and . [8] These are the factors that contribute to the sickness chicken        Injury Virus infection Hypo or hyperthermia (too cool or too hot environment) Old age Malnutrition Lack of sunshine or fresh air Poisoned 2.

2. if we want to find the position data of an object. we must do double integration of acceleration. In addition.1 Positioning Algorithm of Accelerometer To ensure that the accelerometer functions as a sensor. It can also be defined as the rate of change of velocity of the object. accelerometer will change gravity values when there are changes in the axis position [6].1: Formula for acceleration and velocity However.1. the rate of change of velocity can be defined as in Equation 2. Firstly.3. Hence. accelerometer can be defined as a sensor that measures the acceleration experience and anything to which the sensor is directly attached. The double integration can be defined as the area below the curve as shown in Figure 2.1. .8 detecting chicken’s motion. The integral is the sum of very a small areas where the width value is almost zero [6]. we must understand the poisoning algorithm of accelerometer. Equation 2.

zero reference must be taken into account. For pet monitoring. .1: Sample signal of accelerometer However. The children’s activities will be recorded and the data will be analyzed to determine whether the children are active or not. So. four healthy dogs are chosen and five identical accelerometers are attached to each dog to get the output. there are losses in the sampling which affect the accuracy in the obtained data in a real situation case. we can determine the potential reasons of why some children become active [15]. the accelerometer is used for monitoring spontaneous activity in dogs. 3. One of the applications is for measuring the physical activity in children.3.2 Accelerometer application This accelerometer sensor can be used for various applications. In this project. Then the dogs are placed at . This application is designed to measure the physical activity level of children. Then.9 Figure 2.

These modules use the IEEE 802. X-Bee is a LR-WPAN technology and is built up from the lower layers of IEEE 802. . The data then are analyzed to determine which place is the most convenient to them [16]. the X-Bee standard defines the higher-level network and application layers as well as the security services [7]. the alarm will be ON to alert the people around that area [17].15.15.4 standard as a baseline and adds additional routing and networking functionality.4 LR-WPA standard. While the 802. 2. It is designed to fulfill the low power and low cost wireless requirement [5]. For environment monitoring. This module is an embedded solution reserving wireless-end-point connectivity to a device. When a slight change in angle value occurs.4 X-Bee Wireless Protocol X-Bee is a set protocol that uses the 802. These groups of companies developed a network protocol that can be used in a variety of commercial and industrial low data rate applications. the accelerometer is used for monitoring earthquake and landslide.10 different locations and the data from the dogs are recorded.15.4 networking protocol for fast-to-multipoint or peer-to-peer networking.4 standard defies the lower-level Physical and MAC layers.15. The X-Bee Alliance developed the X-Bee protocol and it was a group of companies working in cooperation.

4. X-Bee has a capability for low power applications. It fits well into embedded systems and those markets where reliability and versatility are important but not in high bandwidth.3. The 802. but offers fewer throughputs. The IEEE is a technical professional association that has put out numerous standards to encourage growth and interoperability of existing and latest technologies.11 2. The primary advantage of X-Bee lies in its ability to provide low power consumption and extended battery life. Figure 2.1 Technology Overview The 802.15.4 is a standard for wireless communication approved by the Institute of Electrical and Electronics Engineers (IEEE).2: Comparison between RF protocols .4 standard also permits the communication for point-to-point or point-to-multipoint configuration [7].15. The lower data rate of the X-Bee device allows for better sensitivity and range. There is a comparison of features with other wireless technologies and their different applications are shown in Figure 2.

Figure 2. This method will help the farmer to monitoring their farms. The most popular application for environment monitoring is in agriculture. avoiding the need to communicate with each other through a base station [14].2 X-Bee wireless module application By using X-Bee wireless module.12 2. the Mesh topology method will be installed around the farm. it will find the other nearest sensor node to transmit the data. The sensor used will be for movement detection like infrared sensor for detecting the presence of thieves. For a wide area. Figure 2. Mesh topology is multi-hopping system where the wireless systems nodes communicate with each other to hop the data from the sensor node to the base station. the wireless sensor can pass the command to each other in a mesh network. the farmer will install the wireless sensor network around the farm.3: Mesh topology . Then. X-Bee wireless module is a suitable and convenient method for data transmission. If a sensor node fails. Commonly. Usually.3 shows the mesh topology overview. many applications can be done.4.

5 Arduino Microcontroller Board Arduino microcontroller board is a popular open-source board microcontroller that is used electronics in multidisciplinary electronic application. Arduino microcontroller board is programmed using a Wiring-based language. The software of Arduino microcontroller board consists of a standard program language compiler and the boot loader that runs on the board [9].4: Mesh architecture reliability 2. The Arduino UNO board is used for this thesis because it is commonly used and is also cheaper compared to other boards. This hardware provides a simple open hardware designed with an Atmel AVR processor and on-board input and output support. .13 Figure 2. modification and processing-based integrated development environment. similar to C++ with slight simplifications.

financial modeling and analysis and computation biology. In additional. processing.14 2. a test sequencing and management environment. The front panel defines the input and output for the given node through the connector panel. visualization and numerical computation. the technical computer problem can be solved faster than traditional programming language such as C programming. with the front panel serving as a user interface or when dropped as a node onto the block diagram. test and measurement. MATLAB can be used in a wide range of applications. MATLAB is a programming environment for algorithm development. MATLAB application is used for modeling and analysis of the data from the receiver. data analysis. For this thesis. C++ programming and Fortran [8].6 Programming Software The programming software used for this thesis is LabVIEW and MATLAB software. . the data logging and communication port also provides the data for both current and future analysis [8]. It is a powerful system design software for tasks performed by engineers and scientists. communications. For this thesis. By using MATLAB. The graphical approach also allows non-programmers to build programs by dragging and dropping virtual representations of lab equipment with which they are already familiar. control design. A VI can either run as a program. It consists of signal and image. the LabVIEW software will be used to show real time graph of chicken movement. LabVIEW is a graphical development environment software provided by the National Instrument Company and provides Virtual Instrument (VI) tools. Then.

For the transmitter. . electronics and software. For the sensor part. The accelerometer will detect the movement sensor for the chicken. it consists of a power supply part and sensor system part. 3. the main brain will be Arduino microcontroller board which uses Atmel AVR processor. the desired voltage can be obtained.2 System Overview This system consists of two major parts which are the transmitter and receiver.1 Introduction This chapter explains the system overview and flow of the final year thesis and the function of the main component for mechanisms.CHAPTER 3 METHODOLOGY 3. Lithium polymer battery was used to supply the microcontroller board. Yet. By using a voltage regulator. The power supply system has to supply 5V to the Arduino microcontroller board. the voltage must be regulated first because the voltage requirement cannot exceed 5V.

2. Literature review Firstly.1 The methodology flow i. after obtaining the title of thesis. Regarding the wireless . The gravity value will be sent wirelessly using X-Bee wireless module. Study on the technology required Fabrication stage 5: Circuit repairing Fabrication stage 6: Transmitter-Receiver connectivity checking Fabrication stage 1: Circuit Design Fabrication stage 4: Circuit testing Fabrication stage 7: Programming Fabrication stage 2: Select the suitable component Fabrication stage 3: Circuit constuction Analysis and test: Documentation Figure 3.1 will show the design system flow for the whole thesis. the receiver will receive the output to be displayed at the computer.16 The output will be the gravity value of the accelerometer sensor. Figure 3.1: Methodology flow 3. From there we were able to gather important information about chicken behavior such as when it became sick and also information on wireless accelerometer. The output will display a real time waveform. Then. Literature review. internet research was made relating to chicken sickness symptoms and wireless accelerometer.

the measurement was done at the sensor by . Then. the circuit was supplied with 5V to the Arduino microcontroller board. the required components to fabricate the system is also obtained. ii. iv. Fabrication stage 3: Circuit construction The constructions of the transmitter require high degree of patience. the Arduino microcontroller board would distribute power to the accelerometer sensor and X-Bee wireless module. Fabrication stage 2: Select the suitable component This process must be done carefully because the components were costly. v. After successfully designing the circuit. Firstly. only the transmitter part that needed to be designed. Fabrication stage 4: Circuit testing After finishing circuit the construction. iii. Furthermore. One LED indicator was placed on the circuit to indicate that the circuit functions properly. Some components were also very sensitive.17 accelerometer sensor. the circuit must be tested to ensure that it functioned properly. Then. the circuit construction was carried out. It was because all the components had to be soldered on the strip board. Fabrication stage 1: Circuit design For this thesis. information from previous thesis done by graduates from FKE Digital Library are also referred.

the reading will occur by using this software. ix. The language for the programming is the C language. Fabrication stage 5: Circuit repairing While the circuit construction was underway. Analysis and test: Documentation The sensor and wireless transmission devices were tested again to ensure that the system functions properly. vii. viii. vi. Fabrication stage 7: Programming This stage involved writing the program which detected the movement of the chicken. When the source and destination addresses were matched between two X-Bee wireless modules.18 placing a voltmeter at the accelerometer’s axis and grounding. Fabrication stage 6: Transmitter-Receiver connectivity checking Connectivity between transmitter and receiver can be checked by using X-CTU software. errors would occur when resistor values were wrongly chosen and grounding wrongly system connected to the component. there were some errors during the installation. . Usually. Every changes of axis would change the output voltage from the sensor.

The complete circuit is shown in Figure 3.19 3. 3. This section will discuss how the important components merged into a single transmitter system. Capacitor Switch Voltage Regulator Diode Figure 3. In additional. a diode is used to protect the LM7805 and microcontroller board from the opposite direction of the electric current.2: Voltage regulator circuit . The opposite direction electric current can damage the component on the board.1 5V Voltage regulator Since Arduino microcontroller board can only operate with a supply of 5V. voltage regulator circuit is needed.2. This circuit is implemented by using an LM7805 voltage regulator and a pair of coupling capacitor to reduce noise and stabilize the voltage signal.3. It can be proved because the accelerometer sensor is placed at the transmitter to detect chicken movement.3 Hardware Implementation(Transmitter) Transmitter is a very important part to ensure that this thesis was successfully implemented.

For this thesis. Figure 3.2 Interface ADXL335 with Arduino ADXL335 is the accelerometer sensor model used for this thesis.20 3. The output of this sensor is analog voltage relative to acceleration.3 Interface Arduino with X-Bee wireless module X-Bee wireless module was engineered to meet IEEE 802.3. the X-Bee modules are used as a data transmission between transmitter and receiver. By using Arduino microcontroller board. The processed signal from the accelerometer sensor will be sent out by . It supports the unique needs of low cost and low powered wireless sensor networks.3 shows the connection between Arduino microcontroller board and accelerometer sensor. the output from the accelerometer sensor will be sent to the TX pin for wireless data transmission.3.4 standard. Figure 3.3: Connection between Arduino and Accelerometer 3.15. It is a triple axis accelerometer that is designed by Analog Device where the sensor comes with a breakout board that simplifies the soldering work.

5 shows the combination between the Arduino microcontroller board and sensor breakout circuit.21 transmitter (TX) pin at the Arduino microcontroller board.4 Transmitter circuit Transmitter circuit is a combination between sensor breakout board and Arduino microcontroller.3. The connection between the Arduino and X-Bee wireless module is shown in Figure 3. Sensor breakout board consists of a soldered accelerometer sensor. . Figure 3.4. the X-Bee wireless module that be connected with the Arduino microcontroller board as mentioned before.4: Connection between Arduino and X-Bee 3. A 5V regulated circuit is used to supply power to the Arduino microcontroller board. Figure 3.

there are a few steps that must be followed. With these jumpers.4 Hardware Implementation(Receiver) The receiver functions as a data recipient from the transmitter circuit. After all steps have been made. the DOUT pin of the X-Bee wireless module is connected to RX pin of microcontroller and DIN is connected to TX. two jumpers must connected to the pins labeled XBee/USB. the Atmel processor must be removed from the Arduino microcontroller board.5: Transmitter circuit 3. Firstly. moving to the X-Bee shield. 3.22 Figure 3. Then. This situation determines that the X-bee’s serial communication be connected to the serial communication between the controller and FTDI USB-to-serial chip in the Arduino microcontroller board. Then. the calibration between X-Bee shield and Arduino .1 Interface X-Bee shield with Arduino To set up the receiver. the data received will be sent to the computer for display and analysis.4.

Figures 3. Figure 3.5 Communication Between Two X-Bee Before communication between two X-Bees can be done. there are a few steps required to set the X-Bee wireless module as a transmitter and receiver. the source and destination addresses for both modules must match.8 will show how to set the addresses for the transmitter and receiver.23 microcontroller board can be made. Firstly.6: Set up for receiver 3. . Then. To get a data transfer between modules.7 and 3. it is also used to distinguish a radio from the next and to prevent duplicate data packets. Figure 3. The source address (MY) prevents the for non-duplicate messages from being ignored as duplicate.6 shows all the steps taken to set up the receiver. The addresses of X-Bee wireless module can be set by using an X-CTU software. the destination address (DL) of the transmitting radio needs to match the MY of the receiving radio.

24 Figure 3.8: Setting for receiver .7: Setting for transmitter After the transmitter X-Bee module has been set up. replace the transmitter XBee module with the receiver X-Bee module. Figure 3.

9 will showns the software implementation using LabVIEW. For this section. Figure 3. Firstly. For the real time graph.25 3. For the transmitter. the software for the transmitter where the gravity value needs to be processed and sent to the TX and RX pins and the software for the receiver where the gravity value will convert into a graph. The programming will be attached to the Appendix section.6 Software Implementation This thesis needs two types of software. . only the software for the receiver can be shown. software from the LabView will be used. It is because the software from LabVIEW is easier compared to the other softwares. the C language programming is already done.

26 Figure 3.9:LabVIEW block diagram Figure 3.10: LabVIEWfront panel .

from the movement detected. X-Bee wireless module and . The Arduino microcontroller board will distribute of 3. 4. In order to detect sickness in them.2 Full System Operation The main purpose of this thesis is to study the movement of chicken. Therefore. the circuit will be regulated to 5V by a voltage regulated circuit. the data will be analyzed and the condition of the chicken can be determined.CHAPTER 4 SYSTEM DESIGN 4.3V supply to the accelerometer sensor. The system starts when the circuit is supplied with 7. As mentioned before. the Arduino microcontroller board can be operated at 5V.4V from Lithium Polymer battery. This 5V will be supplied to the Arduino microcontroller board.1 Introduction This chapter will discuss how the software designs and hardware designs are integrated to come out with the full system design.

the output from the accelerometer sensor will be sent to an Atmel processor on the Arduino microcontroller board. The data logger will save the data for further analysis or the non-realtime graph can be done by putting the data to the MATLAB software. Wireless data transmission can be done by connecting Arduino RX pin to DOUT X-Bee module and Arduino TX pin to DIN X-Bee module. After that. From the TX and RX pins. the Arduino is connected directly to the computer. the Atmel processor will process the data in the gravity value and the value will be sent to the TX and RX pins. Figure 4. the data will be transmitted to the receiver.28 LED indicator. data transmission will be done by the X-Bee wireless module. a real time graph and data logger will be shown.1 shows the flow of the system. . From the receiver. Then. The accelerometer sensor will then detect the chicken movement. By using a LabVIEW software. After that.

29 Figure 4.1: Full system operation .


1 Introduction This chapter discusses the result obtained for this thesis. 5.1: Transmitter testing .2 Transmitter Testing LED indicator will turn ON Sensor X-Bee Li-Po Battery Figure 5.CHAPTER 5 RESULT AND DISCUSSION 5.

the LED indicator will turn OFF and when the battery runs out of power. This is because the receiver is connected via USB cable from Arduino microcontroller board to USB computer device. the LED indicator will blink.2: Receiver testing The receiver is easy to test because it gets direct power from the computer. XBee wireless module and 5V voltage regulator. When the receiver is connected. The LED indicator will turn ON if the transmitter works well. If one of the components does not work.32 Figure 5.2 Receiver Testing LED indicator will be blinking Figure 5. The X-Bee shield does not function if the LED indicator is not blinking. 5. It shows that the X-Bee is ready to receive data from the transmitter. LED indicator from X-Bee shield blinks.1 shows the transmitter part consisting of an accelerometer sensor. .

Here. Before that.3 Full System Testing In this thesis.3: Transmitter is attached to the chicken’s body .3 and 5. First is the serial monitor application from the Arduino’s software.4 show the transmitter being attached to the chicken’s body and the receiver ready to receive the data.33 5. the transmitter should be attached to the chicken’s body and the receiver system in a standby mode. Figure 5. three types of software will be used to test its functionality. Figures 5. the gravity values will be shown but it does not provide a real time graph.

Gravity values Figure 5.34 Figure 5.5 shows the data received from the transmitter by using Arduino’s serial monitor software.4: Receiver in a standby mode When the transmitter is ON.5: Result from serial monitor . the transmitter will start sending data although the chicken does not move. Figure 5.

After that.8 and 5.7. The values represent the tri-axis of the accelerometer sensor which are xaxis. 5.7 From the result obtained.35 From the serial monitor. Figures 5. the value can also be copied and paste to MATLAB software for non-real time graph analysis. the results show three values received from the transmitter. y-axis and z-axis. the result obtained consists of tri-axis gravity value.9 will show the graphs using MATLAB. walking and running. A real time graph and data logger can be shown by using the LabVIEW software as demonstrated in Figure 5. . However. shows that real time graph consists of only one axis graph. for the data logger. The result from the data logger can be saved for future analysis. The results consist three conditions which are during the chicken is static.


Data logger

Real-time graph

Figure 5.6: Result from LabVIEW





Figure 5.7: Chicken in static condition

Figure 5.8: Chicken in walking condition


Figure 5.9: Chicken in running condition



Accelerometer sensor is suitable for detecting movement. When there are changes in the axis direction, it will change the gravity value. This is proven in the results obtained as shown in Figures 5.7, 5.8 and 5.9. From the results obtained, it shows that, when the chicken is static, the waveform of gravity values shows that the accelerometer sensor does not change much. However, when the chicken is walking, the changes of gravity values is more active compared to when the chicken is static. Then when the chicken is running, the changes of waveform for the gravity values is very active compared to when the chicken is in static and walking conditions. When the chicken is active, the graph will show the changes for every movement. During this situation, the chicken can be considered as healthy. If the output does not indicate any significant changes, the chicken would be considered as unhealthy or sick.





In this chapter, conclusion and recommendation for the thesis are discussed. For the conclusion part, the objectives of the thesis are explained as either archived or not. As for the recommendation, we give suggestion on how to improve the thesis quality in the future.



From the obtained result, it can be concluded that this thesis was conducted successfully. The objective of this thesis which is to design a sensor system to detecting chicken movement and behavior was achieved. In addition, other objectives such as wireless data transfer, real time monitoring and data logger were also accomplished.

This thesis successfully demonstrates the capability of the accelerometer sensor and X-Bee wireless module. The accelerometer sensor was able to detect the chicken movement and from the chicken movement, the behavior of the

his thesis also has some weaknesses. Also. the design of the system should include smaller components in the future. Firstly. The X. Furthermore. since the size of the transmitter is quite large it will be a burden to the chicken and causes it to become uncomfortable due to its size.3 Recommendation To reduce the weaknesses of this thesis. more extensive research should be done in order to overcome the delay in time of the transmission. However. There is time delay between the gravity values but that does not greatly affect the system. Furthermore. some improvements should be made.Bee wireless module was efficient in transmitting the data from the transmitter to the receiver. 6. One of the weaknesses of this system is regarding data transmission.40 chicken can be determined. the X-Bee wireless module can be used in a wide of range area within a maximum of 100 meters in radius. . this thesis can be used as a platform for future development in using the accelerometer and fully utilizing the sensor’s capability. To reduce large the size of the transmitter system.

41 REFERENCE 1." Faculty of Electrical Engineering. "Wireless Home Security System. May 11. R.wikipedia. "Using an Accelerometer Sensor to Measure Human Hand Motion. "Portable Video Game Using PIC18F452 & Accelerometer. K. WISP 2009. Lindon: MaxStream Inc." M. et al. b. H. Universiti Teknologi Malaysia. F. 5. 2009. Skudai. 2. 2000." Faculty of Electrical Engineering. C. Building Wireless Sensor Network. Faludi. 2007. A. Jimenez. 1 ed. Universiti Teknologi Malaysia. 2011. Ed.com . 2009. Skudai. Y. 2009. B. Universiti Teknologi Malaysia. "Wireless Smoke Detector System. B. Chueng. 1 ed. A. IEEE International Symposium on. Inc.. pp. "Xbee/Xbee-PRO OEM RF Module. Bee." in Intelligent Signal Processing. Skudai. 8. "A comparison of Pedestrian Dead-Reckoning algorithms using a low-cost MEMS IMU. Massachusetts Institute of Technology.: O'REILLY. 4. 3. 2011. Graham. 37-42. Hamid.. 6. K." Faculty of Electrical Engineering. www. "Electrical Engineering and Computer Science. R. 7. 2010.

" Faculty of Electrical Engineering. Saim. 17. D.php?f=32&t=29295 14. "MEM Accelerometer and Distributed sensing forRapid Earthquake Characterization.com/viewtopic.Lawrence.42 9.html 13. . Universiti Teknologi Malaysia. http://phys. Urbanext. F.edu/ayars/XBee/Software. Skudai.arduinoforums. www." 2007. http://iijean." 2010. H.for-measuring-physical-activity-behavior-in-children/ 16.com/2011/09/realtime-visualization-for. "Wireless Mesh Routing for Telemedical System.csuchico. http://forum. 2008. B. J. D. 15.theactigraph.html 12. Hansen.com/article/research-database/validation/ accelerometers.illinois.sparkfun. http://www.edu/eggs/res08-whatis.blogspot.html 11.com 10. "Evaluating of an Accelerometer for at-Home Monitoring of Spontaneous Activity in Dogs.

voltage // x-axis of the accelerometer // y-axis // z-axis (only on 3-axis models) void setup() { // initialize the serial communications: Serial. // Provide ground and power by using the analog inputs as normal // digital pins.begin(9600). // analog input pin 4 -. pinMode(powerpin.43 APPENDICES APPENDIX A Arduino Coding for Accelerometer Sensor const int groundpin = 18. const int zpin = A1. If you use the normal 5V and // GND pins on the Arduino. const int ypin = A2. . const int xpin = A3. OUTPUT). const int powerpin = 19. you can remove these lines. This makes it possible to directly connect the // breakout board to the Arduino.ground // analog input pin 5 -. pinMode(groundpin. OUTPUT).

print("\t"). HIGH). Serial. LOW). // print a tab between values: Serial. // delay before next reading: delay(100).println().print(analogRead(xpin)). Serial.print("\t"). } . // print a tab between values: Serial. digitalWrite(powerpin.print(analogRead(ypin)).44 digitalWrite(groundpin. } void loop() { // print the sensor values: Serial.print(analogRead(zpin)). Serial.

45 APPENDIX B Accelerometer connection diagram .

46 APPENDIX C Arduino UNO Datasheet .

47 .

48 .

49 .

50 .

51 .

52 .

53 .

54 .

55 APPENDIX D Accelerometer Datasheet .

56 .

57 .

58 .

59 APPENDIC E X-Bee Datasheet .

60 .

61 .

62 .

63 .

64 APPENDIX F X-Bee shield Diagram .

Sign up to vote on this title
UsefulNot useful