PC based Controller

This PLC does everything you are all talking about...plus loads more. The inputs are all controlable and it is a snap to learn. There are 24 inputs and 16 outputs. I have mine controlling the input side of the relays and all the power devices are on the latching side on the relays. I'll post a schematic for the relays if I can get the scan to fit in the attachment.
 
pc based controller

pc based controller

We have designed a custom application that is used in an intelligent vehicle transportation system. It is basically a control system that uses a database to log data and schedule events. I'm not a big fan of MS windows or MS products but we are using visual basic to do the custom interfaces and MS Access to record data and do analysis. The great thing about using access is that you can construct queries to process data or create reports,graphs or what ever your imagination desires. Here is the basic idea. You have a pc running an access data base with a periodic timer running some queries. The pc is connected to the tank through some type of communications channel. We currently use both serial and parallel ports but you can also use usb. You will need some type of device to control your inputs and output. We use a custom microcontroller but just about any serial device that can be easily programmed would work as well. The X-10 stuff will work how ever you will probably need to write a serial driver to talk using the X-10 protocol. If your and embedded systems type guru and like programming in C then you can get any number of development boards like the rabbit microprocessor or motorola HC08/HC12 boards and wrig up something to do what you want. One cool device that is sort of self contained is this cool serial LCD device that you can send commands to and turn on some relays and print to the LCD screen. I think the company is called NetMedia, product is LCD+. Anyway here is the deal. Lets say your controller that is hooked up to your tank can read some sensor and spit out some data that you can get by running a query command from the database application. And let us further say that this query sends out a command on the pc serial port that tells the controller to read the value of the lets say sensor #1. If we have more sensors then we can make new queries or to a batch query to read all the sensors. Upon retrieveing the data from the query we can use the data to fill a table in Access and thus record the values. There you have it a pc based data logger. Now if you want to have the pc control your lights, powerheads or other events you can get really tricky and construct queries that take into account the time and date information from your computers real time clock and compare the current time with a some event table and when the current time is greater than or equal to the respective event table you can send out a serial command to the controller that turns on the lights for example. It is probably recommended that a VB type of program handles the logic that controls the controller and the Access database just handle the data recording or analysis. The other cool thing about using access is that you can export the data to excel and have your data displayed graphically. For our vehicle fleet management we are processing the data and dispating vehicles in real time. We log vehicle parameters such as fuel level, battery voltage, gps coordinates and even control the ignition and door locks. The idea is pretty generic and if you think about it all we are doing is reading inputs and controlling outputs.

A fare warning though is that this kind of project can be really time consuming. Also I dont suggest this kind of project be taken up by an individual. If a few people want to take on different aspects of a project like this and share their work then it can prove to be mutually beneficial for everone who contributes. People who would do well with a project like this would have a good grasp of Visual Basic programming, Microcontroller development and Microsoft Acess database design. Generally speaking though if you can program in C or basic then you can pick up the rest along the way. The other part that kind of requires some knowledge of electrical engineering is interfacing the sensors to the controllers. Fortunately you can usually find kits that already take care of the difficults stuff for you. If you do however have the skills then you can really do some nice custom stuff.

Hope I didn't confuse anybody

miramont
 
easttn,

Very cool. I did the crash course on PLC's today. You had me thinking what was very difficult to being fairly simple now. The electrical part is still sort of foreign for me, but I can read schematics.

I found think this site:

http://www.control.com

And from there, I found

http://mat.sourceforge.net

Which is probably the route I'll go. I think it will be easier to distribute later on. I can just make whatever into a boot iso for the unix-phobes. Sounds like there are tons of support for it too.

BTW, if you are posting schematics save them as GIFs. No loss in quality and super compression for low color stuff. For your photo's save them as JPEGS. That should make them small enough to post. Thanks!
 
Regarding miramont's post, if anyone is interested in the hardware side of a windows based system, I would be happy to do the programming side. I would use .NET so we could make it easily monitorable via the web - so you could look in on and control your tank while at work or on vacation.

I would need help on the hardware side, being able to send signals to/from a sensor/heater/powerhead/etc.
 
Data Acquisition

Data Acquisition

As far as the realm of data aquisition, I may have an idea. Tell me what you all think. I was discussing this potential project with a buddy in my shop here, and he came up with the idea of using a Labjack. Has anyone ever heard of these before?


http://www.labjack.com/

I did a little reading on them and the look like they could be the answer to the data aq interface between the tank and the PC's USB.

12-bit analog inputs(8)
10-bit analog outputs(2)
Digital I/O (20)
32-bit counter
Can be used with C, VB, Labview, etc.
Windows 98SE/ME/2000/XP

Any thoughts?

Eric
 
Program it for Bali.....

Program it for Bali.....

Hey, just a thought.... If your running a tropical tank, why not enter lat and long and tide tables of the south pacific? The lights would be on in the evening when you're more likely to appreciate them... and isn't that what we're trying to do? Bring the tropics to our livingrooms?:twitch:
 
Eric,

That LabJack looks cool, have you or your buddy ever used it?? Does it have a D to A converter, or a Digital input version??

Tom
 
Witchdoctor,

All the solutions will need to isolate the output of the PC/PLC/Lumberjack from the current/wattage of the loads via relays. The max current capacity of the LumberJack is 200mA. The ratings for typical relay coils (primary side) is around 20 - 30 mA per coil (@120VAC), therfore you will be limited to 8 - 10 coils. There are probably other solutions to the relays, I just used what I had lying around. 8 to 10 outputs should be great for most box keepers since multiple devices tied to each relay, but they must share the same time intervals for on/off.

Just curious about all the need for tying up a computer for your aquarium. Seems like overkill imo.
 
KingT420, It looks like the LabJack has D/A converters. I was reading here:http://www.labjack.com/labjack_u12.html
And Here:http://www.labjack.com/basic_faq.html#ai
And that's what I got from it. It looks like an extremely versitile device. But having not used it myself so I cannot be positive. Here at my shop we have been trying to find a reason to order one so we can play with it.:D

Easttn, what is the Lumberjack that you are referring to? And what is the current draw for each pump, light, etc.? Couldn't we use a smaller relay? I don't think we'd need a really big relay just to close the circuit. It's not like we have a huge inrush like starting a big multi horse motor.

I don't think there is a need to use a PC. I just like the automation and ability to monitor all of the different parameters. And I have a second laptop just collecting dust anyway. Why not use it for something?:)

Eric
 
I think another adavantage to going with a program is that you could monitor it while away (pH, temp, water level, etc)
 
Im surprised no body has put their tanks on the web with live web cams and live data showing temp, ph, etc. That would be really cool.

:D
 
I'd be REALLY scared to make it controllable via web for fear of hackers frying my fish or something. You'd definitely want good security on the administrative functionality.
 
Hi,

So is anyone ready to have some hardware made? Who is ready to invest? Also still looking for more wish lists.

Chris
 
Well, I'm willing to do some work so long as others are willing to help. I can handle some of the electronics and some firmware. What is most desired as some sort of agreement on what exacly is the requirements for the first prototype. I suggest people figure out a good compromise on where is a good starting point and we go from there. Lets say 6 outputs for lights 3 inputs for sensors maybe some wish list items. I am very new to this stuff so I really don't know what is typical for those of you experts out there. Maybe a typical setup uses 10 outputs and 6 inputs. I'm not sure. Any suggestions


miramont
 
Here is what can be made easily, and for fairly low cost. The controller would have the following.

1-PH probe input
4-Analog inputs. 0-5V input
4-Temperature Probe inputs
8-Switch inputs (float switches etc)
16-Relay Driver outputs. Capable of driving relays up to 100ma ea.

1-LCD Display
1-Serial Port
3-Status LEDS
16-relay indicator leds

All of this would be on a professionally built circuit board. I estimate the total cost to be between $150-200. But will have to add everything up for a final figure.
 
That definitely sounds sufficient to where I'm headed and I am ready to invest. I don't have the system built that I will be taking full advantage of this yet. We're getting ready to move and are looking for a house with a config where I can build an in-wall. In the meantime, though, I was planning on using it on a 54 corner I have setup now. This is overkill for this setup, but will need more later.

I'm not a hardware dude, but am fairly limber. So with detailed instructions, I could help with building also. If I'm missing tools, that's a good excuse to buy tools, right? Hopefully this logic will continue to work with my wife...

Also sounds like we have some different software we can hack away at to interface. Anyone ready to cast votes? I haven't had much time today to check much out. I'm at home with a sick little girl.
 
banger said:

1-PH probe input
1-Serial Port

What kind of system will this be? A stand alone? I'd like to see at least 2 ph probes. Another serial so we can put a IP stack on it and SLIP out the other port if its a stand alone, or an ethernet phy.
 
i have rthe aquacontroller i will work on getting my my proes values online- live so you all can watch and enjoy!! PH, Conductivity Oxygen. Orp and Temp...
 
Back
Top