The Planted Tank Forum banner

Aquarium Monitoring/Control System

10210 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 - 9 of 9 Posts

· Registered
Joined
·
55 Posts
Discussion Starter · #3 ·
Thanks for the welcome back!

The Neptune Apex is definitely very similar to what I am wanting to build no doubt. And yeah it is fun to design and build your own, teaches you alot about the system!

Couldn't agree more on the monitoring first part...best to see how the system operates before you try to control it.

Sent from my Pixel 2 XL using Tapatalk
 

· Registered
Joined
·
55 Posts
Discussion Starter · #5 ·
Thanks for the suggestion, I was thinking about a RPI but wasn't sure how to implement it at the moment. But with your suggestion I think I will move forward with integrating that into the system early on :)

How do you interface the Arduino and the RPI? You are just using the Arduino to gather the data and then pass it to the RPI to utilize in controlling the process?

Your web portal sounds awesome, will definitely keep that in mind!

Also feel free and pass along any EE related questions, I come from an industrial background so I tend to go a little conservative :)

Sent from my Pixel 2 XL using Tapatalk
 

· Registered
Joined
·
55 Posts
Discussion Starter · #9 ·
EE here also, power, water treatment, and building industry. Out of curiosity, is there a reason no one uses a PLC based system with Wonderware as an interface? I'm assuming it's due to cost, but it appears it sure would be a sweet system.
You know that's a good point. I did a little research at the beginning and between my inexperience with the industrial PLCs for programming and how convenient and relatively inexpensive the Arduino (and RPI) was just made more sense to use those. Also the atlas scientific probes are just so easily setup to go with an Arduino with their tentacle shield it was a no brainier for me.

I'm sure if you had more hands on experience with the PLCs it would be awesome and would work just fine :) I'd love to see a setup with a PLC as well! I've only ever used the Allen Bradley ones, and only from a wiring perspective not programming.

Sent from my Pixel 2 XL using Tapatalk
 

· Registered
Joined
·
55 Posts
Discussion Starter · #14 ·
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
It's pretty awesome, really love those web interfaces that's epic. Really perfect for automating aquarium monitoring, and tracking it for future use to compare trends. You made an app as well or just a web interface that sends an email when it alarms on something? How do you handle tank alarms is more my question :)

Sent from my Pixel 2 XL using Tapatalk
 

· Registered
Joined
·
55 Posts
Discussion Starter · #16 ·
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.
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
 

· Registered
Joined
·
55 Posts
Discussion Starter · #28 ·
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.
Awesome join the club! Like diver said seems the general trend (of this thread anyways) will be using an Arduino for data gathering and use the raspberry pi for manipulation and control.

I'm a fan of the atlas scientific stuff as well, seems well made and the documentation is excellent. Which can't be said for every manufacturer lol.

I am tempted to break into the Arduino IoT boards as well for the wireless functionality but we will see...more research needed...

Sent from my Pixel 2 XL using Tapatalk
 

· Registered
Joined
·
55 Posts
Discussion Starter · #33 ·
Post 2 - Starter Schematic

Hey everyone,

Been a little over a week since I last updated. I have been working on drawing up a schematic for how I want to wire up the control system. My plan is to have a little Hoffman enclosure or something similar with some din rail, terminal blocks etc. Just a preliminary wiring diagram/schematic so comments are certainly welcome.

At the moment I have the top section divided by voltages (120VAC, 12VDC, 5VDC and 3.3VDC). I plan on bringing the 120VAC into the enclosure via a cord from a wall outlet, this will drive a 12VDC power supply (Phoenix Contact 2938756 for now...) and the filter, heater, etc. through relays. I had to try and find some low coil power relays for the Arduino to be able to drive via 5VDC without overdrawing on any given pin. I did not want to go through and use transistors or anything to drive the relays like I noticed on some sites. Currently planning on using some TE Connectivity R10-E1Z2-S140 relays for this as they should pull max 20mA from the pin which is acceptable.

Otherwise I drew up the I2C bus, going to need a UART to I2C converter for the flow meter. I realize I could probably just bring this in directly via UART to the Arduino, but for now I am going to try and do all communication via I2C. Going to try and use a NXP SC16IS741IPW,118.

Another note, I did some napkin calcs. I think all should be fine feeding the pump, heater, etc. from the one wall plug on my 20-40 gallon tank. Similar to a power strip but via terminal blocks. Any bigger than this and I might get a little nervous and would need to do some more in depth calculations. I plan on doing this, just haven't yet.

See attached for the PDF! When I am finished I will have this available in .dxf for whoever would like it in CAD. I am currently using QCad which is a nice setup, close enough to AutoCAD to pick up quickly.

Have a good one!
 

Attachments

· Registered
Joined
·
55 Posts
Discussion Starter · #36 ·
I talked to Jordan over at Atlas-Scientific a few months back (wow 9 months ago) about adding I2C to both the EZO-Flow Universal Flow Meter Totalizer and EZO-RGB Embedded Color Sensor.
He mentioned their focus was on moving into their new much larger lab before continuing with further product development. However, it is something he would like to do with those two products. They moved into the new lab last fall. Perhaps, we will see something from them soon. (They have that EZO-Co2 Embedded NDIR Co2 Meter still in development.)

I own several of the previous flow meter boards and older color sensors. No desire to move to the EVO versions of them without I2C. In fact, I'm not going to convert to I2C for anything (no EVO) until I can receive all of my analog inputs (sans my level tape) over I2C. When they put I2C on those final two stamps, I will do an upgrade and replace all of my sensor circuits with new EVO stamps (Temp, pH, ORP, D.O., Conductivity, Flow, Color) and use I2C exclusively for communication. Right now I do Serial with two of the older 4 port serial port expanders... and my Temps are the older analog models.
Gotcha that's good to know that they are working on transitioning those over, hopefully we will see them soon! And a CO2 sensor sounds awesome :)

Sent from my Pixel 2 XL using Tapatalk
 
1 - 9 of 9 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