4

Let's say I have a budget of $15-20 to build a pH meter. I will then read the analog values from a microcontroller or such, but I want to first focus on somehow getting a reliable pH value on a shoestring budget.

First of all, is this even possible for an electronics hobbyist? I see existing pH meters out there but they are quite expensive.

There are commercial options running into the hundreds of dollars to cheap ones like these: http://www.sparkyswidgets.com/product/leophi which still require an external probe.

Ideally I want to build a pH meter circuit that has electrodes that simply dip into water to measure its pH.

I also found this: http://overskill.alexshu.com/cheap-ph-meter-hack-for-arduino/ but it's based on hacking an existing pH meter. I'd first like to hear opinions on whether a complete DIY sensor circuit is possible to do.

T.K.
  • 385
  • 3
  • 4
  • 11

3 Answers3

5

This is definitely possible. You can start with a cheap pH probe like this (available for $6 on AliExpress): pH probe You'll need a female BNC connector to attach the probe to, such as the Molex 0731000105 (available for $1.48 from DigiKey). Finally, you'll need a very-low-input-bias-current op-amp, with the LMC662CN from TI an excellent candidate (available for $1.56 from DigiKey), plus a few passives.

Assuming that the microcontroller board you plan on using has a 5V supply available, you can use it to power the op-amp and generate a reference voltage, which will have to be about 1.2 V because of the common-mode range of the op-amp. The final setup will look something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

The resistor divider generates the reference voltage, and the op-amp acts as a unity gain buffer. This means that your output will only be the reference plus or minus about 0.4 volts over the whole pH range, so you'll need to either add some gain or use an ADC with decent resolution.

Abe Karplus
  • 2,611
  • 1
  • 13
  • 19
  • 1
    That's nice. Instead of making a amplifier module, a pH module is about 15 dollars on Aliexpress. @T.K., for chlorinated water you do need a glass isolated probe, so this is the best and cheapest option. – Jot Mar 01 '17 at 21:43
  • 2
    @Jot Those modules appear to use the TLC4502C op-amp, which at room temperature has up to 60 pA input bias current, which with the 250 MΩ output impedance of the probe corresponds to an error of 15 mV, or about 0.25 pH units, so they are not a good choice. – Abe Karplus Mar 01 '17 at 23:11
  • @AbeKarplus's circuit should not be too hard to build. I like it a lot. With regards to the glass isolated probes, those seem to be substantially more expensive. Why can't the probe that Abe showed work with a swimming pool? – T.K. Mar 02 '17 at 06:57
  • 1
    @T.K. The probe I showed does have a glass membrane, and should be fine for any environment a human would be safe in. I believe Jot was agreeing with me. – Abe Karplus Mar 02 '17 at 07:36
  • Ok I understand. Then I'll try with the $6 probe first. Maybe buy a couple just in case. I really appreciate the level of detail you guys provided (also thanks for allowing me to discover CircuitLab). – T.K. Mar 02 '17 at 08:19
  • One last thought - is the BNC component critical (i.e. the length of cable) or can I just cut it up and solder it directly to the circuit board? Then I would also have a shorter cable, because ideally I want to use a waterproof enclosure anyway. – T.K. Mar 02 '17 at 09:09
  • @T.K. The BNC connector is just there as a convenience, but the cable's probably coaxial, so it might be difficult to solder to effectively. – Abe Karplus Mar 02 '17 at 10:00
  • @AbeKarplus Not a problem. In that case it makes sense to keep the BNC connector. – T.K. Mar 02 '17 at 12:10
  • I was totally agreeing with @AbeKarplus. That is a very nice solution. – Jot Mar 03 '17 at 07:23
  • Don't forget 7 buffer and 4 buffer for calibration. You should also have storage solution. 7 buffer with some KCl in it works as well as anything. – Robert Endl May 09 '18 at 22:14
2

To measure the pH value, a probe with glass isolation is used. Even that cheap hacked pH pen meter has that. That probe is not something you can make yourself. There are however plant testers (often called 3-in-1 plant Ph soil meters) that use two different metals to measure the pH value. That is not very reliable.

Do you have solutions with different pH values ? Then you could try such a 3-in-1 plant soil meter to see if it is useful for you. The resulting measured pH value depends on the nutrients and salts in the water.

You did not tell what kind of water you want to test. When it is for an aquarium, you might need a galvanic isolated pH module with a good pH probe.

That hack of a cheap yellow pH pen is very nice, but not easy. There are now even cheaper pens with metal pins instead of the glass isolated probe. I don't know if they are any good. As far as I know there is at the moment not a cheap module with a glass isolated probe and a interface for a microcontroller. If you want a reliable pH value, you have to pay for it.

Measuring, for example, temperature and baromic pressure can be done with very reliable and cheap sensors. Maybe you have to wait a few years for a good and cheap pH sensor module.

Jot
  • 353
  • 1
  • 9
  • I would like to basically measure the pH level in my swimming pool. So it is chlorinated fresh water that needs to keep a certain pH. – T.K. Mar 01 '17 at 14:56
1

I did almost exactly what is described here for my swimming pool, same sensor, similar O/P amp (LMC6482) and same approach of referencing the probe to +1.250v. It does not work very well. The pH reading changes when the pump starts. And I suspect that the system ground is probably in contact with the water somewhere. I would recommend grounding the probe and powering the O/P amp with +5v and -5v generated by an LM2662. If you use the dual O/P amp LMC6482, you can use the second O/P amp to level shift and amplify.

Yves
  • 11
  • 1