PoolDuino - Automate my pool with Arduino

The valve for the fountain and filling system look fine, but keep in mind that they draw power the entire time they are on. I'm a bit of a nut about saving power anywhere I can. In your situation, power may not be a problem at all. The PH probe is actually pretty cool, I'm wondering how well the calibration holds up and how long the probe actually lasts though. The problem with these things is that they sometimes need to be calibrated a lot to keep a reasonable accuracy.

My filling system is a simple little well with a float in it. Very simple and totally problem free for years now. The same kind of thing they use on an evaporative cooler. An automated one should work fine, but remember, when it fails it could die with the water on.

I have a Hayward pump: EcoStar | Pumps | In Ground Pool Pumps - Hayward Pool Products. This little jewel pulls around 2800 watts at high speed and as low as 150W at low speed. I have to run it around 1800 rpm to get enough head pressure to operate the chlorinator and the solar heater and that pulls around 325 watts. These little jewels (well, not real little) can save you around 75% on pool power usage if you currently have a single speed pump and run it during peak periods. Currently I'm only using two speeds, low and high (I can set each of these to any rpm) and my controller handles that for me. However, take a look at the manual, there is an easy way to get 4 preset speeds out of the pump. Needs 4 relays to do it, but that part is easy.

As for pictures of some of the stuff, check out my blog under 'swimming pool'. http://draythomp.blogspot.com/

markB I don't think this stepper motor would be strong enough to turn a ball valve. If so PLEASE LET US KNOW!! This would be a great and cheap mecanism.

I agree. You would need a gearbox, and then you may as well use an actuator, unless your're a mechanical wizz.
I looked at automating a 1 inch ball valve and it got too hard, thats why I started on the gate valve idea.
Sorry no cheap solution...

Those pumps look like a great idea. Far better than adding a VFD.

Thanks for the PH probe link, they do seem a little cheap, but maybe they work fine for a year or more.

Mark

regarding my water leveler failing, since i'm using this sprinkler solenoid, if we loose electricity while it fills the pool, the water will stop! that's what's cool about it.

Ok so a few things. Those are not pretty, just basic drawing I'm doing to help myself understand where I'm going with this. again, basic!

First diagram is the logical flows for the water level. I want to make sure I cover every states of the software, to prevent any failure. I'm hoping to have more success with the ethernet shield since you pointed out some of them are failing.

Imgur

second picture is something i'm still not sure about. I'd like to come up with some sump tank where I could put all my equipments. If you're familiar with salt water aquarium tank, that's what we use (sump tank) for the monitoring/filtering stuff. This small tank would probably be a cylinder with a radius of 6-8 inches, 2-3 foot tall, and have a pipe (3-4 inches) to connect it to the pool. The pipe would need some angle to prevent water staying in during winter. I would also get some portion of the water output from the pump in the tank to get a fresh read on every probe. The temperature would be higher than the rest of the pool, but that's alright if you know and can take this into consideration.

Imgur

Dave, I saw on your website that you're logging the water temperature. Which probe do you use? I was planning to use a/some LM35DZ and encapsulate them like this guy did:

talk to you later!

This is the temperature sensor. I've had three of these in service for five years and they don't seem to fail.....ever. The one problem with them is that they are black and heat up in the direct sun. That can easily be fixed with a piece of metal tape over the part that is exposed. Of course, if you want the temperature of the ambient air don't cover them. They can be purchased for far less than the picture shows if you look around. http://www.amazon.com/dp/B004S3KCLC/ref=asc_df_B004S3KCLC1605341?
smid=A3J45EP2ZLXHOW&tag=nextagusmp0395406-20&linkCode=asn&creative=395105&creativeASIN=B004S3KCLC
However, waterproofing one of the temperature sensors we use with the arduino is a piece of cake, you only have to protect the wires coming out the bottom of the sensor and you can do that with epoxy or polymorph or a plastic straw filled with silicone caulk.

The way I've seen samples taken is to drill directly into the 2 inch pipe and just stuff the sensor in there. This is done on both my solar and pool temperature probes. For ph, you can put a piece of 6 inch pipe in the plumbing somewhere and create a water filled area to insert the probe. Other folks may have better suggestions in this area, check some of the swimming pool forums for tips on this kind of thing. That's where I got the acid injector idea.

I don't see anything wrong with your logic for the pool water leveling. Just remember to watch it carefully for the first few days to be sure nothing bad happens. Try turning the feed line down to a dribble to be sure you don't go too far with it.

Guys
How about these
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=151

When I was repairing spa controllers, they used a stainless sleeve into the filter housing, and a cable gland that sealed against the sleeve.
If you do it that way, use a bit of heat transfer paste (white stuff used between a transistor and the heatsink) to improve the thermal transfer.

mark

I am Soooooo going to get one of those temperature sensors. I can hook one of those to an XBee inside and thread the thing outside to measure air temperature. It will be the next sensor I use for testing the hot water in my solar water heater. Thanks a lot for the link. I should have known Terry would have something cool like that.

Glad to help.

Terry also has some great Nordic 2.4 GHz devices, with the basic starting at $4.75 and 200 feet range.
I've ordered a couple because Xbee is REALLY expensive here.

Plus the USD is really favourable at the moment.

Cheers
Mark

hey quick question for you. Why do I need the goldline control if I have an arduino?? Why did you interface with yours if you are using an arduino?

I'm probably missing the point.

No, you're not missing the point. Decoding the Goldline protocol and using it is only a step in a whole lot bigger project that I have in mind. See, I don't understand the chlorinator yet and have to use the goldline controls for motor and such to make it work. Eventually, I'll get rid of the Goldline entirely and control everything with my own controller. Meanwhile, I tried to get Goldline to tell me about the protocol and they stonewalled me. That kinda ticked me off, so I decoded a sizeable hunk of their protocol and put it on the web. 8)

I think I'll start my own controller off with a simple set of controls for the lights, fountain and waterfall. Then expand it to the solar heater; leaving the chlorinator and motor control on the goldline. Then I'll start trying to create my own chlorinator. When that works, I'll have a complete system. The lights and stuff are basically easy except for setting up the timers and such. That requires some kind of menu control, and having done them before, don't really like writing that code even a little bit.

As to why I have the goldline at all. It came with the pool.

Quick update on this:

we met a few pool vendors and we're about to pull the trigger. I decided to go ahead with my "sump" in the shed. I'll get a local steel fabricator to build it, and the pool installer agreed to help me in my project. I'm not getting a P4 and will only get the chlorinator since I'll be making the controller myself. I'm also gonna get a variable speed pump.

right now i'm struggling with my arduino on a few things. those being: ethernet module (enc28j60) being a real b*tch to work with. I'm gonna have to get a "real" w500 one I believe. I also received my phidget probe adapter and I tested them. They seems to work fine but until I get both my Ph and ORP probe there's no way to tell. I'm also having some difficulties with a relay boards I got which was suppose to turn on/off 110V electricity based on 12V input and 5v signal but I'm not sure why it is not working. I just received a few SSD relays that I'll try right after this post. Last problem in the queue is a set of LM35 I've ordered. out of 5, only 1 "seems" to work "ok". Shitty crap from china. I knew 3$ for 5 sensors out of ebay was too good to be true!!

nothing really relevant to anybody reading this post but just to let you know that i'm moving forward and that you should expect some nice pics of the building. I've started working on the enclosure, my water level code is done, if the SSD relay works tonight I should have the initial release ready to show you.

stay tune.

The 5100 has its own problems, but it is much easier to use and takes far less code space. There's tons of examples out there on the web for this device so you should be fine with it. As you go, make sure you can stand a board hanging up or rebooting unexpectedly. Power failures happen and the arduino will hang up from time to time for no apparent reason. The reason is almost certainly bad code, yours or something in a library somewhere, but you may never find it. So, get familiar with the watchdog timer and resetting the time when you have to reboot.

I've played with three different temperature sensors now and the lm34 was the most accurate and easiest to use. So, I'm surprised you are having trouble with the lm35. Could be you're right about the quality, but everything I've gotten out of China has worked first try; lucky I guess.

Wow, I haven't been on here a while, but I'm interested! Good idea! Never thought about this before.

You're going a little more extensive than I would've gone with it though.

I would just add some 240V SSR to the arduino so I can control the timer and when the pool goes on/off so I can measure power usage vs chlorine level.

If you switch to using UV light filter (kinda expensive), you wont even need to worry about measuring chlorine level, just pH.

Why do you need to actuate the 2" valves for?

You can get one of those irrigation solenoid controlled valve and control those with arduino if all you're doing is using it to fill up the pool when it's low, or turn on a water line for a slide or something.

I'm going to incorporate this into my pool!

I'm using X-10 right now for home automation along with an Arduino. Shouldn't be difficult to add a couple valves for random stuff like that.

Do you think this component would work to analyze water pressure?

I'm just afraid that if I make a hole in one of the pipe after the filter, the pressure will be different in the "T" section compare to what's being pushed as the pressure wouldn't be as much.

I should have listened during those hydraulic pressure classes!

It should do a reasonable job of measuring pressure differential, but what do you need that for? I only have one pressure guage on the entire system, the one that is mounted to the top of the pump. I originally wanted them all over the place, but it turned out that I was much more interested in flow than pressure. That's why I use 2 inch pipe everywhere except the elements of the solar heater. Flow I simply control by looking at how much water is going around in the various items.

hi guys,

just received my 2 adapters for ph and orp. (phidget stuff). Also got what I believe is my ph probe. Yes I'm not sure, i've ordered both and it's not written which one is what!!! :slight_smile:

anyway, will do some testing this morning and will keep you posted.

Imgur

grido
Regarding your pressure sensor.

I read somewhere that electronic sensors don't like moisture, and the thought was to put them on the sealed side of canister.
To save our water pump stopping and starting everytime the tap is turned on, we use a pressure pot on the pump. Basically its a big metal can with a rubber bladder, that you put x pressure air into one side, and the other side is tapped onto the water line.
When the water pump is off the bladder supplies an amount of water until the pressure drops low enough for the pump to kick in.

I was thinking that if you had a similar device, and measured the air pressure, it would ensure no moisture got near it.

Mark

hi folks,

i just received a few others items. ORP probe, casing, some butttons, my crystal lcd with serial input, just to name a few.

I want to finish the phase 1 asap, which will be the automated water leveling, reporting/alarming over internet, and basic stats gathering (ph, orp, temp, air moisture, light).

I'm still waiting for my arduino mega (need more input/output!), me w5100 shield (the cheap enc23452345 is a piece of junk!) and my floating sensor. I've met the guy who will install my pool and we agreed on my design (second simili-skimmer in the shed). I will send my plan to some local metal shop to get a few quotes and see how much I'll end up paying. I don't expect to pay more than 200$ for this.

I should be able to work on the final look of my enclosure with all the input/output and post some pics over the week-end. stay tune! sorry if i don't have much right now, we are working on getting what we want regarding the pool itself! (which represent a huge investment).

Don't worry about how long this takes. You'll be building and experimenting for months before you get it the way you want it and then changing it for as long as you have it. The fun is in the process. Yeah, that sounds like some spiritual movie crap, but it's actually the truth. Some of my most interesting projects were tough to figure out and took a long time to get right. Plus, the bragging rights only come when you can explain how complex the problem was to someone that is actually listening to you. Heck, I've spent a couple of weeks just trying to figure out how to hook up a solar heating panel and not have it come apart when the pressure is applied. That's going to be quite a story eventually.

So play with your new stuff and take a lot of pictures so you can show it off.

Hi Grido,

I have only just starting experimenting with Arduino and wish to build a system to control my pool as well. I am wondering how the project turned out. Was ORP control effective?