Saturday, July 12, 2014

Measuring PH with Dormant Labs PH Module V2 Using 10 & 7 calibration solutions

Here is another setup guide that shows how to measure PH using the Dormant Labs PH Module V2, except this time we will calibrate using 10 & 7 ph calibration solutions.

You will need

  • 10 ph calibration solution
  • 7 ph calibration solution
  • Dormant Labs PH Module V2
  • A PH probe
  • 4 dupont female to male cables
  • An Arduino
  • Containers to hold the PH calibration solutions, and a container to rinse the ph probe with water.

Fill one cup with 10 PH calibration solution, one cup with 7 ph calibration solution, and one cup with water.



Connect the ph probe to the module.



Connect the module SDA,SCL pins to the Arduino SCL and SDA pins, here because we are using a mega, the SCL is pin 21, and SDA is pin 20. Then connect VCC to 5v on the arduino mega, and then connect GND to the GND pin on the arduino mega.

Then connect the arduino mega to your computer.

Now we will upload the source code. Get the source code from here:

and upload it using the Arduino IDE, if you do not have the arduino IDE then get it from the arduino site.


After uploading the code, open the serial monitor and you should see something like this:



It will output the wrong reading until we calibrate it, so lets do that.

First rinse off the ph probe in the tap water.


Now dip it in the PH 7 calibration solution, and write down the value for avgPhVolts that comes up in the serial monitor.




Now rinse it again.




Now dip it in the PH 10 calibration solution and write down the value for avgPhVolts in the serial monitor.



Also write down the avgRoomTempC value that appears in the serial monitor.

Here are the values that I got:




Now enter them for the values of volt7, volt10, and calibrationTempC and upload.



You now have calibrated your ph sensor! Edit the program to do whatever you want now.

16 comments:

  1. What is the advantage of calibrating at 7 and 10 vs 4 and 7? If it just the likely test solution range?

    Anthony

    ReplyDelete
  2. Hello there is no advantage of calibrating with 7&10 vs 4&7. This is because the ph probe response is very very linear. However some people are still losing sleep over it and emailing me about it so I made this tut.

    ReplyDelete
  3. Do you have a sketch for use after calibration? I would just like to print to my lcd/serial the measured PH of water.
    Carl

    ReplyDelete
    Replies
    1. When you calibrate, you are hardcoding the voltages that you calibrated with, so you can use the 'calibrated sketch' for further use.

      Delete
  4. Hi if I need to have 2 ph meters on 1 arduino mega is it possible?

    ReplyDelete
    Replies
    1. It is, but you will have to use an i2c multiplexer and then modify the code to use it.

      Delete
    2. Where i can find an i2c multiplexer? Can you help me? Thank you

      Delete
    3. Right now you probably have to assemble one.
      Here are some ideas:
      http://bf-arduinolab.wikidot.com/blog:8
      http://www.kerrywong.com/2012/10/08/i2c-multiplexer-shield-testing/
      http://forum.arduino.cc/index.php/topic,110115.0.html

      You might be able to do it in software:
      http://www.reddit.com/r/arduino/comments/1ewi10/how_can_you_connect_two_hmc5883l_magnetometers_to/


      Delete
  5. hello / salam,

    1) Please post a comparision between yours and others (milwakee, atlas scientific, phidget 1130 sensor, hanna instrument, cheaply available ph meter) and post the result here

    2) Please do the test as per
    A) Out of the Box
    B) After calibration

    3) What are major difference between yours and phidget 1130 sensor / atlas scientific (leaving cost)

    4) Does this device work out of the box (no calibration needed)

    5) How often do we need to calibrate this thing

    6) Mostly people calibrate their devices with 3 solutions namely 4.xx 7.xx and 10.xx but yours only 2 so ca we add functionalty for 3 calibration storage ? do you have the arduino code for that ? if not can you make and upload one ?

    7) Don't you think it will be better to add this commanly used thing to the device

    a) Water temp
    b) Room temp (i think you already have that)
    c) Humdity
    d) TDS / EC meter (Yah baby)
    e) orp / DO etc ETC

    this will be so so awesome than...
    Please release a seprate version and name is Hydro Controller or water ever you prefer
    There is so much market for this

    A) Aquarium
    B) POND
    C) hydroponics
    d) aquaponis
    e) any ponics
    f) water analysis and many more

    I am very impressed by what you did

    ReplyDelete
    Replies
    1. Hello, thanks for the compliments!

      1) I do not have the resources to do this, but if someone volunteers I could provide them with a ph module.
      2) The ph module needs to always be calibrated before use, so these tests arent really relevant.
      3) The phidgets from what I see only works with a phidgets board, and I do not know about the atlas scientific, besides that it doesnt have galvanic isolation last I checked.
      4) It will work but the readings it puts out will most likely be wrong if you do not calibrate.
      5) If you are working with water, then probably once a year. It depends on what your ph probe is exposed to.
      6) You can add it, but it makes such an insignificant improvement vs two point calibration.
      7)
      a)No, because people take this module and use it as a piece in their system, and since they are all using it for a different purpose, there isnt an one size fits all approach unfortunately.

      Delete
    2. Thank you for the answers.

      More questions

      1) Do you think if we use it 24/7 than in that case when should we calibrate ?
      2) Why the Documentation page (on tindie) diverts to 2014/4 blog entry rather than redirecting to this (2014/07) page ?
      3) On which basis the Ph is compensated ? water temp or room temp ? and i also heared that sometime water temp is important ? can you please elaborate because it is so confusing suppose my temp is 30 deg c (room) and my water temp is 28deg c (reserviour) than what should be used as calculation or the Anrduino automatically does that for you ?

      4) I have 4.xxx and 6.xxx (calibration solution) will it work for calibration this device?
      5) There is an ic which does the Multiplexing of I2C on UNO so you can attach multiple i2c connection over it. Have to got any other idea for doing it (simple one)?
      6) Can you suggest pH probe (CHEAP ONE)...

      Delete
    3. Sorry so many mistake in the post here is the correction ...
      1) Can we use this device 24/7 if yes than how often should we need to calibrate it?
      2) Why the Documentation page (on tindie) diverts to 2014/4 blog entry rather than redirecting to this (2014/07) page ?
      3) I heared that sometime water temp is important (i know you use room temp for compensate) ? can you please elaborate because it is so confusing suppose my temp is 30 deg c (room) and my water temp is 28deg c (reserviour) than what should be used as calculation or does the Anrduino automatically does that for you (due to source code)?

      4) I have 4.xxx and 6.xxx (calibration solution) will it work for calibrating this device?
      5) There is an ic which does the Multiplexing of I2C on UNO so you can attach multiple i2c connection over it. Do you got any other idea for doing it (simple way maybe)?
      6) Can you suggest pH probe (CHEAP ONE)...

      One more question i can't help it

      7)Is it necessary to provide Precise Voltage to arduino so that this device give perfect reading ? if suppose it is on battery and giving 4.5v will it output wrong pH reading ?

      Delete
    4. Hello,

      1) It depends on the solution you are measuring, something closer to tap water you would have to calibrate maybe once a year, but if you are measuring say sewage then you would calibrate maybe once a week.

      2)The documentation page on tindie I checked, it goes to this documentation page, https://www.tindie.com/products/rezahussain/dormant-labs-ph-module-v2/

      3) In that case you would hardcode the temp compensation to 28c. If you knew your water temp was constant

      4) It will work but you will have to alter the code, you should use 4 & 7 or 7&10 because I have tested and verified that code.

      5) I plan to address this issue in v3 of the module if I end up making it, but in v2 this is all you can do.

      6) Any of the ones off of ebay are good, they should be around 30$.

      7) No, the ph module works internally off of 3.3v, and communicates with the arduino via i2c so no signal will be lost but your arduino may function erratically from 4.5v

      Delete
  6. Just purchased your product from tindie Order #18267.. I hope it will be as it is projected.

    Important note : on tindie the documention link leads to the v1 post of your blog... it didn;t lead me here...Please correct it..

    ReplyDelete
  7. Any update on below questions ?

    1) Can we use this device 24/7 if yes than how often should we need to calibrate it?
    2) Why the Documentation page (on tindie) diverts to 2014/4 blog entry rather than redirecting to this (2014/07) page ?
    3) I heared that sometime water temp is important (i know you use room temp for compensate) ? can you please elaborate because it is so confusing suppose my temp is 30 deg c (room) and my water temp is 28deg c (reserviour) than what should be used as calculation or does the Anrduino automatically does that for you (due to source code)?

    4) I have 4.xxx and 6.xxx (calibration solution) will it work for calibrating this device?
    5) There is an ic which does the Multiplexing of I2C on UNO so you can attach multiple i2c connection over it. Do you got any other idea for doing it (simple way maybe)?
    6) Can you suggest pH probe (CHEAP ONE)...

    One more question i can't help it

    7)Is it necessary to provide Precise Voltage to arduino so that this device give perfect reading ? if suppose it is on battery and giving 4.5v will it output wrong pH reading ?

    ReplyDelete
  8. Hello BilluBhai - I purchased a board a few months ago. I am measuring PH of pool water and adding acid when needed. I started with a PH probe siliconed in with a thermistor with it. I did not do a good job of this and it leaked. I now went with a ph probe holder screwed into the pool pvc. and changed the temperatire to just be adjusted by reading voltage drop across a variable resistor. In my case this works fine for a couple of reasons, the pool does not move that fast for a pool with thousands of gallons and for most of the season the temp in the pool is between 20 and 32 degrees C and PH nead 7. At these temps, ph error is not much because I am near 25 deg C.

    Anthony

    ReplyDelete