You are on page 1of 75

CAPSTO

NE
PROJEC
T1
INSTRUCTOR : Nguyễn Lý Thiên Trường
PREPARED BY : Đặng Minh Tiến
STUDENT ID : 1951212
CLASS : TT19DDT02
Gratitude
• I would like to express my sincere gratitude and deep gratitude to the
teachers of Ho Chi Minh City University of Technology, especially the teachers
in the Faculty of Electrical and Electronic Engineering, who directly taught and
passed on useful knowledge to me during the implementation of the recent
capstone project. These knowledge are the foundation as well as extremely
valuable luggage for me to develop in the future. After studying and practicing
seriously, with the guidance and encouragement from lecturer Nguyen Ly Thien
Truong, I have completed the first Capstone Project.

• In the process of designing, coding, assembling as well as in the process


of making the research capstone project, due to lack of practical experience in
many aspect, especially coding which cause the report inevitably has many
shortcomings, I look forward to receiving comments and contributions from
teachers, so that I can learn more experiences and step forward to the next
challenge better!

- Sincerely, Thank you!


CAPSTONE PROJECT
ABSTRACT
Abstract: Water is a necessity in every aspect of daily life. Given the current state of the
ecosystem on the planet, water management and conservation are essential to
human survival. Recent times have seen a great need for consumer-based
humanitarian projects that might be developed quickly using STM32
technology. In the proposed methodology, a water monitoring system based on
STM32 that measures the TDS (Total Dissolved Solids) and pH level of water in
any situation.
The prototype is based on the idea that water cleanliness,
especially in cooking and drinking, can be very important parameter when it
comes to human health. To detect the desired parameter, a TDS Meter and pH
sensor were used, if the TDS value and pH level reached the undrinkable zone,
the signal is immediately fed to the warning buzzer. A sudden noisy sound from
the buzzer will help people easier to decide what to do with the water they just
measured. The TDS Value and pH level measurement is shown in the 20x4 LCD
that connected to the STM32.
Contents of This Template
Here’s what you’ll find in this Slidesgo template:

1. A slide structure based on a consulting sales pitch, which you can easily adapt to your needs. For more info on how
to edit the template, please visit Slidesgo School or read our FAQs.
2. An assortment of illustrations that are suitable for use in the presentation can be found in the alternative resources
slide.
3. A thanks slide, which you must keep so that proper credits for our design are given.
4. A resources slide, where you’ll find links to all the elements used in the template.
5. Instructions for use.
6. Final slides with:
7. The fonts and colors used in the template.
8. A selection of illustrations. You can also customize and animate them as you wish with the online editor.
Visit Stories by Freepik to find more.
9. More infographic resources, whose size and color can be edited.
10. Sets of customizable icons of the following themes: general, business, avatar, creative process, education,
help & support, medical, nature, performing arts, SEO & marketing, and teamwork.

You can delete this slide when you’re done editing the presentation.
INDEX
SOFTWARE AND
04 You could describe the
IMPLEMENTATION
CONTENTS
topic of the section here

05 RESULT AFTER
You could describe the
SIMULATION
topic of the section here

CONCLUSION AND
06 You could describe the
DEVELOPMENT
topic of the section here

REFERENCES
07 You could describe the
topic of the section here
INDEX
INTRODUCTION AND
01 You could describe the
OBJECTIVES
CONTENTS
topic of the section here

02 HARDWARE DESIGN AND BLOCK


You could describe the
DIAGRAM
topic of the section here

SOFTWARE AND
03 You could describe the
IMPLEMENTATION
topic of the section here

04 RESULT AFTER
You could describe the
SIMULATION
topic of the section here
INDEX
05 PRODUCT OPERATION CONTENTS
You could describe the
PRINCIPLE
topic of the section here

06 PRODUCT DEMO VIDEO


You could describe the
DEMONSTRATION
topic of the section here

07 CONCLUSION AND
You could describe the
DEVELOPMENT
topic of the section here
01
INTRODUCTI
ON AND
OBJECTIVES
1. The Discovery kit (STM32F4 Discovery) helps users to discover
the STM32F4 entrylevel microcontrollers in the STM32F4 Series,
and develop their applications easily. It offers everything required
for beginners and experienced users to get started quickly.

1.1. About STM32F4:


2. Based on the STM32F4, it includes
an ST-LINK/V2 embedded debug tool,
a gyroscope, an e-compass, a digital
microphone, an audio DAC with 3. The Discovery kit (STM32F411VET6
integrated class-D speaker driver, an Discovery) is a low-cost and easy-to-use
OTG Micro-AB connector, LEDs, and development kit to quickly evaluate and start
push-buttons. development with an STM32F4 entry-level
microcontroller.
1.2. About TDS Meter Sensor:
1. Total dissolved solids (TDS) are the amount of organic and
inorganic materials, such as metals, minerals, salts, and ions,
dissolved in a particular volume of water; TDS are essentially a
measure of anything dissolved in water that is not an H2O
molecule.

2. Water with very low TDS will have flat


taste and it lacks in minerals. Moreover
water with high TDS is unsafe due to
contamination and is not recommended
for use. TDS measurement using TDS
meter sensor helps us maintaining water
with right TDS for our usage for cooking
as well as drinking purposes.
1.3. About Gravity Analog pH
Sensor:
1. pH measurements have been, and continue to be, widely used as a
rapid, accurate measure of the acidity of fluids of all sorts. There are
two methods for measuring pH: colorimetric methods using
indicator solutions or papers, and the more accurate electrochemical
methods using electrodes and a millivoltmeter (pH meter).

2. The development of the glass electrode,


which is convenient to use in a variety of
environments, and the development of the
pH meter have enabled the widespread
application of pH measurement and control
to take place.

3. The determination, and hence


the control of pH, is of
great importance in the food
industry.
1.4. Project Objectives:
- Know how to use STM32 and get used to it easier

- Understand roles and code programming for each sensor


such as TDS Meter sensor, pH measurement sensor that are
used in the system

- Learned more about the significant of cleaned water with


human health in most of activities in real life

- Interactive with GPIO, HAL, ADC, Calibrate, I2C, IoC in


STM32CUBEIDE simpler as well as C program.
02
HARDWARE
DESIGN AND
BLOCK
DIAGRAM
2.1 BLOCK DIAGRAM
2.2. Central Processing Unit
STM32F411
The STM32F411XC/XE devices are based on the high-performance Arm® Cortex® -M4 32- bit
RISC core operating at a frequency of up to 100 MHz. The Cortex®-M4 core features a Floating
point unit (FPU) single precision which supports all Arm single-precision dataprocessing
instructions and data types.
Functional overview
- Arm® Cortex®-M4 with FPU core with embedded Flash
and SRAM

- Adaptive real-time memory accelerator (ART


Accelerator™)

- Batch Acquisition mode (BAM)

- Memory protection unit

- Embedded Flash memory

- CRC (cyclic redundancy check) calculation unit

- Embedded SRAM

- DMA controller (DMA)

- Clocks and startup


Specifications
- STM32F411VET6 microcontroller featuring 512 KB of - Eight LEDs:
Flash memory, 128 KB of RAM in an LQFP100 package • LD1 (red/green) for USB communication
• LD2 (red) for 3.3 V power on
- On-board ST-LINK/V2 with selection mode switch to use • Four user LEDs: LD3 (orange), LD4 (green),
the kit as a standalone ST-LINK/V2 (with SWD LD5 (red) and LD6 (blue)
connector for programming and debugging)
- Two USB OTG LEDs: LD7 (green) VBus and
- Board power supply: through USB bus or from an LD8 (red) over-current
external 5 V supply voltage
- Two push-buttons (user and reset)
- External application power supply: 3V and 5V
- USB OTG with micro-AB connector
- L3GD20: ST MEMS motion sensor 3-axis digital output
gyroscope - Extension header for LQFP100 I/Os for a
quick connection to the prototyping board and
- LSM303DLHC: ST MEMS system-in-package featuring an easy probing
a 3D digital linear acceleration sensor and a 3D digital
magnetic sensor - Comprehensive free software including a
variety of examples, part of STM32CubeF4
- MP45DT02: ST MEMS audio sensor, omnidirectional package or STSW-STM32136 for legacy
digital microphone Standard Libraries usage

- CS43L22, audio DAC with integrated class D speaker


driver
STM32F4
11 Block
Diagram
2.3. TDS Meter Sensor

TDS stands for Total Dissolved Solids and


refers to the total concentration of dissolved
substances in drinking water. TDS comprises
inorganic salts and a small amount of organic
matter as well. Inorganic salts are made up of
the positively charged cations (calcium,
magnesium, potassium and sodium) and
negatively charged anions (carbonates, nitrates,
bicarbonates, chlorides and sulfates). The TDS
level is how much of the total dissolved solids
are present in the water.
2.3. TDS Meter Sensor

Total dissolved solids (TDS) is measured as a


volume of water with the unit milligrams per
liter (mg/L), otherwise known as parts per
million (ppm). According to the EPA
secondary drinking water regulations, 500
ppm is the recommended maximum amount
of TDS for your drinking water. Any
measurement higher than 1000 ppm is an
unsafe level of TDS. If the level exceeds 2000
ppm, then a filtration system may be unable
to properly filter TDS.
2.3. TDS Meter Sensor – Board
Overview
2.3. TDS Meter Sensor – Specification
- Signal Transmitter Board:
➔ Input Voltage: 3.3 ~ 5.5V
➔ Output Voltage: 0 ~ 2.3V
➔ Working Current: 3 ~ 6mA
➔ TDS Measurement Range: 0 ~ 1000ppm
➔ TDS Measurement Accuracy: ± 10% F.S. (25 Ԩ)
➔ Module Size: 42 * 32mm
➔ Module Interface: PH2.0-3P
➔ Electrode Interface: XH2.54-2P

- TDS probe:
➔ Number of Needle: 2
➔ Total Length: 83cm
➔ Connection Interface: XH2.54-2P
➔ Colour: Black
➔ Other: Waterproof Probe
2.3. TDS Meter Sensor – Principle
Diagram
2.3. TDS Meter Sensor – Types
The following list details common total dissolved solids that
may be present in water:

- Calcium
- Chloride - Bicarbonates
- Magnesium - Sulfates
- Potassium - Pesticides
- Zinc - Herbicides
- Aluminum
- Copper
- Lead
- Arsenic
- Iron
- Chlorine
- Sodium
- Fluoride
2.3. TDS Meter Sensor – TDS Water Chart

➔ < 50 - 250 ppm => Low: Lacking minerals, such as calcium, magnesium, and zinc.

➔ 300 - 500 ppm => Ideal: This level is the sweet spot for TDS in drinking water. The water most
likely contains minerals and does not taste flat.

➔ 600 - 900 ppm => Not great: Consider a reverse osmosis system to filter TDS.
➔ 1000 - 2000 ppm => Bad: It is not recommended to drink water at this TDS level.

➔ > 2000 => Unacceptable: A TDS level above 2000 ppm is unsafe and household filters
can not properly filter this level of contamination.
2.3. TDS Meter Sensor – Pin Diagram

Pin TDS Meter STM32F4 Series

Vcc + 5V

Analog A0 PA0

GND - GND
2.4. Gravity Analog pH Sensor Module:

pH sensor is one of the most important tools for


measuring pH and is commonly used in water quality
monitoring. This type of sensor is capable of measuring
alkalinity and acidity in water and other solutions.
When used properly, pH sensors can ensure the safety
and quality of products and processes that occur in
wastewater or manufacturing plants.
2.4. Gravity Analog pH Sensor Module:

In most cases, the standard pH range is


represented by a value in the range of 0- 14.
When a substance has a pH value of 7, this is
considered neutral. pH values above 7
represent higher alkalinity, while substances
with pH values below 7 are considered more
acidic. For example, toothpaste usually has a
pH of 8-9. On the other hand, stomach acid has
a pH of 2.
2.4. Gravity Analog pH Sensor
Module – Board Overview
2.4. Gravity Analog pH Sensor Module –
3.3V~5.5V wide input voltage range:
Features
• Hardware filtered output signal with low jitter

• Gravity connector and BNC connector, plug-and-play, and no soldering required

• Software library supports two-point calibration and automatically identifies standard buffer solution

3.3V~5.5V wide input voltage range:

• Hardware filtered output signal with low jitter

• Gravity connector and BNC connector, plug-and-play, and no soldering required

• Software library supports two-point calibration and automatically identifies standard buffer
solution
2.4. Gravity Analog pH Sensor Module –
Specifications
- Model: DFRobot Gravity: Analog pH Sensor / Meter Kit For
Arduino
- Module Power: 5VDC
- Module Size : 43 x 32mm (1.69 x 1.26") 
- Measuring Range :0~14PH 
- Measuring Temperature: 0~60 ℃ 
- Accuracy : ± 0.1pH (25 ℃) 
- Response Time: ≤ 1min 
- pH Sensor with BNC Connector 
- pH2.0 Interface (3-foot patch ) 
- Gain Adjustment Potentiometer
- Power Indicator LED
2.4. Gravity Analog pH Sensor
Module – Principle Diagram
2.4. Gravity Analog pH Sensor
Module – pH Scale Value
Information
2.4. Gravity Analog pH Sensor
Module – Pin Diagram

Gravity Analog
STM32F4
Pin pH Sensor
Series
Module:

Vcc + 5V

Analog A0 PA0

GND - GND
03
SOFTWARE AND
IMPLEMENTATIO
N
3.1. Flow chart from each
• sensor:
TDS Meter Sensor:
3.1. Flow chart from each
• sensor:
Gravity Analog pH Sensor Module:
3.1. Sensor Calibration:
• TDS Meter Sensor:
04
RESULT
AFTER
SIMULATION
TDS Meter Sensor Measurement results:

0 ≤ Drinking Water < 50


(ppm)

50 ≤ Water from
Spring, Fountain… <
170 (ppm)
Extremely
Contamination Level
Water ≥ 500 (ppm)
Gravity Analog pH Sensor Measurement
results:
0 ≤ Drinking Water < 50
(ppm)

Water from Spring,


Fountain… > 50
(ppm)

Extremely Contamination
Level Water ≥ 500 (ppm)
“This is a quote, words full of
wisdom that someone important
said and can make the reader
get inspired.”
—Someone Famous
Our Process

Mercury is the closest Venus is the second


planet to the Sun planet from the Sun

Day Day Day Day


1 2 3 4

Jupiter is the biggest Neptune is the farthest


planet in the Solar planet from the Sun
System
Our Consultants

John James
Venus is the
Jane Patterson second planet Joe Doe
Mercury is the from the Sun Neptune is the
closest planet to farthest planet
the Sun from the Sun
Our Partners

Mercury Jupiter Neptune

Mercury Jupiter is Neptune


is the the is the
closest
Saturn
biggest
Mars
farthest
Venus
planet to
Saturn is planet
Despite of planetis
Venus
thetheSun them red,
being all from
thethe
ringed Mars is Sun
second
Testimonials
Helena James
“Mercury is the closest
planet to the Sun”

Jenna Doe
“Jupiter is the biggest
planet of them all “

Mary Patterson
“Neptune is the farthest
planet from the Sun”
Awards

Mercury
It’s the closest
Venus planet to the Sun
Venus is the second
planet from the Sun Jupiter
Jupiter is the biggest
planet of them all
498,300,000
Big numbers catch your
audience’s attention
Upcoming Goals

January February March April

Goal 1

Phase 1

Phase 2
The Slide Title Goes Here!

Do you know what helps you make your


point clear? Lists like this one:

● They’re simple
● You can organize your ideas clearly
● You’ll never forget to buy milk!
And the most important thing: the
audience won’t miss the point of your
presentation
A Picture Is Worth a
Thousand Words
Infographics Make Your Idea
Understandable…
Mercury Neptune
Neptune is the
Mercury is the closest
farthest planet from
planet to the Sun
the Sun

Jupiter Saturn
Jupiter is the biggest Saturn is the ringed
planet of them all one and a gas giant
…And the Same Goes for Tables

Mass Diameter Gravity


(earths) (earths) (earths)

Mercury 0.06 0.38 0.38

Mars 0.11 0.53 0.38

Saturn 95.2 9.4 1.16


Maybe You Need to Divide the
Content

01 02
Neptune Jupiter
Neptune is the farthest Jupiter is the biggest
planet from the Sun planet in the Solar
and the fourth-largest System and the fourth-
in the Solar System brightest one
Desktop Software

You can replace the image on


the screen with your own
work. Just delete this one,
add yours and center it properly
Thanks!
Do you have any questions?

youremail@freepik.com
+91 620 421 838
yourcompany.com

CREDITS: This presentation template was created by Slidesgo,


including icons by Flaticon, infographics & images by Freepik and
illustrations by Stories
Please keep this slide for attribution
Alternative Resources

Find more illustrations like these on Stories by Freepik


Resources

Vectors Photos
● Programming ● Close-up of woman using a lapto
● Development p
● Mission impossible ● Beautiful young woman holding
● Social networking laptop on pink backdrop
● Segmentation
● Site stats Icons
● Responsive
● Meeting ● Project Management Icon
● Analysis
● Cyber attack
● Secure server
● Control panel Find more illustrations like these on
Stories by Freepik
Instructions for use
In order to use this template, you must credit Slidesgo by keeping the Thanks slide.

You are allowed to:


- Modify this template.
- Use it for both personal and commercial projects.

You are not allowed to:


- Sublicense, sell or rent any of Slidesgo Content (or a modified version of Slidesgo Content).
- Distribute Slidesgo Content unless it has been expressly authorized by Slidesgo.
- Include Slidesgo Content in an online or offline database or file.
- Offer Slidesgo templates (or modified versions of Slidesgo templates) for download.
- Acquire the copyright of Slidesgo Content.

For more information about editing slides, please read our FAQs or visit Slidesgo School:
https://slidesgo.com/faqs and https://slidesgo.com/slidesgo-school
Fonts & colors used
This presentation has been made using the following fonts:

Fjalla One
(https://fonts.google.com/specimen/Fjalla+One)

Barlow Condensed
(https://fonts.google.com/specimen/Barlow+Condensed)

#494949 #477797 #77c6fc #bbe3fe #ddf1fe


Storyset
Create your Story with our illustrated concepts. Choose the style you like the most, edit its colors, pick
the background and layers you want to be visible and bring them to life with the animator panel. It will
boost your presentation for sure! Check out how it works.

Pana Amico Bro Rafiki


Use our editable graphic resources...
You can easily resize these resources without losing quality. To change the color, just ungroup the resource
and click on the object you want to change. Then, click on the paint bucket and select the color you want.
Group the resource again when you’re done. You can also look for more infographics on Slidesgo.
JANUARY FEBRUARY MARCH APRIL MAY JUNE

PHASE 1

Task 1

Task 2

PHASE 2

Task 1

Task 2

JANUARY FEBRUARY MARCH APRIL

PHASE
1

Task 1

Task 2
...and our sets of editable icons
You can resize these icons without losing quality.
You can change the stroke and fill color; just select the icon and click on the paint bucket/pen.
In Google Slides, you can also use Flaticon’s extension, allowing you to customize and add even more icons.
Educational Icons Medical Icons
Business Icons Teamwork Icons
Help & Support Icons Avatar Icons
Creative Process Icons Performing Arts Icons
Nature Icons
SEO & Marketing Icons

You might also like