Spirometry is a basic test for the study of pulmonary function, and its performance is necessary for the evaluation and monitoring of respiratory diseases. Its usefulness transcends the field of pulmonology, and in recent years it is progressively being incorporated into primary care and other medical disciplines.
The spirometer is a technique for the diagnosis of respiratory diseases, because it offers a variety of data that allow a complete diagnosis. Thanks to the advancement of technology, it is easy to perform the examination, by calculating flow and volume, important variables in the spirometer technique. it is possible to determine if there is obstruction in the respiratory tract or if, on the contrary, they are in a healthy state.
Spirometer:
Spirometry is a quick and painless study in which a handheld device called a «spirometer» is used to measure the amount of air a person’s lungs can hold (volume of air) and the speed of inhalations and exhalations during the respiration (speed of air flow).
This study is used in children older than 5 years. The spirometer consists of two parts: a nozzle and a tube that connects to a machine, which records and displays the results.
Spirometry tells doctors if the lungs are working properly. It is used to help diagnose and monitor diseases that affect the lungs and make breathing difficult, such as asthma and cystic fibrosis. It can also be used for the following
Flow sensor:
The Flow sensor YF-S201 (figure 1) is used to measure the flow of water, or for example a greenhouse, or at home as in a project. It is, it is very important to know the consumption of liquid. This sensor is installed in the water line, and uses a Hall effect sensor. It is used to measure the amount of liquid that has moved through it. The sensor blade has a small magnet attached, and there is a Hall effect magnetic sensor, on the other side of the plastic tube you can measure how many turns the wind blade has made through the plastic wall. This method allows the sensor to remain secure and dry


| Distancia | Valor |
| 6 | 400 |
| 5 | 300 |
| 4 | 200 |
| 3 | 100 |
| 2 | 0 |

For this, a simple flow sensor was used with the Arduino microcontroller. The sensor used was the YF-S201 (see figure 4). This sensor works through the Hall effect, internally it has blades that rotate when a fluid passes, the number of blades that pass during a given time is counted and it is possible to calculate the flow.

The maximum volume of inhalation was obtained by using a vector that saved the values obtained in a certain time, and each time a new value was saved, it was bought with the previous one in order to store the higher value in another variable..
[1]Espirómetro (2016). Definición, características y tipos de espirómetro. Recuperado (22 de Mayo de 2018)en“https://futurasmedicas.weebly.com/tensiometro.html”
[2]Manual (2016).Sensor ultrasonido. Recuperado (22 de Mayo de 2018)en“http://publicacionesmedicina.uc.cl/ManualSemiologia/210PresionArterial.htm
[3]Electrónica (2013). Definición sensor de flujo. Recuperado (22 de Mayo de2018)en“https://www.electronicafacil.net/tutoriales/.php
[4] ¿Qué es un sensor YF-S201 (2013)? Amplificador. .Recuperado (21 de Mayo de 2018)de:“http://www.pablin.com.ar/electron/cursos/introao1/quees.html