Time to say thanks, here it is my arduino project of my master thesis

Dear Arduino community,
My name is Sebastián, I come from Ecuador. I would like first to thank to the people of the forum that helped me in this year with his recommendations, codes, advice, etc., that helped me with the realization of my master thesis in mechatronics. I would like to share with you the final code, some php code that I used and the pdf doc of my work, in order to help some other people that can have problems similar to the ones I faced. Thank you very much in advance, I graduated 4 months ago, and I will always count on you for future projects. If there is any other space in which the uploading of my job can be more suitable, please tell me.

Title of the project: Portable Fine Dust Measurement Station with Data Transmision to a SQL Database (Tragbare Feinstaub Messstation mit Datenübermittlung an eine SQL Datenbank)

Brief explanation of the project: I created a device that uses an arduino ATMEGA 2560, aa Arduino WIFI shield, a dust sensor SAMYOUNG 501a, a temperature and humidity sensor DHT22, a real time clock DS1307 and a LCD I2C to project the values of the measurements. Basically it measures 1.0 and 2.5 um particles of dust in the air with their respective temperature and humidity values every minute and send these values in a MySQL database where the data is processed and with the help of a PHP web page code and Google Charts, it creates some graphs of the concentration of particles, index of particles and low ratio of particles vs. Time. Furthermore, the program also saves the data into a SD card using the WIFI shield. Finally the projected consisted also in the analysis of the obtained measurements and the realization of a 3D printable case for the electronic elements.

There are two versions of the program one that saves the data into the data base and the SD card and another that saves the data only in the SD card.

Project web page:

Master thesis document:


  1. Arduino code for saving the data in the database and in the sd card.
  2. Arduino code for saving the data only in the sd card.
  3. Example of the PHP code for creating the analysis graphs from the MySQL database.

Thank you very much, and enjoy!

Sincerily yours,
Sebastián Silva P.

dsm501a_with_WIFI.ino (26.4 KB)

dsm501a_only_SD.ino (20.9 KB)

php code.zip (4 KB)