PC based Controller

I don't think the $300-$600 approx. additional charges for using an ACII is even the concern of most... just the fact that you could build and implement such a thing is really self-satisfying I'd think.
 
The other great thing about designing a new controller from scratch would be that the system would be "open". Schematics and plans could be posted on the 'net and free compilers and tools.
 
just tagging along, and trying to add some info for hardware.

Mcmaster Carr has a ph probe, submersible #14775T21 that is $35.00

they also have a temp probe #39095K21 for $20.95

or replacement probes for a ph/temp/orp handheld they sell #1122T51 for $32.67


steve
 
Interesting thread you have here. I think many of the suggestions are extreme overkill. Most of what you want to do can be done with a $12 microchip PIC microcontroller. It has analog inputs for reading sensors, serial ports for communicating with pcs etc. It also has a fair ammount of memory for logging the data. Using a compiler like PicBasic Pro, you also have x-10 command. This allows the microcontroller to talk to x-10 devices. Turn them on/off etc. It is also quite easy to control solid state relays with the pic. You can get solid state relays very cheap from www.allcorp.com. I think you would be looking at $150-200 to have a controller made, that would have several analog inputs, several relay outputs, lcd display and serial outputs to a pc. If you want to use a pc to run the system it is quite easy to make a microcontroller work as the interface to the system. This would allow you to send serial commands to the microcontroller, to turn various things on or off, and to be read the sensors. By making it a serial device, you can use it with almost any operating system or program.

I built a simlar device to control my hot tub, since I wa not impressed with any of the controllers currently available. The controller has a temperature sensor with .05 degree accuracy. I also incorporated a clock in the system. Since I like to go in the hot tub at 10:00 at night the system automatically figures out the amount of time need to heat the hot tub to the preset temp, so it is ready at 10:00. The pumps, blower, heater and lights are all controlled through solid state relays.

If you are serious about building a controller, let me know. I could design the hardware for the project. I would need some people who would be interested in testing the system as well. It would also be fairly easy to make the controller completely stand alone as well. Basically the sky is the limit. By the way, the inexpensive DAQ modules are basically just a PIC microcontroller, SO you might as well build it the way you want it instead of buying someone elses stuff and trying to make it work for your application. And yes, wireless remote displays and things like that are easy to do. Its just a matter of whether the cost is worth it. You can ever have a system that sends a message to a pager if there is a problem with the tank.

Chris
 
Chris,

I'll take two!! Where do I send payment?? j/k

Sounds like the best plan so far. I am going to look into that a little bit more.
 
I'm aboard! Chris, let me know what you need from me (i.e. write some code, test something, get stuff and put it together based on your design...).

Eric
 
WoW... This really is turning out to be a big project! Well, 'project manager'... IE whomever stepped up to the plate. Don't know how much help I can be. But lemme know what I can do to help! =]

EW
 
I posted some timaeago about PLC's, or Program Logic Controllers. I used a Siemens S7 216, and Step7-Micro software to write the code to control the following:

Lights - 2 Halides, 2 VHO Actinics, Moonlight Led's
Powerheads - 4 simulating tidal flows and night calms
Ca Reactor control (required an input to PLC)
Temp - On at 78, Off at 79 (required an input to PLC)
Main Pump - Off for feeding 6:30 - 7:00 PM, Off for overflow detection in show tank (required an input to PLC)
Skimmer and Doser tied together - Dose at 4pm twice a week, Acqua C off from 4PM to 8 on dosing days.(required an input to PLC)
Topoff control - required a float switch input

The PLC has an internal clock that was set to the correct time of day. The program queries the TOD and initializes outputs to make or break AC contacts (internal to PLC). External to the PLC is a bank of 10Amp AC relays, the primary side of each one is tied to the PLC and secondary(ies) are tied to the above items via a standard plug. For all the inputs to the PLC I used a normally open contact and when the input goes high, the input relay changes states shutting off the output. I'd be happy to post pics if anyone is interested.

Works perfectly for over a week now.
 
easttn

How much was your Siemens S7 216 and where did you get it??

Your relay setup is just what I was thinking about, I currently have my lights running off this setup, with each light having their own Relay, and a cheep (non grounded) timer picks up the relay via a 12v adapter (12 volt coil picks up my relays) I have found this to be a much more reliable way to turn on and off numerous lights and other stuff. Those grounded timers are expensive, and just try and put a load on them and pow.... But also, the relays I run have a Normally open and a normally closed position, so when the lights are off, it energizes another circuit that allows my wave making pumps to switch from always on, (with the lights on) to on for 15 min and off for 15 min, (basically energizing another timer when the lights are off that pucks up the pump circuit, just like the lights do) of course my return runs 24/7 but with the wave making pumps on this setup, I get a night time calm effect,

My garage looks like a lunatic was turned loose at a electrical surplus store. Just donââ"šÂ¬Ã¢"žÂ¢t get too close..... Kind of a dangerous board, I was going to cover it, but its my garage, and I wont hurt myself,.... right......



Why donââ"šÂ¬Ã¢"žÂ¢t we all compile a list of the units that can easily be used for monitoring and reporting to a computer and see what will be the easiest to use, It seams like everybody has solved their own problems in their own creative way, this has been great, thanks all, we will have controllers sooner or later with this level of info.

Tom
 
We make the PLC's here at work. It was scrap :D.... So it was free.:beer: I am currently working on a GUI for the PLC. It will remove any need to understand programming, it just asks for the name of the device you want to control, which in/out port on the PLC you want the device assigned to, and what time(s) you want on/off sequences to occur. Three weeks ago we tossed out over 500 of the units, I snagged one to see what I could do with it. It was easy, my son is 12 and he programmed the second one for a friend.
 
Hi,

First we need everyone to say what they want it to be able to do. Here is a basic list:

2 - rs232 serial ports
8-pump/lights etc switching outputs
8-switch inputs (float switch etc)
4-analog inputs. (ph probes, temperature etc)
1-lcd display

This unit could be pc based, standalone or both. My main concern is that if the PC crashes (and we all know they never do), What happens? If the pc doesnt communicate anymore, I think the unit should go into backup mode, and it takes over the basic functions of the tank on its own. Basically just making sure the pumps are running, lights are on, and heating/cooling is in effect. There is also the question of whether the system should be x-10 based or whether it should have its own relay/dimmer modules. My experience with x-10 is that it isnt always the most reliable. Please put together a "wish list" and I will let you know what aspects are easy, and which arent.

Chris
 
Chris,

Great Idea to have the Controller go into a computer failure or power failure mode!! I love it!!

I think the X-10 modules and interface is way to expensive and to complicated requiring numerous modifications to make it work and ultimately being limited on what it can do.

My list is:

Lights:
4 x separate Halides
2 x actinics (can be run together)
2 x VHOââ"šÂ¬Ã¢"žÂ¢s (separate)
? x night viewing bulbs, (dimmable)

Pumps:
1 Or 2 surge Pump(s)
1 return pump (off at low level)
1 Top off Pump (when at low level)
4-6 Powerheads (either each one separately (with wave making control) or an outlet for an external wavemaker)
1 Water changer
1 Calcium Reactor
1 Skimmer

Environmental:
Heater x 2
Chiller (actually just a pump to my cooling tower, more on that later)
Some kind of dosing setup, (to adjust PH, ectââ"šÂ¬Ã‚¦)
4-5 Fans (different places, basically the need for all the temp sensors)

Sensors: (just to start) this list will probably get longer, depending on what is available
PH
Temp x 4 (tank, refuge, cooling tower, light fixture)
Float
Flow

In power/computer failure mode I would like my return pump to run, as well as the heating cooling aspects of my system, and maybe a VHO or two.

I want to log and graph all readings from all sensors in real time,
I also want to have the ability to create Lunar cycles, overcast days, (less lights or on for less time, or random outages) Tide control, (via surge & powerheads)

Now the real fun stuff, Some type of control on the tank for a feeding time, instant Night viewing

The biggest thing is interconnecting them all. I donââ"šÂ¬Ã¢"žÂ¢t want my skimmer to turn on, if all my extra water is in my surge buckets, I donââ"šÂ¬Ã¢"žÂ¢t want my float to fill my tank, when the surge is going, ectââ"šÂ¬Ã‚¦. Lots of logic controls need to be set up, I want an emergency light kill if the temp gets too hot. Emergency notification (via e-mail or pager) if the situation gets out of control) And of course Remote control and statistical viewing, from any computer.

I know this is a large list, now you know why I wanted to build one, I just cant find one to fit all my needs.

I can provide whatever kind of DEDICATED Pc to run this setup, I was thinking of an old 486 laptop with an Ethernet card (located near the stand) plugged into my LAN, mostly controlled by my computer in the office, but able to make changes remotely.

Well here we go, looks like this is going to be a FUN RIDE.

Tom
 
Hi,

All that you ask is pretty easy to do. The unit would have some intelligence, but would rely on the pc for most of the advanced functions. As far as logging information, the unit could have some memory and log by itself, but getting all this coordinated is a little more difficult. It is easy to have the unit send out the current parameters ever second, 10 seconds, minute etc. This would be a serial data stream, which output all the values. An example might be to send, the status off all the relays, indicating which pumps are on etc. Then send the values of all the temperature sensors, ph probe, any other sensors, and finally the status of the float switch etc. This data could then be logged to a file, and could be easily graphed with a spreadsheet program.

The program running on the pc would then have to interpet the data and decide what to turn on/off etc. If the unit doesnt get a response from the pc in a certain ammount of time, it would go into failsafe mode. This would turn the basics to keep the tank running. There can also be a watchdog mode, that would automatically take over if the temp gets too high or low, turning on/off whatever is nessecary to control the temp.

I can design the hardware, and write the firmware for the microcontroller. But it would be up to someone else to write the winodws/unix software for the PC.

Chris
 
Not a problem. There's lots of us that have posted on the software side. Give us some parameters of what the software is to do based on what data criteria and we'll start designing. We should make it so that a user can use anywhere from 1 to all aspects of the controls, set their parameters, decide which of these should run in failsafe mode... What else?
 
For logging - I would use RRDTOOL - binaries/source code for Windows/Linux for free.

It's a round-robin database so that you can store a years worth of data without needing gigabytes of drive space because the data file just keeps growing.

I've converted MRTG to a 100% windows product called D-Trend (demo located at D-Trend Demo (Servers/A_DEMO has an example output)

Anyway, the site could be easily converted to PHP or whatever for logging purposes as well as graph changes to include more than two items. i.e. for temp/ph/whatever, one parameter would be "desired" and the other Actual.

It's defaulted to log every five minutes, but can be setup for every minute quite easily...

-Tim

So.... why isn't this project finished yet??? ;)
 
Here is the circuit before I finished all the input connections. The PLC has not changed, nor have the outputs (the wires to the relays you see). There are just more wires now. Sorry for the quality, had to take low res pics to fit into attachment.
 

Attachments

Try again
 

Attachments

  • plc1.gif
    plc1.gif
    34 KB · Views: 0
Back
Top