computer control?

hummel

Member
I have an extra computer in the basement doing nothing. I am also setting up a 180 in wall with an aquarium room. How or why the wife agreed to that i'll never know but I'm going to run with it before she changes her mind.
Is there anyone useing a Windows base PC as a controller? As opposed to say a neptune or aquadyne controller. If so what systems are available? I'd imagine you would need a way to connect the probes and such.
BTW this computer would be for aquarium use only and not everyday junk.
Thanks for all your help.
Mark
 

moby

Member
I know they don't like it when you post links, but if you get this before they do try this site.
It might not be a problem since they don't sell this sort of stuff here.
I found some shareware on this site
*Link Removed*
Moby
 

mpls man

Active Member
hummel, is that your last name?? just curious, because thats mine as well .
thats bizarre. :joy:
 

scsinet

Active Member
I've never seen a system commercially available that does this. One may very well exist, but you can certainly home brew one.
How technically savvy are you? Are you familiar with DAC and ADC stuff, and can you write your own software?
This is a project I've been wanting to do for a while. I have the technical ability to do it, just not the time. The biggest problem I have is the relative unreliability of Windows when it comes to life safety, which is essentially what you are dealing with when you want to put the lives of a tank full of expensive fish and coral in the hands of Mr. Gates.
What I've wanted to do is design an aquarium controller around a Basic Stamp (google Parallax), using the stamp to control most of the critical functions, like pump, temperature, and lighting, and accept commands from the PC via the serial port. Basically, the PC would provide the control, but in the event that the PC went down, the stamp would continue to run the tank in a "failsafe" mode until it could be fixed. The PC would also directly control many of the non-critical functions, like ozone, dosing, UV, etc.
If this is all over your head, sorry. I am just tossing out ideas. Whatever you do, you have to work out a way for your PC to sample real-world data, like water levels, temperature, PH, ORP, etc, etc, etc, then turn around and control the real world via relays or whatever to control lights, heaters, dosing pumps, alarms, etc.
If you are really a beginner at this, the place I'd start is a technology called X10. You can design a very simple, non-adaptive controller using X10's computer interface and a number of appliance modules. HomeSeer or ActiveHome all allow for basic macro and timing capability, so you can easily design a simple timing strategy for your tank and basic macros like feed tank, force on, force off, etc.
Whew! Sorry if I am rambling, but this is a topic that really gets me excited. All I need is a way for my company to pay me for about 3 months without me having to go to work so I can put something like this together.
 

moby

Member
Hey SCSInet,
The site I provided doe not control equipment like you are talking about. It is really just a way to compile data with enduser imput.
What you are talking about using a microcontroller is very neat.
I am a member of another forum (Lynxmotion) that builds robots and am very familiar with basic stamp. I use BS2, but there are others which are much more powerful ,Atom Pro or even Gumstix. We use these as the onboard processors for our bots.
I have kicked around this "automated" idea also. It just makes me a little nervous. If I write code for a servo and it is off the bot falls down, do the same to control a doser and the entire tank can be a death pool.
We should get together and talk this over, it would be a fun project.

Moby
 

hummel

Member
Reading, Pa. just recently thought about trying to find out what part of Germany the distant relatives are from but havn't had the time.
Back to topic.... I was looking for a controller system not just a monitoring system but since I have an extra out dated computer lying around maybe I'll try one of thoes programs. Seems to be a great record keeper of event's about the aquarium.
No I'm not very good with a computer. Only thing I can really use a computer for is the internet and the Mercedes diag computer.
thanks for the info.
Mark
 

scsinet

Active Member
Hummel,
I just looked at the site, and apparently "ReefCon" can control via X10. I didn't see the ability to gather data, like PH, ORP, etc, but it has gotten me interested enough to download it. I already have the X10 stuff to do it (I'm kinda a gadget freak) so it might be worth a shot.
Moby,
I'd love to talk about this. Talking is what I do best..... do-ing is something else, but regardless. I can't write a lick of C, assembler, etc. All I can write in is BASIC variants (I cut my teeth on QBASIC, so everything based on basic is a breeze, like GWBASIC, QBASIC, VB, ASP, and PICBASIC), so I need a platform that will accomodate that.
I have a bunch of BS2SX units that were left over from a company project gone amok, so I always try to use those. The lack of support for any of the good expandable stuff like ONEWIRE and I2C is tough though... 16 i/o pins run out real quick, and the cost is really crappy... 40-60 bucks per... Can the two platforms you mentioned help in this area and still let me write in a language that's not Greek to me?
 

moby

Member
Check out the Lynxmotion site.
I only know P basic, and not real well. Just getting started on a bipedal robot and still learning a lot of the code.
The problem I see is application and conversion. How do you recieve a sensor reading and convert into a basic language for the microcontroller to relay back to a pump or other device? The application is not something new since a ph controller basically already does what we are talking about. Evaporation is already done via mechanical means i.e. a float.
I am very interested in your thoughts on this.
I just looked at the site, and apparently "ReefCon" can control via X10. I didn't see the ability to gather data, like PH, ORP, etc,
What exactly is the function of this software? I am unfamiliar with it.
Gumstix (very advanced micro PC) use either C or VB, I can't remember which.
16 i/o pins run out real quick
Easy to overcome, stack the microcontrollers, use more than one that are linked together. Or use the Lynxmotion SSC32 which has 32 I/O pins!
I am not sure how much of their products are usefull to this application we are discussing but I could look into it.
Moby
 

hummel

Member
Ok now you've both lost almost lost me. Too much computer talk but..... I kind of get some of what your saying.
Not knowing much about computers or programs
. I don't see how it's not possible to create a program/ programs to comtrol an aquarium. Am tell me if i'm thinking correctly on this...... basicly a controller monitors water quality through probes such as a PH or ORP probe and reacts with that information to control calcium reactors, ozone, or lighting. So what is diffrent about using a PC to control these things? A controller is basicly a small computer with with the specific task... to control the aquarium. If i've read correctly there are even some controllers that peramiters can be change via laptop connected to the controller. What is the difficulty in producing a software program that can monitor and make decisions on what to do with other equipment. And just have a relay box controlled via USB cable from the computer to turn the device on or off and control output of the device being controlled.
Think about all the calculations the engine control unit in your car has to decifer and make decisions what to do with that information. quick example: Your oxygen sensor in your exhaust reads unburned fuel in your exhaust (ph probe in a calcium reactor), Now the computer must make a decision to add more or less fuel (co2 injected into the reactor). Now.... when I download new software into the ME (engine control) that information is stored unto the diag computer which probably a few software changes and you could run the vehicle on the diag computer. just an example don't beat me up on it ok. which brings me back to why is it not possible to use a computer to run you tank off a PC.
Sorry for the long write just trying to learn a little bit here? ***)
 

hummel

Member
If you could design a program and a control bxo to rum off a PC and keep it easy to use and affordable to the avid hobbiest you could be in a gold mine. Think about it what do you do with your old outdated computer? usually give it away or let it sit in your basement or destroy it because of all your personal information is on there. Bring this hobby into the 21st century. just a thought for today. well now I'm tired and need a good night's sleep for once. Keep it coming very intresting to see your thoughts on this subject
.
 

moby

Member
Great questions hummel!
The problem I have found is the actual programming language and how to interface with the device you wish to do the specific job.
What happens is you have WAY too many different languages for these devices and very few will "play" nice with each other.
Lets use a simple example.
You have a refractometer monitoring the salinity and you want to automate your system to always maintain 1.025.
First what language does the refractometer use when it calculates the salinity?
How do you "patch" into the refractometer physically?
How do you translate the data from the refractometers language to the microcontroller or PC?
Remember our microcontroller/PC is going to activate a pump that adds salt water or fresh water to the tank to maintain the desired 1.025.
How would you calibrate the dosage?
So it looks like this-
Refractometer

[hr]
>microcontroller/PC

[hr]
>servo or pump

[hr]
>back to refractometer
Programming in between each step to- indentify out of desired parameter, take action, identify new reading and then yes/no- if yes stop and monitor- if no add fresh H2O or add salt H2O. Then loop.
This takes an enormous amount of programming, not ot mention the 1st problem we have of what language the refractometer uses and what language our microcontroller uses.
Works the same whether we use a PC or microcontroller.
I wrote almost 400 lines of code to make a 2 legged robot operate just 6 servos to make it walk forward in a straight line on perfectly flat level ground and all my components operate on the same programming language!
The EEPROM in your car uses 1000's of line of code to monitor just the sensors!
Not an easy task, at least for someone with my present skill level!
IMO, this does not make the possibility of an automated aquarium impossible, just more technical than I know how to do.

Moby
 

phixer

Active Member
Have thought about this also. Ive used a spectrum analyzer to measure the contamination level of hyraulic fluid. Wonder if it could be calibrated for H20. The principle is the same as a refractometer Im thinking and it provides digital output. A H20 sample with a known SG could be used to calibrate it, each reading from then on could then be reference matched to a table which lists the salinity levels. This would be simiilar to the map used for fuel injection. :notsure:
 

scsinet

Active Member
Hummel,
One of the other big problems is interfacing the devices. The single biggest issue is that real world exists in analog and computers only see things in digital.
To continue using our examples, PH, ORP, and Temperature are all analog measures. They are not simply an on or off, or a 1 and 0 respectively, there are continuing and essentially infinitely varied values that they put off. Therefore, a computer needs to have an ADC connected to it (Analog to Digital Converter) to be able to sample what the measuring devices put out and convert them to a digital data stream that the computer can interpret. To make matters worse, not all of these operate within the same ranges of voltages, or even operate in the same way. For example, PH probes put out tiny voltages in response to PH, but temperature probes almost always vary in resistance. This means that an individual circuit has to be designed for each and every device you want to capture.
Now for the computer. A PC is an enormously complicated contraption, much more complicated than the big software vendors would have you think, and way, way more than is needed to run an aquarium. A PC is designed to be very universal, to be able to do a variety of tasks. An off the shelf aquarium controller is a computer... but more accurately, it's a stripped down, single purpose computer that has been designed specifically for the task it performs. This takes a lot of the relative unreliability of a PC out of the equation. You'll find that although those controllers can be programmed with a PC, they are not a "slave" to one. The PC is not necessary for the controller to run once it's set up. If you made your tank's health dependant on your PC, what happens when the machine locks up or crashes while you at work... or asleep... etc.
Don't get me wrong, it not only can be done, but it's a great idea and one I've always been wanting to try... I have workarounds for the latter PC reliability issue as I described in an earlier post, I just haven't had the time to really design anything.
Don't be fooled, however, at the thought that you can make a killing by building a PC based product and selling it. The reason the controllers are so expensive is because the probes and the interface circuity to make them readable to the digital circuitry inside are require not only enormous component cost, but an even more enormous R&D cost. These are costs that will be present whether your computer is a single purpose microcontroller or a full blown PC. This all comes back to the thing most people forget about DIY... what your time is worth.
 

scsinet

Active Member
Moby,
Forgot to tell you, I ordered a new BS2 module when I was setting up my new 110 FO system... a BS2p40. It has 32 I/O pins, but what's even more cool is that it supports I2C and ONEWIRE so I can daisy chain AD chips, temp sensors, etc all off one pin.
They are normally pretty expensive but you can get them off EEEE-BAHEY if you look around for a whole lot less.
I looked at the Atom Pro and GumStix. The Atom Pro looks just like a stamp. I haven't really read into them much. Maybe they offer more program space... THAT would be nice.
The Gumstix are cool if you want to keep the system small, but I am thinking they are more geared towards packing PC power into a really small footprint for robotics or automotive use. I am thinking if you have the space for a full PC, that might give you more options. Still though.. it would be cool to write the first revision of the product in PERL or something that will work on both a PC and a GumStix unit, then migrate to them for a second revision... etc.
 

hummel

Member
I guess you have a point there. So a PC can only compute simple tasks such as on/off or analog signal. You'll have to excuse me I'm used to the more complicated systems on a vehical. Like I said before I'm not really good with computers. I basicaly know how to diag a computer as far as signal sent and signal recieved and values stored in that computer. I don't know anything about progaming in the computer except for the software version in that computer. The more I think about it I think a controller works the same way as an engine computer. Basicly like a throttle position sensor send data as to how far to open the throttle plate as opposed to either on or off like a brake light switch. So your PC is perfectly capable of turning lights on or off and for how long' but not like the throttle position as to how much like a co2 regulator on a calcium reactor.
So basicly get a controller sound cheap and easy compared to converting a PC to a controller. What is a good controller? I was looking at a neptune.
Well thanks learned alot from this thread.
 

phixer

Active Member
Hummel, SCSInet brings up some good points, but I think the easiest way to make this work here would be to find a sensor that would react to salinity and then convert the reading to Specific Gravity and create a table for it.
How well do you understand fuel injection mapping? because I think you might be able to apply some of this understanding to designing/modifying an existing device like the one mentioned earlier. It sounds like you know the difference between the typical open and closed loop operation of an automobile ECU. So then it would be a matter of converting one signal to another the same way you would scan the ECU for a code if the check engine light was illuminated and then convert that code to the faulty sensor. So if you can get a device that would give varying signals for different salinity samples then calibrate it from a known standard and map everything else from that point.
Could you make something that measures electrical continuity, the rates will change based on the salinity of the water.
 

moby

Member
Could you make something that measures electrical continuity, the rates will change based on the salinity of the water.
:thinking: Might have an idea, must go do research.
Moby
 
Top