Diy Computerisation Of A Tank

The June FOTM Contest Poll is open!
FishForums.net Fish of the Month
🏆 Click to vote! 🏆

RipSlider

Fish Crazy
Joined
Feb 24, 2006
Messages
210
Reaction score
0
With my new tank coming, I've been out to startt buying hardware for it.

When I got it home this afternoon and had a look at it, it struck me that I am going to have a wall full of sockets, timers, readouts etc, which will be annoying and distract me from the actual tank itself. It will also be more effort.


So, what I've been thinking of is that it should be pretty simple/simple-ish to make a connection board that i can drive all the various gadgets and gizmo's from, have a computer deal with all the dosing/lights/heating etc etc etc remotely.

What I'm thinking of is this:

There would be a PC/Mac that would have a wireless connection.

There would then be a "black box" that all the various pieces of equipment needed for the tank would feed into. This would involve some canibalisation for things like a pH meter, but it will be easy enough ( I've already had the back of it )

The tasks this system would do would be, probably, as follows:

Temp readings + MAYBE control of heaters. Maybe drives a fall back heater for fail safe.
Light set up/timings/atanics/moonlights
kalkwasser/carbonate dosing

maybe a flowrate or pump health reading as well. Pump health would be a lot easier to do.

Anything else that is obvious and is missing.

I'm pretty sure the whole lot could be done for about £300, minus the cost of the actual equipment ( i.e the lights, the pH meter etc ). I'm going to do it for mayself anyway ( mostly becuase I'm a geek at heart ) but would be happy to post code/programs/set ups/step by steps.

However, before I start, I'm just checking that anyone would actually be interested in it as it would be a LOT of words to write/photos to take if no one wanted to see it.

From a computery point of view, I would be looking to setup a custom Linux install that you could download and copy to a CD. This would mean that anyone with a computer could boot from the CD and it would "just work" without having to know anything about computers. The computer would probably want be be an old knackered one, even a 10 year old machine would probably be fine.

The features I would be looking to add are:
Single screen that controls the tank
login over the internet to check the tank stats ( for if your at work or away from home )
e-mail alert if there is an issue with the tank.


If anyone is interested, please let me know.

Many thanks

Steve
 
This sounds just like the type of system the head of the marine department at one of my LFS has. He has everything controlled from his PC, top-off, powerheads, heaters, cooling system, dosing, some feeding as well as all the parameters such as pH, SG, temp, etc. If there's an issue it will email him at work and also send an SMS to his mobile so that he can log on via the internet and see what's up.

I've asked him before if I could go and see the setup but he's very cagey about it all as he's in the process of trying to patent & market the program :/

I would be very interested in seeing the setup, etc. but if it's just me then don't make the effort as i'm sure it will be a hell of a lot of work to compile :)
 
Whoa, holy in-depth steve :hyper:. Thats above and beyond anything I've ever even thought of doing, and I'd love to hear about it if you choose to do it. Keep us posted please :D
 
I guess the question is what would people like to see controlled.

It would all be presented to you on in HTML, so you would see it in Firefox (which is like internet explorer, but doesn't suck the living soul out of your computer, is faster, safer and free! download it now kids ) with buttons etc etc, so anything that can be represented without the need for any wonderful 3d graphics would be possible.

It would also be a plug-in sort of achitecture, so you would have tiny packets of code to add to the standard program to drive a particular instrument or piece of equipment, which should mean that other people can customise it as they wish.

I might end up spoiling your LFS mans plans, as I'll be distro'ing this for free to anyone who wants it, and can probably have first edition out in six weeks.


Steve
 
Lol, nice. The only other thing I'd probably want to monitor is water level via perhaps a float switch/sensor. Just to keep tabs on evaporation ;)
 
OK.

I've worked out a few more details after some e-mails to friends and people I work with this evening.

The system will be in three parts:

1) Headless computer. This will be any old computer tucked away in the house somewhere. I will need to have a ethernet ( network) socket in it or a network card, a CD-ROM, and about 128Mb of RAM. This pretty much covers any computer for the last 5-6 years, and one can be picked up second hand for about £30 from the small ad's or from MicroMart.

2) A wireless router that uses Ethernet, not USB only. These are now dirt cheap on e-bay.

3) a "black box". This will be an input/output systen that all the devices are plugged into. It will probably also feature one or two cannabalised 6-way socket adaptors. This will be built on stripboard with freely available components from maplin/watford electronics etc.

All that "should" be needed is a soldering iron, the electronic whatsits, a spare PC, a watertight plastic tub and a wireless router. Total cost I will be aiming for is less than £200.

The other option would be a lot easier to do, would be to use a specific type of internet router called a Linksys WS54G, which is easily programmable. That would mean that the doner pc and the expensive bit of the wireless setup is not needed, and everything is in a single box, but it would tie people down to buying a specific item, which I don't really want to do. It would however be easier to9 maintain/move/look after.

Not sure what people think.

The plan is that the Operating system of the doner computer will be a custom version of a version of Linux called Knoppix ( www.knoppix.com ). The beauty of this is that all you have to do is put the CD in the drive, re-boot and you have a new operating system. Nothing installs to hard disks, and there is nothing for a compuer novice to deal with or have to sort out. It also means that it could be run on PC's and the new Mac Intels. It may even be possible to make it work and be controlled by an XboX. If there are a lot of people who use older mac's, it shouldn't be too hard to make a version for them using a system called Yellowdog.

This will be connected via a wireless system ( so the PC doesn't get damp or wet ) to the "black box". This will have two main functions. It will send data back to the PC, and will take actions based on what the PC calculates it should do and sends back to it. The PC will take between 1 and 20 samples a second from each measurement. It will also store this in a log file that a tool will be able to generate praghs/history functions etc from.

The doner PC will act as a very small ( and ultra-secure ) websever as well using a system called Apache. This will allow the readings to be measured from anywhere in the world, or from your main Home/Office PC by logging into it with a username and password. A second username/password will be required to make actual changes to the systems that the system is controlling. The reason for this is that while I wqqould be happy for my fiance to check everything is OK, I don't really want her to be able to change things without my knowing. I guess others may be in the same position.

There will also be a very cut down version of an e-mail deamon that will send an e-mail to a given e-mail address if something changes outside of set limits. More than one e-mail address could be added in future, but this is a lot more work. SMS messages are also currently out as I can't find a free gateway that has any track record of existing and isn't likely to close within months.

There will be three main screens displayed to the user.

A stats screen: This will show current reading from all the devices plugged in. It could also show a history over the last hour/day/week ( need to think about this )

A "change" screen. This is where those devices that can be altered will be able to be updated. For example, switching on a spare pump, uping the tempurature etc etc.

An "admin" screen. This is where all the options such as Username/password, email address etc would be entered and stored.

I'm REALLY bad at screen design and user interfaces, so it would probably look a bit barran and bare. However, it;s there to do a job, not look stunning. Or that's my excuse anyway.

Something which a few people have suggested is that it would be nice to get a feed from a web cam to see how the aquarium is/show it off to strangers.

This is pretty complicated, as it's difficult to do in a way that would work on ANY system without needing special downloads etc. I think I could do it, but it would take me a lot of reasearch to learn. Maybe a version 2.0 is required.

I will be setting up a SourceForge site, so that anyone can grab the latest build, leave messages, comments, bug reports, even help with the coding if they feel like it... I'll also keep this page, or another post updated with news and questions.

My so called friends have refused to allow me to do the circut design for the black box myself as they think that I produce messy circuts ( the cheek! ) and have said they will do it, so you may see a few people in here posting detailed notes on this who are not me.


So, all I need now is a list of what people would like controlled.


</end of VERY long and dull post>

Steve
 
I would say that one of my main priorites would be a system that could control multiple powerheads to create random flows in the tank, ie. pretty fast switching on a random cycle with the option to prioritise certain powerheads, etc.

Add to that a auto top-off system and monitoring of parameters i'd be well sorted :)
 
Can powerheads deal with having their rates changed quickly, or would they burn out> Would you ant the rate to change over hours or minutes or seconds?

Steve
 
Can powerheads deal with having their rates changed quickly, or would they burn out> Would you ant the rate to change over hours or minutes or seconds?

Steve

If you used a pulse-width modulation circuit you could slowly ramp up and ramp down the electrical power the powerheads recieve without damaging them. That would create a slow rolling effect. If you dont know what that does, pulse-width modulation basically cycles the voltage to the powerheads on and off at thousands of times per second. Usually somewhere between a 1 to 10 kHz frequency is used. So if you wanted to give the pump say 60% power with a 1kHz chop, 600 out of 1000 milliseconds the pump would get full power, and the remaining evenly displaced 400 milliseconds the electrical power is off. The sheer speed by which the current is modulated doesnt damage the powerhead's electrical motor and ramps up or slows down the pump. If you're electronically savvy enough, this isnt that difficult to design, but if not it might get a little expensive in design labor.

What you dont want to do is design a system that shuts off current to the powerheads at a rate any slower than say 0.5sec. That will burn up your motors or perhaps rip up your impellers
 
As someone who is currently researching keeping marines, I thought that was a lot of information to take on board -_- .

This is waaaaay over my head, but anything to make life easier I am all for, if you come up with a plug and play version I may be interested :rolleyes:

Best of luck with your plans.
 
It really does depend on the Powerhead, some will run without any problems but others will quickly die. I know that Aquaclear's don't like it very much but Eheim's seem to be fine.

I would say a 15 second minimum 'on' time would be the best idea, any shorter and it would be crazy, any longer and the overall effect wouldn't work.
 
If you used a pulse-width modulation circuit you could slowly ramp up and ramp down the electrical power the powerheads recieve without damaging them. That would create a slow rolling effect. If you dont know what that does, pulse-width modulation basically cycles the voltage to the powerheads on and off at thousands of times per second. Usually somewhere between a 1 to 10 kHz frequency is used. So if you wanted to give the pump say 60% power with a 1kHz chop, 600 out of 1000 milliseconds the pump would get full power, and the remaining evenly displaced 400 milliseconds the electrical power is off. The sheer speed by which the current is modulated doesnt damage the powerhead's electrical motor and ramps up or slows down the pump. If you're electronically savvy enough, this isnt that difficult to design, but if not it might get a little expensive in design labor

I may be wrong here, but I do not believe PWM can be used to power AC circuits. It is a way to power DC circuits to make them think they are getting less voltage. It is great for DC motor speed control but I believe it is ineffective for an AC powerhead motor. If there are any DC powerhead pumps out there this may still be an idea for them.
 
I may be wrong here, but I do not believe PWM can be used to power AC circuits. It is a way to power DC circuits to make them think they are getting less voltage. It is great for DC motor speed control but I believe it is ineffective for an AC powerhead motor. If there are any DC powerhead pumps out there this may still be an idea for them.


Doh, you're right :fun:. Sorry, I work with DC pumps all the time at work and forget we usually use AC pumps in our aquariums. My bad :unsure:
 
Wo'h, yeh! :drool: ,

I'm interested in a system without a huge price tag!,

as a programmer myself I have been thinking of the software I cud design to do the e-mailing and database end stuff, but have no clue on the periphary side of things..

So keep us updated RipSlider, will be very interested to see how it goes.
 
Sorry no updates for a while.

The linux build is now pretty much done, and am working on the input/output to control the hardware itself now that the operating system has been sorted. Currently looking for ways to try and deal with the devices generically, rather than having to write specific modules for every single possible piece of hardware, which frankly I'll never get around to, as I'll end up getting bored and giving up.

The skeleton of the database is done ( written with MySQL and PERL ), the Webserver has a skeleton with apache and php, and the e-mail system is 99% complete. Everything is held together with a glue of Python and RUBY.

Will be a while before I get the code to handle the blackbox done, which i proving to be the had
rdest bit. Am also using a new language to do it, which is RUBY, so learning it as I go.

Has anyone thought of any other items in a tank they would want automating?

Steve
 

Most reactions

Back
Top