WSM Set Up Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 8

Well System Monitor
Installation and User Manual
© 2018, Jim Schrempp and Bob Glicksman, Team Practical Projects
Version 2.0; date: 9/21/2018
Installation of the Well System Monitor
Concept
We highly recommend that you first read the Project Concept document included in this
package. The project concept document explains the use cases we address with the well
system monitor and discuss some of the limitations and future expansions.
The system consists of a microprocessor controlled system that monitors several sensors and
reports their status to a cloud based storage facility. The project is based on the popular Water
Leak Detector by Team Practical Projects as found on GitHub. The reader will need to build the
Water Leak Detector hardware before continuing on this project.
This project uses the Particle.io Photon microprocessor and Google Docs Spreadsheet cloud
storage. MIT App Inventor 2 is used to create a test app for an Android smartphone.
© 2018, Jim Schrempp and Bob Glicksman, Team Practical Projects
How the system works
The well monitor system connects over WiFi to the Particle.io cloud service. This is how it talks
to the internet and how we can talk to it. The Android app can also connect to the Particle.io
cloud and talk to the well monitor system for the purposes of testing and checking on system
status. To provide long-term data logging we use the IFTTT service to gather data from the well
monitor system and store it in a Google cloud spreadsheet.
Well Monitor ----> WiFi ----> Particle.io ---> IFTTT ----> Google Spreadsheet
|
‘---> Android app
Accounts
You will need accounts at the following websites:
1. Google (Google Drive app)
2. Particle.io
3. IFTTT
For the Santa Rosa installation account user names and passwords, see the document of that
name.
Well Monitor Setup
WiFi Connection
Before continuing you will need to have know your WiFi network name and password. As you
work through this list of actions you may want to check each step off as you go.
A. Install the Particle.io application on your phone and Claim the Particle Photon into your
Particle.io account.
a. For iPhone, see:
https://itunes.apple.com/us/app/particle-build-photon-electron/id991459054?ls=1
&mt=8 .
b. For Android, see:
https://play.google.com/store/apps/details?id=io.particle.android.app .
c. For Windows mobile, see:
https://www.microsoft.com/en-us/p/particle/9nblggh4p55n?activetab=pivot%3aov
erviewtab)
B. Get the Particle Photon onto your local WiFi. (see:
https://docs.particle.io/guide/getting-started/start/photon/#step-1-power-on-your-device)
a. Put Photon into WiFi configuration mode
© 2018, Jim Schrempp and Bob Glicksman, Team Practical Projects
i. Connect the WSM to power. Wait about one minute.
1. If the Photon is “flashing blue” about twice a second then go on to
the next step.
2. If the Photon is “breathing cyan” or “flashing green” then
a. On the Photon find the Setup button (see photos below)
b. Hold down the Setup button until the LED starts flashing
blue. Now release the Setup button.
ii. The LED should now be flashing blue. If not, repeat the process
b. Start the Particle.io app on your phone.
i. Log in using the Particle.io credentials above.
ii. Find the + button to add a new device.
iii. Select Photon
iv. Follow the directions in the app to provide your WiFi credentials to the
Photon. IMPORTANT - if the app asks you to provide a new name for the
device, just backspace to clear the name field and tap Done.
c. The Photon LED will turn colors, eventually turning green, then flashing green.
i. Then the LED will turn cyan.
ii. Then the LED will begin “breathing” cyan.
d. You are done. Your Photon is now connected to the Particle.io cloud.
Test your Well System Monitor
A. Install the WSM .apk file on your phone (see:
https://github.com/TeamPracticalProjects/WellSystemMonitor/blob/master/TestApp/docs/
Well_Monitor_App_Installation_and_User_Manual.pdf.
B. Start the WSM application.
C. Note the TEST: OFF indicator in the app.
D. Press and hold the test button on WSM system.
E. Tap the “UPDATE SYSTEM DATA” button in the phone app.
F. Note that the TEST switch indicator has changed to TEST: ON.
G. Ok, it’s all working
Hook it up
A. Mount the WSM in a convenient location within 6 feet of the well system relay box.
B. Mount the RJ11 box, near the pressure pump and the well pump relays.
C. From the RJ11 box, run two wires to a currently unused set of contacts on the relays.
(shorting these wires will not hurt our system). The contacts should be normally open
and close when the pump turns on.
a. Yellow and Green to the well pump
b. Red and Black to the pressure pump
D. Use the telephone cord to connect the RJ11 box to the WSM.
© 2018, Jim Schrempp and Bob Glicksman, Team Practical Projects
Final Test
A. Cycle each of the pumps that the system is monitoring.
B. When a pump goes on or off, tap the UPDATE SYSTEM DATA button on the test app
and make sure the app display correctly reflects the state of the pump.
C. You are done!
Logging with Google Docs and IFTTT
The WSM intends to log its sensor data to a Google Docs Spreadsheet for trend analysis.
IFTTT
Log in to IFTTT and create a new applet. For the trigger select Particle.io. It may prompt you to
log in to your Particle.io account. Select your Photon that is running your WSM. Set the trigger
to New Event Published with a name of “WSM”.
For the action select Google Sheets. It may prompt you to log in to your Google Drive account.
Make the spreadsheet name EventName and have it append a row with the following
ingredients: EventName|||EventContents|||DeviceName|||CreatedAt
We used a Photon named P7_WSM and a Google account of “WSM
Santa Rosa”. The summary of our applet is:
Output
Spreadsheet
IFTTT will create a Google Docs Spreadsheet and then append events to it as they happen.
This logging can lag 10 minutes or more from the time the event happens.
This is a sample of the spreadsheet. The columns are: Event Name, Event Value, Device,
IFTTT Time. The first row was a WSM event from device p7_WSM, recorded by IFTTT at 06:53
(no time zone specified).
The second column is the value of a WSM event. Note that it contains three pieces of data:
Photon Time when the event was posted by the device, Sensor Name, Sensor Value. For
example, the first entry is a post made by the device at 13:53 GMT. The event was reporting the
smoothed humidity, current value of 62.99%.
© 2018, Jim Schrempp and Bob Glicksman, Team Practical Projects
Pivot Table
The raw data table is great for knowing details, but it can be hard to scan the spreadsheet to
see what’s happening over time. A Pivot Table helps.
We need to prepare the data for analysis by parsing the second column and adding column
titles. First step is to select the second column. The right click and choose to add a column to
the right. Do this again so you have two blank columns.
Now select the second column. Go to the menu and select Data -> Split Text To Columns…
Google will probably select the wrong separator. Click the pop up, choose Custom, and type a
vertical bar | in the text box. Press Enter.
This will fill in the first blank column you created. Now
select that column and Data -> Split Text To Columns…
again. This time use the colon : as a separator.
Insert a row at the top of the sheet and give each column a
name. Your sheet should now be formatted like this:
© 2018, Jim Schrempp and Bob Glicksman, Team Practical Projects
Select the entire sheet and then Data -> Pivot Table. This will open a new
sheet with a blank pivot table. The pivot table editor should open. Make this
your configuration and your pivot table should look like the one below.
© 2018, Jim Schrempp and Bob Glicksman, Team Practical Projects
Graph
Finally we get to the graph. Select the entire pivot table and the Insert -> Graph.
In the graph below we see all the information from the sample data used above. Temperature
has held at about 69 oF. Relative Humidity is at 62%. Both these values are plotted to the left
y-axis. The sensors are plotted to the right y-axis. When the sensor is at the top line the sensor
reports true; bottom line, false. When the sensor is high, that pump is ON.
In the sequence plotted below we see that the pressure pump turned on three different times.
While the pressure pump was running for the third time, the well pump came on. The well pump
remained on until after the pressure pump stopped.
The graph can be a bit tricky to format, and there are so many config choices. We will outline
the choices we made to get the graph shown above.
1. DATA:
a. Use row 1 as headers
b. Use column A as labels.
2. CUSTOMIZE
a. Chart Format: Plot null values
b. Series
i. Humidity and Temperature to the left axis
ii. All the other sensors to the right axis.
iii. Sensors each get a different Point Shape and Color. Point Size, 10px.
c. Right Vertical Axis limits -0.5 and 1.5
© 2018, Jim Schrempp and Bob Glicksman, Team Practical Projects
Helpful Photos
The Particle.io Photon processor
1. There is an LED in the center of the board.
When the device is initializing this LED will
turn many colors. If something goes wrong
the color will help diagnose the issue. When it
finally starts “breathing cyan” then the device
is connected to the Particle.io cloud service.
2. Note the two little buttons on either side of the
LED. The one on the left is labeled SETUP
and the one on the right is RESET.
There is another LED on the right
side of the board. When working
properly the blue LED will blink
on/off every five seconds.
This is NOT the LED that is
controlled by the Reset and Setup
buttons.
© 2018, Jim Schrempp and Bob Glicksman, Team Practical Projects

Navigation menu