The Planted Tank Forum banner

Aquarium Monitoring/Control System

10205 Views 38 Replies 8 Participants Last post by  FischAutoTechGarten
Hey everyone!

Been a few years since I have had a planted tank and decided it was time to get back into it. In the mean time I have been progressing as an electrical engineer and working long hours. Needing an outlet and hobby I wanted to try my hand at planted tanks again! So I thought I would blend the two together a little bit. My wife and I are currently out on a field assignment and moving back home here in the next few months. Figured I would get my tank and everything once I got back home as to not disturb the bacteria/fish/plants. In the mean time I decided to go forward with designing and building a little aquarium monitoring system!

My plan is to turn this into a short weekly journal about my overall progress, issues I have run into, solutions I have found, and questions for everyone.

So Ill start off where I began the process, keep in mind I am an electrical engineer and not a mechanical/process. I created a crude P&ID (Process and Instrumentation Diagram) to begin with as an overall layout for the project. You can see that attached as a PDF. I appreciate any comments or thoughts on the overall layout. Ill give a short description of each system as it stands now.

I had an Arduino Uno laying around from a Christmas gift to my wife that she opted not to use, so I am now putting that to use as a control system. I am planning on bringing in a pH, ORP, Dissolved Oxygen, Temperature and Conductivity probes purchased from Atlas Scientific into the Arduino through a Tentacle Shield (see attached photos of my work in progress with the pH sensor, Tentacle Shield and a small LCD screen). Ideally I will also have an Atlas Scientific flow meter for the outlet of the filter to maybe warn of filter cleaning time, etc. This will be the monitoring part of the tank, I am hoping to use accrued data after a few months of operation to implement a control scheme with hiccups I may have to manually fix during the time and data from the probes. Ill get more into the electronics part of the project next week. Mostly just excited not to have to do the drop color pH tests anymore :)

Second is the CO2 injection system, which we are all familiar with. I am planning on buying a nice GLA system once moving back. Ideally at some point Ill be able to incorporate the solenoid into my control system and make my own pH controller or tank system controller.

Third, dosing pumps. I plan on having at a minimum two dosing pumps shown in the P&ID. These will be Macros and Micros using the PPS Pro Method at the moment. Simply chose this since it seemed most suited to a dosing pump application, but still considering EI as well. Let me know what you prefer :) I think before this gets implemented I will add a small top off dosing pump as well, but not sure on how I will supply the treated water consistently for this at the moment. Hoping to have an RO system at this point.

Fourth, but not least, the tank system basics. Currently slated to be an Aquamaxx 12 gallon (hoping for bigger), a Hydor professional canister filter, Hydor inline heater, and Finnex Planted+ 24/7.

That is all I have for this week, let me know what you think. Next week will be related to control cabinet design, terminal block layout, specifications, etc based on the P&ID.

Have a good week!

Attachments

  • Like
Reactions: The Dude1
1 - 14 of 15 Posts

· Registered
Joined
·
132 Posts
Hey everyone!



Been a few years since I have had a planted tank and decided it was time to get back into it. In the mean time I have been progressing as an electrical engineer and working long hours. Needing an outlet and hobby I wanted to try my hand at planted tanks again! So I thought I would blend the two together a little bit. My wife and I are currently out on a field assignment and moving back home here in the next few months. Figured I would get my tank and everything once I got back home as to not disturb the bacteria/fish/plants. In the mean time I decided to go forward with designing and building a little aquarium monitoring system!



My plan is to turn this into a short weekly journal about my overall progress, issues I have run into, solutions I have found, and questions for everyone.



So Ill start off where I began the process, keep in mind I am an electrical engineer and not a mechanical/process. I created a crude P&ID (Process and Instrumentation Diagram) to begin with as an overall layout for the project. You can see that attached as a PDF. I appreciate any comments or thoughts on the overall layout. Ill give a short description of each system as it stands now.



I had an Arduino Uno laying around from a Christmas gift to my wife that she opted not to use, so I am now putting that to use as a control system. I am planning on bringing in a pH, ORP, Dissolved Oxygen, Temperature and Conductivity probes purchased from Atlas Scientific into the Arduino through a Tentacle Shield (see attached photos of my work in progress with the pH sensor, Tentacle Shield and a small LCD screen). Ideally I will also have an Atlas Scientific flow meter for the outlet of the filter to maybe warn of filter cleaning time, etc. This will be the monitoring part of the tank, I am hoping to use accrued data after a few months of operation to implement a control scheme with hiccups I may have to manually fix during the time and data from the probes. Ill get more into the electronics part of the project next week. Mostly just excited not to have to do the drop color pH tests anymore :)



Second is the CO2 injection system, which we are all familiar with. I am planning on buying a nice GLA system once moving back. Ideally at some point Ill be able to incorporate the solenoid into my control system and make my own pH controller or tank system controller.



Third, dosing pumps. I plan on having at a minimum two dosing pumps shown in the P&ID. These will be Macros and Micros using the PPS Pro Method at the moment. Simply chose this since it seemed most suited to a dosing pump application, but still considering EI as well. Let me know what you prefer :) I think before this gets implemented I will add a small top off dosing pump as well, but not sure on how I will supply the treated water consistently for this at the moment. Hoping to have an RO system at this point.



Fourth, but not least, the tank system basics. Currently slated to be an Aquamaxx 12 gallon (hoping for bigger), a Hydor professional canister filter, Hydor inline heater, and Finnex Planted+ 24/7.



That is all I have for this week, let me know what you think. Next week will be related to control cabinet design, terminal block layout, specifications, etc based on the P&ID.



Have a good week!


You ate definately on the right track. I am towards the tail end of my project There are a couple of things I would do differently. I would have made more use of the arduino for data acquisition. Also I am just now adding esp8266 ($6 WiFi arduino). To eliminate lots of wire and help with isolation. But one thing you HAVE to look at is adding a Raspberry Pi (RPI) and node red for the process logic and web interface. I would be more than happy to give you what I have code wise. I have NO intentions of selling this but would like to keep everything open source so other could benefit too. I have ph, ec, Temp , water level, dosing, ato (auto top off), 5gallon waterchanges nightly, dimming led lights, heater control, WiFi controlled power strips. And some more I’m forgetting. All is controlled by RPI and accessible over web on phone and at home on pc. I come from a software background so I would greatly appreciate an EE looking over my stuff and calling out the stupid stuff that’s going to burn down the house!



Sent from my iPhone using Tapatalk
 

· Registered
Joined
·
132 Posts
Subscribed. Want to do something similar but much simpler to monitor temp, pH, and sump water level, as well as control the lights once I get my 40B up and running.


This is easily pick and choose on what you want to add


Sent from my iPhone using Tapatalk

another one enters the rabbit hole... ;)
Ferduino Aquarium Controller
https://www.robo-tank.ca/
And about 1 dozen more give or take a few dozen aborted attempts..
http://arduino-aquarium.blogspot.com/p/software.html
https://www.reef2reef.com/threads/h...arium-monitoring-control-system.264093/page-5
diverjoe???

FROM a PURELY amateur and naive standpoint Aduino isn't really the best platform for what you want...







https://makezine.com/2015/12/04/admittedly-simplistic-guide-raspberry-pi-vs-arduino/

There are others...
note just figured out what RSP means.. Doh on my part..


I have looked at all of those and decided on a different architecture. I am 25 yrs into application development and have coded in just about everything. It had to be ease of integration and modification. I HATE hand coding my own UIs and I started seeing Node Red (NR) pop up in several other non-fish related control systems. OpenHab is a great example.

The ui is simply drop a text bit or slider etc in the palette and drag a wire from a datasource and it surfaces everything to both a web interface as well as a smartphone layout..... literally instantly. You actually “code” on he pi by connecting boxes. I have never found anything else more intuitive or simple short of Microsoft Dynamics 365.

My app is complete and running and has been for quite a few months now. It still has some bugs and needs some more safety features but they are only limited my someone saying it needs xyz.

I am a software architect by trade - the hands on kind. So all I have done is with a eye towards repeatability, expandability, ease of implementation , and robust technology.

It has been a slow build because of my steep learning curve of all of the pieces and part of the controllers as well as the technology/science behind aquaculture. I had been out of keeping a tank for over 10 yrs and when I started back I wanted to use all I had learned in life to make fishkeeping less mundane work. Only addressing the exceptions and the fun things like feeding blackworms.

I derived the idea from how the folks over at Reef Angel has been working. The code is open source. I have NO intentions of selling hardware but have been working to find ways to replicate things in a DIY fashion. Like water level. I have a prototype that is $10 in parts and is WiFi. As soon as I figure out a couple of issues it will be ready to release to others. Maybe some of you will help.

Long post but if no one likes anything I have done I am ok with that. I did it for me with a mind to share.


Sent from my iPhone using Tapatalk
 

· Registered
Joined
·
132 Posts
I heartily commend you for your efforts..;)


I am actually digging through a post you are currently active on for lighting. I recently discovered I needed more par to the substrate and am working through a lot of the watts, amps and voltage for an off the shelf led I bought. Expect some brain picking soon lol


Sent from my iPhone using Tapatalk
 

· Registered
Joined
·
132 Posts
I looked at Atlas Scientific web site and those probes are pricey. I have not done much research yet, but is there something more budget oriented?



Looking at Arduino vs RSP vs PLC, wouldn't micro ATX or mini ITX be another viable platfom? Then you could run OS and IDE of choice. I am mulling whether I want to go down that rabbit hole for fun and giggles orshoud I just stick to water changes.


There are some workarounds on the atlas thing that could be pursued as I can see that some of the things I was trying could have worked with what I know now. But however at the end of the day ph and ORP are probably two of the hardest.



Sent from my iPhone using Tapatalk
 

· Registered
Joined
·
132 Posts
Yeah there are definitely multiple ways to do it. I think the raspberry pi and Arduino already have alot of support in this area which gives them a leg up.

There are certainly plenty of budget sensor options on Amazon etc. However you'll need to consider wiring it up to your board of choice with a breadboard and bnc connector. And also don't forget about voltage isolation to get rid of noise and improve measurement accuracy. Something the tentacle shields do quite well and in a small package. My point being there are plenty of options, but not all created equal or as turn key :)

Maybe diverjoe knows of a simpler/less expensive solution for a few measurement points?

Sent from my Pixel 2 XL using Tapatalk


Pretty sure that EC can be done with a future 8 power cord and a cheap noise circuit. I know how to smooth the values in code now

Temp is a $2 sensor.

I am close to having. $5 solution for water level


Sent from my iPhone using Tapatalk
 

· Registered
Joined
·
132 Posts
Have you considered using analog circuits instead of the atlas stamps? Would be cheaper with these and even cheaper if you could just get the circuits and then get cheaper probes off [Ebay Link Removed]



Conductivity

ORP

pH

Analog isolation


I am certainly all ears. Definately EC is simple. But I don’t know what the man behind the curtain is doing in a ph or orp circuit. If I had a clean value from either, the rest could be done in code


Sent from my iPhone using Tapatalk
 

· Registered
Joined
·
132 Posts
I also think that and ESP8266 WiFi module could be used to eliminate the issue of isolation all together. They are about $5 It used arduino type code


Sent from my iPhone using Tapatalk
 

· Registered
Joined
·
132 Posts
Derby and DiverJoe,



you guys are up my alley. I'm a process controls guy from way back (DCS, PLCs, SCADA). Presently building my own aquarium controller, but I've traded out controllers and changed direction a few times.. Arduino Duo, TI TM4C Tiva Series, Rasberry Pi3 running Win10 IoT Core , etc...



Just getting back into the fish keeping hobby which has encouraged me to finish my own controller.


Keep the arduino for daq and the Pi with Debian Linux for data manipulation and process control


Sent from my iPhone using Tapatalk
 

· Registered
Joined
·
132 Posts
I am currently using atlas for EC and pH. One of my side goals was to come up with an inexpensive DIY replacement for what is out there. Once I have a signal, turning it to a readable value is easy. So is calibration. For example peristalic dosing pumps. Measure what they actually do, and store that as a constant and perform whatever math from there. EC - the water is a known 1000 micro seimens, it says it is 945. Store the delta and apply it to the readings as they change. When it is not linear, then you have to do a bit of fancy math, but usually nothing beyond high school. I have also come to realize that we really are not managing to 5 digits. The sensors themselves are not that good.
 

· Registered
Joined
·
132 Posts
ph and ORP probes give out a negative to positive range voltage (-2 to +2 for ORP, -400mV to +400mV for pH), all these boards are doing is converting those ranges to 0-5V to be used for arduino. EC I'm actually less clear on, appears to generate a signal that it puts through the probe and then does some signal conditioning to get a 0-5V signal. They provide the schematics so you can see exactly what the circuit contains.

Compared to the cost of that tentacle board and 3 atlas stamps it's a huge difference. But you would then have to implement your own code for calibrating and turning that 0-5V signal into ph/orp

I actually got a $2 EC working - just thought that it was messed up because I did not understand signal conditioning or isolation. The sensor is literally 2 pins in the water! They are usually stainless or carbon. Or, in my case a figure 8 power cord from a router with 2 stainless screws in the 2 holes and the tops ground off! I was able to get the values to track right along store bought. If the pH and ORP sensors give me a value +-2 to an adc (i.e. arduino analog pin) then the rest is just math and process control. Most of that is documented.
 

· Registered
Joined
·
132 Posts
This is great! Take a look amz or eekbay and search for 8 channel relay 5v. It is great opto isolated you can power the 5v side from a power supply and only use the signal from the arduino or Pi to trigger the change. They can do 12-240v on the high side.

I have a 8 gang junction box wired with one of these that is driven by an ESP8266 WiFi board. The Pi talks to the board directly and turns things on/off


One other thing is that I2C may be a little prone to bus locks and signal noise - something to consider

Sent from my iPhone using Tapatalk
 
1 - 14 of 15 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top