humidity sensor project


Published on

Published in: Design, Technology, Business
1 Comment
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

humidity sensor project

  1. 1. ECE503 PORTABLE HUMIDITY READER 20111.0 INTRODUCTION This section will give a precise description on prior elements or purposes of this project entitled the Portable Humidity Reader. 1.1 PROBLEM STATEMENT Nowadays, there are lacks of awareness to the significant of humidity in our life. Suitable humidity level is needed to stabilize our environment and the world ecosystem including to ourselves. The relative humidity in the air should be monitor in order to maintain an ideal environment. The common problem result by humidity such as dampness, dryness and condensation in surroundings cause discomfort and various problem to public. Too high or too low humidity level condition can affect the quality of wood furniture which needs an extra care of dry condition all the time. For certain industry such as chickens eggs hatching or even the incubation of immature new born chicks also needs a controlled humidity condition. In order to ensure energy efficient and optimized results, proper controlled system need to be designed. Development in sensor design lead sensor as main component to read some of the parameters and microcontroller features make it preferred choice embedded control to ease the end user to monitor the parameters, control devices and system operation. Hence we would like to propose this device that can read the humidity level and the temperature in order to help us be aware of humidity condition around us. 1.2 OBJECTIVES These are the objectives of our project; I. To design a portable electronic device that can read humidity and temperature level by using PIC 16F876A. II. To stimulate and design the PCB layout using ALTIUM. 1
  2. 2. ECE503 PORTABLE HUMIDITY READER 2011 1.3 SCOPE OF PROJECT Our project entitled Portable Humidity Reader is to read the level of humidity and temperature in a particular room. The project will be using a humidity sensor where the sensitivity is very high but quite costly as this is just the prototype of the device. The roughly operation of this device is that once the ON/OFF button is pressed once, the device will activated and the LCD will display both the reading of humidity level and also temperature level and also that the reading is displayed by output measured by the sensor continuously. The device will stop operating as the ON/OFF button is pressed once again. The device will need a battery of 9V but the voltage regulators will regulate the voltage to 5V for device usage. The size is about 16cm×11.5cm and hence it is quite handy for users. The accuracy of this device will be depending on our sensor’s sensitivity used. The limitation of our project is that the device is only specifically to display the reading of humidity and temperature on the LCD provided. But this device are portable and available everywhere.Figure 1.1 Block diagram of portable humidity sensor 2
  3. 3. ECE503 PORTABLE HUMIDITY READER 2011 1.4 STAKEHOLDER All engineering projects are collaborative efforts. This collaboration is notonly the software designer and hardware designer who need to work together, sharingdesign ideas, patterns, interfaces, architectures, standards, discovered faults and testresults but also between the users, and all other stakeholder. It could be argued that allengineering projects are generally made up of three dimension (i) softwareengineering; (ii) quality engineering and (iii) project management. The software engineering dimension deals with the specification and buildingof the system and focuses on activities such as requirement, design and development.The quality engineering aspect deals with conformity to standards, configuration andchange management. While the project management dimension deals with planning,scheduling, risk management and client management. The two most common scenarios that occur in engineering projects are that theend of the effort, the customer rejects the system that we done because does not fulfiltheir requirements and the cost and schedule of the project increasingly grows. Theknowledge base, institutional and operation mechanism and skills of stakeholders areall capacities that the project manager should access at the outset of the project. Being aware of a stakeholder’s strengths and weakness can inform the designand the design and implementation of project to help build the capacity ofstakeholders of participate effectively in the collaboration process. So in order to besuccessful, all project stakeholders must actively work with the team to achieve thesegoals. In our group, the stakeholder consists of software designer, hardware designerand project manager. This entire active role plays their task successfully. We discusstogether starting from collecting and analyzing information, defining priorities andsetting goals, deciding and planning project, managing projects, monitoring progressof the projects and evaluating results and impacts. 3
  4. 4. ECE503 PORTABLE HUMIDITY READER 2011 PROJECT MANAGER HARDWARE DESIGNER/ TROUBLESHOOTERNUR FATTAHIAH HASLAHUDDIN SYED SHAMSUL AZHAR SYED OTHMAN CUSTOMERS SOFTWARE DESIGNEREN EZRIL HISHAM MAT SAAD NORAZLIN MOHD RAZALIGROUP MEMBER OF EE2405A In conclusion, stakeholder participation within projects is both means and an end. As a means, cooperation and the collaboration between managers and stakeholders is the most important thing in the projects. As a end, participation on the projects is a process that empowers stakeholders through skills, knowledge and experience, leading to greater self-reliance and self-management. 4
  5. 5. ECE503 PORTABLE HUMIDITY READER 2011 1.4 DEFINITION, ACRONYMS AND ABBREVIATION Humidity: the concentration of water vapour in the air. it can be expressed by relative humidity, absolute humidity and specific humidity. This element depends on the temperature and it gives adverse effect not only towards human health in fact all life aspect. Relative humidity: the actual quantity of water vapour present in a given space expressed as a percentage of the quantity of water vapour that would be present in the same space under saturation conditions at the same temperature. Temperature:a degree of hotness. LED: light emitting diode (LED) are diodes (electronics component that let electricity pass in one direction that emit visible light when electricity is applied, much like a light bulb. LCD: stands for Liquid Crystal Display that are super-thin display that are used in computer screens and flat panel monitors. PCB: Printed Circuit Board that is a thin board made of fibreglass or a similar material. We used PCB in order to design our circuit. PIC: Peripherals Integrated Circuit. MPLAB: Microchip programmer (software) 2.0 GENERAL DESCRIPTION This section will specifically discuss the methodology to interfacethe sensor andhardware module. The most important part is to enable the analogue sensor to senseanalogue data and represent it in digital. It can be done with various techniques. One ofthe reliable techniques is to produce a relation between the sensor analogue range andmicrocontroller analogue to digital converter (ADC) specification. This relation is basedon some calculation and will be clearly explained in the next section After considering all the important software criteria, the flow of project continueswith the construction of hardware. The connection of sensor nodes and the relatedcomponent was built using printed circuit board (PCB). Before components were placed,the PCB design was sketched by using Altium Designer Summer09. 5
  6. 6. ECE503 PORTABLE HUMIDITY READER 2011Printed circuit board (PCB) This design work as a connection reference needed for hardware including sensornode interfacing with microcontroller. Most of the component in the designer doesnot represent the actual components due to the software limitations. However, the mainconcern is the exact holes connection. By following the layout, the complete designwas soldered. 6
  7. 7. ECE503 PORTABLE HUMIDITY READER 20112.1 SYSTEM FUNCTIONS 2.1.1HUMIDITY SENSOR Module Humidity sensor HSM-20G.Input 1. Batteries (9V),user button, temperature and humidity reading 2. Surrounding (environment) humidity.Output Humidity sensor will produce an analogue voltage then will go through into analogue digital converter(ADC) on microcontroller will give a digital voltage in order to get digital display the reading of temperature in RH (relative humidity) and temperature (Celsius) -ADCNO=0b10000001 send 1 to enable ADC at last bit. -ADCN1=0B01000100 send 0 to able ADC at last bit.Functionality To convert sensor reading to voltage output. 7
  8. 8. ECE503 PORTABLE HUMIDITY READER 2011 2.1.2 MICROCONTROLLER*28 pin-3 input ports, 14 interrupts, 5 analogue digital input channel Module PIC 16F876A Input Operates according to software programming commands. Output Turn LED -Send 1=active height -Send 0=active low the LCD display - register to set LCD mode RS at pin RB3 RW at pin RB2 E at pin RB1..2 LCD register need to be set(line,data width) Functionality Process data to carry out the tasks. 8
  9. 9. ECE503 PORTABLE HUMIDITY READER 2011 2.1.3 VOLTAGE REGULATORModule Voltage regulator (VR-7805)Input Voltage (9V)Output Output current up to 1A,ouput voltage of 5-24VFunctionality Built –in current limiting, thermal shutdown, safe-operating area protection which makes immune to damage from output overload. 2.1.4 UIC PROGRAMMERModule UIC programmerInput Reading from the sensor when PIC is onOutput Display the reading value at the LCDFunctionality To load software programming to the circuit. 2.1.5LCDModule LCD (DS-LCD-162A)Input Vr from power supply (battery) 9V DcOutput Display both temperature and humidity reading in voltage and degree Celsius (◦) respectively.Functionality Display reading detected from the sensor.Pin connection for LCD 9
  10. 10. ECE503 PORTABLE HUMIDITY READER 20111-GND 9-RC22-Vcc 10-RC3 Vdd=5V 10% Vss=0V3- Contrast (variable resistor) 11-RC4 Ta=25◦ c4-RB3 12-RC55-RB2 13-RC66-RB1 14-RC77- RCO 15-Vcc8-RC1 16-GND 2.2 USER INTERFACE Generally, the goal of human-machine interaction engineering is to produce auser interface which makes it easy, efficient, and enjoyable to operate a machine inthe way which produces the desired result. This generally means that the operatorneeds to provide minimal input to achieve the desired output, and also that themachine minimizes undesired outputs to the human. So our output is only to read thevalue of humidity of the environment and detect temperature. First user will ON themain switch to provide power to the circuit then sensor will operate that give aanalogue voltage that will give result in LCD. If the LCD is not give a reading usersneed to press button reset to give a PIC reset an operation. 2.2.1 SCHEMATIC DIAGRAM 10
  11. 11. ECE503 PORTABLE HUMIDITY READER 2011 The following picture shows the circuit created by using AltiumDesigner. 2.2.2 PCB2.2.3 FLOW CHART (HARDWARE) 11
  12. 12. ECE503 PORTABLE HUMIDITY READER 2011 2.2.4 CODING PROGRAMME #include <pic.h> //include PIC microcontroller library // configuration //========================================================================== __CONFIG ( 0x3F32 ); //PIC microcontroller configuration // define //========================================================================== #define rs RB3 //RS pin of LCD display #define rw RB2 //R/W pin of the LCD display #define e RB1 //E pin of the LCD display #define b_light RB0 //Backlight of LCD display (high to on) #define lcd_data PORTC //LCD display data PORT (8-bit) #define led1 RA2 //led 1 (active high) #define led2 RA5 //led 2 (active high) 12
  13. 13. ECE503 PORTABLE HUMIDITY READER 2011 // function prototype (every function must have a fucntionprototype) //========================================================================== void delay(unsigned long data); void send_config(unsigned char data); void send_char(unsigned char data); void lcd_goto(unsigned char data); void lcd_clr(void); void send_string(const char *s); void send_num(unsigned short data); unsigned char usart_rec(void); void beep_short(void); void beep_short2(void); void beep_long(void); unsigned char read_ad(unsigned char channel); // global variable //========================================================================== // main function //========================================================================== void main(void) { //assign variable unsigned char temp; //declare a temporaryvariable for reading ADC unsigned char mode; //declare a variable torepresent current mode //set I/O input output 13
  14. 14. ECE503 PORTABLE HUMIDITY READER 2011 TRISB = 0b11110000; //configure PORT B I/Odirection TRISA = 0b11011011; //configure PORT A I/Odirection TRISC = 0b00000000; //configure PORT C I/Odirection //configure lcd send_config(0b00000001); //clear display at lcd send_config(0b00000010); //Lcd Return to home send_config(0b00000110); //entry mode-cursor increase 1 send_config(0b00001100); //diplay on, cursor off and cursorblink off send_config(0b00111000); //function set //configure ADC ADCON0=0b10000001; //enable ADCconverter module ADCON1=0b01000100; //configure ADCand ANx pin //initial condition b_light=1; //on backlight lcd_clr(); //clear lcd lcd_goto(0); //set the lcd cursor tolocation 0 led1=1; //on led 1 led2=1; //off led 2 while(1) //infinity loop { 14
  15. 15. ECE503 PORTABLE HUMIDITY READER 2011 lcd_goto(0); //set lcdcursor to location 0 send_string("Humidity Sensor "); //display "Humidity Sensor" temp=read_ad(1); //read AN1(Humidity Sensor) lcd_goto(20); //set lcdcursor to location 20 send_num(temp); //display the analog value of the gas sensor } } // functions //========================================================================== void delay(unsigned long data) //delay function, the delay time { //depend on the given value for( ;data>0;data-=1); } void send_config(unsigned char data) //send lcd configuration { rw=0; //set lcd towrite mode rs=0; //set lcd toconfiguration mode lcd_data=data; //lcd data port = data e=1; //pulse e toconfirm the data delay(50); e=0; 15
  16. 16. ECE503 PORTABLE HUMIDITY READER 2011 delay(50); } void send_char(unsigned char data) //send lcd character { rw=0; //set lcd to writemode rs=1; //set lcd to displaymode lcd_data=data; //lcd data port = data e=1; //pulse e to confirmthe data delay(10); e=0; delay(10); } void lcd_goto(unsigned char data) //set the location of the lcd cursor { //if thegiven value is (0-15) the if(data<16) //cursor will be atthe upper line { //if thegiven value is (20-35) the send_config(0x80+data); //cursor will be at the lowerline } //location ofthe lcd cursor(2X16): else // ----------------------------------------------------- { // ||00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15| | data=data-20; // ||20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35| | send_config(0xc0+data); // ----------------------------------------------------- 16
  17. 17. ECE503 PORTABLE HUMIDITY READER 2011 } } void lcd_clr(void) //clear the lcd { send_config(0x01); delay(600); } void send_string(const char *s) //send a string to display in the lcd { unsigned char i=0; while (s && *s)send_char (*s++); } void send_num(unsigned short data) //function to display a value on lcddisplay { unsigned char tenthou,thou,hund,tenth; tenthou=data/10000; //get tenthousandvalue data=data%10000; thou=data/1000; //getthousand value data=data%1000; hund=data/100; //get hundred value data=data%100; tenth=data/10; //get tenth value data=data%10; //get unit value 17
  18. 18. ECE503 PORTABLE HUMIDITY READER 2011 send_char(0x30+tenthou); //display the tenthousand value send_char(0x30+thou); //display the thousand value send_char(0x30+hund); //display the hundred value send_char(0x30+tenth); //display the tenth value send_char(0x30+data); //display the unit value } unsigned char read_ad(unsigned char channel) //fucntion read analog input according to thegiven channel { unsigned char result; //declare a variablecall result switch(channel) { case 0: //ifchannel = 0 CHS2=0; //CHS2=0 CHS1=0; //CHS1=0 CHS0=0; //CHS0=0 break; case 1: //ifchannel = 1 CHS2=0; //CHS=0 CHS1=0; //CHS=0 CHS0=1; //CHS=1 break; } ADGO=1; //start ADC convertion 18
  19. 19. ECE503 PORTABLE HUMIDITY READER 2011 while(ADGO); //wait forADC convertion to complete result=ADRESH; //read the result return result; //return theresult } 2.3 GENERAL CONSTRAINTS General constraints specify information about what is and is not valid. They differ from other constraints in having no restrictions on means or form of expression. General constraints may be used to specify behaviors which are non-deterministic or unconstrained for example software limitation, hardware limitation and system limitation. 2.3.1SOFTWARE LIMITATION There are several software limitations on this project for example when using MPLAB IDE v8.30 we have to study in detail about this software and datasheet for the component such as sensor, LCD, and turn on LCD. The other limitation is failure in burning program in PIC because the requirement of burner to burn in PIC the voltage of the PIC must not less than 4.5V. The software under development is intended to be special-purpose software focused tightly on customer needs. As such,the software is not intended to serve a broad market or multiple customer, and the implementation of the software is not required to be compatible with multiple platforms or interface standards beyond those identification in the application design constraint. 2.3.2HARDWARE LIMITATION 19
  20. 20. ECE503 PORTABLE HUMIDITY READER 2011 This project has some mistake during using Altium designer summer09 forexample connection of ground and Vcc always interchange because the line is closetogether. Limitation that commonly occurs in circuit is polarity of the component. Inour case the polarity of LED is in inverse direction so LED will not light up. Actuallyon first design of PCB we forgot to put a switch on PIC that might be effect on ourresult at LCD because there no reset buttons the circuit. For LCD we have use 2 voltage regulator in order to get lighter backlight ofLCD, since that happen our voltage circuit drop about 4.3V whereas fail to burnprogram in PIC. so we already take a solution about this problem whereas the othervoltage regulator that supply to LCD have omitted and the other voltage regulator inresult the voltage increase about 4.8V to achieve in burn program. In other words troubleshooting is the best solution to achieve our goal ingetting perfect result. 2.3.3SYSTEM LIMITATION On the system limitation we focus on our budget because totally our project istoo expensive to compare the other item on market. Because this is prototype so theprice is not an issue due to troubleshooting and other. Our dimension on project is nottotally exact with our first assumption that it can be a portable unit since our PCB islarger than we expected.3.0 ASSUMPTIONS AND DEPENDENCIES 20
  21. 21. ECE503 PORTABLE HUMIDITY READER 2011Assumptions: the temperature is in range 0<temperature<100 degree Celsius. This project is suitable in Malaysia because the temperature of this country isnot more than 100 degree Celsius. So our portable will cannot detect the temperature.Dependency: Rapid review cycle People work best when information is fresh in their minds. Therefore, it isessential that documentation generated by the software development team be reviewas quickly as possible, while the discussions that resulted in the documentation arefresh in the minds of customer personal. A length review cycle typically leads to aproject becoming stagnant, and is one the leading causes of project abandonment.Dependency: device is too sensitive and easily damaged. Commonly the device that we use easily to broken when exposed to highertemperature, that why we have leg of PIC for example.4.0 REQUIREMENT DETAILS 21
  22. 22. ECE503 PORTABLE HUMIDITY READER 2011 Under this section, we will specifically describing the wholeprocedures/system required for making this project of Portable Humidity Reader as areality. Here, we also temp to clearly explain the system operation. 4.1 CUSTOMER REQUIREMENTS Basically, we firstly determined the purpose of this project and gatherinformation through various source for customer requirements. As to be discussed inthis final report, the Portable Humidity Reader should be capable as a monitoringsystem for sensing humidity in the air. For customer requirements, we were requiredto present the device as portable. Hence it is more energy efficient because the deviceonly needed a 9V battery to operate and therefore portable for customers usage whereever they in need for humidity monitoring. Due to these characteristics of our device,it is undeniable that this Portable Humidity Reader is handy and cost saving in termsof electrical supply. The other requirements for this project is that the device should be helpful toshow the reading of humidity sensor and here we present the data resulted by LCDprovided and the device also can be used by everyone through easily understandingfor units measured by the device. Through this Portable Humidity Reader , itrepresent the humidity level that will be expressed as relative humidity (RH) which isdetermined as a ratio of the current vapour pressure of water in air to the equilibriumvapour pressure. A user manual should be provided to the customer suggesting that 65to 85%(RH) is the most ideal range of humidity level. However the required humiditylevel is dependent on the purpose of the usage of this Portable Humidity Reader. Theestimated cost for this device is approximately RM85 which is affordable for mostcustomers. 4.2 ENGINEERING EQUIPMENT 22
  23. 23. ECE503 PORTABLE HUMIDITY READER 2011 To accomplish this Portable Humidity Reader, we have listed all the requiredcomponents as the table below, together with their cost which deliberately representthe overall cost of our project. No. List of components Quantities Total cost (RM) 1. PIC16F876A 1 25.00 2. LCD [blue] 1 25.00 3. Humidity Sensor 1 35.00 [HSM-20G] 4. PIC USB Programmer 1 58.00 5. LED [yellow & green] 4 0.80 6. Connectors [USB,LCD] 3 2.70 7. Resistors [10K,330R,47K] 5 0.25 8. Capacitors [100µ,0.1µ,30p] 10 2.10 9. Diodes [1N4148,1N4007] 1 0.20 10. Battery 9V[PANASONIC] 1 5.00 11. Voltage regulator 2 2.00 12. Battery connector 1 0.20 13. Crystal oscillator 1 1.50 14. Variable resistor 1 0.15 15. Switches 2 1.40 16. Casing [ordered-Perspex] 1 90.00 TOTAL (RM) 249.30 Hence, as for commercial distribution of this device, we hope to reduce thecost for the manufacture since the total presented is only the cost for creating thedemo of this device. 4.2.1 HUMIDITY SENSOR 23
  24. 24. ECE503 PORTABLE HUMIDITY READER 2011 Humidity sensor is a devise consisting of a special plastic material whoseelectrical characteristic change according to the amount of humidity in the air.Basically, this sensor senses the amount of water vapour in air. For this project,analogue input sensor was used. HSM 20-G is essential for the objectives andapplications where the reading in terms of Relative Humidity was converted intostandard voltage output. The applications include humidifiers and dehumidifiers, airconditioner, humidity data loggers and automotive climate control. 4.2.2 PIC 16F876A 24
  25. 25. ECE503 PORTABLE HUMIDITY READER 2011 PIC 16F876A is chosen due to it characteristics that is suitable to this projectapplication. Based on the data sheet, these microcontrollers consist of 28pin thatinclude 3 input/output ports that will reduce the complexity of the system which issuitable for the beginner, 14 interrupts and 5 port of A/D input channel. 4.2.3 PIC Kit ProgrammerIn order to load the program in the microcontroller, this software was used. This adall program made into internal memory of PIC16F876A. Once the HEX file wascreated in MPLAB, this file will then be loaded into PIC16F876A using PIC Kit2. 4.2.4 LED (as an indicator) 25
  26. 26. ECE503 PORTABLE HUMIDITY READER 2011Device that act as receiver thatindicates sensor node and overall system is workingby emitting low intensity light.This semiconductor diode has lower energyconsumption,longer lifetime, improvedrobustness, smaller size and faster switching. 4.2.5 Liquid Crystal Display (LCD)An electronic display device which has a flat panel display type commonly used indigital devices. In this project, LCD will display the readings and measurement ofparameters. LCD 2x 16 characters was used. 4.3 DESIGN SPECIFICATION 4.3.1 CONCEPTUALIZATION 26
  27. 27. ECE503 PORTABLE HUMIDITY READER 2011 It could be argued that humidity plays a part in every industrial productionprocess. The extent to which humidity plays a part in any given productionprocess may vary but in many cases it is essential that, at the very least, it ismonitored and, in most cases, controlled. It may also be said that humidity is amore difficult property to define and measure than associated parameters suchas temperature and pressure. Indeed, it is a truly analytical measurement inwhich the sensor must contact the process environment, in contrast to pressureand temperature sensors, which are invariably insulated from the process by athermo well and a diaphragm respectively. Therefore we hereby try to comeout with our product of PORTABLE HUMIDITY READER. The primaryidea is focusing on how we can read humidity level in a room condition whichthen allows us to monitor the level besides the temperature reading. Hence,due to our specific function of device, we do not tend to include other extrafeatures as available like other devices of humidity reader such as Bluetooth,USB data transfer, and so on. It shall be a portable device only to display thehumidity and temperature. 4.3.2 ANALYSIS The portable reader that we designed is specifically focused on the readinghumidity and the temperature of the surrounding environment. The sensor thatwe use in our project is HSM-20G.The specification of the sensor is a DC5.0±0.2 V input voltage and the output voltage is 1-3V. The measuringaccuracy for the detection of humidity reading is ±0.05RH. The combinationof humidity output, with the temperature output being matching current orvoltage signal. The sensor is high sensitivity to humidity in the air. Therelationship between output voltage and temperature refer on figure below. 27
  28. 28. ECE503 PORTABLE HUMIDITY READER 2011 Based on figure 2.1, when the temperature goes higher than45℃, the output voltage will become unstable. The relationship between output voltage and humidity is as shown in figure 2.2 and table 1 below.We use 9V of battery to supply on the portable humidity reader. We use the battery as thepower supply as our project is the portable unit, so it is better to use battery rather thanother power supply. 28
  29. 29. ECE503 PORTABLE HUMIDITY READER 2011 4.3.3 BLOCK DIAGRAM OF THE SYSTEMTop-Down DesignTop-down design is the type of our design because we start from input to the output.From sensor detector it will detect humidity level from surrounding and convert tovoltage to get level of humidity. So output voltage will be read in PIC based on ourprogram by using equation of gradient to get value humidity and temperature. Lastly ourPIC will give a command to display output of the system that it temperature andhumidity. 4.3.4 LEVEL DESIGN ARCHITECHTURELevel 0: Our goal is to read/display the humidity level and temperature. Level 1 Architecture 29
  30. 30. ECE503 PORTABLE HUMIDITY READER 2011 4.3.5 FULL ANALYSISBased on the synthesized system the objective of the project to design a portableelectronic device that can read humidity level by using PIC 16F876A and to stimulate,design the PCB layout using ALTIUM is achieved. There are several risks that we haveto face, for example our project can only read humidity at certain point not continuously. 30
  31. 31. ECE503 PORTABLE HUMIDITY READER 2011Based on this graph we can extract mathematical model as below; Y=mx+ cY=value of voltageX=temperature.M=gradient of the slope.= ( y-y1)/(x-x1 )For example :Equation for voltage Vs sensor Y=mx+c Y=0.1133x-2.833This equation is used to find the value of temperature. 31
  32. 32. ECE503 PORTABLE HUMIDITY READER 2011For this graph we extract the same mathematical model; Y=mx+ cY=output of voltageX=humidity levelM=gradient of the slope. = (y-y1 )/(x-x1 )This equation is used to get the value of humidity level. For example : Equation for voltage vs humidity value Y=mx+c Y=1/3(x+1) After determine mathematical model, we do some general analysis (simulation or experimentally) by conducting it at different places to make sure our portable device can operate smoothly. To make ensure the successfulness of our project, we redo synthesis process to refine a solution such as how to make a simple humidity detector with maximum efficiency. Then we analyze it again by taking an average of the readings to get an accurate reading. Lastly we can evaluate the other alternative solution by using different sensors to get the maximum sensitivity and therefore more accurate results. 32
  33. 33. ECE503 PORTABLE HUMIDITY READER 2011 4.4 SYSTEM INPUT The Portable Humidity Reader was using a humidity sensor as the only inputsystem which is a device consisting of a special plastic material that the electricalcharacteristic change in accordance to the amount of humidity in the air. Basically,this sensor senses the amount of water vapour in air. For this project, an analogueinput sensor was used that form the vital system input. HSM 20-G is essential for theobjectives and applications where the reading in terms of Relative Humidity wasconverted into a standard voltage output. The system input for the Portable HumidityReader is best described as presented earlier in this final report. Please refer to Figure2.1 (Block diagram of portable humidity sensor). There are many reasons for choosing HSM 20-G as our humidity sensor. Thefollowing points showed some of the reasons; Small size makes it easy to conceal and suit current miniaturization product. Compatible with all types of microcontroller makes it reduces the complexity of interfacing. Very high sensitivity to humidity in the air and makes it reliable. 4.5 SYSTEM OUTPUT In order to present the system output, we use a LCD (2x16 characters) wherethe output from the humidity sensor will be displaying both the temperature andhumidity level on the screen. The humidity level is shown as % of RH (relativehumidity) while temperature as unit of °C (degree of Celsius). 33
  34. 34. ECE503 PORTABLE HUMIDITY READER 2011 4.6 SYSTEM PROCESSES The roughly operation of this device is that when the ON/OFF button ispressed once by user, the device will activated and the LCD will display both thereading of humidity level with temperature level and also that the readings isdisplayed by output measured by the sensor continuously. The device will stopoperating as the ON/OFF button is pressed once again. The device will need a batteryof 9V but the voltage regulators will regulate the voltage to 5V for device usage. In order to load the program in the microcontroller used which isPIC16F876A, MPLAB was used for this Portable Humidity Reader. This softwarewill load all program made into internal memory of PIC16F876A. Once the HEX filewas created in the MPLAB, this file will then be loaded into PIC16F876A using PICKit2. To ensure the sensor works in the specified range, detailed programming mustbe taken into consideration since the sensor is sensitive towards vapour produced byexhalation or water heater. The programming is modified so that the LCD will displaythe reading continuously measured by Humidity Sensor. In circuit designated, a diode (1N4007) is use to protect the circuit from wrongpolarity supply. Few capacitors is used to stabilize the voltage at the input side of thevoltage regulator, while the other capacitors is used to stabilize the voltage at theoutput side of the voltage supply from the 9V battery. The LED is a green LED toindicate the power status of the circuit. A resistor is also used to protect LED fromover current which might burn LED. MCLR, RB6 and RB7 need to be connected to the USB in Circuit Programmer(UIC00A) to program the PIC microcontroller. At the same time, RB3 need to be pulldown to 0V to disable low voltage programming, because the programmer is usinghigh voltage programming. The PIC16F876A will gather all analogue input data senses by the humiditysensor and converted into digital output and shows through the LCD. The process isin infinity loop operation as according to the programming loaded earlier into the PICmicrocontroller. 34
  35. 35. ECE503 PORTABLE HUMIDITY READER 2011 5.0 PROJECT SCHEDULE AND MILESTONESSubject SEPT2011-DEC 2011(weeks) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15Discussions withcustomerSearcha title ofprojectFirst Present tocustomerBuyingcomponentsDesign PCBSolderingSecondpresentation tocustomerProgrammingTrouble-shootingFinal presentationto customer 35
  36. 36. ECE503 PORTABLE HUMIDITY READER 2011 6.0 CONCLUSION AND RECOMMENDATIONSCONCLUSION Sensor technologies are developing fast with time and innovative technology. Thisfield is one of the most interesting areas to be discovered continuously. so many sensordesigns will come out and develop in future hence increasing the competitiveness betweenresearchers. This project is a minor contribution to interest of people. it also gives a verybasic understanding which will be a good learning process to the beginner. The hardware andsoftware part of this project is working based on the objectives mentioned before and basedon the conduct test or experiments held towards the end this project, suppose it will workingproperly but due to some problem while troubleshooting the hardware and software we can’tproved this project well. Through this project, it has much to teach us the meaning of patienceand a spirit of teamwork. Besides that, we also find that it is hard to produce electronicproducts, and we very much appreciate the progress in electronics in recent times. Even though our project does not work as we planned, we got a lot of experiences ondoing this microwave oven project. At least, we were now familiar on using an AltiumSoftware Designer to build our printed circuit board, PCB which can’t be obtained in othersubjects. A lot of question we asked to other friend, lecturers and the seniors to get a lot ofinformation to improve our knowledge and skills on Altium software. This will help us a lotin our final year project soon.RECOMENDATIONS  To improve it, a wireless communication can be set up to a portable, the ability of monitoring system communication in spacious place and wide spectrum.  For further improvement, the research can add some features that enable the master controller to control the sensing element, for example gas sensor. 36
  37. 37. ECE503 PORTABLE HUMIDITY READER 20117.0 REFERENCE 1) 2) 3) 4) Parchizadeh.H “PIC project “2009. 5) Stephen R. Turns, 2006, Thermodynamics: Concepts and Applications, (Volume 1), Cambridge of University Press 6) Norman A. Anderson, 1980, Instrumentation for Process Measurement and Control, (3rd edition), University of Michigan: Chilton Co 7) R.C. Srivastava, Subit K. Saha and Abhay K.Jain, 2004, Thermodynamics: A Core Course (2ndEdition), Prentice Hall if India Limited 8) 37