I'd like to build my own aquarium controller, but it's WAY complicated

A few things you might need to know before you start reading :
- If you think a lot is alike well your right

- I'm a non native english speaker nor writer when words are placed between "....." then I don't know if I used the correct word that would fit, but I hope you will get what i mean by understanding it with the "context".
Main controller :
On the front side of the controller there would be an touch screen(I know this isn't possible yet with E-blocks but I'll probably program this is VB or C++)
What it has to do :
- With that touch screen you will be able to set all the variables off the program (But it will only be possible for the modules that are connected).
- When you want to change your variables you will need to swing an RF-ID card in front of the receiver to unlock this mode, this because we don't want kids to just start pushing buttons do we

- The controller will receive all variables of the sensors and when not in programming mode it will print them on the screen.
- It will also need to act on some variables to switch relays(All will be relays I think, with the expansion it might change).
A lot of other things that the Main controller will need to do will be place with the correct sensors.
This to make it easier to comprehend
PH-module
This will be a small PICmicro with 3ports.
- CAN-bus card
- Sensor interface card
- Switches
What it has to do :
- The sensor will need to be read and send with the CAN-bus to the Main Controller
- The switches are will serve for recalibration. This will also be possible on the Main controller.
Temperature-module
This will be a small PICmicro with 3ports.
- CAN-bus card
- Sensor interface card
- Switches
What it has to do :
- The sensor will need to be read and send with the CAN-bus to the Main Controller
- The switches are will serve for recalibration. This will also be possible on the Main controller.
Conductivity-module
This will be a small PICmicro with 3ports.
- CAN-bus card
- Sensor interface card
- Switches
What it has to do :
- The sensor will need to be read and send with the CAN-bus to the Main Controller
- The switches are will serve for recalibration. This will also be possible on the Main controller.
Oxygen-module(This is the dissolved oxygen probe
This will be a small PICmicro with 3ports.
- CAN-bus card
- Sensor interface card
- Switches
What it has to do :
- The sensor will need to be read and send with the CAN-bus to the Main Controller
- The switches are will serve for recalibration. This will also be possible on the Main controller.
- There is an option to buy a barometer, this could be taken in to account when calculating the correct "oxygen saturation".
Water level-module
This will be a small PICmicro with 2ports.
- CAN-bus card
- 4 water-level sensors will be connected to this port.
What it has to do :
- The sensors will need to be read and send with the CAN-bus to the Main Controller
- When the lowest sensor in the aquarium says it doesn't "feel" water it will need to refill till it reaches this sensor, when this sensor fail's there will be a second higher one to stop the refilling of the aquarium to happen.
- The water comes from a reservoir that is filled with osmoses water, here the same program should be in place to keep the reservoir from overflowing. Here we don't stop a pump but a valve that is connected to the "water grid".
Salinity-module
This will be a small PICmicro with 3ports
- CAN-bus card
- Sensor interface card
- Switches
What it has to do :
- The sensor will need to be read and send with the CAN-bus to the Main Controller
- The switches are will serve for recalibration. This will also be possible on the Main controller.
- There are 2 options when the salinity drops below a certain level that can be set on the Main controller
* When there isn't a Water change-module it will give an alarm, this also has 2 possibility's
+ A sound alarm
+ A sms to the owner with the sms module if this is in place
* When there is a water change module, the Main controller will do a water change with the correct amount of salt in the water that it is going to change.
Water change-module
This will be a small PICmicro with 4ports
- CAN-bus card
- Sensor interface card
- 4 water-level sensor
- Switches
What it has to do :
- When does it need to happen???
+ When the salinity has reached a critical high or low level
+ When there need's to be a weekly/monthy water change(The time interval can be completely set on what date on the Main controller)
+ When the nitrate level reaches a sertain high value (5-20ppm)
+ When the amonium level reaches a sertain high value (..-..ppm)
+ When there is no Calcium-reactor-module or calcium is add true the dosing module and the calcium level in the tank drops under ...ppt
How does it need to happen.
1. Prepare the water that will be used to do the waterchange.
+ Fill the tank with osmoses water
+ Measure the salinity of the osmoses water(will be 0 on the first waterchange but will be more on the next because you can't drain all the water from the tank)
+ With a precise machine to add the synthetic salt in the right quantity. This until it reaches 35ppt
2. Stop the main pump from the sump(filter) to the aquarium
3. you will need to empty the measuring reservoir to the drain. (this only gets done when there is effectively going to be a waterchange, this because when we would empty the measuring tank before water that could evaporate in between water changes and this will result in a higher volume that will be taken out of the aqurium then there will be put in to the aquarium) The tank wont be fully drained, only till the lowest water-level sensor.
4. Pump the water from the sump to the measuring reservoir untill it reaches the highest sensor.
5. Pump the water from the water change reservoir till the lowest sensor in that reservoir.
6. Put on the main pump of the aquarium.
Some of these stept can be taken at the same time.
At all times there will be a small circulation pump running this because water that is standing still will become dead water, this ain't no pleasure to have this in your house

Calcium reactor-module
This will be a small PICmicro with 4ports
- CAN-bus card
- Sensor interface card
- Sensor interface card
- Switches
What it has to do :
When the PH drops below ..,..(e.g. 6.3) no more CO2 needs to be added but when the PH is ..,..(e.g. 6.4) or more CO2 needs to be added to the calcium reactor.
By trial and error there will be formed a formula that will regulate the calcium that is added to the aquarium water and this will be used to controle a dosing pump to give the right amount of CA saturated water to the aquarium. This so the amount in the aquarium stays between 410 and 440.
Barometer-module
This will be a small PICmicro with 3ports.
- CAN-bus card
- Sensor interface card
- Switches
What it has to do :
- The sensor will need to be read and send with the CAN-bus to the Main Controller
- The switches are will serve for recalibration. This will also be possible on the Main controller.
Nitrate-module
This will be a small PICmicro with 3ports.
- CAN-bus card
- Sensor interface card
- Switches
What it has to do :
- The sensor will need to be read and send with the CAN-bus to the Main Controller
- Give and Alarm(sound or SMS) when above ...ppt
- The switches are will serve for recalibration. This will also be possible on the Main controller.
Ammonium-module
This will be a small PICmicro with 3ports.
- CAN-bus card
- Sensor interface card
- Switches
What it has to do :
- The sensor will need to be read and send with the CAN-bus to the Main Controller
- Give and Alarm(sound or SMS) when above ...ppt
- The switches are will serve for recalibration. This will also be possible on the Main controller.
Plug-module
This will be a PICmicro with 7ports(16F946)
- CAN-bus card
- Switches(4)
- 8 plug that will be switched on by a pulse
- 8 plug that will be switched on by a pulse
- 8 plug that will be switched on by a pulse
- 8 plug that will be switched on by a pulse
- 8 plug that will be switched on by a pulse
What it has to do :
- When necessary a plug will be switched on by a pulse on the right ports exit.
- The plugs can be tested 1 by 1 with the switches.
- On the plug itself there will also be a button to make it switch. This for easy maintenance of pumps, light bulb switching and so on.
- On ..-plugs it will be possible to place lightning that will be switched on from xx:xx till xx:xx. These relais that will switch on and off, have a
maximum load of 2300W
Dosing-module
This will be a small PICmicro with 3 ports
- CAN-bus card
- Switches(8)
- 8 dosing pumps that will be put on by a relais. probably the same electrical wiring of the plugs.
What it has to do :
- Needs to be switched on by the main controller. This a preset amount devided true the day. Value's will be in milliliters.
- There is a time limit set in place in this PIC controller this to see that there isn't going to happen an overdose to the tank
- With the switches you will be able to add manually to the system, also possible with the main controller
Reading-module
This will be 2 small PICmicro with 2 ports
- CAN-bus card
- Zigbee card R
- Zigbee card C
- Graphical LCD touch screen
What it has to do :
This device will be a special add-on this will have the possibility to see the value's of your aquarium on a separate screen. Because it is always unknown where it is going to be place I used the zigbee board to make it wireless. So it can be place a bigger distance from the aquarium. Only power is needed. This means i have 2 PICmicro's 1 as a sender and 1 as reciever. You will only be able to read the value's, it isn't a second controller, though it would be interesting

Voltage-module
This will be a small PICmicro with 3 ports
- CAN-bus card
- Sensor interface card
- Switches
What it has to do :
When there is a power cut a generator will be turned on to supply power to the aquarium(believe me these things already exist and are EXPENSIVE, don't think i'm a fanatic


When there is a powercut only your aquarium will run on the generator but you will need to cut off the electric grid so you don't supply them with free of charge energy


SMS-module
This will be a small PICmicro with 3 ports
This I have no idea what it would be, I'm going to order the course
http://www.matrixmultimedia.com/product ... PHPSESSID=
this to learn how it works and if I can use this, the answer here will be yes probably.
What it has to do :
When any sensor gives a abnormal reading for longer then x time a sms will be send to the cell-phone.
The other way around is possible to, you send a text message and the module will send you the values of your aquarium.
PC logging-module
This will be a small PICmicro with 2 ports
- CAN-bus card
- USB interface board
What it has to do :
Send the values of your aquarium to your PC so they are stored and can be viewed in a program.
RFID-module
This will be a small PICmicro with 2 ports
- CAN-bus card
- RFID board
What it has to do :
when the card is read by this module it will give a signal to the main controller that the menu to set your value's can be accessed and changed.
If not shown you can still access the value's but not change, this to check what is your minimum and maximum that is set. This way you don't need the RFID-card to check if your value's are still correct.
This is it. Maybe more add-ons will come but I doubt it, this is a lot of work already :mrgreen:7
My problem is that i wouldn't even know how to use the CAN-bus system(macro's) but I'm going to buy the CAN training solution. But then still can you send INT across a CAN??? I hope so otherwise I'm screwed

If someone doesn't understand what has to happen and needs some visualisation drawings, no problem I can make them for you just ask
Thanks in advance
Greetings
Ben