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.

8 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