Marine control system

I am looking at designing an easy to use controller for salt water fish tanks.

There will be need of 8 individual parameters, as an example.

  1. A PH controller to ascertain if water change is needed. Where water change will be made if the PH drops to below a 6.
  2. If water change is needed to let out 5 liters of water and to replace, from resivor.
  3. Water circulation chamber, where pump is switched on for 30 seconds and off for 15 seconds
  4. Water airiation, where the unit is switched on and off a certain intervals
  5. To control lighting to emulate sunrise / sunset
  6. To control protine skimmer , working hours, as example on at night only.
  7. To control water temperature, if tank too hot to switch on cooling fans. If too cool, to switch on water heater
  8. To control feeding hours during vacation mode
  9. To create a wave action, by selecting power on to internal pumps , on timed basis.
  10. To be controlled remotely from Web
  11. To be linked into Google Sheets for ever changing parameters
  12. To be scaleable to control more than one complete marine tank.
  13. To have additional 8 other control modes, should it be needed in future, and or modular to be abe to add more functionality if required at later date.

What I need is endless, and all help is welcome.

If you know what hardware is needed to start this project it will be appreciated. Coding for the controls, I believe can be doable as most are based on timing factors, falling into a specific condition. (But if you have any suggestions please do advise)

Hello and good morning,
The first thing I would do is start with the collection of hardware to be used. This collection needs to be evaluated for the application to determine the size of the power supply. In parallel, the description of the overall function can be broken down into software function blocks.
Good luck

You have not described the steps to be taken if the normal path does not correct the problem.
Paul

yes you are correct.
I have ordered some hardware and waiting for their delivery.
All that has been ordered is with voltage of 220-240 of which some have transformers using the same power.
In general the idea is to design a solution that simplifies keeping marine fish.

please describe your knowledge about Arduino programming, sensors and actors (relays, pumps, lights...).
Show us you best project you have finalized so far.
This helps us to understand your startingpoint, what we can expect from you and where you might need support.

there are certain number of steps which I plan to take to over come issues. the biggest issue is water quality, where for obvious reasons needs to be spot on.

So what I have designed is a water reservoir where the water in the reservoir is directly from the Red Sea. This hopefully will allow me to keep some water always ready for a change :slight_smile: .

The system will have a trickle filter which will be within the system, allowing to clean the water, and to act for the wave maker, and recirculation of the water.

so in reply to the above whilst my knowledge on the Arduino hardware and software is Zero (0), I have heard that this is one of the best solutions out there.
If I can get this project off the ground, first and foremost I can have a tank after 20 years of being away from this hobby.
For obvious reasons if test aspects of certain functionalities is available directly by Arduino, then obviously I will incorporate those solutions.
As an example I saw a PH controller.
But I would love to hear of any other modules that you consider useful in this project, so I can look into.

the 8 parameters are estimated at this juncture. as an example a power generator may become required to step in with there is no power. therefore in such an example, detection of now power, to enable the external generator, and to run for duration whilst there is not electricity[quote="Paul_KD7HB, post:3, topic:875872, full:true"]

You have not described the steps to be taken if the normal path does not correct the problem.
Paul
[/quote]

for the start:
DON'T do any changes to your fish tank. You are dealing with animals and we don't want to see that you killed them due to a programming error.

For the beginning, only do measurements and manuall signals/displays to check the state of your fish tank.
As a start I suggest to read the temperature. Check if you like the DS18B20, get a LC Display with I2C port expander and a simple Arduino Uno for the start.
Obviously, you can start with the PH sensor, but I guess you will find temperature measurements more frequently to start with ;-).

One day - when you have all your sensor implemented, we will come up with alternatives for your microcontroller. But in the current stage it's essential that you learn the basics - and this can be done with a simple Uno some sensors and a simple display solution.

1 Like

Good day.
At this juncture there is no tank, or fish!

This project is being designed from ground up.
the size and dimensions of the tank will vary to suite the area whee the tank will be used.

As an example the depth of the tank is not determined only by the space, but also from the lighting. In general the light will go through 24" of water max where the corals and algee will benefit from.

I will look into DS18B20.

Please keep the info coming.

And thank you for your comments.

Consider getting something that can send you alarm messages, whether that be WiFi/Ethernet or SMS.

Also consider using another Arduino to act as a fish tank simulator so that you can test your controller code safely.

Hi ,

SMS message is a great idea, but will need much help with that.

Could you elaborate on another Arduino as a stimulator?

As @noiasca noted, running an automated controller program puts your fish at some amount of risk. You may be surprised at the number of bugs you can cram into a small piece of code.

Testing the code can be tricky and time consuming. Even managing the temperature isn't necessarily easy because you'll want to check that the fans and heater come on appropriately, but it's unlikely that it'll be too hot now and too cool five minutes later when you're testing.

Then again, you have protein skimming that's supposed to happen at night, so you'll need to test at the appropriate time to check that etc. etc.

With a simulator, you can wire up a pot to let you tell the controller what the water temperature is, so you can set it too hot and watch the fans come on, immediately set it too cold and see the heater kick in.

You can also have it manage the clock so it runs through a day in half an hour or whatever so you can ensure that the functions that are supposed to happen at night actually do.

Another useful feature is to have the sim take orders from the PC over Serial. Then you can script what the sim is to do and run the same scenario over and over again while you debug the controller.

The problem with this of course is that by now, the simulator has evolved into something rather more complex than the actual controller and you will have managed to put bugs in it too, which means you have two places to look for defects.

My general suggestion is to start off breaking the tasks into smaller pieces. Perhaps you start with a few sensors and get them reading properly and reliable. I've read that the DS18B20 already in a "waterproof" housing are not as waterproof as suggested. No personal experience.

I know nothing about fish tanks, however I know in marine environment metals tend to corrode.

Perhaps start with a small fishless tank?

I know nothing about keeping marine aquariums, but if I was approaching this project, I’d be sketching up a block diagram of the whole ‘system’ with the aquarium at the centre, any supply, reservoir, pumps, drainage and valves shown.

Once that ‘manual’ concept block is agreed upon, the next step is to overlay an idea of how those elements are controlled ‘automatically’.
No suggestion of software, just ‘how it will work, and be controlled’

Only then would I start working on the blocks to realise that automation.

Beyond the basics, I’d also be putting sensors to detect error, fault or overflow conditions to protect the equipment, fish and surroundings from a failure of any type.

The biggest problem you have is similar to constant readings on aqua culture vegetables etc. where the probes used to measure ph are subjected to corrosion and unless continually cleaned will give inaccurate and worthless readings.

1 Like

Absolutely true. Sensors can fail abruptly or slowly. Your software has to be able to recognize anomalous readings and automatically fall back to some pre-defined 'open loop' behavior that has a low risk of harming the occupants.

At the beginning of your project you naturally focus on the control algorithms but by the end you'll find that 80% of your code is devoted to data validation and handling 'what if' scenarios.

1 Like

initial idea was to design the hardware and controller to run with no fish or even with no full size tank. in a bucket as per say.

to see how we can make it to behave.

the heating of the water is not such a huge issue as I live in Israel, issue will no dought be cooling the water down. I have ordered some fans, I don't think I will need to run pipes through a fridge or freezer to cool down, but different ideas are running through my mind on the water temperature.

I have also been contemplating to build the tank from acrylic. I was worried of the scratching in side the tank. so another idea was to attach is thin sheet of glass to the inside, so it does not scratch.

Still pondering what is the best choices.

everything that the system needs to achieve can be done with timers.
I am not new to fish keeping, and in 1987 my first tank was self contained with clunky timers.

Obviously I did not have ph levels or salinity, but experience in fish keeping and estimated timings were great help.

today with micro controllers I can take many of the manual chores out. or at least that is the general idea. I know it can be done, I just must find out how.

yes in marine environment everything corods. its nature of salt and irons.

using Acrylic I can build the hosing for the micro controller, and it does not need to sit where the tank is. about 1 meter away gives much protection.

In Israel, during months of August we have very high humidity, that will be a bigger issue with circuits than salt water. But I think I found a way to address that.

yes, I must break down the functions into baby steps.

But I am completely lost with the hardware, which is why I am asking for help.
I am sure some of it will come with trile and error, but that would mean waisted monies which I really don't have too much of.

knowing which hardwares are a must, to get the ball rolling will help. being a modular solution adding more will not be difficult and the costs I am sure are justified.

I was looking at also another controller rasberrypi

but not sure if these two are compatible or not

lol, great minds think alike.

I have sketches on papers all over my office.

no app to draw in, and need to reply on paper and pencils.

so I am with you on this. and no matter what I have though, I am bond to find something I have forgotten.

as is the nature of a project like this.

the 1st was to tell wife I am doing this. LOL