Group 27 UR6523002 NMJ30504 Mini Project NTC 3045 Computer engineering (Universiti Malaysia Perlis) Baraah Ali Omar Balagem 201020037-5 s201020037-5@studentmail.unimap.edu.my Abdulrahman Fouad Salah Alsuede 201020016-5 s201020016-5@studentmail.unimap.edu.my Ali Imran bin Saad 201021150 s201021150@studentmail.unimap.edu.my Smart Thermometer using NTC 100k with the 30﮿C to 45﮿C range (Ni Elves -Lab View) Group 27-NMJ 30504-Electronic Instrumentation and Measurements ABSTRACT Temperature sensors are used in many industrial and scientific applications. The NTC thermistor is one of the temperature sensors used in electrical appliances such as MONITORING PATIENT TEMPERATURE. NTC thermistors are heat-sensitive resistive elements whose resistance values decrease rapidly with increasing temperature [1]. In this article, the applications of NTC thermistors as temperature controllers in the circuit of a Smart Thermometer machine are examined. The NTC thermistors are measured and the properties are determined as expressions of mathematical functions. INDEX TERMS Thermistor( NTC 100k), temperature sensor, nonlinear characteristic, voltage divider, resistor , Op Amp (Lm741), LED, Smart Thermometer. 1. INTRODUCTION Temperature is one of the most important fundamental physical quantities to be measured, processed, controlled and transmitted for various health, industrial and domestic applications. In addition, temperature sensors must be precise, linear, sensitive, accurate and low powered in the current technologies to be used in intelligent workplaces, smart localities, ecological monitoring and warfare applications. Hence, the sensor’s output readout should truly represent the measurand of the process. Human Body is very sensitive to the temperature. If the temperature is so high it will cause hyperthermia (Medical News Today,2022). Which is a medical emergency that occurs when the body is abnormally hot. While if the body temperature is very low a very dangerous health condition called Hypothermia occurs to the Human body (Mayo Clinic,2022). Therefore, we designed Smart Thermometer. The Smart Thermometer is a system to measure the human’s body temperature It measures from 30°C to 45°C. This System divide the range into 5 sections. These sections are firstly 30-32 which is dangerously cold. Secondly 32-35 which is moderately cold. Thirdly 35-37.5 which is normal. Fourthly 37.5 – 42 which is moderately hot. Lastly, 42-45 which is dangerously hot. For each of the above sections the device will light an led depending on the body temperature and if the situation is very dangerous it will activate a buzzer. Other than that, the device will give the user a suggestion based on his Temperature. The Smart thermometer is using NTC sensor. There are two types of thermistors: Negative Temperature Coefficient (NTC) and Positive Temperature Coefficient (PTC). With an NTC thermistor, when the temperature increases, resistance decreases, but in this mini project we use NTC 100k. Thermistors change resistance with temperature changes; they are temperature-dependent resistors. They're perfectly suited to scenarios where one specific temperature needs to be maintained, they're sensitive to small changes in temperature. They can measure liquid, gas, or solids, depending on the type of thermistor. The thermistor used in our project is NTC, that resistance value decreases when temperature increase. 2. DESIGN OF ELECTRONIC INSTRUMENTATION The operating range of the system is from 30°C to 45°C.therfore measuring the patients temperature is the application that we picked for our project .We have a 5V power supply to the detector circuit and a 100k Ω NTC thermistor is to be used to design the detector of the system ,along with other components to implement our application. Table of components NTC Thermistor 100KΩ Operational amplifier (LM741) 10KΩ resistor 100KΩ resistor 68KΩ resistor 1kΩ 2.2kΩ 5.1kΩ 100 Ω LED NI ELVIS LAB VIEW Large breadboard Small breadboard Wire Jumpers Quantity 1 1 3 2 1 2 2 2 3 3 1 1 1 1 In the design for Smart Thermometer, NTC-MF52-B3950 100kΩ Thermistor was used. The Tolerance of the B-value is ±1% in response with a rated resistance for which the precision is ±1%. The operating temperature range for the used NTC is between -55℃ and +125℃ which is compatible with the design. In this type of thermistors the resistance decreases when the temperature increases . LM741 is a general-purpose operational amplifier. Firstly, its null-offset could be adjusted through two pins. Secondly, it is very stable because its regular input voltage range for is also very high. Moreover, this device has protection against short circuits. This operational amplifier can operate between ranges of 0-70°C. The operational amplifier IC is used as a comparator which compares two signals, the inverting and non-inverting signal. In short, this op-amp is the best choice for analog circuits. Then NI ELVIS II will Send the information to the computer. The computer will modify the inputted signal according to the code in the LabVIEW. In this project there are 2 outputs firstly the LabView front panel which Has colored LEDs and A message that gives and advice based on the body Temperature. The first output Doesn’t need a Digital to Analog Convertor Since it is still in the Computer it Self. However, the Second output Does. The Digital Signal from the computer will be converted to analog signal then sent to the NI ELVIS II. Lastly A specific LED will light up based on the temperature. Flow chart 2.1. FLOW CHART AND BLOCK DIAGRAM Block diagram The Smart thermometer is A Device that measures the human body temperature and then Show it to the user with some suggestions. The Smart thermometer will begin to measure from 30﮿C to 45﮿C. This device contains several components which are Transducer, Operational Amplifier, Analog to Digital Convertor, Processor, Digital to Analog Convertor, and output transducers. Firstly, the input Transducer which is NTC 100KΩ. This Sensor Converts the Temperature into resistance. Then this NTC will be connected with other Resistance to form a voltage Divider Circuit that will produce voltage. Since this Smart Thermometer works in a specific Range another voltage divider circuit was made. The voltage divider Circuit will set the lower side of the required Range (30﮿C). Since the difference Between the voltage of the lower side of the range and the voltage of the maximum required temperature (45﮿C) measured by NTC is very small An Operational Amplifier was used as the signal conditioning. The OP-Amp Amplifies the Difference between the 2 sides in order to increase the sensitivity of the Analog to Digital Convertor and make the reading more accurate. Then the output of Op-Amp will be connected to the NI ELVIS II which has an Analog to Digital Convertor. The ADC is used to allow the processor to understand and process the inserted voltage by converting it from Analog signal to Digital signal. At the steady state the Smart thermometer is waiting for the user to Switch it on. when the user Switch the device on it will begin reading the body temperature. If the body temperature is between 30 and 32 or between 42 and 45 means the human’s Life is in Danger. So, Red Led and buzzer will be activated and a message that notify the user and suggest calling the emergency number will be shown then it will measure new temperature. While if the body temperature is between 32 and 35 or between 37.5 and 42 means the person is sick but the situation is not very Dangerous. So, Yellow Led will be activated and a message that suggests some home solutions for the situation and suggests visiting a clinic will be shown then it will measure new temperature. Next if the body temperature is between 35 and 37.5 Green light will be activated and a message that says “the patient's temperature is normal” will be shown then it will measure new temperature. Lastly when the user press stop the device will stop measuring the body temperature. . 1.1. DESIGN OF TRANSDUCER minor difference noticeable by the ADC. The ADC voltage reference is only 5V so the maximum output voltage should be less than 5V. Therefore, we assume Vout is 5V. Since, this is differential amplifier the output equation is 𝑅𝑓 𝑉𝑜 = (𝑉𝑚𝑎𝑥 − 𝑉𝑚𝑖𝑛) . 𝑅𝑖 The NTC voltage divider circuit will be connected to the positive input pin of the amplifier while the 30﮿C voltage divider circuit will be connected to the negative input pin of the amplifier. So, 𝑉𝑚𝑎𝑥 = 0.932V, 𝑉𝑚𝑖𝑛 = 0.551V. Finding Ri with the Assumption that 𝑅𝑓 = 100𝑘Ω, 100𝑘Ω 5𝑉 = (0.932 − 0.551) , Ri = 7.6𝑘Ω 𝑅𝑖 Since there is no resistors that is 7.6KΩ in the lab 2 resistors are connected in series to form 7.3 𝑘Ω. 1.3. Virtual instrument design using LabView software and Ni Elvis II board. By referring to the 100kΩ NTC thermistors in the above table. At the temperature of 30﮿C the resistance will be 80.65kΩ. While, in the temperature of 45﮿C the resistance is 43.659kΩ. The NTC will be connected to 10kΩ, 5V supply and ground too form a voltage divider circuit. So firstly, calculating the voltage coming from the NTC voltage divider circuit when temperature is 45﮿C. 𝑅2 Vout = x5V 𝑅1+𝑅2 10kΩ Vout = x5V, So Vout = 0.932V 43.659kΩ+10kΩ Secondly, calculating voltage coming from the NTC voltage divider circuit when temperature is 30﮿C. 𝑅2 Vout = x 5V 𝑅1+𝑅2 10kΩ Vout = x 5V, So Vout = 0.551V 43.659kΩ+10kΩ A voltage divider circuit will be designed to form the voltage of 30﮿C in order to make it constant. Next calculating the resistors for the voltage divider. Assuming R2 = 10kΩ. 10kΩ 0.551 = x 5V, so R1 ≈ 80 kΩ R1+10kΩ So the practical Vout is 0.551 = 10kΩ R1+10kΩ x 5V 1.2. DESIGN OF SIGNAL CONDITIONING CIRCUIT The device will use a deferential op-amp. In order to amplify the difference between Vmax and Vmin. in order to make any Figure 6 : The complete lab view block diagram Now I am going to explain about every main aspect of this program. We have an overall while loop function with both stop control and timing. Figure 10: calculating the voltage and resistance of the NTC (transducer circuit) using the Amplified voltage Using the differential amplifier equations then solving it for the V2 which is the voltage coming from the transducer circuit Figure 7: the stop control Create a stop button control in order to stop the while loop from running and therefor stop the program. with ;therefore getting the voltage of the transducer. Then using a normal voltage divider equation and solving for R1 which is the NTC resistance. with ,which gives us ,Why do this? The temperature equation needs it Transferring the equations into the lab view with the constant values as shown will give us the results. Figure 8: the timing function This block is a function that will control the while loop in order for it to loop according to a certain time (milliseconds) Figure 11: is it in range? Figure 9: the reading of the amplified voltage This is how we read the amplified voltage, First we have the create channel element and make sure it’s set to AI voltage since we want to read an analog input voltage then we create a constant at the physical line port And set it to the analog input that we want to read from on the ni Elvis board. then add the start element and connect the task out and the error out of the channel to the task in and error in of the start element respectively ,then inside the while loop create and connect the task out of the start element to the task in and have the read channel set to analog single channel.since we are using analog signals and reading from one input, then create an indicator from the output data, Named Amplified voltage afterword’s create a stop element outside the while loop and a clear element as well and connect the task in/out and error in/out like the previous parts finally take the error out from the clear element and input it to a merge error element. To check whether the voltage coming out of the amplifier is in the range to be amplified, using a range element, comparing between 0 and 5,as 5 is the maximum voltage that can go into the ADC, and connecting it to a Boolean indicator for the led to turn on when the comparison result turn to Truth value. Figure 12: Temperature Block In order to find the temperature of that the sensor measured we take the equation and do an inverse calculation to find the temperature T, giving us then dividing by 10 to find the surrounding measured temperature depending on the NTC resistance and the beta of the 100k NTC ;Then • changing everything into lab View block diagram therefore getting the current temperature value . • So that is the temperature is in that range then that led will light up. The Led Writing to the physical LED • In addition to the led lighting on in the front panel there is another led in the circuit that will light up according to this coding • Figure 13 : Thermometer Block This block consist of a thermometer ,which is the temperature-indicator and a case structure with a color box inside, connected to the temperature indicator in order to change the color that fill the thermometer depending on the temperature . • For example when the temperature is between 30 and 32 the color box will be red which will result in a red colored thermometer and so on depending on the conditions in the case structure ,and so one with the other colors of yellow and green. • • Here we have the first and last ranges connected to a DAQ assistant that is configured to write digital signals to two DI/O lines ,with an extended build array to connect and combine the two ranges ;and the same goes for the rest. And so the same write function to the specific DI/O (form the same line we can connect a buzzer to make a sound when the temperature is in one of the ranges) The selection loop for the case structures • An easy way for loop structures conditions is implemented here. Figure 14 : Physical and virtual Led and temperature conditions. This block contains four main parts: • The compare-in range functions : • Here we have an element that will compare a value x with two numbers and output Truth value is the number x is in between that range • • • Here after our x is the measured temperature (30<x<32)if it’s true then the it will output a Truth (Boolean) value. The Led Display on Front Panel • After comparing in the previous function, the green wire is connected to a specific led Boolean indicator • • • • The selection is connected in a sequential manner ;the output of the last element is connected to the input of the one before it ,and the first element is connected to the case structure. Later in the case structure we put the numbers 0 to 5 and inside is the statements concerning the case ; Figure 17 : merge the error out In this figure there is a merge error element that merge the error out of the text close file and the clear element into one error and connect it to the simple error dialog. Figure 15 : the Message block This is a string indicator connected to a string constant inside the case structure that has a message written inside being displayed according to the temperature using the previously explained selection loop. In the figure 15 the case condition is 3 ,which is we look back it’s when the temperature is between 37.5 and 42 degrees Celsius and therefore the message displayed shows that the patient is in need of assistance. Temp. (℃) 30.57 32.5 36.57 38.57 43.36 Measured Vout (V) 0.613 1.155 2.610 3.352 4.317 Figure 18 : merge the error in In this figure there is also a merge error element that is placed to merge the error in of the open text file and start element and connect the merged error into the read channel error in 3 RESULTS AND DISCUSSION TABLE III RESULT OF THE VOLTAGE DROP ACROSS THE THERMISTOR AND ITS OUTPUT VOLTAGE (VOUT) FOR DIFFERENT TEMPERATURES Table III shows the calculated output voltage and the measured output voltage of each temperature. Figure 16: writing the data to a text file. To save our data we need to write the data into a text file in the way er want it to be displayed As shown in figure 16 we create an open file element then create a constant from the operation port and change it to open or create ,this will allow us to create a new text file or overwrite an existing file, after words create and connect a write into file element and a close file element ;to create the display of our string we use a concreted string that combine and order our text ;as for numbers we can’t directly combine then in the string but rater we need to convert them form a number into a string using decimal to fractional string element and connect the combined string into the input of the write into text file element ;when the program runs it will ask the user to either create or open a text file ,it will show this way : Figure 20: shows the initial state of the program/front panel. This figure shows the front panel for our program. When the program runs the thermometer ,the LEDs both virtual and physical the amplified voltage and the message box change according to the temperature. Figure 22: Result When the temperature is between 32℃ and 35℃ when the temperature is between 32 and 35 degrees the second LED shows the color yellow same goes for the circuit as the physical yellow Led lights up, and the message displays that the patient temperature is low and suggests giving him a hot drink or covering him well. Figure 21: Result When the temperature is between 30 ℃ and 32℃ After we run the program and when the temperature is between 30 and 32 degrees the first LED shows the color red same goes for the circuit as the red physical Led lights up, and the buzzer output a sound. As for the message it displays that The Patient temperature is low and is in need of immediate medical assistance. This is a figure showing the red physical led on in sequence with the virtual led. Figure 23 : Result When the temperature is between 35 ℃ and 37.5℃ This figure shows when the human body temperature is in the normal state ,as the virtual and physical led light up and a message saying that the patient’s temperature is normal ,and the thermometer color turns green in sync with the LEDs. Figure 25 : Result When the temperature is between 42 ℃ and 45℃ when the temperature is between 42 and 45 degrees the last LED shows the color red and the physical red led turn on and the message says that the temperature is very high ,in the state as well the buzzer is turn on as it’s considered a critical situation Figure 24 : Result When the temperature is between 37.5 ℃ and 42℃ when the temperature is between 37.5 and 42 degrees the fourth LED shows the color yellow same goes for the circuit as the physical yellow Led lights up, and the message displays that the patient is having a fever and might be in danger. • For all states the thermometer color changes according to the temperature in a similar manner to the LEDs . 4 CONCLUSION This project was developed using hardware and software to get the best outcome possible. Theis project was designed to measure the patient temperature between 30 and 45 degrees Celsius and light up an led or a buzzer according to the temperature and statements, at the same time a user interface panel displayed a thermometer displaying the temperature virtually along with 5 LEDs to indicate the state of the patient with a message that change according to the temperature. In conclusion this project applied the concepts of electronic and virtual instrumentation altogether with the aid of ni Elvis board and LabView software and completed the objectives of the project. REFERENCE 1. “Fever in adults: Symptoms, treatment, and when to seek help,” Medical News Today. [Online]. Available: https://www.medicalnewstoday.com/articles/fever-inadults . [Accessed: 28-Jan-2023]. 2. “Hypothermia,” Mayo Clinic, 05-Mar-2022. [Online]. Available: https://www.mayoclinic.org/diseasesconditions/hypothermia/symptoms-causes/syc20352682 . [Accessed: 28-Jan-2023]. ACKNOWLEDGMENT We'd like to thank all the lecturers, - Assoc.Prof.Ts.Dr.Thennarasan Sabapathy - Ir.Zahari Bin Awang Ahmad -Ts.Dr.Mohd Ilman Jais For their lecture, support, guidance also help in troubleshoot our circuit of mini project during this course NMJ30504 Electronic Instrumentation and Measurement at the Universiti Malaysia Perlis (UniMAP) We'd also like to thank everyone who help a lot and contribute so much to this mini-project. We'd also like to thank ours family and friends for their support. Without this support we this mini project would not be succeedREFERENCES .