Grove - PH Sensor Kit (E-201C-Blue) Raspberry pi Zero

Interesting!

I never knew that pH was so sensitive to temperature.  If that’s the case, than how do pH test strips and test solutions, (like the kind for testing pool water), work?

Obviously you don’t test in the dead of night during a frigid Siberian winter where the solutions have icicles, nor do you test the steam coming off of the solution in the middle of a hot Saudi summer, but for us mere mortals in more temperate climates, it shouldn’t be rocket-science.  Neither should it require ±0.001° temperature accuracy to get a stable reading.

Correct me if I am wrong, but the last time I used test strips, or test solutions, they didn’t come with a small temperature probe hanging off the side. :wink:

Or am I missing something here?

That’s exactly my point: the relationship between pH and temperature is not that strong as I observe with my probe. Under normal circumstances (test strips for example) you do not have to bother about the temperature. Just to give you an idea: at 25 degree celsius the pH of neutral water should be 7. At 10 degree Celsius it is about 7.27, at 100 degree Celsius it is about 6.13. I was once able to calculate this, nowadays I better look it up in a table :wink: . The reason for this is that the equilibrium of the autodissocation of watermolecules depends on the temperature. OK, enough of chemical mumbojumbo, fact is: my electrode does strange things when the temperature changes.

1 Like

Maybe there’s something wrong with me, but that makes perfect sense!

(And is what I would have imagined too.)

I can see three obvious possibilities here, (maybe there are more. . .), which are

  1. This particular probe, for whatever reason, needs to be temperature compensated and only works correctly with a calculated temperature offset.

  2. There is something screwy with the way you’re reading it.

  3. There’s something wrong with the probe.

Solutions:

  1. Create “standardized” solutions, (with buffers if possible), and take readings with both the test kit and your probe at several different temperatures for each solution.  Then, create a table of offsets or derive a offset function (ft), that will correct the readings.

  2. Figure out what you’re doing wrong, if anything.

  3. Get a better probe, (assuming you’re using the Seeed Studio probe @mountbaldybrewing used)

As I have mentioned before, and I’ll say it again, I don’t trust Seeed Studio any further than I can throw Vladimir Putin under water.

I avoid them like the Coronavirus if at all possible, and if they are the ONLY source for something I need, I still think five or six times before buying it.  Maybe I’m being a bit anal about them, but given my choice of paying $5 for something from them, or $25 for the same thing from someone like Adafruit or SparkFun, I’ll spring for the $25, since I know I’ll get a good product with excellent support.

In Germany we have a saying, I think it translates to something like: buy cheap, buy twice. I´m aware that the seeed probe I´m using is one of the cheapest around and therefore I shouldn´t expect high quality lab equipment. But it should still be possible to get some results at a constant temperature, so I wil start with calibrating the electrode with different solutions of known pH (test strips will be accurate enough for me) at a constant temperature.
Once this is done I will see if I can measure a neutral solution at different temperatures to get the correction factor for temperature.

All of this is more or less just for fun and interest, since I found this page today:

http://homelab.link/

Here someone has built more or less the device I´m trying to build, complete with a nifty web-based frontend :crazy_face:. Most interesting on this page is this

It is somewhat tricky to measure pH in volumes where immersed appliances leak direct electric current into the liquid. Due to the very high input impedance of the pH-probes these currents, even small, may impact the measurement and result in unstable or shifted pH value. This is the case with aquariums where immersed air or water pumps, heaters and lighting leak small electric currents through their insulating shells.

Aquarium owners or hydroponics enthusiasts interested in on-line pH-measurement may benefit of the functionality added by our HomeLab isolator module. When coupled with HomeLab-pH it assists the pH measurement by effectively filtering the interfering currents of the environment.

This might just be the effect I observe when putting my probe into the aquarium. I will check this by taking a sample of the aquarium water and testing it outside the aquarium where no freaky currents can interfere.

After all this is done I will see if it makes any sense to continue with this project or just tell my gilfriend that the test strips she is using right now are the best method anyway :smile:

1 Like

Interesting!

I didn’t even think of that. . . .

If you can get a 1-1 isolation transformer, you can check that quickly, or - using your idea, take water out of the aquarium to test, you should know quickly if subtle currents are your problem.

Hey! @mountbaldybrewing, I wonder if you were experiencing the same issue?

And yes, in the U.S. we have a saying “buy nice or buy twice”.  Russia says “Are we so rich that we can afford to buy cheap things?”

1 Like

I took a deeper dive into the python code I found here and took the time to take some measurements. Got some pH strips from the pharmacy which only measure between 5.6 and 8 but for a first shot they are OK.
I changed my code so that it takes 20 measurements with 50 msec pause between the readings. The values become more stable but measuring an alkaline solution of household soda (pH according to test strips: > 8) is a complete desaster. If I just look at the raw values the sensor kit reads and don’t hassle with calculating voltages and whatnots I can easily see that the values returned when the probe is in tap water or in a solution of soda are nearly identical. Acidic solutions work better, I will do more testing when I have better pH strips with a wider range next week. These things are somehow hard to come by, stuff that stupid pandemic.
Conclusion: as @jimrh does’t get tired to say: you get what you pay for and this electrode only does half the job if any. It’s time for a beer I think, no make that two …

2 Likes

Reminds me of something I read in a quantitative analysis textbook:

“Phenolphthalein is insensitive to bicarbonate”

I wonder what they made the probe from?

I’m not trying to be a pest. It’s just that, (at my age, at least), I don’t have time for half-baked solutions to problems.

Like your sensor, I have a collection of “cheap” drones that are half-baked versions of the $400 drone I wanted to get the first time.

I’ve spent the $400, but still don’t have a usable drone.

Since mountbaldybrewing already went down that rabbit-hole, I was hoping to spare you the angst.

Of course, in the U.S. we have a figure of speech: “the pot calls the kettle ‘black’.”

I’m still working on my “multi-booting” research, and I have discovered what may be a fatal issue with my current method, so I have to save my “place in the game”, (so to speak), while I explore a different method. :laughing:

Actually, I prefer kvass.

And, as fate would have it, the absolute best Russian kvass is made in Canada!

I had read that as well on the Atlas Scientific website. Their circuit is isolated as well to mitigate these types of issues. Unfortunately, I could not get their device to calibrate either. (The board I have is their OEM board which is different than the one I linked here. The one I linked here IS the board I SHOULD Have bought instead.)

One thing I will say is that the simple “yellow” pH pen made in China works well measuring pH in my hydroponics setup. I just cannot link that directly to a web interface as I am intending.

On a side note… My new probe should get here today or tomorrow. I will post what I find out here than. This probe is, I believe, a better probe than the blue one from the SEEED kit.

Prost!

1 Like

@DocDrum This is the electronically isolated board that Atlas suggests you use for their circuits. This link MAY shed some light on that too.

https://atlas-scientific.com/carrier-boards/electrically-isolated-ezo-carrier-board-gen-2/

1 Like

Viz.:

You get the whole enchilada, including calibration solutions, storage solution, a lab-grade probe, a circuit isolator and so forth for a measly $154.  (Of course, title, tax, and destination charges are always extra!)

A hundred-fifty smackers can buy a LOT of aquarium test-strips!

In your case, assuming you want to do real honest-to-home-brewed-beer process monitoring, that $150 might not mean much.  For an aquarium?  I can think of better things to spend a “buck and a half” on.

But that’s MY opinion - you know; the guy who goes out and drops $80+ every couple of weeks to get more SSD’s for his 'bot to try and multi-boot?  Yea, THAT idiot.  :wink:

:laughing:, but you are right, 150 $ + shipping / taxes is way to much for me, although this kit really seems to do the trick. I found this probe some weeks ago when putting together my shopping list and ruled it out then because of the price. I also stumbled over the yellow chinese pH-pen @mountbaldybrewing mentioned and think this might be plan B for the aquarium. Goal of my project was to learn working with the GPIO and getting the hang of python, and I´d say i’ve hit the spot there.

1 Like

One other caveat. . .

The good doctor lives in Germany as far as I can tell, and I don’t know how difficult it is to get that kind of stuff there.

I totally understand what it’s like.  Being exiled to the darkest reaches of Moscow Russia for a while kinda cramps my style as far as getting stuff is concerned.

News Flash!  Peanut Butter is now “a thing” in Russia - or at least in Moscow - and I actually saw one, count 'em, ONE, bottle of “Genuine Lea & Perrins Worcestershire Sauce” - and I grabbed it!

Of course, availability is relative.

All the fast-food places here sell beer on tap and one of the “impulse purchase” items in the supermarket checkout lines are pre-filled 50 ml glasses of vodka and sample-size bottles of whisky, schnapps, rum or other distilled spirits.  It’s your choice:  Rot your teeth on the candy and gum on the one shelf, or rot your liver on the booze on the shelf above it.

It’s still a cultural shock to see the electronic menu-boards in McDonald’s advertising their current Happy Meal on one side and a “two-fer” for draft beers on the other. :crazy_face: :woozy_face:

Then again, I remember reading an article about school lunches in Paris France, where part of the menu is a glass of wine. . .

Part of what I really like about these discussions, (and this discussion in particular), is the ebb-and-flow of information and ideas.  I’ve learned more about electrochemistry in the last two weeks than I have in the last twenty years - and that’s great!

Being able to discover sources for things like pH probes is interesting.  Now, don’t get me wrong, I don’t have anything against pH probes or measurements, but I would not have thought a thread about using a pH probe would get more hits and more replies than just about every other thread on the entire site combined!  (This thread has 112+ postings as of this point in time. . .)

Obviously there’s an interest in automating process management, and pH seems to be a popular process to manage.

I’m tickled pink that we can even try to help.  I’m learning a lot and I am glad it’s so useful for everyone else too.

Maybe $150 is too much for me and maybe it’s too much for you, but who knows - someone else may stumble upon this thread, see the code and the links and say “WOW!  Where have you BEEN all my life?!!”

I hate to sound like a Micky-Dee’s commercial, but I’m lovin’ it!

Well… I have success! My new probe arrived yesterday and I have it up and going. I agree 100% with both of you. The $150 price tag was why I didn’t go that route. I actually did order their OEM product. It is much tougher to setup and has a much higher learning curve. I couldn’t get it to work with the pi at all AND it would not calibrate properly with the probe I had. That said, it’s the same probe I had problems with. My guess… It was the probe all along. UGH!

For me, my project is actually growing things hydroponically. Mountbaldybrewing was a homebrew supply shop I once ran. I no longer have the business but the name stuck. :smile: My hydroponic operation requires pH to be specific 5.8 - 6.2. I have a device that keeps my pH in check (Tourus Hydro pH Perfect) but I wanted to be able to integrate a pH reading into my interface (it has humidity, temperature, TDS, water temperature, pH, fan condition, heat relay, humidifier relay and pump relay, light relay.). I am using Openhab for my interface. It works very well. I’m using multiple relays from Shelly for my controls with mains power.

I’m happy to say that AnyLeaf pulled through. The owner sent me a new probe free of charge. His kit was $60 US. He is very responsive and helpful. I will order other things from him in the future. He has other sensors that may interest @DocDrum for aquarium usage too.

Next step… Incorporate two peristaltic pumps to dose pH remotely via MQTT. I’m real close to getting this to work. :wink:

Thanks for keeping with it! Hopefully this thread helps others in the future.

3 Likes

Well - quick update from me - I also got it working once I installed the grove hat on the pizero. In the reference solution it’s reading 6.7 ish which is fine.

I wonder if the homelab isolator could be added to this sensor to make this work in the aquarium (I havent tried that part yet but I suspect I might get electrical interference).

Also - Does anyone know how to access the built in temp sensor? I have a 1 wire waterproof sensor on another pi which is pretty easy.

2 Likes

btw I have a perialstatic pump working fine for the last ~3 years - cheap ~£6 off ebay with a relay hat which controls a separate 12v supply. Be interested in how you are switching/powering yours

2 Likes

Congrats on getting your stuff working!

I am using a similar pump. It is 12v as well and was very low cost.

Well, I finally got everything actually hooked up last night and working. I am just using a 4 relay board I picked up off of ebay. This relay actually works fine using the 3.3 volts supplied by the pi GPIO pins. In fact it would not fire the relays using 5 volts (using a converter).

https://www.ebay.com/itm/4-Channel-5V-Relay-Shield-Module-Board-for-Arduino-Raspberry-Pi-ARM-AVR-CN/222518087646

I’m powering mine with an old power supply from a scrapped Linksys router (12 v). I did wire in a capacitor at the VCC and GND on the relay board to prevent any flyback.

So far so good!

For the record, I"m interfacing all of this with Openhab v 3. I haven’t taken the time to make it pretty yet but that’s on the radar to do in the future.

excellent - thats almost exactly the same way I’m controlling my pump including the old router power supply! I did use a more expensive relay controller designed for robotics as thats all that was available when I built it but the options are much more varied now. I calibrated mine by timing power on/off cycles and pushing liquid into a measuring tube. Mine is roughly 1ml/second which makes it nice an easy as I only need 20ml each dose and it doesnt need to be super accurate

1 Like

Gratulations to @mountbaldybrewing and @aemee for geting their stuff to work, thumbs up. Could you both post wich ph-electrode you ended up with? @mountbaldybrewing, do you use the AnyLeaf-Probe and Board now?
@aemee, are you still on the seeed-Probe? Is the 6.7 you measure in the storage KCl-Solution the electrode ships with? I´ve got the same value there but can´t get good values for alkaline solutions. I finally got my universal indicator strips to do some rough calibrating but couldn´t find the time yet. But i fear that my seeed-electrode just won´t work in the alkaline range.
The AnyLeaf-gear looks good, but
a) the pH-probe is out of stock
b) 60$ + shipping and taxes to germany (OK, half the price of Atlas Scientific, but still …)
c) 10-20 days shipping to europe

I’ll have to meditate on this, after all it is just a small aquarium.

Edit: I wonder if it would be wise to buy one of the million different pH-electrodes with a BNC-connector out there and leave the rest of my setup (seeed-interface → groveHat → Pi) in place. After all the electrode just delivers a small current to the interfaceboard and all the calculations and calibrations take place in my script. Or am I missing something there?

Big favor from both of you please:

This thread is rather long and convoluted, and things have become somewhat confused.  Would you two please provide a quick summary of what you did, and what eventually worked, so that the rest of us mere mortals can piece together the issues and how you solved them?

@aemee
Did you try this at other pH values both above and below?  @DocDrum had problems with pH values away from neutral, especially higher pH values.  Simply because the one reference solution reads OK doesn’t mean the range of values is correct.  I would check if I were you.