AtlasScientific WiFi Pool Kit Water Quality Monitoring User Guide

June 6, 2024
AtlasScientific

AtlasScientific WiFi Pool Kit Water Quality Monitoring User Guide
AtlasScientific WiFi Pool Kit Water Quality Monitoring

Stop: Atlas Scientific does not make consumer electronics.

This equipment is intended for electrical engineers. If you are not familiar with electrical engineering or embedded systems programing, this product may not be 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.

Operating principle

The Wi-Fi Pool Kit has been designed to provide the engineer with a simple way of remotely monitoring and controlling a pools system’s chemistry. Sensor data is uploaded to ThingSpeak ™, a free, cloud-based data acquisition and visualization platform. The Wi-Fi Pool Kit has also been designed to be easily modified by the engineer. Feel free to change the sensors or functionality of the device to meet your specific needs.

Overview

CPU

The Wi-Fi Pool Kit is controlled using an Adafruit Feather HUZZAH as its CPU. The HUZZAH is programmed using the Arduino IDE and uses an onboard ESP8266 as its Wi-Fi transmitter. Adafruit Feather HUZZAH datasheet.

Sensor ports

The Wi-Fi Pool Kit PCB has 5 sensor ports. Three of the ports are electrically isolated. The isolated ports are marked pH, ORP, and AUX. The isolated ports are needed to take noise-free electrochemical readings. Because the sensing element of a temperature sensor is never in direct contact with the water, electrical isolation is not needed for temperature sensing.

The AUX port can be used to add an additional sensor of your choice. The terminal block marked Port 5 has been designed to connect one or more dosing pumps to the device. However, the port could also be used to connect a gas sensor.

Sensor ports 

PCB

The overall design of the PCB is quite simple. The CPU is powered and programmed through the panel-mount USB connector. The CPUs onboard voltage regulator supplies the board’s power bus with 3.3V at 500 mA peak. All connected sensors are running at 3.3V.

Design of the PCB

Each of the four main sensor ports have an enable pin, which must be set correctly to power the sensor. The enable pins are found here:

Sensor ports

The first three pins (pH, ORP and Aux) must be set low to power on the sensor. The last pin (Temp) must be set high to power on the sensor.

Truth table

Truth table

Sensor port 5 (the terminal block) does not have an enable pin and can not be turned off.

Data protocol

The CPU communicates with all peripheral sensors using the I2C data protocol. All data lines are directly connected to the CPUs I2C port. Using a different data protocol with this circuit board is not possible.

It is important to keep in mind that all Atlas Scientific components default to UART mode. When adding a new Atlas Scientific component to the kit, it must first be put into I2C mode. Refer to the component’s datasheet for instructions on how to switch it over.

Adding more of the same sensor or component type

Adding additional components of the same type, such as an additional pH or ORP sensor, is not hard to do. As mentioned above, you must set the device to I2C mode, and you must make sure that its I2C address is not the same as the already existing component.

Adding additional components

This table lists the default I2C address of components commonly added to this kit.

Truth table

Dosing pump

An optional dosing pump can be added to the Wi-Fi Pool Kit. Using both the Large Embedded Dosing Pump and our sensor bridge is the simplest way to add on a dosing pump.

Dosing pump

You can directly connect an EZO Pump to the Wi-Fi Pool Kit without the sensor bridge however you must remove the data cable connector and manually put the pump into I2C mode.

EZO Pump

Uploading sensor data to the cloud

The Atlas-Scientific Wi-Fi Pool Kit has been designed to upload sensor data to ThingSpeak ™, a free, cloud-based data acquisition and visualization platform. You will be required to set up a free account with ThingSpeak ™ to upload and visualize  the data. With a free account, you can upload data once every 15 seconds. A paid account lets you upload data once per-second; look here for more info about various ThingSpeak ™ services.

Atlas Scientific has no business relationship with ThingSpeak ™; we just like how it works. If you want to use a different service, modify the device as you see fit.

Setting up your Wi-Fi kit

Step 1 Setup a ThingSpeak Account

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

Setup a ThingSpeak Account

Step 2 Create a Channel

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

Create a Channel
Create a Channel

ill out the highlighted boxes. (Be sure to click on the checkboxes to enable field 2 and 3) or 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

ThingSpeak API keys
ThingSpeak 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.

Esp8266 Library

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

Esp8266 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.

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

library for Arduino 

D: Add the EZO I2C Library

To download the Ezo_I2c library file, click HERE.

EZO I2C Library

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 kit with the correct code

A: Select, open and adjust the code you want to use for your Wi-Fi Kit

File > Examples> EZO_I2C_lib-master> Examples> IOT_kits> pool_kit 

B:  Fill in your Wi-Fi / ThingSpeak credentials

Fill in your Wi-Fi name and Password, along with the Channel ID and Write API Key to the code. (see step 3)

ThingSpeak credentials

C:  Setting up your pump

If you do not have a pump attached, you can just skip this part. The code is rather self explanatory. You set what parameters will trigger the pump to engage.

Coding

Step 6 Setting up the HUZZAH board

A:  Set the target CPU to flash

Tools > Board> Adafruit Feather HUZZAH ESP8266 

Setting up the HUZZAH board

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.)

Step 7 See the readings

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

Arduino serial monitor
Set to carriage return and 9600 baud.

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

Wi-Fi Pool Kit

If it cannot connect to your Wi-Fi you will see this:

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

Step 8 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.

Sensor Calibration

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.

Remove the soaker bottle and rinse off the pH probe. Remove the top of the pH 7.00 calibration solution pouch. Place the pH probe inside the pouch and let the probe sit in the calibration solution until the readings stabilize. This will take about 1 – 2 mins.

Calibrate pH
Calibrate pH

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

C:  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

Calibrate ORP
Calibrate ORP

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

100 °C V

Calibrate Temperature

Calibration Complete

Step 9  Almost done!

Once you are finished with calibration, issue the data log 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.

Setup Complete!

Documents / Resources

| AtlasScientific WiFi Pool Kit Water Quality Monitoring [pdf] User Guide
WiFi Pool Kit Water Quality Monitoring
---|---

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Related Manuals