Pool Arduino controller to read pH, ORP and temperature

Automatic pool cleaners, vacuum heads, pool covers,
decks, fencing, pool alarms and security ....
paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Sat 06 Jan, 2018 03:07

Hi All,

Another project I am working on is a pool sensor controller using an arduino and an ORP and PH sensor together with water temp which will run via PoE to my RRD server so I can plot and track Ph and ORP and pool temp. Helps manage the pool and predict when Ph is about to take a dive so I can correct it earlier.

The Ph and ORP sensors were easy but damn expensive. $400+ for both. I looked at a few water temp options and wanted a simple thermistor that's reliable and cheap so ended up going for an SR20 water temp sensor. I've got the SR wiring diagrams and the sensors are cheap so should work well.

"A couple of Nissan SR20's would pull a premium a week before race wars."

ill post some pics when it's all working


paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Re: Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Sat 06 Jan, 2018 03:10

Ok spent a bit more time on this, namely problem solving before the build. Issues I had;

(1)

the PoE arduino shield I purchased used discontinued POE module so I had a working POE shield and no power module which meant it was completely useless and I only wanted it for Poe to save running another 240v mains outlet at the pool pumps - already oversubscribed in terms of AC outputs. The other issue I had was even if I got the PoE shield then I had to feed it an 802.af source via Ethernet and I only had Cisco aironet POE modules and they aren’t compliant . So I would have had to source another arduino PoE shield and then a PoE supplier.

(2)

i have no way of connecting the sr20 water temp sensor to the arduino. I know you can simply make a resistor breadboard but I don’t have all the parts or schematics



so I did some poking around and got lucky when I came across PoE workarounds and came up with the jaycar PoE passive loop cables. Basically it’s inject your power source over the cat5 cables . The plugs mate to the arduino first shot and I got a $17 AC power adapter that mates to the same plug. So for $30 I got working POE for arduino. This solves a crap ton of problems for me.

for the temperature input instead of making my own or buying a kit I found jaycar have a premade arduino thermistor board and I’ve simply purchased this and will cut off the supplied 2pin thermistor on the board and mate the sr20 plug to it.

very happy. Should have it working in a few weeks.

after some troubleshooting with the passive POE kit ive found out that i actually need 5v 500ma and not 5v 1000ma. the USB built controller on the adruino has overload protection and kept tripping out when i was trying to power it off the 5v 1000ma kit. so what ive done is cut an old USB plug off and mated this to the DC plug and ill extract USB 5v from the intel nuc i have in the cupboard. so i now have working POE and the temperature sensor is working also, so now just need to try the SR20 sensor on it and we are all good.

Ph solution calibrated at a PH of 4 (low end) for caliration purposes...

IMG_6724.thumb.JPG.ac2a9d7bf70964d782c270ef2325c68d.JPG
IMG_6724.thumb.JPG.ac2a9d7bf70964d782c270ef2325c68d.JPG (59.2 KiB) Viewed 3916 times


PH and ORP sensors, these are $250 AU each, but industrial grade...



IMG_6731.thumb.JPG.e0ff0252ec67f152ba0c1847d4a43ab8.JPG


The sensors come with a pluggable loom so it mates straight onto the arduino as each sensor uses BNC connectors for outdoor usage

IMG_6733.thumb.JPG.0c5e57e27e44631e38dea2e3386698d1.JPG


once i get it all working, the end goal is this setup which i currently have for a range of other crap in the house, but it will have PH and ORP for the pool and pool temperature
paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Re: Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Sat 06 Jan, 2018 03:14

RRD current temperature probes that I have already

drraw.thumb.png.28a5cf2f68a17a3d723ede36888861c0.jpg


did some sensor calibration for the water temp sensor, spent ages looking up NTC documentation and scientific crap

in the end, the simplest approach is the one that often works, grabbed the vipec manuals and dig up their resistance / temp ranges for the NTC thermistors and used their values and it works spot on, so its accurate. the water temp sensor is a large bodied sensor so its nice and slow to respond and react to temperature changes which is ideal for my application.

if you are curious, these three coefficients are prefect for the sr20 water temp sensor (NTC)
Selection Criteria
Lower
Temp C Midrange
Temp C Upper
Temp C Resistance
@ 25° C Thermistor
Curve
-40 55 150 2,103 Z/D (-4.4%/C @ 25C) Mil Ratio B



Results

(Data is for Reference Only and is subject to change)
Coefficients
a = 0.001486256111584
b = 0.000237996994255
c = 0.000000104123343

made some great progress tonight, got all the sensors wired in and connected and did a wet test run using pool water in a bucket
all the sensors are working and im getting real values so all happy. now to plumb the sensors in permenantly and its all good.

it looks a bit mad scientist style at the moment but it will be all installed into an outdoor junction box to cover and hide it all up.

IMG_9928.thumb.JPG.f7d4b9eea1cd60340bc2a3a72590bb52.JPG
IMG_9927.thumb.JPG.73414ffd01094545cb40143e382b6e80.JPG
paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Re: Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Sat 06 Jan, 2018 03:16

working prototype

IMG_9938.thumb.JPG.922c4e3a6ebc8c2b1a98a42dba12f9e1.JPG


Once i have the sensor plumbed in properly and a few days of logs/data i will post it up
Teapot
Pool Industry Leader
Pool Industry Leader
Posts: 1337
Joined: Tue 17 Oct, 2017 10:52
My Pool: 12 x 24 (45m3) liner pool, Triton TR60 filter with AFM glass media (Activate) and variable speed pump running 0.08HP
Location: UK

Re: Pool Arduino controller to read pH, ORP and temperature

Postby Teapot » Sat 06 Jan, 2018 15:20

paulr33 wrote: Helps manage the pool and predict when Ph is about to take a dive so I can correct it earlier.

Cool project, it's one on my list, I have the arduino and sheilds, probes sitting in my office but so far it's sat for 8 months with other stuff taking preference.
I watch with interest and a little awe.

Why does your pH take a dive? any water figures available?
paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Re: Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Sat 06 Jan, 2018 20:07

i dont have any logging data yet, the sensor should get plumbed in today. i find our water (in melbourne) is rock hard and i have to regulary add pH down to bring it down.
once i have some graphs ill show you what i mean. also not sure what sort of ORP values I should be expecting, ive read 650 is a good target. i did some testing of pool water in a bucket and the ORP was around 220 when seems pretty low. i guess it will make sense when i have a day or so of average data instead of a small sample in a bucket
Teapot
Pool Industry Leader
Pool Industry Leader
Posts: 1337
Joined: Tue 17 Oct, 2017 10:52
My Pool: 12 x 24 (45m3) liner pool, Triton TR60 filter with AFM glass media (Activate) and variable speed pump running 0.08HP
Location: UK

Re: Pool Arduino controller to read pH, ORP and temperature

Postby Teapot » Sun 07 Jan, 2018 05:49

Redox is not a very accurate measure, the cyanuric acid stabiliser plays havoc with the reading.
Better to get the correct level of chlorine relative to your cyanuric acid level and then take the redox reading and look for a consistent levels with temp and pH also.

Water hardness and alkalinity both have an effect of pH but alkalinity more so. I'll wait for some figures on those before making any comment.
paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Re: Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Mon 08 Jan, 2018 03:44

yeah its a learning experience thats for sure. the pool is pretty easy to look after and i am always keen on electronics and any adruino applications to see what else i can learn and discover.

got the sensors plumbed in and just waiting for it to cure, will run it tomorrow and see how the data looks

IMG_0040.JPG
IMG_0040.JPG (148.56 KiB) Viewed 3899 times
Teapot
Pool Industry Leader
Pool Industry Leader
Posts: 1337
Joined: Tue 17 Oct, 2017 10:52
My Pool: 12 x 24 (45m3) liner pool, Triton TR60 filter with AFM glass media (Activate) and variable speed pump running 0.08HP
Location: UK

Re: Pool Arduino controller to read pH, ORP and temperature

Postby Teapot » Mon 08 Jan, 2018 10:12

OK, any news on hardness levels and alkalinity?
paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Re: Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Sat 13 Jan, 2018 20:29

just waiting to get some more data and a useful baseline before posting it all up. the sensors get noisy data when the pumps run so ive had to adjust my graphing system to avoid the window where the pumps run. also had some issues calibrating the ph sensors but i think its right now. waiting on a meaningful ORP reading (should get one today), but still not sure if its right. so ive ordered a pen style ORP sensor to compare readings to make sure my code is right.
Teapot
Pool Industry Leader
Pool Industry Leader
Posts: 1337
Joined: Tue 17 Oct, 2017 10:52
My Pool: 12 x 24 (45m3) liner pool, Triton TR60 filter with AFM glass media (Activate) and variable speed pump running 0.08HP
Location: UK

Re: Pool Arduino controller to read pH, ORP and temperature

Postby Teapot » Sun 14 Jan, 2018 05:26

If your sensors are mounted in the main flow stream and not as most pro kit is in a separate slower flow chamber it is quite likely the probes generate a lot of turbulence around their tips causing the noise.
paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Re: Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Mon 15 Jan, 2018 05:30

the ph sensor is reading good values, checked against calibration and chemical (droplet) test but the ORP values are off the planet. im reading on average, -200 to -400 for ORP which from what ive seen is way off a reasonable baseline of 550 to 600. My alkalinity levels were low (80ppm) so I added some increaser and now my alkinlinity is around 130ppm which is in the good range and my Ph shifted a little so ive brought that back down to 7.6 and now awaiting to see what ORP looks like. Free chorline looks good around 3ppm.

maybe the ORP sensor is toast? ive ordered a seperate ORP pen sensor to see if my pool is off the planet or the sensor is dead/out of range.
paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Re: Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Mon 15 Jan, 2018 05:32

yes you are right, re: samples and i am ok with that as i can make code for my graphing engine that means it only captures and plots data during non-pump running timeframes so thats not an issue for me, and the whacko readings im posting up are when the pump is off also to rule out interferance. the only thing im not doing is sampling one sensor at a time, the code is active for both sensors and both are running in real-time and the documentation talks about avoid electronic interferance so i could change the code to sample Ph then turn the sensor off then sample ORP then turn it off and back again, whereas currently both sensors are always powered on and active
Teapot
Pool Industry Leader
Pool Industry Leader
Posts: 1337
Joined: Tue 17 Oct, 2017 10:52
My Pool: 12 x 24 (45m3) liner pool, Triton TR60 filter with AFM glass media (Activate) and variable speed pump running 0.08HP
Location: UK

Re: Pool Arduino controller to read pH, ORP and temperature

Postby Teapot » Mon 15 Jan, 2018 05:47

Paul, I noted you said you have low Alkalinity (80ppm) Your pool is fiberglass and therefore you can run with your alkalinity much lower, this will help stabilise the pH around the usable figures for our pools (7.2-7.6) providing you are not relying on pre packaged tabs for chlorination?

My pool, (vinyl liner) runs around an alkalinity of 37-50ppm with near rock solid pH and less acid needed when pH correction is required. The higher figures used by the industry were born from concrete pools that require it. In effect you are over dosing causing a higher build up and more out gassing of CO2 which causes the pH to rise.

If using tablets to chlorinate you could get pH fluctuations using lower Alkalinity as they are made with higher alkalinity in mind but it's not needed.
paulr33
Pool Care Proficient
Pool Care Proficient
Posts: 40
Joined: Wed 03 Jan, 2018 18:53
My Pool: Fibreglass Salt Water Pool, 45k litres
Location: Melbourne, AU
Contact:

Re: Pool Arduino controller to read pH, ORP and temperature

Postby paulr33 » Mon 15 Jan, 2018 06:00

hi teapot, thanks for the reply so quickly. i use liquid chroline when i add it as its directly active and easier to use/handle. we have a pool tech come out once a year and plan on doing it each year and he said our alkalinity level was low also and said it should be around 80 to 120ppm. once i get this other ORP sensor I can then do some comparisons as the values im getting make no sense. the last tests i did today were free chorline 3ppm , ph 7.6ish and alkalinity approx 130ppm but yet ORP comes out at -439 - doesnt make sense!

Return to “Pool Equipment & Other Pool Maintenance”

Who is online at the Pool Help Forum

Users browsing this forum: No registered users and 14 guests