Twitter icon
Facebook icon
LinkedIn icon
Google icon
Reddit icon
StumbleUpon icon
Del.icio.us icon

Atlas WiFi Pool Meter

Added to IoTplaybook or last updated on: 08/04/2020
Atlas WiFi Pool Meter

Story

This tutorial will show you how to set up the WiFi Pool kit from Atlas Scientific. It measures pH, ORP, and temperature. Data is uploaded to the ThingSpeak platform, where it can be monitored remotely via a mobile device or computer.

IMPORTANT

  • If you do not have the Arduino IDE or do not know what that is, then this product is not for you.
  • This device was developed and tested using a Windows computer. It was not tested on Mac, Atlas Scientific does not know if these instructions are compatible with a Mac system.
  • The enclosure is not waterproof.

Things used in this project

Hardware components

 
WiFi Pool Kit
 
× 1

Atlas Scientific

USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
 
× 1

Newark
Adafruit

 
Windows Computer
 
× 1  

Software apps and online services

Arduino IDE
Arduino IDE
 
  Arduino
ThingSpeak API
ThingSpeak API
 
  ThingSpeak

Step 1: Setup a ThingSpeak Account

Because the sensor data is stored/viewed on ThingSpeak, you will need to set up a ThingSpeak account. Create your ThingSpeak account by clicking HERE.

Step 2: Create a Channel

Your data is uploaded to ThingSpeak through a ‘Channel.’ Select New Channel

Fill out the highlighted boxes. (Be sure to click on the checkboxes to enable field 2 and 3) For reference, this is what we entered.

Name Atlas Sensors

Field 1 pH

Field 2 ORP (mV)

Field 3 Temp (°C)

Scroll to the bottom of the page and click Save Channel.

Step 3: Get ThingSpeak API keys

After you saved your channel settings, you will be redirected to your channel page. Click on API keys.

Be sure to save your Channel ID and Write API Key we are going to need these, in the next few steps.

Step 4: Make sure your Arduino IDE libraries are up to date

A. Make sure you have the correct path for the Esp8266 library

In the IDE, go to File > Preferences

Locate the Additional Boards Manager URLS text box.

Make sure this URL is in the textbox http://arduino.esp8266.com/stable/package_esp8266com_index.json

Click OK.

B. Update the esp8266 board

In the IDE, go to Tools > Board > Boards Manager

In the search bar of the Boards Manager, lookup esp8266. Update to the most recent version if you don’t already have it. (Version 2.6.3 is not the most recent version)

C. Download the ThingSpeak library for Arduino

Click HERE to download the latest version of the ThingSpeak library.

Don’t unzip it!

Import the.ZIP file into your Arduino IDE.To import the.ZIP file go to Sketch > Include Library > Add.ZIP Library

D. Add the EZO I2C Library

To download the EZO library.ZIP file click HERE.

On the GitHub page, click on the Clone or download tab, then Download ZIP

Don’t unzip it!

Import the.ZIP file to your Arduino IDE. To import the.ZIP file go to Sketch > Include Library > Add.ZIP Library

Step 5: Flash the Pool meter with the code

A. Download the code

To download the Pool Meter code, click HERE.

Open the file within the Ardunio IDE and Set your IDE to the correct target CPU Tools > Board > Adafruit Feather HUZZAH ESP8266

B. Adjust CPU Settings

Make sure the CPU settings on the Adafruit Feather HUZZAH ESP8266 are correct. To adjust the CPU settings, click Tools.

For reference, this is what Atlas Scientific set the CPU settings to. (your options may not be exactly the same, just try and match them as closely as possible.)

C. Preparing to flash the CPU with the code

Before you flash the CPU with the code, you need to add your Wi-fi name and password, along with the Channel ID and Write API Key to the code. (see step 3)

Flash the CPU with the code. You are now ready to take readings!

Step 6: See the readings

Open your Arduino serial monitor. (You must have the serial monitor set to the com port from the Adafruit Feather HUZZAH)

Set to carriage return and 9600 baud

The Wi-Fi Pool Meter will always attempt to connect to ThingSpeak on bootup.

If it cannot connect to ThingSpeak you will see this:

Entering the poll command will stop the Wi-Fi Pool Meter from uploading the readings to ThingSpeak, while you debug your Wifi problems.

Step 7: Sensor Calibration

Atlas Scientific created a list of calibration commands that are built into the library. Type in help to see a list of commands.

A. The poll command

Send the command poll; This will let you see the readings once per second and it will stop uploading to ThingSpeak while you calibrate.

B. Calibrate pH

When calibrating pH, you must always calibrate to pH 7 first.

Rinse off the probe, and place it into a small cup of the pH 7.00 calibration solution, and watch the readings. Wait for the pH readings to stabilize. This will take about 1 – 2 mins.

Rinse off the probe and repeat this process for both pH 4.00 and pH 10.00.

B. Calibrate ORP

Rinse off the probe, and insert it directly into the 225mV calibration solution, and watch the readings. Wait for the ORP readings to stabilize. This will take about 10 – 60 seconds.

D. Calibrate Temperature

Calibrating the PT-1000 temperature probe is not required. However, if you want to, a simple method to calibrate the probe is to place the PT-1000 into boiling water. Then issue command rtd:cal, t where t = temperature value.

Step 8: Almost done

Once you are finished with calibration, issue the datalog command to resume taking a reading every 15 seconds and uploading it to ThingSpeak.

To see the data on your phone, download the ThingSpeak app.

Code - WiFi Pool Meter code

Credits

Atlas Scientific

  Atlas Scientific

  29 projects • 94 followers

Atlas Scientific specializes in building laboratory-grade sensing equipment for robots, appliances, and industrial control systems.

 

 

 

 

 

Hackster.io

This content is provided by our content partner Hackster.io, an Avnet developer community for learning, programming, and building hardware. Visit them online for more great content like this.

This article was originally published at Hackster.io. It was added to IoTplaybook or last modified on 08/04/2020.