Me Lab 2 Final Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

DEPARTMENT OF MECHANICAL

ENGINEERING
Visca, Baybay City, Leyte, PHILIPPINES
Telefax: (053) 565-0600 local 1029
Email: coe@vsu.edu.ph
Website: www.vsu.edu.ph

MEng – 151 Mechanical Engineering Laboratory - 2


FINAL PROJECT: WATER TO AIR HEAT EXCHANGER

Members:
Ablen, John Mark R.
Albarico, Achilles C.
Alluso, Bryan R.
Atizon, Me-Ann L.
Arotcha, Verniel
Castil, Kian Mae L.
Flores, Earl Louwyndale N.
Hoyumpa, Gercel Niño E.
Paña, Patrick Anthony N.
Pepito, Justine Mae D.
Purca, Bacille John
Tan, Venus O.
TABLE OF CONTENTS

I. Introduction: ................................................................................................................. 3
II. Objectives: ................................................................................................................... 4
III. Theoretical Background: ......................................................................................... 5
IV. System Design and Construction: .......................................................................... 7
Materials............................................................................................................................ 7
........................................................................................................................................ 13
........................................................................................................................................ 13
Wiring Diagram................................................................................................................ 16
Sketch/Code .................................................................................................................... 16
Experimental Methodology .............................................................................................. 25
Project Device Development ........................................................................................... 26
V. Results and Discussions: ......................................................................................... 27
VI. Conclusion and Recommendation: ....................................................................... 28
VII. References: ............................................................................................................. 29
VIII. Appendix:................................................................................................................ 30
I. Introduction

Heat exchanger is a device that incorporates the process of heat transfer between two
fluids that are at different temperatures, either direct or indirect contact. The device is utilized
in many engineering applications, such as heating and air conditioning systems, refrigeration,
power plants, food processing systems, chemical processing systems, waste heat recovery
systems, and automobile radiators (Balaji, Srinivasan, & Sateesh Gedupudi, 2021). For every
process plant, heat exchangers are critical elements as it involves heat transfer throughout its
process. Majority of exchangers are shell-and-tube type, but there are several types of this
heat transfer equipment – finned tube, spiral, plate-and-frame, plate coil, and bare tube (Hall,
2012).
The project utilizes a radiator heat exchanger. The heat transfer process conforms
from two fluids at different temperatures from air to water resulting in a decrease in the
temperature of air flowing out and increased in the temperature of water flowing out. The
thermal analysis for quantifying the heat transfer from air to water involves parameters, namely
– overall heat transfer coefficient that considers fouling factors, logarithmic mean temperature
difference, surface area of heat exchanger, pressure drop equation, Darcy friction factor
equation, specific heat capacity, mass flow rate or volume flow rate. According to Serth (2007),
assumptions are also considered, where overall heat transfer coefficient throughout the heat
exchanger is constant, no heat losses (no heat transfer between heat exchanger and its
surroundings), and no heat generation occurs within the heat exchanger. These are all
theoretically-base but on actual settings, it varies.
A comprehensive analysis of the project's theoretical basis necessitates a nuanced
exploration of different heat exchanger designs, ranging from coil to plate heat exchangers.
This exploration is crucial in identifying the most suitable design that ensures optimal heat
transfer efficiency. In addition, a profound understanding of fluid dynamics is imperative as it
guides the optimization of the system's air and water circulation to minimize energy losses
and enhance overall performance.
Despite the theories involve in designing the project, it adds a control system to
maintain the temperature of the air throughout the process. The system utilizes a servo motor
to alter the fixed water flow rate that is coming to the system, and this variation of flow rates
helps to maintain the temperature of the air that is coming out of the system. The servo motor
is accompanied with a code that is intended for the purpose of the project.
In summary, this project approaches the knowledge of combining the heat transfer,
fluid dynamics, and control systems. The substantial knowledge foundation acts as the
intellectual cornerstone of the project, paving the way for a thoughtful and innovative
implementation strategy in developing a durable and efficient air-to-water heat exchanger
system.
II. Objectives

This project specifically aims to:

● To design and construct an air-to-water heat exchanger with a control system.

● To use a servo motor to alter the fixed water flow rate that is coming into the system.

● To create a program for the air-to-water heat exchanger with a control system.

● To cool and maintain the temperature of the air that is coming out into the system.
III. Theoretical Background

A water to air heat exchanger is a crucial component in various heating and cooling
systems, designed to transfer thermal energy between water and air streams. The integration
of advanced control mechanisms, such as a controlled servo motor and a temperature sensor,
enhances the efficiency and adaptability of such systems. This theoretical background
explores the key components and principles behind a water to air heat exchanger equipped
with a temperature control system, aiming to optimize the exchange of heat while providing
real-time monitoring through an LCD display.
The primary function of the water to air heat exchanger is to facilitate the transfer of
thermal energy between the water and air streams. As cold water flows through a tube, it
passes through a radiator that is exposed to the ambient air. Heat is exchanged between the
warm air and the cold water, leading to a temperature change in both mediums.

Temperature Control

To enhance the efficiency of the heat exchange process, a temperature control system
is implemented. A temperature sensor is strategically placed within the tube, constantly
monitoring the temperature of the water. The feedback from the temperature sensor is utilized
to regulate the flow of water through the heat exchanger using a controlled servo motor.

Figure 1. DHT22 Temperature & Humidity Sensor

Valve Control

The controlled servo motor acts as the valve for regulating the flow of cold water
through the heat exchanger. The servo motor is programmed with a series of codes to adjust
the valve's position based on the real-time temperature readings from the sensor. This
dynamic control mechanism ensures that the heat exchange process is optimized, preventing
overcooling or undercooling of the air.
Figure 2. 30 kg-cm Servo Motor

Monitoring

To provide a user-friendly interface and real-time monitoring, an LCD monitor is


integrated into the system. The LCD display showcases crucial information such as the current
temperature of the water, the flow rate, and possibly other relevant parameters. This allows
operators or users to observe and adjust system parameters as needed, ensuring optimal
performance and energy efficiency.
The integration of the temperature control system and LCD monitor creates an
automated and intelligent water to air heat exchange system. The use of programmable codes
in the servo motor allows for precise and responsive adjustments, optimizing the heat
exchange process in real-time. The system can be designed for standalone applications or
integrated into larger heating, ventilation, and air conditioning (HVAC) systems.
IV. System Design and Construction

Materials

Power Supply
A 12V 4.2A Switching Power Supply 50W (LRS-50-12) can supply a DC voltage
of 12V DC, and a current of up to 4.2A, it also features a trim potentiometer to fine tune
the output voltage.

Figure 4. 12V 4.2A Switching Power Supply 50W (LRS-50-12)

Water Pump
A 12 Volt water pump is a DC electric water pump motor that powered by a 12V
direct current power supply. It uses centrifugal force that generated by high speed
rotated impeller to booster, transfer, lift or circulate liquids like water, oil, coolant for
sprayers, car, fountain, shower & garden

Figure 5. 12V Submersible Water Pump


Flow Meter
A YF S201C Water flow sensor is a simple sensor for measuring the flow of
liquids. YF S201C consists of a pinwheel that has a magnet and Hall sensors. By
counting the pulses of a hanging fan, in a simple way, you can measure the flow of
liquids. With this method, the electronic part of the sensor has no contact with
water. Water flow sensors are installed at the water source or pipes to measure the
rate of flow of water and calculate the amount of water flowed through the pipe. This
is a 1/2″ inch size water flow sensor made by rotor assembly and the Hall sensor. Can
be fixed with 1/2″ pipe and mounted at the inlet end of the heater, for detecting a water
flow, when the flow of water through the rotor assembly and the speed of rotation of
the rotor with a magnetic flow change, a pulse signal corresponding to the Hall sensor
output, the feedback to the controller, the control is to determine the size of the water
flow regulation.

Figure 6. YF S201C Water flow sensor

Servo Motor
A servo motor is a high torque coreless motor with 30 kg-cm (3 Nm) stall torque,
220° angle sensor, steel gear and double ball bearings, selectable 6V or 7.4V
operating voltage. This type of servo motor can be used in projects that requires a lot
of torque or for any heavy actuating such as valve turning.

Figure 7. 30 kg-cm Servo Motor


Cooling Fan
DeepCool DP-FDC-XF120 Fan is a low speed rpm to ensure quite operation.
Overall Dimension 120X120X25 mm, Fan Dimension 120X120X25mm, Net Weight
180g, Bearing Type Hydro Bearing, Rated Voltage 12VDC, Operating Voltage 10.8~
13.2VDC, Started Voltage 7VDC, Rated Current 0.07±10%A, Power Input 0.84W, Fan
Speed 1300±10%RPM, Max. Air Flow 43.56CFM, Noise 23.7dB(A)

Figure 8. DeepCool DP-FDC-XF120 Fan

4 x 20 Liquid Crystal Display


A The Liquid Crystal Displays have a parallel interface, meaning that the
microcontroller has to manipulate several interface pins at once to control the display.
The process of controlling the display involves putting the data that form the image of
what you want to display into the data registers, then putting instructions in the
instruction register. The LiquidCrystal Library simplifies this for you so you don't need
to know the low-level instructions.

Figure 9. 4 x 20 Liquid Crystal Display


10k NTC Thermistor
A 10k NTC thermistor displays 10k ohm resistance at 25°C and has a negative
relationship between temperature and resistance. The Thermistor 10K is a
temperature-sensitive resistor used in electronic circuits for measuring temperature. It
consists of a metal oxide material that changes resistance in response to changes in
temperature, making it an ideal sensor for temperature measurement and control.

Figure 10. 10k Thermistor

Buck Converter
A buck converter is used to step down voltage of the given input in order to
achieve required output. Buck converters are mostly used for USB on the go, point of
load converters for PCs and laptops, Battery Chargers, Quad Copters, Solar Chargers,
and power audio amplifiers. There are two types used in this project, a 5V and a 7.7V
buck converter.

Figure 11. 5 Volts & 7.7 Volts Buck Converter


NodeMCU ESP32
The NodeMCU-ESP32 is comfortable in prototyping this is possible with simple
programming via Luascript or the Arduino IDE and the breadboard-compatible design.
This board has 2.4 GHz dual-mode Wifi and a BT wireless connection.
In addition, a 512 KB SRAM and a 4MB flash memory are integrated into the
microcontroller development board. The board has 21 pins for interface connection,
including I2C, SPI, UART, DAC, and ADC.

Figure 12. NodeMCU ESP32

Terminal Block
Terminal blocks are commonly used in electrical wiring, circuit connections,
and control systems. They provide a secure and organized way to connect and
disconnect wires without the need for soldering or specialized tools. Terminal blocks
are often found in industrial automation, control panels, distribution boards, and other
areas where reliable electrical connections are required. A specific "1 in 2 out" terminal
block allows you to take one incoming wire or signal and split it into two separate
outgoing connections. This can be useful in various applications where you need to
distribute a signal or power source to multiple devices or components.

Figure 13. Terminal Block and 1 In 2 Out Terminal Block


Stranded Wire (AWG 22)
AWG 22 Stranded wire, denoting its American Wire Gauge size of 22, is a
versatile electrical conductor widely utilized across electronics, electrical circuits, and
telecommunications. Its strength lies in its stranded composition, where multiple
smaller wire strands are meticulously twisted or braided together. This structure
imparts both flexibility and resilience, making it an excellent choice for applications
where repeated bending or movement is expected, while also ensuring efficient
conduction of electrical current. AWG 22 Stranded wire is a dependable component
within the realm of wiring, enabling the seamless transmission of power and signals in
a wide array of electrical and electronic systems.

Figure 14. AWG 22 Stranded Wire

Breadboard
A breadboard consists of plastic block holding a matrix of electrical sockets of
a size suitable for gripping thin connecting wire, component wires or the pins of
transistors and integrated circuits (ICs). The sockets are connected inside the board,
usually in rows of five sockets.

Figure 15. Breadboard


Connectors (1/2 inch Tees, Elbows & Hose Connector)
The Pipe Tees are used to connect pipelines with a pipe at a right angle with
the line which allows for branch connections.
The Pipe Elbows are used to change the angle or direction of the pipe run.
Most commonly in 90 degrees and 45 degree turns. The sweep of the fitting describes
how fast a transition or change in direction is made.
The Hose connectors are couplings used to securely and robustly attach hoses
to water and pressurized air outlets of various types. They are highly versatile, used in
commercial, industrial and domestic settings.

Figure 16. Connectors (1/2-inch Tee, Elbow & Hose Connector)

Valves (1/2-inch Check Valve & Ball Valve)


The NodeMCU ESP8266 features an integrated USB-to-serial converter,
making it easy to program and upload code, while its compatibility with the Arduino
IDE simplifies development for those familiar with the Arduino platform. It boasts a
powerful 32-bit microcontroller, providing ample processing power and memory for
handling complex tasks and IoT functionalities.

Figure 17. Valves (1/2-inch Check Valve & Ball Valve)


Polyethylene Tubing & Hose Clamp
A Poly tubing, often referred to as PE tubing or polyethylene tubing is a flexible,
lightweight, durable and corrosion resistant plastic that can be used for a wide range
of liquid, gas and fluid transfer applications. Poly tubing is also FDA approved for use
in food and beverage applications.
Hose clamps are designed to secure a hose over a fitting, such as a spigot or
barb, acting as a seal to prevent fluid from leaking at the connection. They also stabilize
the hose connection.

Figure 18. Polyethylene Tubing & Hose Clamp

Acrylic Sheet
An acrylic sheet, often referred to simply as "acrylic" or "plexiglass," is a
versatile and widely-used material known for its transparency, durability, and ease of
fabrication. Acrylic sheet is utilized as the backing part of the project that holds the
components because it offers remarkable optical clarity, almost as clear as glass, while
being significantly lighter and less prone to shattering.

Figure 19. Acrylic Sheet


Polyvinyl Chloride Junction Boxes
The PVC orange Junction box houses electrical sockets, switches or other
fixtures. It serves to house an electrical device, such as an electrical receptacle or
switch or a GFI. Junction boxes are metal or plastic enclosures used as housings for
wiring connections.

Figure 20. Polyvinyl Chloride Junction Boxes


Wiring Diagram

Figure 21. Wiring Diagram using Fritzing

Shown in the figure above is the wiring diagram of the components connected
together to make the device. This was done using the application called “Fritzing”
which is an electronics design and prototyping platform to visualize the wiring
connection of the project. As shown, the NodeMCU ESP32 is powered using 12V 4.2A
Switching Power Supply 50W (LRS-50-12). The VCC, GND, SCL, and SDA pinouts of
the 20x4 LCD module, DHT22, flowmeters and servo motor are connected to the 3V3,
GND, G4, G14, G21, G22, G25, G26, and G32 of the NodeMCU ESP32 WROOM
respectively. The fans and submersible pump are connected to the 7.7V and 5V buck
converters which is then connected to the 12V power supply.

Sketch/Code

#define BLYNK_TEMPLATE_ID "TMPL6LHMOezes"


#define BLYNK_TEMPLATE_NAME "ME LAB"
#define BLYNK_AUTH_TOKEN "Jrj1VpKikSFRFS3EzZKxD0KyijCTY3Gm"
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
#include "DHT.h"
#include <Wire.h>
#include <SPI.h>
#include <LiquidCrystal_I2C.h>
#include <Servo_ESP32.h>
//#include <SD.h>

#define FLOWMETER1 32
#define FLOWMETER2 4
#define THERMISTOR1 34
#define THERMISTOR2 35
#define DHTPIN1 25
#define DHTPIN2 26
#define DHTTYPE DHT22
#define STARTBUTTON 18
#define STOPBUTTON 19
#define RESETBUTTON 13
static const int SERVOPIN = 14; // PWM pin for servo motor

// Blynk authentication token and Wi-Fi credentials


char auth[] = "Jrj1VpKikSFRFS3EzZKxD0KyijCTY3Gm";
char ssid[] = "PAPI69"; // Enter WiFi SSID
char pass[] = "11111111"; // Enter WiFi Password

float calibrationFactor1 = 5.5; // Calibration factor for flow meter 1


float calibrationFactor2 = 5.5; // Calibration factor for flow meter 2
volatile byte pulseCount1;
volatile byte pulseCount2;
byte pulse1Sec = 0;
byte pulse2Sec = 0;
float flowRate1;
float flowRate2;
float F1;
float F2;
long currentMillis1 = 0;
long currentMillis2 = 0;
unsigned int flowMilliLitres1;
unsigned int flowMilliLitres2;
unsigned long totalMilliLitres1;
unsigned long totalMilliLitres2;
unsigned long previousMillis1;
unsigned long previousMillis2;

//unsigned long writeMillis = 0; // Store the previous write time


//const unsigned long writeInterval = 30000; // Interval between data writes (30
seconds)

//File dataFile; // File object for SD card

DHT DHT1(DHTPIN1, DHTTYPE);


DHT DHT2(DHTPIN2, DHTTYPE);

float dhttemperature1, dhthumidity1, dhttemperature2, dhthumidity2;

const float referenceResistor = 10000; // Resistor values in ohms


const float referenceVoltage = 3.3;
const float beta = 3950;
const float nominalTemperature = 25;
const float nominalResistance = 10000;

float Average1 = 0;
float Average2 = 0;
const float alpha = 0.1; // Filter coefficient, adjust as needed

Servo_ESP32 servo1;

int angle = 0;
int angleStep = 5;
int angleMin = 5;
int angleMax = 90;

int lcdColumns = 20;


int lcdRows = 4;
LiquidCrystal_I2C lcd(0x27, lcdColumns, lcdRows);
boolean isRunning = false;

void IRAM_ATTR pulseCounter1() {


pulseCount1++;
}

void IRAM_ATTR pulseCounter2() {


pulseCount2++;
}

void setup() {
Serial.begin(115200);

lcd.begin(20, 4);
lcd.init();
lcd.clear();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM ON");

analogReadResolution(10);

WiFi.begin(ssid, pass);
Blynk.config(auth);

pinMode(FLOWMETER1, INPUT_PULLUP);
pinMode(FLOWMETER2, INPUT_PULLUP);
DHT1.begin();
DHT2.begin();
pinMode(THERMISTOR1, INPUT);
pinMode(THERMISTOR2, INPUT);
pinMode(STARTBUTTON, INPUT_PULLUP);
pinMode(STOPBUTTON, INPUT_PULLUP);
pinMode(RESETBUTTON, INPUT_PULLUP);

pulseCount1 = 0;
flowRate1 = 0.0;
flowMilliLitres1 = 0;
totalMilliLitres1 = 0;
previousMillis1 = 0;

pulseCount2 = 0;
flowRate2 = 0.0;
flowMilliLitres2 = 0;
totalMilliLitres2 = 0;
previousMillis2 = 0;

attachInterrupt(digitalPinToInterrupt(FLOWMETER1), pulseCounter1, FALLING);


attachInterrupt(digitalPinToInterrupt(FLOWMETER2), pulseCounter2, FALLING);

servo1.attach(SERVOPIN);
servo1.write(angleMin);
delay(5000);

lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
Serial.print("SYSTEM STABILIZING");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("0 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("10 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("22 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("36 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("44 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("59 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("66 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("78 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("85 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("97 %");
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM STABILIZING");
lcd.setCursor(8, 1);
lcd.print("100 %");
delay(1000);

//if (!SD.begin(15)) {
//Serial.println("SD card initialization failed!");
//while (1)
// ;
//}

Serial.println();
lcd.clear();

servo1.write(angleMax);
delay(2500);

servo1.write(angleMin);
delay(2500);

servo1.write(angleMax);
delay(2500);

servo1.write(angleMin);
delay(2500);

servo1.write(angleMax);
delay(2500);

servo1.write(angleMin);
delay(2500);

Serial.println("System Ready");
lcd.setCursor(0, 0);
lcd.clear();
lcd.print(" SYSTEM READY");
lcd.setCursor(0, 2);
lcd.print(" PRESS START");
}

void loop() {

Blynk.run();

if (digitalRead(STARTBUTTON) == LOW && !isRunning) {


// Start the system
isRunning = true;
Serial.println("System Started");
lcd.setCursor(0, 0);
lcd.clear();
lcd.print(" START");
delay(2000);
previousMillis1 = millis();
previousMillis2 = millis();
}

if (digitalRead(STOPBUTTON) == LOW && isRunning) {


// Stop the system
isRunning = false;
Serial.println("System Stopped");
lcd.setCursor(0, 0);
lcd.clear();
lcd.print(" STOP");
delay(2000);
lcd.clear();
}

if (digitalRead(RESETBUTTON) == LOW) {
// Reset the system
Serial.println("System Reset (5 seconds)");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" SYSTEM RESET");
lcd.setCursor(0, 2);
lcd.print(" (10 SECONDS)");
delay(2000);
lcd.clear();
servo1.write(0);
delay(2000);
isRunning = false;
delay(5000); // Reset for 5 seconds
ESP.restart();
}

if (isRunning) {
currentMillis1 = millis();
currentMillis2 = millis();
lcd.clear();

if (currentMillis1 - previousMillis1 > 1000) {


pulse1Sec = pulseCount1;
pulseCount1 = 0; // Reset pulse count
flowRate1 = ((1000.0 / (currentMillis1 - previousMillis1)) * pulse1Sec) /
calibrationFactor1;
previousMillis1 = currentMillis1;
flowMilliLitres1 = (flowRate1 / 60) * 1000;
F1 = (0.00005 * pow(flowRate1, 3)) - (0.006 * pow(flowRate1, 2)) + (0.7402 *
flowRate1);
totalMilliLitres1 += flowMilliLitres1;

Serial.print("Flowmeter 1: ");
Serial.print(F1);
Serial.print(" LPM\t");
lcd.setCursor(0, 0);
lcd.print(F1, 2);
lcd.print(" LPM");
// Serial.print("Total Volume 1: ");
// Serial.print(totalMilliLitres1 / 1000);
// Serial.println(" L");
}

if (currentMillis2 - previousMillis2 > 1000) {


pulse2Sec = pulseCount2;
pulseCount2 = 0; // Reset pulse count
flowRate2 = ((1000.0 / (currentMillis2 - previousMillis2)) * pulse2Sec) /
calibrationFactor2;
previousMillis2 = currentMillis2;
flowMilliLitres2 = (flowRate2 / 60) * 1000;
F2 = (0.00005 * pow(flowRate2, 3)) - (0.006 * pow(flowRate2, 2)) + (0.7402 *
flowRate2);
totalMilliLitres2 += flowMilliLitres2;

Serial.print("Flowmeter 2: ");
Serial.print(F2);
Serial.print(" LPM\t");
lcd.setCursor(10, 0);
lcd.print(F2, 2);
lcd.print(" LPM");

// Serial.print("Total Volume 1: ");


// Serial.print(totalMilliLitres1 / 1000);
// Serial.println(" L");
}

// The rest of your loop code for DHT and THERMISTOR readings
float dhttemperature1 = DHT1.readTemperature();
float dhthumidity1 = DHT1.readHumidity();
float dhttemperature2 = DHT2.readTemperature();
float dhthumidity2 = DHT2.readHumidity();

Serial.print(" Inlet Air Temperature and Humidity: ");


Serial.print(dhttemperature1);
Serial.print("°C & ");
Serial.print(dhthumidity1);
Serial.print("%");
lcd.setCursor(0, 1);
lcd.print(dhttemperature1, 2);
lcd.print(char(223));
lcd.print("C");
lcd.setCursor(10, 1);
lcd.print(dhthumidity1, 2);
lcd.print(" %");

Serial.print(" Outlet Air Temperature and Humidity: ");


Serial.print(dhttemperature2);
Serial.print("°C &");
Serial.print(dhthumidity2);
Serial.print("%");
lcd.setCursor(0, 2);
lcd.print(dhttemperature2, 2);
lcd.print(char(223));
lcd.print("C");
lcd.setCursor(10, 2);
lcd.print(dhthumidity2, 2);
lcd.print(" %");

// For THERMISTOR1 and THERMISTOR2


int adcValue1 = analogRead(THERMISTOR1); // Read ADC value
int adcValue2 = analogRead(THERMISTOR2); // Read ADC value

Average1 = alpha * adcValue1 + (1 - alpha) * Average1;


Average2 = alpha * adcValue2 + (1 - alpha) * Average2;

float temperature1 = (0.0000003 * pow(Average1, 3) - 0.0005 * pow(Average1, 2)


+ 0.3619 * Average1 - 74.346) + 10;
float temperature2 = (0.0000003 * pow(Average2, 3) - 0.0005 * pow(Average2, 2)
+ 0.3619 * Average2 - 74.346) + 10;

if (dhttemperature2 < 18.00) {


// If temperature is less than 5°C, close the valve
angle = angleMin;
} else if (dhttemperature2 > 22.00) {
// If temperature is greater than 30°C, open the valve completely
angle = angleMax;
} else {
// Map temperature between 5°C and 30°C to servo angle between angleMin and
angleMax
angle = map(dhttemperature2, 18.00, 22.00, angleMin, angleMax);
}

// Set servo motor position


servo1.write(angle);

Serial.print(" Inlet Water Temperature: ");


Serial.print(temperature1);
Serial.print("°C");
lcd.setCursor(0, 3);
lcd.print(temperature1, 2);
lcd.print(char(223));
lcd.print("C");

Serial.print(" Outlet Water Temperature: ");


Serial.print(temperature2);
Serial.print("°C");

lcd.setCursor(10, 3);
lcd.print(temperature2, 2);
lcd.print(char(223));
lcd.print("C");

Serial.print(" Angle: ");


Serial.print(angle);
Serial.println("°");

//if (currentMillis - writeMillis >= writeInterval) {


//writeMillis = currentMillis;
// Open the file in append mode
//dataFile = SD.open("data.csv", FILE_WRITE);
//if (dataFile) {
// Check if the file is empty
//if (dataFile.size() == 0) {
// Write headers to the file
// dataFile.println("Flowmeter 1 (LPM), Flowmeter 2 (LPM), INLET AIR
TEMPERATURE (C), INLET AIR HUMIDITY (%), OUTLET AIR TEMPERATURE (C), OULET AIR
HUMIDITY (%), INLET WATER TEMPERATURE (C), OUTLET WATER TEMPERATURE (C)");
//}

// Write data to the file


//dataFile.print(F1, 2);
//dataFile.print(",");
//dataFile.print(F2, 2);
//dataFile.print(",");
//dataFile.print(dhttemperature1, 2);
//dataFile.print(",");
//dataFile.print(dhthumidity1, 2);
//dataFile.print(",");
//dataFile.print(dhttemperature2, 2);
//dataFile.print(",");
//dataFile.print(dhthumidity2, 2);
//dataFile.print(",");
//dataFile.print(temperature1, 2);
//dataFile.print(",");
//dataFile.print(temperature2, 2);
//dataFile.println();

// Close the file


// dataFile.close();
//}
//else {
//Serial.println("Error opening data.csv!");

// Blynk uploads
char fFM1[30];
char fFM2[30];
char fNTC1[30];
char fNTC2[30];
char fDHTtemp1[30]; // Adjust the size based on your needs
char fDHTtemp2[30];
char fDHThum1[30];
char fDHThum2[30];

snprintf(fFM1, sizeof(fFM1), "%.2f", F1);


snprintf(fFM2, sizeof(fFM2), "%.2f", F2);
snprintf(fNTC1, sizeof(fNTC1), "%.2f", temperature1);
snprintf(fNTC2, sizeof(fNTC2), "%.2f", temperature2);
snprintf(fDHTtemp1, sizeof(fDHTtemp1), "%.2f", dhttemperature1);
snprintf(fDHTtemp2, sizeof(fDHTtemp2), "%.2f", dhttemperature2);
snprintf(fDHThum1, sizeof(fDHThum1), "%.2f", dhthumidity1);
snprintf(fDHThum2, sizeof(fDHThum2), "%.2f", dhthumidity2);

Blynk.virtualWrite(V1, fFM1);
Blynk.virtualWrite(V2, fFM2);
Blynk.virtualWrite(V3, fNTC1);
Blynk.virtualWrite(V4, fDHTtemp2);

delay(1000);
lcd.clear();
}
}

The sketch/code above is uploaded to the NodeMCU ESP32 to make the


project device function as intended. The first NTC thermistor is to read the inlet water
temperature flowing into the system, which is intended to be of low temperature to
generate cold air as intended. The first flowmeter is used to measure the flowrate of
the said inlet water. The 30 kg-cm servo motor is used in order to control the modified
3-way valve which facilitates the water that is allowed to flow into the radiators. The
second flow meter is used to measure the flowrate of the said water that is allowed to
flow into the radiators. The first DHT22 sensor is for reading the temperature and
humidity of the inlet air or ambient air. The second DHT22 sensor is for reading the
temperature and humidity of the outlet air or the cold air generated by the system. The
readings are then displayed in the 20 x 4 LCD in integrated in the system and can also
be seen in smartphones via the application Blynk IoT which would only be accessible
if the ESP32 is connected to the internet. Other parts of the sketch, specifically the
commented ones are put in place in case future improvements of integrating a microSD
card module is to be done for easier data logging and collection. There are also buttons
used to turn on the fans and pump at the same time, start button to start the reading
of the system, stop button to stop the system, and restart button to restart the whole
system in case restarting is needed.
Basically, the system is designed to generate cold air with a set specific
temperature range, in this case, in the range of 18.00°C to 20.00°C.

Experimental Methodology

Heat exchanger is a critical aspect in many engineering applications, such as


heating and air conditioning systems, refrigeration, power plants, food processing
systems, chemical processing systems, waste heat recovery systems, and automobile
radiators. To ensure precise data acquisition, this experimental methodology outlines
a comprehensive approach to assess the efficiency of a newly developed air to water
heat exchanger. The heat exchanger device with an automatic temperature and
humidity sensor equipped with 30 kg servo motor to control the modified 3-way valve
and flowmeters to measure the flowrate of water flowing through the system is
subjected to rigorous testing to ensure the efficiency of the device in transferring heat
from the water that is then cooled by the air through the use of the deep cool fans. The
test aims to validate the device’s performance and efficiency.
Project Device Development

The project device for water to air heat exchanger is developed, incorporating
the DHT22 for temperature and humidity data acquisition, flowmeters for the flow rate
of the water, fan for suction and discharge and servo motor for the valve control. The
device is configured to maintain a certain temperature during operation. All the
materials mentioned above are used for this development and assembled as shown in
the wiring diagram above. The sketch/code also shown above is used for the project
device to work as programmed in order to attain the objectives set.

Testing/Assessment
The accuracy of the project device is assessed by activating the device and
observing accuracy of the temperature by setting the program to the actual
temperature needed. The group conducted a test in the Department of Mechanical
Engineering Visayas State University, Baybay City Leyte. The group conducted
observations on the output of the developed equipment with various presets and
adjustments to help gather data about the efficiency and accuracy.

Data Collection
In order to have a visual evidence and representation of the functionality of the
project and its success to work as intended, data from the sensors used in the projects
are collected. The uploaded code/sketch used in the testing phase of the project is set
to reduce and maintain the temperature of the outlet air temperature in the range of
18.00°C to 20.00°C, which can be seen in the LCD of the project. The data can be
extracted from the Blynk IoT application which logs the readings it receives from the
ESP32.
V. Results and Discussions

The results and discussions on the air-to-water heat exchanger are presented
in this chapter, which largely includes the constructed prototype, and the reading of
data in the system.

Figure 22. Data Collection Set-up

The figure above shows the set up in the data collection. Cold water is supplied
to the system which absorbs the heat from the air inside the heat exchanger/radiator
which in turn produces cold air.

Shown in Figure 23 is the graph showing the decrease of the outlet air
temperature as time progresses and that the when the temperature drops in the range
of in the range 18.00°C to 20.00°C, it autonomously maintains that temperature range.
This serves as evidence that the system functions as intended of generating cold air
and maintaining its temperature.

Outlet Air Temperature Graph


35
Temperature in the range (°C)

30
25
20
15
10
5
0
0 20 40 60 80 100 120
Time (seconds)

Figure 23. Outlet Air Temperature Graph


VI. Conclusion and Recommendation

In conclusion, our team successfully conceptualized, designed, and


implemented an Air-to-Water Heat Exchanger equipped with a flowrate control system.
The incorporation of a servo motor allows precise control over various operational
aspects, enabling us to optimize the efficiency of the heat exchange process. Notably,
the integration of a flowrate control mechanism shows a functional way in maintaining
or controlling the desired temperature consistently. In addition to the technical
achievements, our comprehensive testing has demonstrated the reliability and
robustness of the Air-to-Water Heat Exchanger and its control system.

For future endeavors, it is advisable to explore potential optimizations in


materials and manufacturing processes to streamline production costs. First matter to
point out is to use a weather proof case in pace with the junction boxes used in order
to have a more spacious and more arranged wiring of the project, as well as giving the
project a more aesthetic look. Second to point is to use a clear epoxy to avoid giving
the project a messy look. Third to point is to use a more detailed and rigid anchoring
frame used for the servo motor. Lastly is to optimize the code/sketch used in the
project, specifically, in order to restrict sending signals to the servo motor when there
is no needed for angle change in controlling temperature.
VII. References

(n.d.). Clear Acrylic Perspex Sheet Cut to Size Plastic Panel Plexiglass. Retrieved September
30, 2023, from https://www.lazada.com.ph/products/clear-acrylic-perspex-sheet-cut-
to-size-plastic-panel-plexiglass-i1204178430.html

Mean well switching power supply, LRS-50-12, 12V DC, 4.2A, 50W, 1 output, 120 → 373 V
DC, 85 → 264 V AC (no date) RS. Available at: https://ph.rs-
online.com/web/p/switching-power-supplies/1065830

NodeMCU ESP32 (no date) ESPHome. Available at:


https://esphome.io/devices/nodemcu_esp32.html

Quick Connector 1 Input 2 Output Electrical Splitter Push-in Terminal Block. (n.d.).
RoboticsDNA. Retrieved September 30, 2023, from
https://roboticsdna.in/product/quick-connector-1-input-2-output-electrical-splitter-
push-in-terminal-block/

Stranded Wire (Black, 22 AWG, 50 Feet) in Canada Robotix. (n.d.). Canada Robotix.
Retrieved September 30, 2023, from
https://www.canadarobotix.com/products/2411?variant=14423860969521
VIII. Appendix

Appendix A. Project Device’s Collected Data

Time Temperature Time Temperature Time Temperature


(seconds) (°C) (seconds) (°C) (seconds) (°C)
0 28.9 39 21.4 78 18.7
1 28.9 40 21.2 79 18.4
2 28.8 41 21 80 18.2
3 28.6 42 20.8 81 18
4 28.6 43 20.8 82 17.9
5 28.5 44 20.7 83 18.2
6 28.4 45 20.7 84 18.6
7 28.2 46 20.6 85 18.9
8 28 47 20.6 86 19
9 27.7 48 20.5 87 19
10 27.3 49 20.4 88 19.2
11 27 50 20.3 89 19.3
12 26.8 51 20.2 90 19.4
13 26.6 52 20.1 91 19.4
14 26.4 53 20.2 92 19.5
15 26.2 54 20.1 93 19.7
16 26 55 20 94 19.5
17 25.8 56 20 95 19.5
18 25.6 57 20 96 19.5
19 25.4 58 20.1 97 19.7
20 25.2 59 20.1 98 19.8
21 25 60 20.1 99 19.8
22 24.8 61 20 100 19.8
23 24.6 62 20
24 24.4 63 20
25 24.2 64 20
26 24 65 19.9
27 23.8 66 19.9
28 23.6 67 19.9
29 23.4 68 20
30 23.2 69 20
31 23 70 20
32 22.8 71 19.8
33 22.6 72 19.8
34 22.4 73 19.7
35 22.2 74 19.3
36 22 75 19.2
37 21.8 76 19
38 21.6 77 18.8
Appendix B. Project Budget Breakdown
Materials/Components Units Total Price (₱)

DHT22 Sensor 2 pcs 600.00

10k NTC Thermistor 2 pcs 80.00

YF-S201C Flowmeter 2 pcs 396.00

20 x 4 LCD 1 pc 305.00

Buck Converter (12V to 5V) 1 pc 160.00

Buck Converter (LM2596) 1 pc 120.00

AWG 22 Stranded Wire 10 m 200.00

Breadboard 1 pc 50.00

Acrylic Sheet (6 mm) 2’ x 2.5’ 1340.00

Acrylic Sheet (3 mm) 2 pcs of 1’ x 1’ 500.00

NodeMCU ESP32 1 pc 205.00

ESP32 Terminal Adapter 1 pc 187.00

LRS-50-12 Power Supply 1 pc 500.00

30 kg-cm Servo Motor 1 pc 600.00

Soldering Lead 3m 100.00

Junction Box 2 pcs 140.00

½” Tube/Hose 10 m 295.00

Radiator 2 pcs 1000.00

Fan 2 pcs 485.00

Hose Clamp 20 pcs 240.00

Pump 1 pc 420.00

Check Valve 2 pcs 400.00

Ball Valve 2 pcs 90.00

Tee Joint 5 pcs 100.00

Straight Elbow 11 pcs 275.00

Nozzle 14 pcs 490.00

Male Plug 2 pcs 40.00

Epoxy 1 pc 180.00
Bolts & Nuts 720.00

Teflon 3 pcs 90.00

Switches 5 pcs 145.00

L-bracket 2 pcs 20.00

PVC Mold 1 pc 225.00

Double-sided Industrial Tape 1 pc 160.00

Grand Total ₱ 10858.00


Appendix C. Documentation during Project Assembly and Project Testing

You might also like