Introduction: Arduino PH Standard Addition of Salt


The purpose of this experiment is to use a pH sensor with an Arduino uno to measure the voltage of tap water, vinegar, and Mountain Dew drinks as standard addition of Himalayan pink salt is added. The goal is to not only see how adding salt to a liquid affects the pH but also how it changes the voltage.


  1. Arduino uno
  2. pH meter and pH sensor board
  3. some liquids ( I used tap water, vinegar, and mountain dew)
  4. Salt (any table salt is good)
  5. A measuring device for standard additions (I used a 1/8 tsp)
  6. Some cups for the liquid
  7. jumper cables (Male to female or female to female)
  8. Computer with Arduino program
  9. Buffer solutions - if possible

Step 1: Setting Up Your Arduino

  1. To connect your Arduino to the pH sensor board you will need:
    • Attach PO aka the pH analog input to Arduino A0
    • Attach Gnd to Arduino Gnd
      • This is to ground the pH probe
    • Attach the other Gnd to Arduino Gnd
      • This grounds the boards
    • Attach VCC (5V DC) to Arduino 5V
    • I used female to female jumper wires

Step 2: Code

Use this code borrowed from to upload to your Arduino

Step 3: Testing Your Buffers (if Possible)

You need to calibrate your pH probe so it understands that a 2.5 V indicates a neutral pH, a 5.0 V indicates a basic solution and 0 V is very acidic. On the pH board used here it's pretty easy to do.

All you need a solution you know is neutral, like water. I used a pH 7.0 PO4 buffer solution

Insert your probe into the water, run the serial monitor. If it is not reading approximately 2.5 V, then need to adjust the potentiometer.

If you have a small flat head screw around, adjust the screw on the blue potentiometer closest to the BNC interface. Adjust it until the serial monitor reads approximately 2.5 V and you're good to go

Step 4: Testing Your Solutions

If you have pH buffer solutions to test, do those first as a positive control to make sure you get a voltage that makes sense for the pH of the buffer.

  1. To a small cup, add 1/4 cup of water
  2. Insert the pH probe
  3. Use the serial monitor to measure the voltage. Give it about 30 seconds or so before determining your final value
  4. Remove the pH probe and put it into a separate cup of water just to hold it in between runs
  5. Using a 1/8 tsp, pour the pink salt into the cup of water. Stir as best you can. I found that this himalayn pink salt did not dissolve as well as your typical white table salt, but thats ok.
  6. insert the probe into the water with salt
  7. Repeat step 3-6 until you have inserted 0.5 tsp of pink salt into solution.
  8. It is recommended that you also to the actual pH reading after each addition of salt. I just used some pH strips but you can find other schematics and codes to program your Arduino to measure the pH.

Step 5: Video

Here's a short video of the basic steps of measuring the voltage with standard addition of pink salt

Step 6: Data Analysis

I recorded the voltage for tap water, vinegar, and Mountain Dew

To find the pH per voltage all you do is divide the measured pH before any salt was added / voltage output from Arduino. You may also google the pH of what the solution is supposed to be.

I also went on ahead and calculated the % error for the tap water. (I didn't do it for the other drinks).

You can use your data from the tap water to create a calibration curve, seen here as well. Other data analysis was also done, as seen on the Excel spreadsheet

Step 7: Resources

Sources I used for inspiration