Looking for some help to design/build an automatic PH controller - cheap

Ok, Im going to admit up front that this is a selfish request, but I think Im not alone in this quest. There are a lot of folks doing hydro of one form or another that could really benefit from an automatic PH controller, but they either cant afford to buy one, and/or dont have all the knowledge needed to build one from scratch.

Thats where Im at. Way too broke to buy one, but dont have all the knowledge I need to put one together. Im especially short on programming skills, but I also dont know enough about the various hardware options to trust myself to pick good (but cheap) hardware that would actually work at least somewhat reliably.

I have played around with Arduino some over the years in my RC hobby. I have an Uno, and have done some minor programming with it, but I really have no clue - especially on the programming. I hate programming and Im not good at it at all.

Here is where the selfish part comes in. I am sure I could spend the time to learn more about Arduino or other hardware options, and develop the programming skills needed, but thats going to take me a long time. I am no longer willing to spend that much time or effort for a one off project. Im just getting too old to learn all those new skills, and Im not interested enough in it to do it for fun.

So. Im hoping some of you, who do know this stuff, will be willing to contribute some of your valuable time and expertise to help with this project. I think it could benefit a bunch of people if we come up with a simple, inexpensive hardware list, and programming that other folks can do at home with some instruction.

I am thinking it would be good to keep this as KISS as possible. Mostly to save money. If a good setup can be designed, I think it would be easy to make small mods, with a different sensor, to do EC/TDS monitoring, and adjusting, or other automation. So a person could slowly add additional ā€˜modulesā€™ or parts to expand the automation as needed.

Here is what Im thinking might be a good, or at least cheap, start.

I see three basic parts needed.

  1. A PH sensor. I have no clue what would be a good/cheap one to start with that might last a while, and be reasonably accurate. Most people dont need to know the PH to .0001 resolution. Im good with .1 or so.

  2. You need a pump or valve that can add PH UP or DOWN as needed. I cant think of any cheap pump options, but a servo controlled valve would be very easy, and cheap to DIY. A set of 4 servos that would work fine can be had for $12 on Amazon. You could use them to pinch some tubing closed and open as needed. Simple and reliable. I happen to have a bunch of servos on hand and a Pololu servo controller.

Another option would be solenoids. There are cheap, plastic, 12 volt, zero pressure solenoids available for around $8 ea.

Both those options would require gravity feed, but Im ok with that to save money.

Some normal servos can be converted to continuous rotation, so it would be possible to DIY a peristaltic pump, but thats a lot more work. There are cheap peristaltic pumps available, but they have mostly crap reviews on Amazon.

The tricky part is what goes between the sensor and the servo, which is the third piece of the puzzle.

  1. You need a controller that can take the sensor output, and convert that to a signal that will control the servo, or solenoid.

It would be nice to have a USB connection to a computer to monitor PH and change settings on the controller for PH limits, and delays. Im thinking you need to have a delay after you add a dose to give the rez time to adjust, then re-dose as needed.

Of course, being able to monitor PH in real time and change the settings would be really nice. Maybe a USB connection to a laptop could work there?

It will be necessary to decide on servo control or solenoid control, because they need very different inputs to control them. The servo needs a PWM signal, and the solenoid needs 12V DC switched ON/OFF as needed.

I dont really have a preference between the two, but solenoid control seems like it would be simpler, and possibly cheaper - but thats just a guess on my part. I have no clue what is needed to generate/control a PWM signal that goes from hi to low or how to convert the sensor signal into something that can control a relay to switch 12 volt ON/OFF.

The Pololu servo controller I have can be controlled with TTL signals, but again, I have no clue on that either. It can be programmed to some degree, so you could send a signal to start a pre-programmed set of motions for the servo. For example, the signal inut could trigger the servo to move to the OPEN position, hold for how ever long you want, then close. That cycle could then have a built in delay before it repeats. That delay could allow the rez to adjust, which would remove the trigger signal from the sensor, and stop the dosing cycle.

Or, all that programming would need to be inside the Arduino controller itself. The Pololu would allow the controller to just monitor the sensor and trigger the dosing signal when a certain PH is reached and turn if off when the PH was in range. Without the Pololu, the Arduino would need to control the servo motion 100%.

Soā€¦ anyone willing to help out, or have any other suggestions that would be cheaper or easier or better? You will be handsomely paid in good karma :slight_smile:

1 Like

I bought my auto ph for 100$ pump n all

4 Likes

Link? I havent seen one for under $300. Well, at least none that had any good reviews.

1 Like

Youā€™re not going to like it but believe it or not it works well https://m.aliexpress.com/item/32397818150.html?trace=wwwdetail2mobilesitedetail&productId=32397818150&productSubject=On-line-pH-Controller-with-3-50-10-50PH-Controlling-Range&gps-id=storeRecommendH5&scm=1007.18500.102169.0&scm_id=1007.18500.102169.0&scm-url=1007.18500.102169.0&pvid=ae9a5d91-9741-4191-b5d5-ce04a8368cd1&_t=gps-id:storeRecommendH5,scm-url:1007.18500.102169.0,pvid:ae9a5d91-9741-4191-b5d5-ce04a8368cd1&spm=a2g0n.detail-amp.sellerrecommend.32397818150&aff_trace_key=&aff_platform=msite&m_page_id=9972amp-P0cb5vPlH5cTEvcHJ0iMdQ1541932529309

5 Likes

Im thinking about building a pH meter with multiple probes, for monitoring multiple reserviors.
So I donā€™t need to bring my pH pen, from one room to another. As it always seemt to end up in the other room/cabinet :slight_smile:

Years back I had fully automatic pH, and to be honest I donā€™t like it for Cannabis.
It didnā€™t improve my yealds at all, only made it more expencive.
It was setup to lower the pH, and if the pH droped it would add tap water to raise it.
Rather then adding both pH up and down, raising the Ec value with useless ionā€™s.

Cannabis and many other plants have a pH fluctuation at almost 1 pH, where they optain different nutrients.
I find a slow pH fluctuation of my reservior is a good thing, and I strongly belive most hydro growers simply just run too small reserviors. And they would be better of, building a bigger reservior then a automatic pH controller.

On the other hand, if you donā€™t have that much time on your hand. Automation can be a god send, and you will get a better result. If you donā€™t have time or care, to check your water chemestry twice a day and adjust if needed.

1 Like

im working on developing a arm m3 based platform that will have a cpl different config options and modularity but I donā€™t see the final price for a pH/ec combined controller much lower than 300$ street price discounted, even having the main board manufactured in 1000 units lots as the expensive things are the probesā€¦ and you can skip quality vs price on various things like the enclosure, lcd/leds , buttons but not on probes/precision pumps.
DS

1 Like

I was gonna go down the Arduino route and the programmkng is pretty simple. A lot of if this then that. At the end of the day my findings were similar to Dee in that to do it with quality sensors you arenā€™t saving much.

The older I get the more Iā€™m realizing the time value so I just bought a BlueLab. I enjoy it. I still need to figure out of it doses out of the range or set point. When I topped up yesterday the acidic nutrients dropped my pH down to 5.4 and it was flashing. Rose up to 5.7 later in the day and it wasnā€™t flashing any longer.

Iā€™d be bummed to find out this isnā€™t how it operates because a range is good as palindrome has mentioned and what kind of company would bluelab be if they think people want the set point only and put the range values as an alarm only.

Soon as I find out itā€™s doing the range Iā€™m going to buy another. If it doses the second it comes out of 5.8 then Iā€™m ebaying or Craigslisting it cause thatā€™s stupid.

I set my range so if Iā€™m in dose up mode it doses at 5.6 and if Iā€™m in dose down mode it doses down at 6.1

2 Likes

These might help get someone kickstarted on their projects.

Someones university project for a simple controller system:

Open Source Automation for Hydroponics
10.1.1.834.3775.pdf (922.9 KB)

Another:
https://publiclab.org/wiki/new-concepts-for-oshw-in-indoor-gardening

Sourcecode:

Or, a search through github shows a variety of open source that could be adapted to your personal ambitions:
https://github.com/topics/hydroponics

3 Likes

Thanks to all of you for the feed back. Looks like this idea just isnt going to work out.

Be patient young grasshopper your topic hasnā€™t even been up for a day, there might be someone else that can help you out in a while :wink:

2 Likes

to keep cost down you could source the probes from pH/ec pens and draw on protoboard the circuit to run them and connect them to a 'duino, lpc, berry, what u like/have available; they anyway output a analog range that you have to read via standard I/O, its a relatively easy thing but it has to be done custom on what you have on hands, and locally and will take quite some timeā€¦
DS

1 Like

I went down this road initially as well. Since I have a background in software dev and prototyping boards I figured this would be an easy project. With the pH drift I had planned on a single peristaltic pump with RO via a float valve handling the other direction. This would keep it simple (and as cheap as possible).

I finally abandoned the idea once I swapped back to the larger res, though. Once I had a larger volume of water I no longer had the pH issues so the extra work and complexity wasnā€™t worth it.

If I do decide to migrate my aero setup into one of the larger rooms I will most likely go with an off-the-shelf nutrient and pH controller. Personally I love the Growlink setup, the app is great and it has everything I wanted to build myself ā€“ the downside for the small grow is the cost.

https://hydrobuilder.com/growlink-hydropods-nutrient-controller.html

2 Likes

Good guess :slight_smile:

I agree about the PH swing and want that coded into the controller. In my case, a larger rez just makes things worse. Its my water that is the issue, plus the low EC I run at - not the size of the rez. Plus, I just dont have room for a larger rez.

Your setup is way beyond what I need. I would love to have something like that, but dont really need it and cant afford it.

LOL!! Says the guy who already knows the programming. When you are starting from zero knowledge, its not so simple - or easy.

That BlueLab does everything I would want - almost. It has upper and lower limits you can set and will keep the PH between those levels.

I would like to add the ability to force the PH to swing between those set points, if it doesnt already, plus the ability to set how fast it swings. But, I realize that will add to the programming.

Thank you! I got really excited when I started reading some of those links - but - then I ran into what I always run into. There are sooooooooooo many things that you are assumed to already know, that its impossible to actually go from where I am at to where I need to be.

That first one for example, has a nice list of parts - but some of them are no longer available - I have no idea how to choose substitutes. Then, the over all system is way more complex than I need, and the code is over 1800 lines, plus things called ā€œlibrariesā€, and other acronyms I have no clue about. I could never manage to sort through that code to modify it to do what I want.

Its the same for the other GitHub projects. IF you already know your way around GitHub, its a great resource. BUT - you have to know the hardware AND be a programmer already. I have no clue how to use any of that.

I have been down this road before in other hobbies :slight_smile:

The experts say ā€œOh, its easy. Just confabulate the zittle fab thingamajig and you are all set. Of course, you know about the X23-C protocols and to allow for the CVD52.02020 up-dates to the finigan libraries, so it wont be a problem. You will of course have to confabulate the variable upstarts, but thats easy enough. Anyone can do it. If you need help, just go to the beginner section, and take a look at the tutorials. Be sure to ask questions. There are no stupid questions.ā€

BUT

When you get to the beginner section, they say ā€œOh, thats way to advanced for the beginners section. You need to work through sections 1a, 72f, 16, 17, 19, and 211 through 743 first. Of course, you have already done the hardware tutorial sections first right? There are only 733 of them. Im sure you already know most of that though, so it wont take long. Then just go to GitHub, grab some quazar ditties, and maybe one or two of the histeresis fiddlesticks - but of course avoid any of the nuclearised versions tomtoms - unless they are version 73.21 of above. It will be easy.ā€

But - there is always hope :smiley:

2 Likes

Ok, lets back up a bit. and take this in little steps.

  1. A larger rez will not solve my problem. Been there done that.

So, how about some suggestions on the hardware?

First - Can anyone suggest some good choices for a probe that wont break the bank and that works?

Second - Can anyone suggest what combination of Arduino or other brand of controller is needed to do the following:

  1. Establish an upper and lower limit for the PH.

  2. control the rate at which the dosing occurs. In other words, I want to do what @Palindrome suggested above. I want the PH to swing back and forth between my upper and lower limits - but on a time scale that I set.

For example, the PH in my rez climbs at first. It will continue to climb for several days, but then it finally stops and will then just sit there. I am drain to waste, so no plants to mess things up. Its just my well water likes to climb in PH - until it doesnt.

I have a 15 gallon rez and it takes maybe 4 to 5 days to get it to settle down and stay at the set point. In the first day or two, the PH rises very fast. It will go from 5.5 to 6.6 over night the first day. Then I PH back down and it will climb to 6.3 the second day and so on. By the time I get it stable, the rez is 1/2 empty, and I have to start adding small amounts of tap water to get it to go up.

I would like to set the upper and lower limits, then have the controller add acid so that the PH rises slooooowly to the upper limit. Id like it to take three or four days to go from 5.5 to 6.2. Then it should slooowly add tap water to move it back down to the lower limit. Again, over 3 or 4 days. By that time, I will be needing to re-fill the rez and start over.

I dont need logging, but it would be nice to add at some point.

I dont need to monitor the PH in real time, but that would be nice. I dont want an separate display though for costs. If the PH could be read via USB to the lap top, that would be fine.

As far as how to add the tap water and acid - I think the solenoids would be easiest. I can make up a solid state relay that can trigger a solenoid with just a 2.2 to 5 volt signal. So no PWM, or TTL programming involved. Just generate that + voltage to trigger the relay.

I dont think this needs to be all that expensive - maybe.

  1. Ph probe = $50?
  2. hardware boards = $50?
  3. two solenoids = $17
  4. Two solid state relays = $18.
  5. Misc connectors, plumbing, etc = $??? most of that I probably have on hand.

So, under $150 ?

So, can anyone suggest some hardware choices that will get me from the probe to sending a signal to the solid state ralays?

1 Like

@anon32470837 I donā€™t know anything about Arduino. I did read a tutorial a year or two ago when I was wanting to build. Also read below on my findings with the Bluelab pH doser.

So I had the Bluelab on monitor mode and the pH was 5.9 so I tested and switched to control mode and the pump started working.

Not sure why they would make a doser that doesnā€™t do a range. I guess I could force a range by setting the desired pH to 6.1 and tweaking the pump on times so it gives the required amount for a swing to 5.6 but that seems like it would be a variable Iā€™d have to test and tweak constantly.

Iā€™m going to contact Bluelab and see what they have for suggestions.

So buyer beware. For right now Iā€™ll set the pH to 5.6 and then set to monitor mode until I see itā€™s 6.1 and then set to control mode and itā€™ll bring down to 5.6.

Iā€™m going to look into an Arduino based setup and see if the programming can be changed on the Bluelab or sell it

1 Like

If I were to do one Iā€™d get an uno or mega microprocessor, pH shield with bnc connector, bnc pH probe, 10ml/min peristaltic pump.

There are lots of tutorials online of how others have done it. Iā€™d suggest starting there. Thatā€™s the direction Iā€™m going. If I learn anything Iā€™ll share. Iā€™m following this thread since I feel Iā€™m in the same boat as you.

I contacted Bluelab but I doubt they will do anything.

1 Like

So, it just freezes the PH at where ever it is when you tell it to ā€˜controlā€™? I suspect thats how most of them work. Or maybe they just get it back into the set range when it goes out of range?

I really like the idea of having the PH move through a range that you can select - but under control.

From the little I know about programming, I dont think that will be all that difficult. <<<<< hehehehe I just realized what I said after all that crap I went on about above!! :slight_smile:

Ive been looking into this more, and I think you are right about the PH shield. It looks like that is the gizmo you need to convert the analog voltage from the probe into a digital format that the controller can use.

I have an Uno, but I have no clue if it can do what I want. I cant even remember why I have it. Its been several years since I messed with it. At the time I was trying to customize an altitude/GPS in-flight data logger I had for my models. I think I needed to use it to program the data logger?

I have not found any tutorials that were just for a PH controller that were simple enough for me to follow or use. @Northern_Loki posted some links above, but they are all far more ambitious than what I want or need, and I have no clue how to take the bits I need and separate them out.

Do you have any links to something that might be better?

I know we arent the only ones. If we can come up with something workable, Im betting a bunch of folks will be real happy.

My brain is fried. Ive spent the last two hours searching diy PH controller projects.

First, most of them are NOT controllers - they are just meters = waste of time. The ones which are actual controllers, for the most part, are using pre-built controllers and just add a pre-built pump. The others are again way to complex - they do C02, TDS, EC, etc etc etc., with thousands of lines of code. I did find one that looked promising, until I saw he was using a custom board that you needed to etch yourself.

So, no luck so far.

Well, I did find several sources for probes. The mini from Atlas looks pretty good for around $50. There are cheaper ones - like the Gravity - but it has bad reviews. I guess it wont last if left in constant contact with the solution, so that wont work,

1 Like

Well once you have the bnc shield you can use any meter. Bluelab is cheap and reliable.

I probably read all the same jazz that you did

1 Like

Ive got a meter Im happy with.

I found several other threads like this one, but none of them went far enough to have a working device, or went off the rails some other wayā€¦