Author Options:

In over my head - pH automation Answered

Hi all,

I'm in need of help.

Due to my previous jobs and general knowledge a friend has asked me if I could build an automatic pH regulation system that will monitor and maintain two tanks (it sounded easy to me at the time) but I've suddenly found myself out of my depth.

Having spent long evenings searching on the web and on here, I've seen a few builds of monitors and a couple of dosing systems but none are just what is wanted as they are only set up for single tanks, or not combined into an auto-doser, or too "over-tech'd" or multi-purpose orientated and I don't have the knowledge to adapt or alter things to my requirements.

Plunging straight in at the deep end with no real idea of what I'm doing and can actually be done, I'm thinking I should be able to (theoretically) assemble and program an Arduino controlled system, with the one box doing the job of monitoring and regulating both tanks independently, so two sensors, pumps etc., from what I gather it's by adding different boards to the base unit (I did say I know nothing). I don't need wifi or anything like that, just a simple device with a basic display showing the current values that will sit there and just do the job.

I think I have the capability to actually build and program the thing having a background in electrics and a little knowledge of relay control systems - not electronics, I start getting lost just after the transistor/diode level and BASIC is more my programming level (yes, I may be THAT old, but I'm still trying to learn), and so what would really help me is if anyone out there can point me towards a site or pages where I can find the info I need, hopefully that doesn't assume years of prior experience, to either build or adapt something to what I want, or even aim me towards someone who could be able to supply me a design and components list, either for fee or free.



The forums are retiring in 2021 and are now closed for new topics and comments.

2 years ago

The real problem of maintaining good PH levels in a tank is not how to modify them.
It is creating a habitat that does not need adjusting and regulating.
Been there done that....
A lot of modern tanks are only for the looks and sadly not for function in terms of a working eco system.

Having said that:
There are quite a few PH control solutions out there.
The often insane prices are partially justified because only people desperate enough to fix their tank have a real need to them.
Thing is PH does not change quickly if standard things are used.
So overdosing either direction from perfect is quite easy.
A high PH is quite easy to fix by adding diluted hydrochloric acid, vinegar (the clean stuff only) or othe food suited acids.
Hydrochloric acid is my favourite as the possible by-products are far less toxic as for example those from vinegar.
Getting a too low PH up though can be very tricky thing.
I contemplated with the idea of an automatic system a few times as my sister only has tiny tanks and with them a lot of problems due to our hot weather.
So maybe some of these ideas help to get you going:

A PH control system does not need to work in real time, a sample every few minutes is enough.
Same for the dosage system, no matter what agent you use.
The water needs a certain amount of time to be really fully circulated by the filter system.
A drop of UV dye can highlight this very nicely as it takes quite long until the water has a uniform glow to it.
Some time is for once on your side.
Take a set number of sample, store them in some register or variable.
Calculate the average PH and by how much the level went up or down during the measuring cycle.
If not steady run another round of samples until only steady values are collected.
Add you agent in a small amount and preferably in the outlet stream of the pump.
Start over collecting samples.
Once the desired level gets close, increase the number of sample and reduce the dosage amount - by at least half.
Once the increased sample numbers steady close enough to the target reduce to hourly samples and keep comparing an calculating the differences.

All this is well and fine but in the end it might turn out to be cheaper and easier to just get the tank up to specs instead of trying to control it from the outside.


Reply 1 year ago

fish tanks are neat until the expense becomes too great


Reply 1 year ago

Thank you for your detailed reply. From what you are saying I think you are talking about a bio-recycling system of some sort, sadly this doesn't seem to be the sort of thing my mate has got or requires at the moment.
He lives off-the-grid as much as he can and is sited halfway up a mountain, and having chatted more it seems his water storage system (a series of IBC's set into the hillside and filled from a well) has a tendency to head more alkaline as it sits. Why this is neither of us knows but as I said in the original thread he needs something simple and automated to keep the two tanks more stable.
It does seem though that your reply has given him thoughts about reclamation of his "grey" water so there could be activity in that area soon.
Thanks again, Hobbit.


1 year ago

It seems we got off on the wrongfoot here.
You speak water supply, I thought tanks in terms of fish or similar.

1. The water itself
If run off from the mountains then it can be rich in minerals but also has a relative high PH due to the rocks, sediments and so on.
2. Tanks
Depending on the material used they can affect the PH quite badly.
For axample using concrete will always result in PH problems until the tanks are either properly sealed (natural by time or quick with sealers) or something is done to neutralise it all.

You best option is to use a simple PH tester to check what goes in the tank, what is in it and what comes out.
If all levels are the same then your supply is the main problem.
I simply assume the most common problem of high PH levels as you did not specify this, or I missed that bit.
A very old and very good trick is to use egg or sea shells.
Brings a slow but steady fall of the levels until close to neutral.
On the other hand things peat moss, old wood and so on can increase the acidity and through that also help with your PH.
For quick and dirty options there also things like for example baking soda but no use if the source is already the problem.


Reply 1 year ago

Many thanks for your efforts in posting a constructive and helpful reply, it reminds me of one of my old teacher's reports at school - Must Try Harder.
If you'd done more than skimmed the original post you would note I'd already gone through many pages not dissimilar to your link (actually, my results were better as there were fewer of the links pointing towards commercially manufactured devices before the page wandered off to other non-related stuff like water level sensors and motor controls etc.) but I have still been unable to find anything suitable for me to build or adapt at my level of knowledge.
OK, at your level of skill, education and experience you'd probably class it as my level of ignorance, I haven't the impressive background you have, but I'm trying to learn, to pick out the small gems of knowledge required to build on from the lake of dross that abounds on the web, and was asking either for assistance in the right direction in fields I am totally unfamiliar with, or if someone knew of the actual device and could point me towards that, all this on a site called "Instructables", a place where people educate and help others in how to do or to make or to create.
It may not sound it to some but I do thank you, through your efforts to broaden my horizons, I have found one link on the page you sent that yielded information that it seems I should know for the future, Scidle.com: how to use a pH sensor with Arduino, now to see if I can find all the foundations to put that brick onto.
Cheers. Hobbit.


Reply 1 year ago

Ok I take your point.

Lets see if my experience is any use to you.
1. Your going to need to start by writing a really detailed User Requirement Specification (URS) for what your client wants - detailed down to the last $ of costing, the sizes, the expected outcomes - this is YOUR bible - if you can respond totally to that specification your client will be most happy and the project will be a success.

2. your going to take that User Requirement specification and write your response A functional Specification (FS). this will detail HOW to do the job, what is required for each element, costings and any other information needed to do the job - eg. your going to need to locate and get the specification for a suitable sensor to do what the URS wants. That will probably (but not limited to) be interfaced with a microprocessor. You need to identify the relevant inputs and outputs your going to need so you know how big (or small ) the microprocessor needs to be.

2. You need to detail to the point of identifying ranges of accuracy etc, Materials, the fluids your dealing with and any other restrictions you can possibly think of that apply to the project. (this isn't easy - I used to do this as a consultant for big money but the more thorough you do this the easier the project will be.)
The sensors your going to buy and MUCH of what you do after that depends a lot on what they need.

This all sounds like a lot of effort but in the end the less familiar you are with your subject the more you need to nail down the details so you can knock them off one at a time.I promise you that the more effort you put into the front end of the project then easier the project will be and the success chance increase proportionally.
As a control system engineer most of my project time was taken up in writing detailed specifications and getting the client to agree them. After that actually doing the job was fairly easy and a matter of following the specification step by step.

3. A hard part will be getting things balanced and stable. Normally in an industrial situation you would probably use a PID loop controller so that you make big changes when the reading are a long way out and as you get closer to the target your changes get smaller and smaller until your within your tolerance, then small adjustments are made as it goes out of tolerance. This can get very complicated.

You are most likely to use the microprocessor route, without high level electronic skills doing this type of task with hard electronics is going to be very complex with only a small chance of success.

However that means programming and getting that right is very dependent on having a good understanding of the requirements and how to meet them. (Back to the URS and the FS)

These instructables are not for the arduino but the principles still stand. If Basic is your thing the Picaxe controller used basic and is fairly easy to learn.

At this point there isn't enough understanding to give you a ready made solution. AS I said i would personally look for an off the shelf solution from one of the PLC / control system manufacturers at least you have a good chance it might work.

might be helpful