★ DIY [Auto] ★ [ ALKALINITY MONITOR ] ★ 3 Tank [HANNA with Raspberry PI / Ardiuno ] with ADVANCED Features

WallyB

REEF Techno-Geek
View Badges
Joined
Jan 24, 2017
Messages
1,868
Reaction score
4,483
Location
GTA Toronto, CANADA
IT's finally over. 6 months of hard work is coming to the End Game. (Working Alk Monitor)

A crazy idea I came up with, actually works.
All started because I couldn't get a Apex Trident (none available),
nor or was I will to shell out the money (and throw out two perfectly working two Apex Classics).

Posting a Thread now... since it's Finished/Finished 100%. Works perfect and Tested/Debugged/Proven. (No more worries I would fail)
I just filmed the VIDEO Demo PROOF (posted on YouTube)...SEE YouTUbe LINK at Bottom of this Post.

IT's Call the TANK MATE ( AquaMon LAB ) .... (Aqua=Water Mon=Monitor)
"Tank Mate" is my Brand Name for all my DIY Controllers.


2019-11-04_TankMate-AquaMon-Lab.jpg


What is it?

A Triple Tank Automatic Alkalinity Monitor for my 3 Tanks. (DT#1,DT#2,FragT#3)

HARDWARE:

- Raspberry PI as the Master Controller (THE BRAIN, Network, Scheduler & Web Server)
- Ardiuno Mega as the Secondary Controller (The WORKHORSE to control the Motors, Servos, Pumps, and Lighting)
- PI CAMERA for Computer Vision (Digitization)
- 4x Displays (Touch Screen, LCD, Green OLED, and Color OLED) for Human Interface, Status, results, etc
- 5x Kamoer Pumps for (Fluid transfer).
- 4x Servo Motors for Robotics, 1 DC motor for Mixer (removed from Printer Paper Feeder)
- Digital I/O DC Control (PWM Module, LN298 Dual-H Bridge, LM296 Buck DCtoDC converter) via Digital, I2C, SPI.
- A few LEDs (Lighting), Buttons, Contact Switches,and some Pennies for position markers. (Plus lots of wire, and Hot Glue)
- Build on the Foundation of a (Broken) HP All in One DeskJet 6968 Printer/Fax (Torn apart for Parts)......[ A HANNA Alk Egg Tester located on the Printer Head for lateral movement ]

SOFTWARE:
- Too much to describe all the code but a combination of Integrated:
--------> Python, C, Perl, Linux, Driver/Libraries, OpenVision, MatLab, Apache Web, CSS, CGI and scripts, with Custom Jpeg images.

FEATURES:

- Accuracy: +/- 0.05 dKH, (Consistent Results)
- Auto Alk Testing auto scheduled (Hourly, Daily, Weekly, anything you want for each Tank)
- Hanna ALK Reagent (30 Test bottle @ reasonable cost for Weekly Testing, or as Needed)
- Remote Access via Web Interface (WiFi), Touch Screen, or BlueTooth (Mouse/Keyboard)
- No distance limitation on Sample Lines from Water Source (distance Calibration)
- Data Storage local, manual input, edit, Can Combine External Tests (ie Calc, Mag, NO3, PO4)
- Graphical Presentation, with Tables, Graphs, Thresholds/Targets, Alerts, and color coded results.
- Software Calibration of Dosing Lines (lengths), Samples Volumes, Pumps, even re-calibration of Test Results for Offsets.
- Manual mode for On-Demand testing (External Samples), and SW controlled maintenance Functions.
- Self Cleaning.
- Doser Control
...future integration..
- and more....(eg. works with Apex Fusion, tested, proven with a D/A module with cable into Apex Probe input port)

PERSONAL PURPOSE: I get busy and my SPS tank has paid the price. 4 Years, and always something busts after a while of positive progress.
LPS/mixed tank has no issues (Forgiving). It's only the Sensitive SPS.
Automation is the answer for me (and over last few years worked to build a few Controllers, (to my spec) to keep things humming)
This Alk Monitor is the Last of the Series after completing the Water Changer, ATO , Doser, and Maintenance Minder.


I have a 90 Gallon Very Successful LPS/mixed Tank
KitchenLPSmixed90Gal.jpg


and also the **Failed many times *** 110 Gallon SPS Tank (few frags alive)
SPS110GTank.jpg


All run from my Central Basement Custom Built Sump Room. (SPS tank behind Home Office wall)
2020-02-10_SumpRoom.jpg


With Alk Monitor finish, I'm Ready to start Fresh again (NEW SPS Frags)..... *** ONE MORE TRY **

Hope things go right with Automation on Key Aspects of SPS Success. (Don't need Mag/Calc since I dose A/B two Part and they balance with Alk)

Below Photo
is the 35 Gal Frag Tank. next to SUMP ROOM . No SPS Frag has ever survived long (no time for maintenance), so for now Fish/Live-Rock.


2020-02-08_TankMateFamily.jpg


Here is the DEMO VIDEO. (Pardon the quality, I just wanted it out-of-way after months of effort)
...so no Edits, Re-Takes, stills, or music, and I have a cold so not the best voice over. (Might make a better video someday after running it for a few weeks/months)


AquaMon Auto (DIY) ALK MONITOR DEMO <--- CLICK HERE for YouTUbe VIDEO

OR HERE
to watch on R2R.


After all this R&D/New-Skills, plus code ready for re-use.... Might make a better, compact, Single Tank/Portable Alk Monitor. (Kleenex box sized)

Enjoy.

Wally.B
 
Last edited:
OP
WallyB

WallyB

REEF Techno-Geek
View Badges
Joined
Jan 24, 2017
Messages
1,868
Reaction score
4,483
Location
GTA Toronto, CANADA
Even if you don't have a repo, for the love of God please back up your code in multiple places lol
Code repository - ie.: Github, bitbucket, etc.
don't tell me your code is on your local hdd only?
Thanks for your concern. Appreciate that.

Decades ago I learn a very painful lesson on losing code. I had a commodore 64, that had broken power LED. Every so often it would crash, and I would loose code having to type it back in, or get from slow tape (if even there). I learned months later it's wasn't a Computer crash. The C64 was alive, but my monitor has a loose connection, and I actually was powering things down, till it cooled and work. I self destroyrf code (unecessarily) that was there (Powering down, but it wasn't needed).

No worry about Lost Code for this project. This is 6 months of Hard work
Every day of progress, I documented, everything meticulously.
Not only code. I made dumps of PI Images, to preserver the OS customization's.
Backed up the SD cards, and then cloned back to a 2nd card to prove it would boot.
(learned that lesson on incompatible SD cards, so bought a few of the same type). High grade micro SD's that are x-ray, water proof (even in salt water)

The code, and schematics, wiring diagrams (if lost) would be my greatest nightmare. Wiring is complex and tight in the controller.
Even a day lost after debugging would be extremely painful to re-do.
So backed up to 2nd SD drive, then to Raid 0 NAS, the copied onto a 2nd Disk pack (store in fireproof safe), and then once every while (a copy of the whole project, copied to a 2nd Portable SSD drive, and stored at another family members house).

Since then I back up everything (Cameras, Family PHones) I survived a Rasomware encryption that my young kids brought in clicking all over the home computer. When the Ransom popup appeared, I laughed. Formatted the Computer and went to my safe for restoration of everything, minus a day.

The Code isn't GitHub or any repository quality, unless I would do some serious clean up. (no time to combine documented code, with HW/wiring, etc)

Here a example of how well I documented, and how it's important I don't ever lose my hard work.

THis is how the Raspberry PI (Camera) decodes the Digits off the Hanna and digitizes into Data.
Once I figured that out, I started the project Build.
ComputerVisionDecodeDigits.jpg


I have plenty more to share if anyone is interested, in the Under-The-Cover Tech details.
 
Last edited:
OP
WallyB

WallyB

REEF Techno-Geek
View Badges
Joined
Jan 24, 2017
Messages
1,868
Reaction score
4,483
Location
GTA Toronto, CANADA
Wow dude. I’ve read your build thread... been awhile. But you do some crazy nice stuff. I feel like such a simple person.
Glad you read my thread, so you must know when it comes (Simple People), that's me with SPS. I'm a failure and hopeless. Other rookies just throw sps into tanks and they thrive. Not for me!! Hope that changes soon. Or I will eventually give up (But not till I give it all I got). I'm stubborn.

Everyone has the strength, weakness's, and talents.
We are all special in some way.
I tell my kids that everyday as they sometimes compare themselves to others.
 

ScottR

Opihi picker
View Badges
Joined
Feb 12, 2019
Messages
4,983
Reaction score
14,436
Location
Hong Kong
Glad you read my thread, so you must know when it comes (Simple People), that's me with SPS. I'm a failure and hopeless. Other rookies just throw sps into tanks and they thrive. Not for me!! Hope that changes soon. Or I will eventually give up (But not till I give it all I got). I'm stubborn.

Everyone has the strength, weakness's, and talents.
We are all special in some way.
I tell my kids that everyday as they sometimes compare themselves to others.
My tank is a year old. I’m mostly successful with SPS. I do nothing fancy. Dose, good lighting, heavy flow. I’m a set it and forget kind of a guy. Tinkering usually gets me in trouble. But I did enjoy reading your build thread. I need to revisit it sometime soon. But it is one of the memorable ones.
 

Matt Peacock

Member
View Badges
Joined
Jun 22, 2018
Messages
18
Reaction score
10
I don’t know what to say. Your creativity and self-taught know how is borderline incredible. Then you have gone one step further and shared all your hard work.
 
OP
WallyB

WallyB

REEF Techno-Geek
View Badges
Joined
Jan 24, 2017
Messages
1,868
Reaction score
4,483
Location
GTA Toronto, CANADA
I don’t know what to say. Your creativity and self-taught know how is borderline incredible. Then you have gone one step further and shared all your hard work.
Thank your Matt,
Your generous compliment means a lot.
I'm really proud of this achievement, and my wife/kids don't really care. They do like the blinking LEDS.
and they are glad I'll be crawling out the basement (finally) to see sunlight again.
I kept promising they would see me more, if I automated things more.
 
Last edited:
OP
WallyB

WallyB

REEF Techno-Geek
View Badges
Joined
Jan 24, 2017
Messages
1,868
Reaction score
4,483
Location
GTA Toronto, CANADA
My tank is a year old. I’m mostly successful with SPS. I do nothing fancy. Dose, good lighting, heavy flow. I’m a set it and forget kind of a guy. Tinkering usually gets me in trouble. But I did enjoy reading your build thread. I need to revisit it sometime soon. But it is one of the memorable ones.
Scott, glad to hear your SPS are doing well.
I totally agree that Tinkering is my downfall. Trying to break the habit.
If you stopped tinkering, be careful of the Lurking things that can happen (Accidents). Happens always...Eventually.

This is the Farthest I ever got with SPS before things went belly up.


2020-02-10_MiyagiGrowth.jpg


2020-02-10_ShortTermSPSsuccess.jpg


I always wish that Forest Fire Digi made it. It started taking on a Weird Shape :) Funny eh?
 
Last edited:

peterj66

Member
View Badges
Joined
Mar 18, 2016
Messages
73
Reaction score
42
Location
Malmoe, Sweden
Really cool build. Thought about using photometric alkalinity checks but think I will go with the pH probe version on my build when the time comes. Like the idea of using an old printer for positioning. If more tests could be done with fluid reagents only that would be an awesome mulitparameter testbed.
 
OP
WallyB

WallyB

REEF Techno-Geek
View Badges
Joined
Jan 24, 2017
Messages
1,868
Reaction score
4,483
Location
GTA Toronto, CANADA
Thanks.

I did think about muliti parameter and still may do so. However it wouldn't be Calcium or Mag.

I would like Phosphate, and maybe Nitrate. If Hanna had liquid Reagent for P04 I would be building it now. But powder management with robotics isn't easy. Plus the powder is dangerous.

The plan after testing and proving this prototype will give consistent results for a few months is to make a single unit tester. Then I won't need the printer to get to 3 samples. It would be stationary therefore much much smaller.

The current AquaMon I have would become the lab for development.

Right now I just want alk stability on all my 3 tanks.

BTW. Did you catch the Fact that I'm not actually doing the Photo Metrics? I use the Hanna to do it for me. So not need to figure out chemistry. The Hanna is proven, reliable and accurate. I just add water, reagent, and the automated task of the test. Not affected by temp as well.
 
Last edited:
OP
WallyB

WallyB

REEF Techno-Geek
View Badges
Joined
Jan 24, 2017
Messages
1,868
Reaction score
4,483
Location
GTA Toronto, CANADA
AquaMon Alk Monitor UPDATE: Protype PASS Initial TESTING ( Version 3 Model in Progress: *Improvements*)

After design/build/testing for 6 months, I just wanted to prove the concept would work. ALL GOOD. CHECK

Now that is does work, time to make the final improvements.

- I just remade the Hanna Housing (First was a hack) ** I actually Broke the First Hanna with spills during months of testing **
- Adding logic to bullet proof the tests, and tidy things up.

Here is the *NEW* Hanna Housing. (Gutted the Hanna, and sealed it a New WaterProof/Light DIY Foam Case)

2020-02-17_V3HannaHousing.jpg


-> The original Design was prone to leaks around the Vial, and into the unit. Now it's 100% WaterProof.
--------> the Water Proofing not only protect the Electronics, but also the Outside Vial Glass from getting stained.
-> It was heavy, making the movement jerky, and stressing the Robotics (during moves, tilts, etc)
--------------> I remove the Hanna casing, and it's now light ( Less than 1/2 the weight since made of Foam and no Cradle needed)
--------------> The Battery was alway's externalized for weight reduction.
--------------> Another Advantage is the Hanna window was giving me reflections ( Now it's matte, better for Vision Scans)

and speaking about Computer Vision Scans. I added more Recognition.

The Hanna can vary on time from Push to Next Step. I had timers but that's wasn't idea.
Now I scan for the Status, and will eventually pick up error codes too (like Battery, Low, or bad test)

2020-02-17_V3-HannaVisionReading.jpg


What you see above is the View the Camera picks up thru the Photo Portal (The Half Dome on the Front of the Aquamon)

Now I can Sequence thing Exactly on TIme. Only when I get a proper, NEXT STEP reading.
Also prevents a de-sync should it happen (Ie Hanna Battery Dead, Hanna is already powered on or , C1 vs C2 mismatch)


I also prepared things this time for *FINAL* Calibration. (HAND TESTS for Reference)

-> When I had the Hanna out of the AquaMon, I put in Brand new Vials (Cultvettes). Not the smeared old ones.
----------------> The new Crystal Clear Culvates actually give me a more accurate reading (comparing to Salifert Test)
-> I got a large sample of Tank water for future use. (Reference Water) ...No more Random Samples.

-> I did 4x2x2 tests, and they all came back the same. Even swapping the new Vials, or even with using two vial.
2020-02-17_AlkReferenceCalibration.jpg

So when testing the AquaMon, I'll know when it's calibrated properly. (Same New Vial went into the Sealed Tester)



Stay tuned. More details to come. (Including a much Better Demo Video than that First Hack)
 
Last edited:

hmmmmm

Member
View Badges
Joined
Nov 14, 2019
Messages
18
Reaction score
29
Dude.. amazing work! I have a bit of experience with combining multiple languages and the amount of work put into this is pretty spectacular ;Stig I know ive had some pretty big ideas but usually that sort of project never gets finished and ends up in a drawer somewhere..
 
OP
WallyB

WallyB

REEF Techno-Geek
View Badges
Joined
Jan 24, 2017
Messages
1,868
Reaction score
4,483
Location
GTA Toronto, CANADA
Dude.. amazing work! I have a bit of experience with combining multiple languages and the amount of work put into this is pretty spectacular ;Stig I know ive had some pretty big ideas but usually that sort of project never gets finished and ends up in a drawer somewhere..
That is crazy! Congrats on your setup. Just wow.
Thanks Guys.

It's about to get better (Doing something useful for my Tanks)
I put in the final touches last night. So few more tests and I will installed it on my 3 Tanks.

I Added More Smarts and the error/fault logic.
That was painful coding since it's boring, but will make less excitement of catastrophe down the road.

The code complexity wasn't the original plan.
It was suppose to be all Aridiuno Sketch (C Code), but it grew and grew.
I learned a TON. 90% of the code was written from scratch. Thus 6 Months. I built the Hardware in 2months.

First Time I wrote PYTHON (I HATE IT, except for the many useful libraries).

And OpenCV is amazing. Complex too. I am thinking of using the Computer Vision for future project. A Watchdog EYE to monitor my Sump Room for Equipment failures.

THE HERE IS THE COOL PART. All my code is in Separate Modules for re-use.
I already started planning on a AquaMon MINI. SIngle Tank Alk Monitor.

Using an Raspberry Pi Zero and an Miniature Ardiuno Mega, I figured out a way to avoid all the complex robotics. (on Paper)
It will be roughly the size of a Kleenex Box (or smaller). No screens (since it's web based)
Just a stationary pivoting Hanna holder, swivel plate on Servo Motor for dosing line posititioning.
All I have to figure out is a simpler mixer (A linear positioner, instead of the robotic arm).
To make it happen, I need to Learn 3D printing.
 
Last edited:
OP
WallyB

WallyB

REEF Techno-Geek
View Badges
Joined
Jan 24, 2017
Messages
1,868
Reaction score
4,483
Location
GTA Toronto, CANADA
Nice work, please keep us updated.
Thanks!! ... I will keep updates going and maybe the new model will be easier than I thought.
I just did a live demo for someone.
He said no need for the robot stir mixer.
Simple back and forth swaying is how they mix Paint in cans, so the way I dump the reagent can work for mixing.

I can actually compare the two mixing methods on Aquamon V1 with a minor program change.

If it works then V2 will be easy. Maybe make DIY project Kit (3d printed and jumper circuit boards). If I have time so everyone can make their own.
 
World Wide Corals - Quality Aqua-cultured Coral

Are you a Builder, Maintainer or Both?

  • I woud rather build out a new system

    Votes: 133 24.7%
  • I would rather maintain a system than build it out

    Votes: 61 11.3%
  • I's passionate about both

    Votes: 344 63.9%

Online statistics

Members online
2,342
Guests online
9,781
Total visitors
12,123
Build a Better Aquarium at Marine Depot
Top