DIY Automated Controls - Advice Solicited

I too like swimming, but you wouldn't know based on how much work I do OUT of the pool :p We've gotten to about 97 but it's cooler again, 89-91. Internal case temp has gotten to about 150 so it could stand to benefit from some active cooling.
 
Something I've been fretting a bit is the library dependencies on the Nokia 770 as well as the mono installation. Happily I've been able to solve all of the issues and I've been able to run a sample app on the 770 that connects to a mysql database and opens a window. This all but guarantees I'll be able to complete the program. It's not too slow either :)
 
piku said:
Internal case temp has gotten to about 150 so it could stand to benefit from some active cooling.

So the next question is, when can you build one for me? :bowdown:

In all seriousness though, have you considered using water cooling? you could use the suction and pressure of the pump to pull water though the pipe/heat sinks and keep the electronics cooler.

HTH,
Adam
 
It's a start - it's worth noting that everything is accurate except water temp. The sensor is reading right but the arduino is messing up the number. This suggests too that the case temp is reading 10-20F too high which would certainly be a relief for me.

[attachment=0:1yawqxj3]start.png[/attachment:1yawqxj3]
 

Attachments

  • start.png
    start.png
    56.1 KB · Views: 495
I am very interested in this project. I too am programmer, gadget, and home automation geek so this is right up my alley.

Not to mention the fact that I have been trying to figure out a way to make solar panels the most efficient without a costly solar controller that isn't good for much else. Ideally I would like to monitor the pool temp, and the water temp in the solar panels and since I normally run my pump at night I would need it to be able to open the valves for the solar panels as well as turn the pump on. Ideally when the pool temp is below a certain temp and the solar panels temp is above a certain temp I would turn the pump on and open the valves for the solar panels and turn the pump off and close the valves when the temp in the panels drops back down the the same temp as the pool (reducing the energy used to heat the pool to an minimum) .... this could work in reverse for cooling the pool as well.

Also, the fact that I can tie this all back into homeseer (home automation software) and control it all from touch panels around the house (or my tivos) certainly pushes it over the edge for me. You have to admit checking on the pool without leaving the comfort of the sofa would be nice.

At this point it's not a question of if I will do it, but more a question of when.

Also, out of curiosity what are your thoughts on why the arduino would be messing up the temps?
 
I figured that one out. The temperature sensors are NTE LM34 sensors which report a millivolt temp as degrees Fahrenheit. I.e. 0.800V = 800 degrees Fahrenheit. In reality i could buy the LM35 if it was cheaper or vice versa because I cannot read the raw millivolt value on the arduino but instead a 10 but (1024 values) ADC value. So if 500 degrees fit in 5 Volts you simply divide 500 / 1024 to get the amount of degrees per increment. That's all good and great except the arduino uses an internal reference voltage to compare against. While that's supposed to be 5V the NSLU2 is actually putting out 4.22V either due to the bus being overloaded or due to it just sucking (especially since I tested it's power supply to be 5V exactly). Since it was using this reference voltage all of the readings were coming in high. This made my case temp of 120 look like 150, etc. I figured this out soundly once it tried to tell me my pool water was 95. When it was really 80. I know it was lying. The other issue was that the LM34 attached to the arduino for the case temp is a VERY short run so it works fine. The pool temp goes through a couple feet of wire so is subject to interference a bit more. The LM34 application guide suggests a Vsrc / 50 ohm resistor (120Kohm in my case) resistor between ground and the sensor read line. I just shoved the resistor lead into that port and into the conveniently located ground port right near it in the arduino itself and all was well. No soldering, no fuss. For some reason my pressure sensor readings didn't seem to be affected much by this I guess due to different methods of calculation. Also the Nokia 770 application I wrote kept crashing repeatedly. I figured out over the course of days that this was due to me updating the ui using System.Timer rather than GLib.Timeout which it seems to like much better. I now have the Nokia 770 hanging on the wall with double sided tape and the whole thing is wife approved :goodjob: I am developing now a feed to pull in weather channel data and to expand the application to show weather data. That way in the morning I can just tap a button rather than sitting down at the computer to see if I can ride the motorcycle or not.
 
Just an FYI... If you are familiar with the 3M command strips 3M makes a similar Velcro version that I find works very well for mounting Home Automation equipment to walls while keeping it easy to remove and replace when doing maintenance, and when you decide to remove it permanently won't leave a mess to clean up.

I learned the hard way from using double sided tape a few times. :hammer:
 

Enjoying this content?

Support TFP with a donation.

Give Support
I've made a lot of progress and Phase II of the project is pretty well completed. There are some software changes I'd like to do and I'd like to make the touch screen mounting a little more professional but otherwise I'm quite happy with how things have turned out. I added pics onto the original controller album:

http://picasaweb.google.com/evaporated/DIYPoolControl

The most interesting ones are near the end which illustrate the touch screen app deployed to the Nokia 770. The more interesting part is how we got to this stage. Basically the current mono release for the Nokia 770 is bad. Certain aspects of the build don't work including the WebRequest functions. That's no good since we want to pull the weather.gov NDFD weather forecast data. So I set out to rebuild mono for the device. This was a long and interesting process and it took some learning about the build environment for maemo (scratchbox) as well as other things.

Now that it's done you'll notice I can pull current conditions weather wise and I am working on forecasting as well. The music button instructs my DVR to tune to a favorite internet radio station we like to listen to. Then I just turn on the receiver and switch the output to the outdoor speakers. It works pretty well and everyone who I demo it to gets a kick out of it (especially when I quietly turn on the receiver and switch the speakers ahead of time).

So, now that the project is coming to a close, it's time to start documenting. Which I will do to the best of my ability.
 
This is an awesome project!!! I am very interested in trying to do something like this, but I'm afraid that I don't have the technical savvy to pull it off. I can wire and stuff, but the programing and interface will be my challenges. How many I/O points does the Arduino have? Any more tips on the software used? I've installed Linux on several computers, and even got a Winmodem and wireless card working, but only by following detailed instructions from the 'net. I guess that I'm really wanting to have a way to check on the pool when I'm gone-I've had both mechanical and electronic timers fail while away, and returned to a green pool. I'm also guessing that you plan to web enable so that you can do all of this remotely, with-out the Nokia 770, using any browser? Again, congratulations on a Great body of work!!! :goodjob:
 
Looking back through all of the posts, and reading what's on the web about the arduino has answered my question about the I/O points, and cleared up some of my confusion on the interface. If the www.arduino.cc site would respond, I'd download the software and try out my control ideas. My new question is -Did you incorporate physical(manual overide) switches? You said something about door bell types early, but I don't see any in the pics, except for the one light switch in the power panel. I'm thinking of a three position rotary switch (OFF-ON-AUTO) on the 24V side of the contactors, as I couldn't find the door bell ones.
 
I was thinking about installing manual overrides. It really wouldn't be that hard and you could force the pump on or off respectively when necessary. In practice I've found I don't need it at all. When it comes time to backwash I simply turn the pump on and manipulate pump power using the breaker. The pump breaker is independent from the light breaker which is what the controller is powered from so no harm in that. If I become very anal later on when I finish off the electrical box I may install override switches then.

Also note, I wrote the bulk of phase I instructions tonight. I'm aware that the files linked to aren't present yet - all in due time. I also of course have to add pics.
 
Hello all,

It's been a long time since I posted on this thread. I never did update my instructional guide but that's ok as many many things have changed. Since I last posted I have installed a solar system and am now working on controlling the solar diverter valve with my setup. I also completely revised the architecture to make this setup more generic and applicable to end users - the reason being... drum roll please... is that I am now planning to sell and install this system commercially. Before anyone frets, please read through my plan and I think you'll find it to be very fair.

1. The system still uses NSLU2, Wifi, Arduino and a Nokia 770 touch screen. All of this hardware, with my family's abuse has proven to be absolutely bulletproof.
2. The arduino has much more complex code now that includes a control protocol. Everyone's arduino setup and firmware will be identical and on system startup it will download the configuration to the arduino. All correction factors and calibration values are stored on the server.
3. The NSLU2 has been upgraded to slugos 5.3 and it works way better. I have all of the OFFICIAL packages isolated and I have a rock solid reliable wireless configuration. This took a LOT of trial and error.
4. The control program written in C has been retired for a higher level language (C#) and that program will run on the necessary server (linux or windows or whatever else you have) as part of this package. The control program is now also 100% generic and completely defined based on what you have defined in the database.
5. The database design has been completely redone such that the entire configuration is stored there. A concept of special actions has been implemented and will be built in a modular fashion. So far I have for instance a special action called PUMPCHECK. This action will monitor a defined pressure sensor whenever a defined switch is on and will shut down the pump if the pressure is greater than or less than a set point for more than X seconds. It works fantastically. I am also working on the solar code as well.
6. After I got this all done I realized that only this program will be able to communicate with the NSLU2->arduino so I figured why not make all of this a web service - so I did.
7. Since I am now using web services and since I upgraded my 770 to a later OS, I can now use flash and actionscript as the frontend. This allows nice design, clever animations, access to weather data, etc.

So there you have it. How am I going to charge? Simple. The entire hardware layout will be published with DIY instructions for free. I will build and ship a kit for people for X price. I will install the entire system professionally for Y price. Right now I am looking into required plumbing or electrical licensing, insurance, as well as what I would need to accomplish to make my system up to code. Obviously I would only be able to do in person installations in the tri state area but I've already had some interest from neighbors who are always curious about what mad science project I am up to. The arduino firmware will be released for free. The control web service and daemon program will be released as open source for free as will the control modules for pump check, solar, etc.

My plan is to charge for a very nice administrative program to configure everything as well as the flash for the touch screen. I am estimating $149 (software only) sounds fair for my time and effort that went into the system but I'll have to really mull that over depending on what kind of licensing I need and everything else. Business costs money :( My main ideal here is to provide a system that the DIYer can implement 100% for free, with an element of polish, perfection and support which can be purchased. When it comes to pricing I really want to be fair, but at the same time I love doing this stuff and would love if it wasn't just a side business some day. When the time comes, feedback will be important to me on this.

Even so looking at pricing for other stuff ($1200 for aqualogic PS8, etc). I somehow don't think I'd be causing any ill will for charging modest prices for super nice control and ease of use.

Everything is still in planning stages. If some smart people think I'm being stupid, I'll just release everything for free.
 
If you sell the system, I suspect that the easiest to reach market is hobbyists who would like a head start on building the system. I suggest selling a kit of parts with some of the more complex assembly steps, for example soldering, already done and a basic software framework, all in open source. Give them something they can use to get a quick start on working on whatever part of the system they really care about (which will vary from person to person) by taking care of all the other parts with reasonable default behavior that is easy to modify.

The more flexible the system the better. People will come up with a lot of different areas that they will want to tinker with. If you encourage people to share their software changes back with the community, you will probably be able to buildup a library of user submitted improvements that could become quite impressive over time.
 
I'm very interested in what you have put together. I've had pool automation on the back burner for a while (I just wrapped up my carputer project). My timer for my booster pump just died and I think it would be perfect timing to bet back in to the automation.

I'll need to go back through this topic, but do you have a hardware list for where your project stands now? My pool equipment is on the outside wall from my bedroom closet so I prefer to have wired networking and can install all the low voltage electronics inside. Let me know, maybe I can do some beta testing for you. :wink:
 
I've been waiting for you to update this thread! I was enticed by how easy you made it seem to create a DIY control system, so I took the plunge and got myself some stuff from Ebay![attachment=0:2l4syeus]controls.jpg[/attachment:2l4syeus]
Not pictured is my Nokia 770. My plan was to cherry pick the aspects of your build that fit my needs, with-out having to do any heavy lifting myself. Well, I'm just a little astray of where I want to be. :oops: The Intex SWG control board has a Sonix SN8p2604AK MCU that I plan to disable and/or remove, and wire in its place the Arduino for output control only. I think I can handle the actual wiring(once I have the pin-outs identified), but the programming is really testing me!

So far, I've played with the Arduino software, which seems pretty straight forward, but I hit a wall with finding a Belkin wifi driver for SlugOS, and ended up with DebianSlug. Then my harddrive went kaput :( and things have languished in the closet for months. I'm now back to concentrating on just the Arduino-SWG marriage. Once I have that working, I'll tackle the NSLU2 again( I haven't done anything with the 770, other than turn it on and think "what the ???? was I thinking?")

I just wanted to Thank You! for giving pointers on how things can work, and work well!! Best Wishes for continued success!
 

Attachments

  • controls.jpg
    controls.jpg
    82.4 KB · Views: 118

Enjoying this content?

Support TFP with a donation.

Give Support
Thread Status
Hello , This thread has been inactive for over 60 days. New postings here are unlikely to be seen or responded to by other members. For better visibility, consider Starting A New Thread.