I am off on another project, making a smart controller for a solar pool/spa. I am going to be looking at temperatures in a couple places and a real time clock, flipping some valves and starting motors. Assuming the "outs" are all opto isolated basically LED drivers and the "ins" are all digital when I get them, should I use a small processor to keep the time and run the logic or should I just go with a 4xxx CMOS solution and some RTC chip? What is a good RTC chip for CMOS integration? .
Take a look at either PIC or AVR families. They are cheap, and fairly simple to program, and a lot less trouble than laying out all the circuitry in discrete form. A lot of help is available on news:sci.electronics.design .
Unless you have energy to spare, you may be thinking of "smart" in the sense of trying to achieve an optimal solution. which will require a degree of predictive response, such as responding to rate of change and even rate of change of change. Quite tricky to do with 4xxx..
Are you going to make your own copper wire for this job, too? Seriously - shoebox PLCs are so cheap that you can't possibly get a custom solution rolled for less - unless you plan on building 15,000 of them. Surely you can buy the controller you need at your HVAC/plumbing store.
(unless this is a pet hobby project with no budget and unlimited resources, of course...)
You might as well use an MCU like a PIC since you are going to need to set the time anyway. I do caution you that you will need to use a cristal or your clock will be off a lot. Im not sure how you are going to get the temp on a digital in signal. But good luck.
I am not worried about squeezing every available BTU out of the system since we have plenty (Florida). I was going to switch on ambient air temp and tested by looking at the delta between water in and water out with a comparator. Time that to the solar day as a master gate. If I determine it was not worth turning on the solars by around noon or 1PM I would just open the valves for maximum flow turn on the pump and churn the pool water long enough for sanitation. If after that I decide solar might give me something I would move that valve. I have a year or so running the system manually so I have a pretty good idiea when it is worth running. Basically the air temp needs to be somewhat higher than the water and the sun has to be shining.
Comparator will give me a 1 and an 0 I don't really care what the absolute temp is, only if the water is warmer or cooler than the air and if the water coming back from the solars is hotter than it was going up.
BTW I have a scheme using a garden variety HVAC thermostat (ambient air) and a couple regular plug in the wall timers that will give me a huge chunk of what I need. (the result of my testing experience) I already use a comparator based on an automotive water temp sending unit, a pot and a whetstone bridge feeding a 741 in my spa thermostat. If that was two sensors I would have my in and out comparator. I was just trying for a more elegant solution.
It is clear you have never looked at the shit the "professionals" sell. Most name brand spas are not listed by a NRTL (none of the secondary or tertiary ones are) and all pool electrical systems are field built.. I can handle the 680 issues. I am really looking for the simplest solution, using as much off the shelf hardware as possible and I am not happy with the Aqualink or similar product.
Your "professionals" may sell shit, but it's their liability. If there is any suit, *I* would not want to explain to a jury how my design was better than that of a "professional's", even though I am a "professional".
Can you handle an ambulance-chaser and a jury that's just seen autopsy photos of a crispy neighbor kid?
The simpest solution is likely to be an X10 system running bog-standard hardware. ...everything with a UL sticker for the intended use. At least you might be able to point the leaches to a larger money vein. I wouldn't attempt to control a spa or pool with unlisted hardware.
What precisely is *BAD* about his idea? He has an existing system that is already installed and inspected. He has been running it manually - now he wants to use the low voltage control capability that is already built in to the UL listed stuff. So how is this *BAD* ?
If you think that's what he's asking, his question is *WAY* beyond your ability to comprehend. It seems like you didn't see it. Perhaps if you go back to the original post and follow the thread you'll get a better idea.
He doesn't even know how to drive an LED, yet he *thinks* he knows how to properly isolate the mains from water. ...not to mention the long line of lawyers that *will* line up if this home-brewed kludge fries somone. No, even though I know how to do this, I'd not go there. ...too many opportunities to make a bad day for me and the opposite for an ambulance-chaser. Yes, this is a *BAD* idea. Do it with X10 stuff.
You do know that the op is an electrical inspector, right?
. ...not to mention the long line of
I would be less trusting of X10 signals than hard wiring if I was concerned about reliability. Nothing that he described will be able to cause a major malfunction or override any UL Listed safety controls. His main heaters have over-temp safeties, and the pump is protected. If he runs his circuit from a UL class 2 transformer, there is no electrical hazard. He is just trying to capture a few BTU from the sun. At worst, a valve will be in the wrong position and he will not get the solar heat.
Thanks for your support. Thank you everyone who responded. I did some plumbing changes today and got the whole problem down to switching one valve actuator and turning on one pump. When I actually drew out the truth table and looked at the states I really can do this with 2 timers, a relay and some switches. All of that will be 6vdc driving those LEDs (The pump is controlled by an SSR as part of the original installation, safely far from the pool) The master timer will still be a regular off the shelf unit, supplying the 6vdc and 24vac power supply for around a 12 hour solar day. I will watch ambient temp with a regular HVAC mercury thermostat and if I see
80F or so I will turn on the pump and switch the valve to solar (a relay switching 24v to the valve and 6v to the SSR) Six hours later, if the solar never came on I will just turn on the pump with the valve wide open for max flow (the default state when the relay is not picked) to churn the water for sanitation until the master times out. That timer might be a 4060 ripple counter and a 2n2222 to pick the SSR. I may pick off a smaller slice of the 4060 to limit the time the valve is driven in case a limit switch in the valve fails. I have a comparator looking at the water temp in and water temp out of the solars but I am not sure I even need it. In the time I have been using this I have figured out if the ambient isn't 78-80 by 1PM I am wasting my time trying to solar heat the pool.
The other valve actuated features (swapping spit with the spa etc) don't have to be part of this problem. The solars are useless for spa heating beyond what the pool gets. Running the fountain (another valve) is pretty much mutually exclusive of heat and will go off a normally closed point of the "heat" relay.
I am really trying to interlock these valves so I won't be able to get an undesirable state.
I did look into making this more capable/complicated and the little processor idea but I will save that for something biigger. Maybe my weather/tide station. (although Omega has some nice off the shelf stuff) I am really trying not to saddle my wife or the next owner with something that nobody can figure out if I am not here.
I think pluggable relays and lots of LED indicators along the logic path will make something that will be easy to fix if you have a decent MAP. If it will make Kieth feel better I can point out that none of this will be within 40 feet of the pool itself and it will be out of reach of the children. I spent extra money on bigger pipe so I didn't have to listen to the pump and still get good water flow..
All I would say is, once you have started using PICs, you will never, well hardly ever, use anything else..
They makes the hardware side so simple and you can build diagnostic modes of operation in so easily (eg a row of buttons and LEDs that allow you to operate/sense each hardware item in turn).
And far, far cheaper and more flexible than PLCs - although they do have many advantages in certain commercial applications. The learning curve for using them is a lot gentler.
But it is a learning curve problem for getting to grips with PICs. There are many, cheap, development boards, emulators, etc and you need them.
A first project "as simple as this" sounds ideal. Actually an even simpler one is where you would start with the development board. Getting your firt set of lights changing with the pattern of a set of switches is difficult enough, at first.
But what you can do with them is awesome. I am looking at a little board I have here, about an inch square with maybe 9 (standard Rs and Cs etc- nothing surface mount) components including the PIC. It takes 12 Dallas temperature sensors in, converts them to ASCII strings in either C of F (set by a link on the board), multiplexes them onto a single channel and squirts them out into a fibre optic cable. And cost me