1. Introduction
HVAC systems date back to ancient civilizations, where systems for heating and cooling were developed for comfort and health. During the ancient Roman period, central heating systems were used in homes and public baths and wind towers were used to cool homes. In the 19th century, during the industrial revolution, the need for heating and cooling systems in factories and large buildings increased, which led to the development of the early HVAC systems shown in
Figure 1. In the early days, coal-fired boilers and large fans were used to ventilate these early systems. One of the earliest innovations in heating systems was the introduction of the steam radiator, which was invented in the 1820s by a British engineer named S. A. [
1].
Heating steam radiators used a central boiler to heat water and distribute steam throughout a building via a network of pipes and radiators. This system allowed for a more even distribution of heat compared with the fireplaces and stoves that were previously used. Ventilation systems in the 19th century were typically designed to provide fresh air to the building and to remove stale air [
3]. Openable windows and chimneys were the most common methods of ventilation at the time, although some buildings also used mechanical ventilation systems that used fans to circulate air. The forced-air furnace was another important invention of the 19th century. This system was invented by Alphonse Beau de Rochas in France and circulates hot air throughout a building with the help of a blower. Compared with gravity heating systems, which relied on natural convection to circulate air, this was a significant improvement. In the mid-19th century, the use of air conditioning systems began to emerge. The first air conditioning system was patented in 1851 (shown above in
Figure 1) by John Gorrie, a physician and inventor from Florida. His system used ice to cool air and was primarily used in hospitals to help reduce the spread of infectious diseases [
3]. Overall, the 19th century was a time of great innovation in the field of HVAC systems. The invention of the steam radiator, forced-air furnace, and air conditioning system laid the foundations for the modern HVAC systems used today.
In the 20th century, the use of electricity and the development of modern technologies led to significant advancements in HVAC systems. The invention of the first modern air conditioner by Willis Carrier in 1902 revolutionized the HVAC industry (
Figure 2), making it possible to cool large buildings. His invention removed the moisture from the air, he called it “Apparatus for Treating Air”, and through this invention he was able to notice that it also cooled the air at the same time. From the beginning, Carrier realized that his invention had a wider range of applications than just dehumidifying industrial buildings. At first, Carrier did not refer to his invention as an air conditioner. The term “air conditioner” came from Stuart Cramer, he invented a machine that added humidity to the air to make yarn easier to work in the manufacturing plants [
3]. In 1904, at the St. Louis World Fair, the public was first introduced to the wonders of air conditioning. The air conditioning unit was able to circulate air to over 35,000 cubic feet of air per minute in the Missouri State Building that hosted the St. Louis World Fair [
4].
The air conditioning machine cooled all rooms on two floors except for the libraries and bathrooms. At that time, nobody could have imagined anything such as this was possible. This system was installed by the United Iron Works Co. of Springfield (Springfield, MO, USA), Missouri. Unfortunately, the boiler for the system exploded in November of that year and set the building on fire. In 1906, Carrier patented his invention, the “air conditioner”, and then patented the control system for the air conditioner in 1914. After conducting more research and critiques of his first version of the air conditioning system, Carrier was able to downsize it to make it more manageable. In 1920, the first version was able to be downsized and by 1925 it was able to be installed at the Rivoli Theater in New York City. As technology improved, air conditioning units became smaller. A window air conditioning unit was invented in 1931 by H.H. [
5]. Today’s air conditioners are based on this technology. In the years following World War II, air conditioning development boomed and small companies became household names. In 1956, Carrier won a contract to provide central air conditioning in 700 upscale Pennsylvania homes. By the 1970s, central air conditioning and ventilation had become mainstream. In response to the demand for cool indoor air, Paramount installed air conditioners in another 300 movie theaters. Additionally, in the late 1920s and early 1930s, Frigidaire, General Electric, and General Motors joined the A/C game. The development of refrigerants and better insulation materials also improved the efficiency of air conditioning systems. HVAC systems play a crucial role in maintaining a comfortable indoor environment in residential, commercial, and industrial buildings. These systems control the temperature, humidity, and air quality of indoor spaces. However, the proper functioning of HVAC systems depends on several factors, such as proper installation, maintenance, and repair. The early detection of malfunctions or inefficiencies in HVAC systems can help prevent significant energy waste and ensure occupant comfort. The design of HVAC systems in the 19th century was limited by the technology available at the time [
5]. Nevertheless, these systems represented a significant improvement over the earlier heating and ventilation systems, which relied on fireplaces and stoves for heating and natural ventilation methods for ventilation.
2. Related Topics
There have been many studies using machine learning techniques to enhance the efficiency and performance of HVAC systems. One common area of research focuses on predictive maintenance for HVAC equipment. By leveraging historical sensor data and machine learning algorithms, researchers have developed models that can predict equipment failures and malfunctions before they occur. These predictive maintenance models allow HVAC technicians to perform timely maintenance, reducing downtime and preventing costly breakdowns and leading to improved system reliability and energy savings. From some of the recently published research conducted on this topic, different techniques have been used to help build these deep learning models. In a study conducted by Yang, Shiyu, et al., machine learning techniques were used by taking the collected online building data to help improve the system performance. The systems implemented in their research uses multi-objective functions to help improve indoor thermal comfort levels [
6]. In a similar study, Du, Yan, et al. used reinforced learning techniques to build optimal controls for multi-zoned control residential HVAC systems for user comfort levels. The simulation results showed that energy consumption was reduced by 15% and comfort level violation reduced by 79%, and when compared with a rule-based HVAC control strategy, the comfort violation can be reduced by 98% [
6].
Some more related studies focus on using similar techniques. Later, I will discuss building deep learning models implemented with Pi cameras and thermal infrared cameras for the detection of human occupancy. In both publications, the papers reference using different techniques to improve AI-based techniques to improve heating and air-conditioning comfort. Beltran, Alex, Varick L. Erickson, and Alberto E. Cerpa’s study used software called ThermoSensor to detect the occupancy of users [
7]. The system regulates ventilation using conditioning regimens trained from occupant usage patterns and near real-time estimates of occupancy and temperature. ThermoSense uses a cutting-edge multisensor node that combines a passive infrared sensor with a low-cost, low-power thermal sensor array. We demonstrate that our system is capable of measuring occupancy with an RMSE of about 0.35 persons by utilizing a unique processing pipeline and sensor fusion. We demonstrate that we can conserve 25% of annual energy while retaining the efficiency of room temperature by conditioning areas based on occupancy. One case study used techniques to analyze the response of comfort levels in office spaces [
8]. Similar to data collection, other methods were used to help develop deep learning models to improve the comfort levels of the occupants [
9,
10]. For example, in a study conducted by Tien, Paige Wenbin, et al., CO
2 sensors were used to help accurately detect occupants for indoor air quality. Because the model for counting individuals was simpler, it was able to detect intersections over unions with an average accuracy of about 98.9%, which was higher than the accuracy of the activity detection model, which was approximately 88.5%. According to the real-time data regarding the population and their activities, count-based occupancy profiles were created during the detection.[
7] Through the use of building energy simulation, scenario-based modeling of the case study building under four different ventilation scenarios was performed to determine the impact of this strategy on indoor air quality and energy consumption. The results showed that the suggested method may give data on dynamic changes in occupancy for demand-driven ventilation controls to enhance indoor air quality and address the issue of under- or over-estimation of the ventilation demand when employing the static or fixed profiles [
11]. In all the relevant research conducted around this growing area, there has yet to be a systematic system built from the ground up showing the proposed research. In this paper, I will discuss the development of my prototype using related techniques used in previous research.
The proposed prototype HVAC system aims to use Raspberry Pi cameras and IR cameras to control butterfly valves, enabling an intelligent and responsive HVAC control system. The system leverages the capabilities of the Pi cameras to capture visual data, such as occupancy patterns and thermal profiles, whereas the IR cameras provide information about temperature variations within the space [
12]. Using this data, the system employs machine learning algorithms to analyze and make real-time decisions on valve control. The butterfly valves function as actuators, regulating the flow of air or water within the HVAC system based on the data received from the cameras. The valves can be automatically adjusted to open or close, optimizing the airflow or water flow distribution, thus maintaining an ideal indoor environment.
3. Energy Usage in Homes
Figure 3 shows that, according to the Department of Energy (DOE), approximately 48% of a home’s total energy consumption comes from HVAC systems. In addition to the size of the home, efficiency of the HVAC system, and outdoor temperature, the energy consumption of HVAC systems can vary widely. Heating and air conditioning systems can consume as much as 60% of a home’s energy in warm climates. In colder climates, where heating is the primary use, HVAC systems can account for up to 30% of home energy consumption [
13].
According to a survey conducted by the National Association of Home Builders, in the United States, 90% of new homes are equipped with central air conditioners. According to the survey, new homes are also larger, increasing the need for HVAC systems. Moreover, the increasing demand for larger homes and the use of more advanced HVAC systems with advanced features such as zoning and smart thermostats have resulted in higher energy usage [
15]. According to the International Energy Agency, the energy consumption of HVAC systems in buildings is expected to increase by 30% by 2040, highlighting the need for energy-efficient HVAC systems and practices to mitigate the energy demand.
A house’s HVAC system ensures the comfort and quality of air inside the home by distributing heat and air. However, HVAC systems consume a significant amount of energy, accounting for nearly half of the energy usage in a typical American home. There are several factors that affect the energy usage of HVAC systems, such as the size of the home, the efficiency of the system, the outdoor temperature, and the indoor temperature settings. Inefficiency of HVAC systems can result in higher energy bills and carbon emissions. The reduction of energy consumption and improvement of indoor air quality can be achieved by installing high-efficiency HVAC systems and ensuring proper maintenance [
15]. The use of programmable thermostats in residential homes can reduce the energy usage of HVAC systems. When the occupants are sleeping or the building is unoccupied, homeowners can use programmable thermostats to adjust temperature settings according to their occupancy patterns, thereby reducing energy usage. Additionally, regular HVAC maintenance, such as cleaning or replacing air filters and checking ductwork, can improve the efficiency of the HVAC system, reducing energy consumption and improving indoor air quality [
16]. Proper insulation and weatherization can also prevent air leakage and reduce the workload on the HVAC system, further reducing energy consumption. Overall, reducing the energy usage of HVAC systems in residential homes requires a combination of energy-efficient HVAC systems, regular maintenance, and energy-saving practices by homeowners.
4. IR Camera
The history of infrared cameras dates to the mid-20th century. The first infrared cameras were developed in the late 1920s and early 1950s, following the development of modern technologies that made it possible to detect and measure infrared radiation. The earliest infrared cameras used a special type of film that was sensitive to infrared radiation. Shown in the image above
Figure 4, this special type of film was placed in front of the lens of the IR camera, which focused the infrared radiation onto the film. The film was then developed in a darkroom, producing an image that showed the distribution of infrared radiation in the scene.
The first thermographic camera, a groundbreaking invention in the field of infrared technology, emerged in the early 1920s. Developed by the Hungarian physicist Kálmán Tihanyi, the device revolutionized how we perceive and measure heat. The thermographic camera harnessed the principles of infrared radiation, capturing and converting the invisible thermal energy emitted by objects into visible images. This pioneering technology enabled scientists and engineers to peer beyond the limitations of human vision, opening new avenues for research in various industries [
17]. The thermographic camera’s significance quickly extended beyond the scientific community. It found practical applications in military reconnaissance during World War II, enabling soldiers to detect hidden enemies, vehicles, and even identify potential hotspots on battlefields. In subsequent decades, the technology evolved further, becoming more compact and affordable, which led to its integration into various sectors, including building inspections, firefighting, industrial maintenance, and medical diagnosis. Since its inception, the first thermographic camera has paved the way for a new era of innovation, continuously pushing the boundaries of what we can see and understand about the world around us [
17]. Its impact remains evident in modern-day thermal imaging devices, which continue to play a vital role in countless industries, contributing to safety, efficiency, and problem solving and now using machine learning techniques in our ever-evolving technological landscape.
In the 1960s, the first solid-state infrared cameras were developed, using recent technologies such as charge-coupled devices (CCDs) and uncooled thermal detectors. In the 1980s and 1990s, the development of digital imaging technologies led to the widespread use of digital infrared cameras. These cameras captured infrared radiation as digital data, which could be easily processed and displayed on a computer screen. Since the turn of the 21st century, advances in digital imaging technologies have continued to drive the development of infrared cameras. Today, there are a wide variety of infrared cameras available, ranging from handheld devices used for industrial and military applications to specialized cameras used in scientific research.
In 2012, the Raspberry Pi foundation launched the Raspberry tool to help educate students and programming professionals. The Raspberry Pi was created with the goal of education in mind. This ultra-tiny computer was designed to be small and cheap so that schools could easily afford to teach students about microprocessors in the classroom [
18]. In the image above
Figure 5, you can see each of the ports for a Raspberry Pi. A powerful feature of the Raspberry Pi is the row of GPIO (general-purpose input/output) pins along the top edge of the board. The Raspberry Pi is great for two reasons, the first is that it provides extremely cheap access to a computer, the second is that it is a great tool for learning more about computers. In today’s modern environment, detecting occupancy in automation systems for several reasons can be a critical task. Artificial intelligence has a wide range of uses; machine learning is one of them. It empowers any task to learn from and improve on previous experiences and outcomes without the requirement for explicit programming. It focuses on the creation of a variety of other programs that can acquire data and use it to train and learn on their own through iterative procedures before testing themselves [
18]. At this time, occupancy detection based on a machine learning algorithm is quite beneficial for a variety of applications. The history of infrared cameras has been marked by the steady progression of technological advancements that have made these cameras more versatile, easier to use, and more widely available. Today, infrared cameras are a useful tool used in a wide range of fields, including industrial inspection, scientific research, and military and security applications.
A single person did not discover Arduino, rather it was created by a team of researchers and students at the Interaction Design Institute Ivrea (IDII) in Ivrea, Italy in 2003. The team was led by Massimo Banzi, a professor at the institute, and included David Cuartielles, Tom Igoe, Gianluca Martino, and David Mellis. Their goal was to create a low-cost and easy-to-use microcontroller board that could be used by artists, designers, hobbyists, and anyone interested in creating interactive projects [
19]. The first prototype of the Arduino board was based on the wiring platform that was developed by Hernando Barragán. Since then, the Arduino project has grown into a global community of makers, artists, designers, educators, and hobbyists who use the platform to create a wide range of projects, from interactive art installations to smart home devices.
Arduino Uno is a popular microcontroller board that is widely used in various electronics projects. The board is based on the ATmega328P microcontroller chip and has a variety of input/output pins, analog inputs, and other useful features. With the help of Arduino IDE 2.1.1 software, users can write code to control various electronic components connected to the board, such as motors, sensors, and displays [
19]. This makes the Arduino Uno ideal for prototyping and experimenting with in various electronics projects. One of the key features of the Arduino Uno is its versatility. The Arduino Uno board can be used to create a wide range of projects, from simple circuits to complex robotics and automation systems.
Figure 6 shows that Arduino uno has fourteen digital input/output pins, six analog inputs, and a 16 MHz quartz crystal; the board can easily communicate with and control other electronic components [
20]. Additionally, the board’s USB connection and power jack make it easy to power and program. Another advantage of the Arduino Uno is its ease of use. The board is designed to be user-friendly, and even beginners with no experience in electronics or programming can start using it. The Arduino IDE software comes with a variety of built-in functions and libraries that simplify the process of programming the board. This makes the Arduino Uno a great learning tool for students and hobbyists who want to explore the world of electronics and programming. Overall, the Arduino Uno is a versatile and user-friendly microcontroller board that offers a wide range of possibilities for electronics enthusiasts and professionals alike.
5. HVAC Capabilities
Infrared cameras can be used to diagnose various HVAC problems and occupancy and improve wasted energy cost and climate control for inactive spaces. By identifying temperature variations of occupied or unoccupied spaces, infrared cameras can help technicians improve the overall efficiency of HVAC systems, as shown in
Figure 7 [
21].
By detecting temperature variations on equipment surfaces, infrared cameras can help technicians identify problems that may be causing the equipment to operate inefficiently. There are many use cases for human occupancy recognition. In energy consumption reduction, knowing if a space is occupied or not can be used to control ventilation and temperature systems. As the demand increases for comfort levels in all spaces, being able to provide a new development in technology around comfort levels for hospitals, office spaces, and museums with priceless artifacts is important. These types of commercial spaces require a more complex HVAC system to maintain the most approximate temperature to the required specification needed [
21]. Human occupancy recognition data can be used to optimize room-booking systems. It can also be used for monitoring purposes, for example in medical facilities and in security systems; a system can be established to detect the number of occupants who entered and left the facility, as shown in
Figure 7. HVAC units, which are a key target of building automation, account for about half of the energy consumed in both residential and commercial buildings. Building automation systems, in general, are designed to intelligently operate building facilities in response to dynamic external conditions while maintaining acceptable energy usage and comfort levels [
22].
Deep Learning image recognition is a subfield of computer vision and artificial intelligence that deals with training artificial neural networks to recognize objects and patterns in images. This is achieved by using large datasets of labeled images to train the network to recognize features, objects, and patterns in new images. The training process involves using an optimization algorithm to adjust the weights of the neurons in the network to minimize the difference between the predicted and actual output for a given image. Once the images are trained, deep learning image recognition models can be used for a variety of tasks such as object detection, image classification, and segmentation [
22]. For example, in the image shown in
Figure 8 an infrared image was captured using object detection methods to capture heat signatures. Deep learning models have the potential to improve HVAC systems by enabling more energy-efficient operation, predictive maintenance, improved comfort control, more accurate fault detection and diagnosis, and better indoor air quality management. Some studies show that energy costs for heat and cooling residential or commercial buildings could significantly change if tools such as deep learning are used in the advancement of HVAC systems. For example, a study published in the IEEE Transactions on Industrial Electronics in 2021 proposed a method for detecting and tracking human activity in video sequences using an IR camera and a deep learning model. The study showed that the proposed method was able to accurately detect and track human activity in a variety of scenarios, including low-light conditions [
22].
In
Figure 9, you can see a deep learning model process a batch of images and make an output detecting multiple objects, two people, and a person and object. These models can be applied to real-world problems such as self-driving cars, medical image analysis, facial recognition, and human recognition. Deep learning is a subset of machine learning that involves training artificial neural networks on substantial amounts of data to make predictions or decisions. It has the potential to significantly improve heating, ventilation, and air conditioning (HVAC) systems in several ways:
Energy Efficiency: Deep learning algorithms can analyze building energy usage data and predict when HVAC systems should be activated based on factors such as occupancy, weather, and energy prices. This can result in more energy-efficient operation, reducing energy costs and reducing the environmental impact of HVAC systems.
Predictive Maintenance: Deep learning algorithms can be trained on data from HVAC systems to predict when components are likely to fail. This can allow for proactive maintenance, reducing the risk of unexpected breakdowns and improving the overall reliability of HVAC systems.
Comfort Control: Deep learning algorithms can analyze building occupancy data and make predictions about temperature and air flow requirements. This can result in more accurate and responsive temperature control, improving occupant comfort.
Fault Detection and Diagnosis: Deep learning algorithms can be trained on data from HVAC systems to identify and diagnose faults. This can reduce the time and cost of maintenance and improve the overall performance of HVAC systems.
Indoor Air Quality: Deep learning algorithms can analyze indoor air quality data and make predictions about the levels of pollutants in the air. This can help building managers to make informed decisions about when to activate air purifiers, ventilation systems, and other air quality control measures.
6. Prototype Concept
To use this DL model, we must use a system of wiring to connect a Raspberry Pi to multiple Arduino Uno for communication. This process is known as serial communication. Serial communication is a communication method that uses one or two transmission lines to send and receive data; this data is continuously sent and received one bit at a time by a device shown in
Figure 10 [
23]. Communication between a Raspberry Pi and an Arduino Uno is a popular and straightforward method to exchange data between the two devices. The Raspberry Pi, running a Linux-based operating system, communicates with the Arduino Uno, which uses an Atmel microcontroller over a UART (Universal Asynchronous Receiver/Transmitter) serial interface.
By using this technique, it will allow for communication to be conducted between the Raspberry Pi and Arduino Uno. To effectively use this method, you must first pip install Raspberry Pi configuration. This command will allow you to connect the Raspberry Pi to the Arduino to receive the transmitted data [
24]. Once the connection is established, the next step is to call for the connection ports to check for an established connection. Once these steps are conducted properly, the installation of Arduino IDE (integrated development environment) can occur.
By using intricate wiring systems, we will be able to map the wiring of the Raspberry Pi to the Arduino using Pi camera images. The systems of wires will be aligned across the prototype connecting to the blower and each of the four butterfly valves shown in
Figure 11. The butterfly valve will also be connected with a Pi cameras to detect occupants. This requires many different pip installs such as OpenCV and other programs required for the Arduino to be able to seamlessly communicate with the Raspberry Pi [
25].
OpenCV (Open-Source Computer Vision Library) is an open-source computer vision and machine learning software library. It was originally developed by Intel and later supported by Willow Garage and Itseez (now part of Intel). OpenCV is written in C++ and has interfaces for C++, Python, Java, and several other programming languages, making it highly versatile and accessible to developers [
26]. The primary goal of OpenCV is to provide a comprehensive set of tools and functions for various computer vision tasks, enabling developers to build applications that can understand, analyze, and manipulate visual data. My proposal concept will use these techniques to help develop a prototype to simulate a HVAC system. By using the OpenCV for communication, code can be developed to send serial messages between the devices to control the flow of air through the system. A snippet of the example code developed shows how communication between the devices will be processed when receiving a message.
def getObjects(img, thres, nms, draw=True, objects=[]):
classIds, confs, bbox = net.detect(img,confThreshold=thres,nmsThreshold=nms)
#print(classIds,bbox)
if len(objects) == 0: objects = classNames
objectInfo =[]
if len(classIds) != 0:
for classId, confidence,box in zip(classIds.flatten(),confs.flatten(),bbox):
className = classNames[classId - 1]
if className in objects:
objectInfo.append([box,className])
if (draw):
cv2.rectangle(img,box,color=(0,255,0),thickness=2)
cv2.putText(img,classNames[classId-1].upper(),(box[0]+10,box[1]+30),
cv2.FONT_HERSHEY_COMPLEX,1,(0,255,0),2)
cv2.putText(img,str(round(confidence*100,2)),(box[0]+200,box[1]+30),
cv2.FONT_HERSHEY_COMPLEX,1,(0,255,0),2)
# Temporary Attempt to write-in code for Valve Controls Opening @ 90 degrees
if camera_1, objects = True:
V_1.angle = 90
print("Human Detected")
human_check = 1
else:
V_1.angle = -90
return img, objectInfo, human_check |
From the above code, this portion of the program will take the loaded image from the Pi camera to detect any occupants that may trigger a serial message to be sent to the butterfly valve. When an occupant is detected, this will activate the butterfly values to go from the rest angle (180°) to 90° angles. When the serial message is sent, one (person detected) or 0 (no motion), a message will be sent to activate the sensor. This process will cycle every 5 min to allow the store data to be dumped to reserve memory space. Serial communication between the Raspberry Pi and Arduino Uno enables real-time data exchange, allowing the Arduino Uno to manage precise control of the HVAC equipment based on inputs from the Pi camera [
26]. The Arduino Uno’s ability to interface with various actuators and sensors makes it well-suited for fine-tuning the HVAC system’s parameters according to the data provided.
By using the methods suggested in this paper, the system could be developed to adapt to changing occupancy patterns, ensuring efficient heating or cooling only in areas with occupants. Secondly, the IR cameras can detect temperature variations, allowing the system to respond to localized thermal conditions and adjust the valves accordingly [
27]. Lastly, the use of machine learning enables predictive control, anticipating environmental changes and adjusting the valves in advance to improve energy efficiency and occupant comfort.
7. Conclusions
In conclusion, the use of infrared cameras in diagnosing HVAC problems can improve the efficiency and effectiveness of HVAC maintenance and repair. HVAC systems play a vital role in maintaining comfortable and healthy indoor environments, especially in buildings where people spend a lot of time. Over the years, HVAC technology has made significant advancements, revolutionizing the way we control and optimize indoor environments. These advancements have resulted in increased energy efficiency, improved comfort, enhanced air quality, and smarter system management. However, in some cases, these systems can develop faults or inefficiencies that can lead to higher energy costs, poor indoor air quality, and reduced system performance. The introduction of smart technology has also had a profound impact on HVAC systems. With the rise of the Internet of Things (IoT), HVAC systems can now be connected to a network, enabling remote control and monitoring [
28]. Smart thermostats, for example, have the capability to learn occupants’ preferences and adjust the temperature settings accordingly, leading to energy savings and personalized comfort [
29]. Additionally, data analytics and machine learning algorithms are employed to optimize HVAC system performance, identify potential issues, and provide predictive maintenance, reducing downtime and improving overall efficiency. This proposed research, with the integration of a Pi camera and serial communication between a Raspberry Pi and an Arduino Uno, holds great promise for enhancing HVAC systems. The Pi camera, with its imaging capabilities, can provide valuable visual information about occupancy patterns, thermal profiles, and environmental conditions within a space. This data, when combined with machine learning algorithms, can optimize HVAC control strategies, leading to improved energy efficiency and occupant comfort IR (infrared) cameras, on the other hand, can be a useful tool for diagnosing and assessing the performance of HVAC systems. By detecting temperature variations and thermal patterns, IR cameras can identify areas of the system that may be malfunctioning or where energy may be wasted. For example, during certain periods of the year, university and grade schools may shut down; when these buildings are unoccupied, the HVAC system still performs as if the building has occupants unless it is regulated by a maintenance worker to adjust the settings. Implementing a system that could detect whether a building is occupied in specific area would play vital role in saving energy. This can help prevent significant energy waste, improve indoor air quality, and ensure occupant comfort. Therefore, the use of smart cameras such as IR cameras and Pi cameras in HVAC systems can play a crucial role in maintaining a comfortable indoor environment and reducing overall energy costs.