Final Project For Micro Buten
Final Project For Micro Buten
Final Project For Micro Buten
College of Engineering
Electronics Engineering
Submitted by:
Mergal, John Errol M.
Remegio, Nino
Bermas, Jade
Micro E
A.Y. 2022-2023
Sept 8, 2023
Submitted to:
INNO-HUB
ABSTRACT
CONCEPTUAL FRAMEWORK
1
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
Water level detection: The microcontroller will read the water level sensor
to detect the current level of water in the dispenser's tank. It is also a user
interface; The user can interact with the dispenser using a keypad or push
buttons. The user interface will allow the user to set the desired water level and
schedule the dispenser's operation. The microcontroller will control the water
pump to fill the dispenser's tank to the desired level. The pump will be turned
on or off based on the water level sensor reading and user input. Once the
water tank is filled to the desired level, the microcontroller will automatically
dispense water at a predetermined interval or when the water level drops below
a certain threshold. The dispensing mechanism can be controlled using a
solenoid valve or a servo motor. The microcontroller will monitor the
dispenser's operation and ensure that it operates safely. For example, the
microcontroller can prevent overfilling of the water tank, prevent pump
overheating, and detect any malfunctions in the system. The microcontroller
and other components of the system will be powered by a suitable power
supply, which may include a battery or a mains supply with appropriate
voltage regulation and protection.
OBJECTIVES
To provide a reliable and consistent supply of water without the need for
manual intervention.
To detect and maintain the water level in the dispenser's tank using
sensors and control the water pump to fill the tank as needed.
To allow the user to set the desired water level and schedule, and adjust
the dispenser's operation as needed using a user interface.
2
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
3
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
CIRCUIT/SCHEMATIC DIAGRAM
4
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
CIRCUIT OPERATION
As an engineer working with sensors, signal conditioning is a crucial part
of my work. In the given circuit, I utilized signal conditioning techniques such
as isolation and excitation to ensure that the temperature and humidity
sensors provide accurate and reliable data.
Isolation is essential in protecting the sensors and microcontroller from
electrical interference, which can result in inaccurate readings. Opto-isolators
were used to electrically separate the sensors from the microcontroller,
ensuring that the signals transmitted between them are free from noise and
interference.
Excitation is another technique that I used to ensure that the sensors
provide accurate measurements. The temperature and humidity sensors
require a specific input voltage to produce an accurate output signal, and this
was achieved using a voltage regulator. The regulator provided a stable and
precise excitation voltage, allowing the sensors to produce accurate and
reliable output signals.
By using signal conditioning techniques, I was able to ensure that the
temperature and humidity sensors provided accurate and reliable data, which
was critical in the success of the circuit. Without proper signal conditioning,
the data collected by the sensors would be unreliable, leading to incorrect
decisions and actions taken by the system. Therefore, as an engineer working
5
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
6
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
FLOWCHART
ALGORITHM
7
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
● Initialize the system: power up the system, initialize all sensors and
actuators, and set the initial condition for all sensors.
● Wait for the sensor send signal to microcontroller.
Wait for a coin to be inserted into the coin slot, as detected by the coin
sensor.
Wait for a bottle to be inserted into the machine, as detected by the IR
sensor.
If the amount of money is sufficient, activate the water pump to dispense
water for a fixed duration.
Wait for the water pump to finish dispensing water.
Turn off the water pump and update the amount of money received.
CODE
#include <xc.h>
#include <htc.h>
#include "CONFIG.h"
#include "LCD_HEADER.h"
int i;
8
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
void main()
{
TRISD = 0xff;
TRISB=TRISC0=TRISC1=TRISC2=0;
//Port D act as Input
I2C_Master_Init();
LCD_Init(0x4E);
while(1) {
if(IR == 1) { Starting if the IR sensor = 1
MOTOR = 0; // motor off
LEDD = 0; // LEDD off
LEDDD = 1; // LEDDD on
LCD_Clear();
LCD_Set_Cursor (1, 5);
LCD_Write_String("WATER OFF");// LCD print data
LCD_Set_Cursor (2, 5);
LCD_Write_String("WATER STOP");
__delay_ms(100);
} else {
LCD_Clear();
LCD_Set_Cursor (1, 5);
LCD_Write_String("WATER ON ");
LCD_Set_Cursor (2, 7);
LCD_Write_String("WAIT");
9
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
MOTOR= 1;// ON
LEDDD = 0; LEDDD off
LEDD = 1; ON
__delay_ms(7000);
}
if(CN == 1) {// command for coin sensor if its = 1
MOTOR= 0;
LEDD = 0;
LEDDD = 1;
__delay_ms(100);
} else {
LEDDD = 0;
= 1;
LEDD = 1;
__delay_ms(7000);
}
if(CS == 1) { // Command for capacitive sensor,
LB = 0;
__delay_ms(4000);
} else {
10
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
LB = 1;
LEDD = 0;
LED = 0;
__delay_ms(50);
}
}
}
MATERIALS.
DOCUMENTATION;
11
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
SELF ASSESMENT;
12
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
ANALYSIS
In my analysis of the automatic water dispenser that uses IR sensor, coin
sensor, capacitive sensor, and water pump, controlled by a PIC16F877A
microcontroller I have gained valuable insight into the effectiveness and
practically of the system. Through carefully evaluation and testing. I have asses
various aspect of the project and drawn meaningful ideas.
One of this is the system provides a convenient solution for dispensing
water without the need for human intervention, saving time and effort. It can
save so much time by dispensing only your water coz, while you’re dispensing
your own water, you can do others staffs while waiting for your water to full.
Furthermore, the coin sensor can help ensure that only authorized users
can access the water dispenser, preventing theft or unauthorized use. By that.
The profit on the water dispenser can use again to buy for additional clean
water.
13
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
CONCLUSION
In conclusion, an automatic water dispenser that uses IR sensor, coin
sensor, capacitive sensor, and water pump, controlled by a PIC16F877A
microcontroller, can be a convenient, secure, and hygienic solution for
dispensing water in various settings. The use of multiple sensors increases the
accuracy of the system, and the microcontroller allows for programmable logic
to ensure that water is only dispensed when the appropriate conditions are
met. However, the system's cost, complexity, maintenance requirements, and
power consumption should be considered before deciding to implement such a
system. Ultimately, the benefits and drawbacks should be weighed against the
specific needs of the user or organization to determine if an automatic water
dispenser is the best solution.
REFERENCES
1. "Design of an Automatic Water Dispenser Using PIC Microcontroller," by
Akande, E. A. et al., International Journal of Advanced Research in
Computer Engineering & Technology, vol. 4, no. 7, July 2015. This paper
provides a detailed description of the design and implementation of an
automatic water dispenser using a PIC microcontroller and various
sensors.
14
QUEZON CITY UNIVERSITY
College of Engineering
Electronics Engineering
15