ECE3196 - EMBEDDED SYSTEM DESIGN
TRIMESTER 2 2015/16
PROJECT ASSIGNMENT
PROJECT TITLE:
WATER LEVEL DETECTOR USING
NUVOTON NUC 140 LEARNING BOARD
STUDENT NAME / ID / MAJOR / EMAILEdrick Lau Sie Lik / 1122701907 / TELE /
GROUP MEMBERS:
STUDENT NAME / ID / MAJORMOHD ALIF DANIAL / 1122701153 / TELE
DHANESSWARAN / 1122702428 / TELE
ISAH TAFIDA / 1112703836 / TELE
INTRODUCTION
In this assignment, we are required to build a project by using a Nu-LB-NUC140 learning board. The Nu-LB-NUC140 is an evaluation board for NUVOTON's Cortex™-M0 based NUC100 series microcontrollers. And also it gives a complete advancement environment to NUC140 microcontrollers which has 4K/8K/16K byte internal SRAM and 32K/64K/128K-byte embedded flash, build in 1.8V LDO, incorporated Timers, Watchdog Timer, RTC, PDMA, UART, SPI/SSP, I2C, PWM Timer, GPIO, LIN, CAN, USB 2.0 FS Device, 12-bit ADC, analog Comparator, Low Voltage Detector and Brown-out locator. It supports Brown-Out Detector.
In this project, we want to build a water lever detector. The water level controller is used to control the water level in a container. The level of the water is detected by using the microcontroller. The main components are Nuvoton (Nu-LB-NUC140), water level sensor, DC motor, resistor and transistor. The water level sensor will sense the level of water and send the indication signal to the microcontroller. So microcontroller will produces signals to start or stop the motor.
OBJECTIVE
The main objective of this project is to create a water level detector system which can detect various water levels and send output to notify the people about the water leakage or overflow. It can also be used to avoid water wastage at home and lead to a better environment and water usage.
TASK
We have to connect the water sensor and DC motor to the Nu-LB-NUC140 learning board and when the certain water level is reached, the sensor will send signal to the Nu-LB-NUC140 learning board. This will make the motor to spin and Nu-LB-NUC140 learning board will display characters in LCD and the buzzer will make sound. Keypad usage is added for the purpose of showing the state. We can repeat the same experiment again and again and end up with the same output showing the reliability of this water level detector system.
EQUIPMENT USED
· Nu-LB-NUC140 learning board
· Self-made water sensor
· Male-Female Jumpers
· DC Motor
· Breadboard
· Resistors
· Transistors
Figure 2: Parts in the Nu-LB-NUC140 learning board
Water Level Detector:
The water level detector can being installed at places where there seems to water overflow or leakages. This system is designed is such a way that it notifies the people around whenever there is overflow. It normally displays the water level at all scenarios. At the start, halfway and full. When it’s at the beginning of the water level and halfway the motor spins, however when it reaches the full level, the motor stops spinning and the buzzer makes sounds and LCD also shows that the water level is full. This method can be applied at various buildings and places to ensure water wastage is prevented and everyone is notified of the water leakages.
Working Principle:
· The water sensor senses the water level and sends signal to the nuvotron board.
· When water level is detected by the sensor, the wire is short circuited and sends a high bit to the nuvotron.
· Once the water level is at the bottom and halfway the motor spins and LCD prints the water level.
· When full level is reached, the motor stops and buzzer makes the sound and it shows display in the LCD.
Applications:
· Common toilets
· Water Dam
· Hotel Toilets
· Hand wash Area
· Living room, Malls,
· And many more
SCHEMATIC DIAGRAM :
FLOW CHART
PROGRESS OF ASSIGNMENT
Dateline of this assignment: 03 Dec 2015 - 16 Feb 2016
Week 1: 14 Dec 2015 – 20 Dec 2015
· Searching for group member
· Searching for a suitable project
Week 2: 21 Dec 2015 – 27 Dec 2015
· 1st meet up (face-to-face)
· All members gives ideas on the project they preferred
Week 3: 12 Jan 2016 – 19 Jan 2016
· Project title is chosen
Week 4: 4 Jan 2016 – 10 Jan 2016
· 2nd meet up (face-to-face)
Task Distribution
Week 5: 11 Jan 2016 – 17 Jan 2016
Components were assem
Week 6: 18 Jan 2016 – 24 Jan 2016
· 3rd meet up (face-to-face)
· Hardware was set up and tested
· Code testing was done in the lab
Week 7: 25 Jan 2016 – 31 Jan 2016
· Code was not properly executing (showing some error)
· Some changes were made in the code
Week 8: 1 Feb 2016 – 7 Feb 2016
· Code was reconstructed with
· Hardware is set up again
· Week 9: 8 Feb 2016 – 14 Feb 2016
· The entire project was completed with the hardware and software working perfectly.
16 Feb 2016 : Assignment is submitted
Face to Face Meeting :
Meeting 1:
Date / Time / Place22 December 2015 / 7.00 pm / SRC Meeting ROOM
Attendance / Agenda
1. Dhanesswaran RNagarajan
2. ISah
3. Muhd Alif Danial
4. Edrick / · First meeting after setting up a group.
· No introduction since us all knew each other. We went ahead and choose the group leader.
· Isah was made the leader after receiving highest number of votes from everyone.
· We did brainstorming to gain some inputs of the project.
· Later we decided to do more research on this topic since we all were lacking of idea.
· After extensive research and discussion we came up with our topic of water level detector.
· Then, we ended our meeting at 9pm
Meeting 2:
Date / Time / Place7 January 2016 / 8.30pm / MMU Library
Attendance / Agenda
1. Dhanesswaran RNagarajan
2. ISah
3. Muhd Alif Danial
4. Edrick / · We started of by doing task distribution. The leader distributed it among our members.
· All of us were satisfied with the distribution and decided to have a weekly reporting to know how much have we progressed.
· Then we proposed a date to purchase our items for the project and we decided Nixie Electronics in Pudu would be the right shop to get our components.
· Then we ended the meeting at 10.00pm
Meeting 3:
Date / Time / Place29 January 2016 / 2.00pm / MMU Library
Attendance / Agenda
1 Dhanesswaran RNagarajan
2 ISah
3. Muhd Alif Danial
4. Edrick / · The hardware set up was done by two people whereas the other two people started off with the coding part.
· Nevertheless, each of us contributed our ideas to make it work more efficiently.
· The hardware was built and we did some code testing in the lab.
· The meeting ended at 4.00pm
Task distribution
Muhd Alif Danial
1. Hardware part
Edrick
Isah Tafida (leader)
2. Coding part
Dhanesswaran
Reflection
NAME : Isah Tafida Ibrahim
ID : 1112703638
MAJOR : TELECOMMUNICATIONS
TASK DISTRIBUTION: CODING PART
This assignment has thought me a lot in studying the instruction table’s for the nuvoton board to understand the libraries to call, how to call a function, declare it and also get and clear values from the nuvoton pins. With this little knowledge and the materials sourced from lecture notes and some example from our lecturer, I was able to assemble a full working embedded system that interacts with external and internal sensors and giving out commands to the outputs and making them take action using the algorithm programmed in the nuvoton board. Some of the difficult parts in this assignment is trying to prepare a code that actually runs based on the inputs gotten from the sensors. The first issue we had with debugging the code was getting the values from the home made sensors and putting it in a loop. We actually found out by the help of our hardware team, that we need a pullback resistor to force the pin to go low after water level has been opened circuited (not connected).
NAME : DHANESSWARAN RNAGARAJAN
ID : 1122702428
MAJOR : TELECOMMUNICATIONS
TASK DISTRIBUTION: CODING PART
Throughout this assignment I have been tasked with the job of coding for this project. It has been a very steep learning curve for me. I further understood how the Nuvotron board works and is features. It has variety of libraries for us to use and various GPIO pins. This makes things easier. Not only that, the various built in function definitely makes things easier to understand and work with. It has different form of initializations but since it is based on C the coding part could be done in a reasonably good method. I particularly worked with my partners to establish the display of LCD, using the buzzer and also the keypad as our outputs. For the external part we used current sensing method to detect whether the water level is detected and make the motor spin. It was overall a good experiencing learning to integrate software and hardware part together to make things work perfectly.
NAME : Edrick Lau Sie Lik
ID : 1122701907
MAJOR : TELECOMMUNICATIONS
TASK DISTRIBUTION: HARDWARE PART
Throughout this assignment I have been given tasks with the job of the hardware part for this project. It has been a very steep learning curve for me. I need to make the research of the water level detector to confirm what the component are we needed. After that we need go to the electronic shop to buy the component. Then, me and my partner working together to connect all the component together to form the water level sensor circuit and also water level sensor. And also connect our circuit and motor with the Nuvoton Board. From this project, I learn how to make the water level sensor ourselves and how to connect the our circuit with the Nuvoton board.
NAME : MOHD ALIF DANIAL BIN ABDUL AZIZ
ID : 1122701153
MAJOR : TE
TASK DISTRIBUTION: HARDWARE
For this assignment project, my task is Hardware-focused for water level detector. In this project. I have to go through the internet, journal and some other references in order to understand how the hardware works so that it can help me to go through the hardware. After me and my partner know all the components that we need for this project, we go and buy them. We learnt a lot of things when we are buying the components as the shop owner guided us on how to do the project with a bit simpler way and using less components. Less component means less cost. All those advices and guides help us in this project. It has been a very steep learning curve for me. I also further understood how the Nuvoton board works and as well as its features. The construction of the hardware is the most interesting and the most challenging as sometimes the hardware is not working well. We are having a hard time to make sure it can synchronize well with the coding part. At last at the end of the day, we succeeded complete both the hardware and software. Thus, the project is well done. I learnt of lot of things from this project. Teamwork is very important in order to complete this project. It also teach us to appreciate the time. Time management is very important in this project. Without it, we might be very late in completing this assignment.
Conclusion
From this project, we learn a lot of thing about the embedded system design. For example we learn how to embed the system which are design by ourselves with the microcontroller – Nuvoton. We also learn how to use the Nuvoton such as then GPIO pins, buzzer, LCD display and etc. The most important thing we learn are how to code the Nuvoton. We face many problems about the coding and we try to solve it. From that, we learn a lot of how to code more better.
In other hand, we also lean team work , project management and time management to help us to complete the project on time. And also we have chance try the knowledge which learn from the lecture class and lab section and let it become our own knowledge.