The thermometer is able to read the target and the current air temperatures of both the air in the atmosphere and the temperature of one's own laptop, and with the difference of five to ten degrees the temperature sensor will trigger starting a fan to cool off ones laptop when reached to a certain temperature. Also when the temperature is below the current number value (example 75) then the fan will go into sleep mode and restart when the temperature rises above 75.
The hardware consist of three parts: the LCD display screen, a temperature sensor, and a keypad. The keypad is used in the process of creating the set temperatures to be displayed on the LCD screen, the way this works is the programmer to types a number representing the target temperature where they want the fan to turn on to start cool down something warm (in this case we will say a laptop), it will also take the current temperature of the atmosphere and when the difference is at a of say 5 degrees the fan will turn on and off. The LCD display screen is used to display the target and the current temperature of both the atmosphere and the item you are trying to cool off. The way it works is that it takes 1 second delay to start up the screen and 15 milliseconds to power up completely, once fully powered you then can use the keypad to type in the current and the target temperature on the 2 line of commands the first line representing the current temp, and the second line represented target temp (Example Targ= 75 and Curr= 70). The temperature would be set in double digit variables however if a third number is pressed the first number would be canceled out changing what the target or current temp would be, however if no other key is pressed then after a millisecond or two the numbers would be set until the next time the thermometer is used and a new entry is entered and the cursor is reset in spot one on the first line for the new target and current temperature. As for the temperature sensor its use would be turning the target and current temperature on the LCD screen and convert it into °Fahrenheit. This would use an equation
F = (119*(ADC value of a number) - 31762) / 256 + 32
The temperature sensor would also control the fan being on or off. The way this would work when the fan is off the current temperature is less than the target temperature and the current temperature is greater the target temperature it will turn on the fan.
Schematic | Top view | PCB bottom | ||
The thermometer Display Number command works as follows it takes A which represents your quotient and B which is your third digit then you divide A & B then you save your result as for the third digit and push it aside for the time being, you then do the same process with A & B again but this time with your first and your second number then once the result is shown from A & B you divide it by 10 and save your result B. Now say the temperature of the current air outside was in the triple digits, the way this works is your first digit is zero in the first space then the way it would be presented in according to American Standard Code for Information Interchange or the ASCII for short would be 32 for a space, this would be displaying the first digit, next you will need to get your second digit and have it as your new A in this case we will say 6 your then would you add 48 in the ASCII to get your second digit to display, and finally for the third digit you are going to need to restore it first then add 48 to that number in order to display your third digit. The LCD command works like this for the screen it starts by a set delay for it to power up (example 100 sec display) then when that reaches 0 it then will start a 15 millisecond power up, then will retrieve a total wake-up command and reach full power. Then you proceed to compile the data entered so it can be read on the screen then wait a millisecond for it to read and appear on the LCD. Next is the how the code is presented in this case in 4 bit form with two line mode command, then you compile it again, then a blink cursor will be displayed so that you can type in the temperature for the 2 lines that you need (this being your target and current temperatures). This will then set your cursor on the first line so you can enter the target temperature number, and then set your cursor on the second and enter a number to represent the current temperature. And when the target temperature is greater than the current temperature will start up a fan to cool off something warm and turn off when the current temperature is less than the target temperature.
Last modified:Mon, Jan 23, 2023.