PoolDuino - Automate my pool with Arduino

Guys
I'm curious about the PH meter/probes you have been using.
Any links to them. I have been asked for another type of project and the cost is quite high, so I'm looking for any leads.

Re Valves
I'm curious if you can use a 2'' version Gate Valve and have a stepper instead of the handle.?

I'm also wondering if some of the irrigation suppliers can source 2" valves at a lower cost. Here in NZ they aren't cheap.

Many years ago I knew someone who used a saturated chlorine solution, and just poured the liquid in, which I guess left all the solids out of the pool...His pool was gin clear, so maybe it was a good idea.

We have a smaller pool that the wife wanted, so its her job to do the cleaning, chlorine, etc....far easier for me.

I do like your VFD for the pump though, there was an article in Silicon Chip (Australina Electronics mag) about a similar device.
You had to manually choose what your were doing, and it included a few preset times, but a simple Arduino controlling a basic VFD would work just as well.

Mark

I honestly don't know if the valve you show can be used with a stepper motor. The problem I see is that the valve in the picture is a gate valve which is usually multi turn and that could be a problem. My experience has been that the valves have too high a resistance and require too much torque for most devices. Maybe one of the folks that deal with motor control can comment on that. Also, brass on the valves of a pool can be a bad idea with the various chemicals involved, but there are a lot of plastic ones to choose from.

I have used a regular ball valve with the actuator I showed in the picture, but it took making an adapter to go from the female socket on the actuator to the valve stem on the valve. It has been working for a couple of years with no problem however. The reason I did this was because I was automating a fountain valve which was 3/4 inch and I couldn't find a swimming pool valve for that size pipe. So something along those lines may be possible.

On another note, the prices on the actuators seems to be coming down, albeit slowly, so maybe you can find a bargain on one of them. Also, since I haven't needed many of them and have spread the purchases over a few years, I haven't been too motivated to find a cheaper method. If you figure out how to control a two inch water line cheaply, be sure to post it. You'll become an immediate hero because these things are darn expensive. They have to set out in the weather with freezing cold and scorching heat for years at a time and that's tough to do.

Regarding PH, I haven't tried them yet, but this place http://atlas-scientific.com/ has a pretty compelling array of devices. I plan on getting one of these http://atlas-scientific.com/Details.cfm?ProdID=32&category= in a few months to experiment with. Don't let the U$25 price fool you though, they need a probe (http://atlas-scientific.com/Details.cfm?ProdID=35&category=) and it costs U$55 so the whole package is U$80, but that's less than one designed for a pool by one of the big names. Additionally, the documentation indicates that we can tweak the code to correct for calibration drift over time and get several years out of a single probe. My only concern is that the company goes out of business or gets bought out by one of the big companies after I have become accustomed to using their products.

I suspect that before I get done with this I'll have a complete pool controller running. The one thing that will take some serious experimentation is building a chlorinator from parts available around town. I've got a good hint from those things they make to split water into H and O to (supposedly) increase gas mileage. That's exactly what a chlorinator does and I should be able to leverage that somehow. Sign, I'll never, ever run out of projects.

@draythomp

Hey thanks very much for the link. $55US is far cheaper than some of the other scary prices.
Re the valve, I was wondering if brass was an issue, and the steeper may need a gearbox.
I brought one of these suckers earlier, and its already geared down, so stopping it at 5v is nearly impossible.
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=126

I agree with you, I have so many projects that if I live to 150 I think I'll ony get half done.

Mark

hi,

draythomp I wish you were leaving next to my house so I can pick your brain!!!

I got the following to monitor the ph:

adapter to read the probe:

cheapest probe I could find.
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=120636420084

I'm working on a custom "skimmer" that I'll use to install all my probes (ph, thermometer, water level, water input...). I'll install the skimmer in the shed and have some pipe in between. I need to draw a plan for the person who'll make it (made of inox) so I'll post it here when done.

I have a few things I need to post here which i'm hoping to do by Tuesday as i'm still in vacation. this includes a call flows for the water leveler, the preliminary code for my arduino and the initial plan for the skimmer, pool and kids fountain.

I know this projects sounds a lot, but considering the amount of money i'm about to spend I'm confident i'll get far enough to at least get a success/failure and not just an unfinished project.

Draythomp, question for you. Which pump brand/model have you bought? Do you control the speed of it with your arduino? Do you have some pictures of your finish project? How do you control the variable speed pump?

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'm going to use this for the kids fountain and the water leveler input: http://www.orbitonline.com/products/Valves/02/16/01/218/

this us not good enough for the backwash but should be fine for my current usage. I will have to use those actuator later on though.

any of you were able to interface with the chorinator??

thank you guys!

i'll keep you guys posted!

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