I have a solar pool heater that is rigged in to the plumbing for my pool pump. I was looking around for thermostatic solenoid valve assemblies so I could automate when the heater is included in the filtration loop based on available heat and residual pool temperature. Unfortunately, pre-built assemblies that do this that I've been able to identify are pretty pricey. Looking for DIY solutions led me here. This is what I'm thinking I want to do, but I need some guidance on what I will need to accomplish it:
I will be controlling a 1/2" 12V DC solenoid valve, something like THIS. I believe that I should be able to generate the 12V DC current with the Arduino directly, or using a transistor. For logical control I would need two waterproof temperature sensors, such as THIS.
The program logic would be relatively straight forward, but I haven't looked at any reference material for the Arduino programming language yet. We're really talking about "If TempA < X and TempB > Y Then Solenoid=Open", so I don't anticipate a real struggle there aside from getting the right temperatures selected.
So, questions:
Does anyone know of a ready-made but relatively inexpensive package that would prevent me having to design/build this?
Would the components I've identified above work with Arduino?
What is the least expensive board I could get away with?
Is there a trusted waterproof enclosure for such a project? Ideally one that could house the upper portion of the solenoid valve, too?
What is the "best" way for me to get the requisite 12VDC out from the Arduino controller?
What are some "smart" things that I could/should do to improve my basic concept?
Thanks in advance, and please feel free to point out flaws in my thinking, too!
You WILL need an external power source. The valve ad doesn't mention the resistance or current requirement but it is likely over the 40 mA MAX that the arduino can supply. Any arduino board should do what you want. The temperature sensors are a good choice as there is a lot of experience using them and libraries written for their use. I build a solar heater for our pool a while back. I had temp sensors in several places and solar cells and monitored with PC. I found that pool temp and the temp at the outlet of the heater were all i needed to control heating so programing should be pretty simple. I used a small submersible pump to circulate the pool water. The cost for electricity is higher in the daytime so I run the big pool pump at night and the small pump in the daytime.
JWBrandon:
2) Would the components I've identified above work with Arduino?
Be aware that, if you trawl around eBay yoiu will find those DS18B20 sensors come in different package lengths, which might make the installation easier. Also different cable lengths. If you need to extend the cables, make sure the extra is decent shielded stuff.
If you are using a solenoid, you need to provide continuous power to keep it activated.
1/2" diameter tubing seems small - you will likely find that 1 1/4 or 1 1/2 piping is usual for pools.
Depending upon how you would be diverting water to the panels, if you were to restrict the larger pool piping to the smaller diameter, it will take a toll on your pump.
Consider using the Jandy 3 way valve and actuator that is pretty well standard on all pool heater packages. Valve is about $40, actuator is about $100. The valve is full diameter without restriction. The actuator is motor driven from a DC voltage, available in 12V or 24V. The motor is cammed with micro-switches to limit the travel. You simply put the voltage on, the motor moves until the micro-switch turns it off. To drive the valve the other way, you then reverse the polarity. The motor is low voltage and fairly low current. Simple relays will handle it. No current draw when the valve is at it's limit.
I have a pool with solar heat and the Jandy valve and actuator with a commercial controller. I replaced the controller in the past - very large $ - but would now build my own controller when this one fails.
The reason I'm dealing with 1/2" is because that's what the heater uses. The "heater" is a DIY fabrication that pushes some of the water from the return post-filter through a coil of ~200 feet of 1/2" black Poly (irrigation hose). I'm still working on improving the flow as when I built the thing I was following the DIY pool-heater mantra of slower flow is better, which if I had stopped to think about it I would have realized was wrong ... at least for my purposes. None the less, I only spent $50 to build a heater that turns 78F degree water in to >140F water at a rate of 4-5gpm... I'm okay with it, and I received a couple of suggestions elsewhere that should allow me to improve that flow rate almost double. As far as putting increased stress on the pump, the 1/2" tap is from a 1-1/2" (what I'm using for the rest of the pool's piping) "wye", so whatever flow doesn't want to go down the 1/2" just continues on its merry way. But, yes, next year's iteration will be much improved.
I will take a look at the referenced Jandy valve, but not this year I don't think based on remaining budget for "pool maintenance" (wives are such a drag, sometimes.) Am I correct in my assumption that it acts as a pass-through for 2 of the three ways and only limits the third port, or can you actually limit it in two directions, or?
In regards to the external power source for the solenoid, I would then connect the power supply to the solenoid, and use the controller to switch the power supply, yes? No actual connection between the solenoid and the controller?
I had considered using a submersible pump, but one it added dramatically to up front cost, and I was really trying to keep this cheap as it's really just to extend the season in my yard (I have a fully south facing back yard @ 39 degrees N, so the pool will hit 90 unassisted during July and August), thus the reason I tapped the filter. I don't pay a differential on electricity between on/off-peak times in my area, so that wasn't really a concern. I run the filter for 8 hours during the day and an additional 4 hours overnight regardless. I like to make sure the surface is pre-skimmed and what not when we get home from work and want to jump in the water.
Thank you very much for the feedback, as I didn't hear anyone say anything like "Wait! You're stupid!" I'll go ahead and start downloading some more specific documentation and start designing.
You will need a transistor, relay or MOSFET to switch the solenoid valve. Whatever you use will need to be sized to handle the current of the solenoid. I have heard of some solenoid valves that only need a pulse it turn on and off as the water pressure keeps it in the on position till a pulse turns it off. I made my heater with the same tubing. It works surprisingly well.