Arduino Swimming Pool Cloud Monitoring

by imjeffparedes in Circuits > Arduino

10261 Views, 39 Favorites, 0 Comments

Arduino Swimming Pool Cloud Monitoring

img_3101_Qh5lbFkkb6.jpeg

The primary objective of this project is to use Samsung ARTIK Cloud to monitor the pH and temperature levels of swimming pools.

Hardware Components:

Software and Cloud API Used:

ARTIK Cloud Setup

1.jpeg
2.jpeg
3.jpeg
4.jpeg
5.jpeg
6.jpeg

1. Sign up with ARTIK Cloud. Go to developer site and create new "device type".\

2. Enter your desired display and unique name.

3. Create new Manifest

4. Enter field name and other description

5. Click Save and then navigate to Activate Manifest Tab

6. Click the ACTIVE MANIFEST Button to finish and you will be redirected here

Done creating device type!
Now lets create your application that will use that device.

Create ARTIK Cloud Application

7.jpeg
8.jpeg
9.jpeg
10.jpeg

1. Navigate to ARTIK Cloud Applications and Click new application

2. Enter your desired application name and authentication redirect url.

Note that the authentication redirect url is required. It is used to authenticate the users of this application hence will redirect to this url if in need of login.
We used http://localhost/index/ for sample.

3. Now set your application permission to read and write, navigate to your device then save.

Congratulation you now have your application!

Connect Your Device

11.jpeg
12.jpeg
13.jpeg
14.jpeg
15.jpeg
16.jpeg

Now lets connect the application you created earlier.

1. Navigate to my devices and click connect another device.

2. Click your new device type created earlier then click connect device.

3. Click your connected device settings.

4. Take note of these info as you will needed it on the program.

5. Now navigate to your connected device

Done for ARTIK Cloud setup. Once your hardware is up, the chart will have data.

Hardware Sensor Setup

14583313_860214457448377_78076032925564928_n (1).jpg
Sensor-DS18B20-waterproof.jpg
TRS-Audio-Plug-Connections-2.jpeg
Untitled Sketch 3_bb.jpg

Here's the diagram:

  • Temp GND to MRK1000 GND
  • Temp OUT to MKR1000 Digital pin 1
  • Temp VCC to MKR1000 5V
  • Connect a 4.7K resistor to Temp VCC and Temp OUT
  • pH GND to MRK1000 GND
  • pH OUT to MKR1000 Analog pin 1
  • pH VCC to MKR1000 5V

See my sample wiring on the attached images.

We added an Audio Jack for easy detaching of temperature sensor. But this is optional.

Setup Required Software

lib.jpeg
manage.jpeg
board.jpeg
  1. Go to Arduino IDE and add the MKR1000 board.
  2. Search mkr1000 and click install
  3. Add required library: Search for libraries to install:
    • ArduinoJson - we'll be using this to send JSON data to ARTIK CloudArduino
    • HttpClient - host for connecting to API
    • OneWire - needed to read digital input from Temperature sensor
    • DallasTemperature - Dallas Temperature sensor required library

Finish adding required software!

Upload the Program

IMG_20160913_140106.jpg
ard.jpeg
16 (1).jpeg

1. Now plug the MKR1000 to your PC/Laptop.

2. Download the software on GitHub here

3. Change ARTIK Cloud API and Wifi Credentials.

4. Then Upload the Software Code to MKR1000 and start monitoring.


Note: Your WiFi must have internet connection.

Field Test

img_3101_Qh5lbFkkb6.jpeg
SCHOOL.jpg

We have tested the hardware sensor to Private, Public and School Swimming Pool. Collecting the data from these respondents' pool enabled us to analyze the capability of the hardware.

You can place the MKR1000 and sensor on a box and put it on your swimming pool away from water contamination. By doing this, you can monitor the quality of your water and normalize them by placing the desired chemicals.

Hope this tutorial helps people to build their own DIY swimming pool water quality monitoring device. May there will be an increased awareness regarding the continuous degradation of the swimming pool water quality as people tend to focus more on the amenities that are offered instead of checking how safe they are. They also intend to contribute to the community by being able to provide a means to make water quality testing more efficient and effective without the unnecessary sacrifice of resources.


Happy building! :)