Download PDF
        SAMOVAR 
×
Menu

pH calibration

 
The PH-4502C pH sensor outputs a voltage that Samovar reads on the LUA_PIN input as an ADC value (0-4095) and converts to pH with the formula pH = k · ADC + d. Every electrode has its own coefficients k and d, so before the first brew and after replacing the electrode the sensor must be calibrated with two buffer solutions. Without calibration the pH field on the main page shows "no data" («нет данных»), and the "Waiting for pH" («Ожидание pH») stage in the program will not start.
 
The calibration page is opened with the "pH calibration" («Калибровка pH») button on the "Additional" («Дополнительно») tab of the Cheesemaking («Сыроварение») mode or on the Settings → Cheese («Настройки → Сыр») tab. The sensor is polled only in Cheesemaking mode - in other modes the page shows "no data".
The pH sensor calibration page
1

Current value («Текущее значение»)

The pH converted with the saved coefficients. "no data" («нет данных») - the sensor is not being polled or the result is outside 0-14.
 
2

ADC

The raw reading of the LUA_PIN input (0-4095), updated once a second. The calibration points are captured from it.
 
3

pH of the first point («pH первой точки»)

The pH of the first buffer solution (7.00 by default).
 
4

Point ADC («ADC точки»)

The ADC value stored when the point was captured.
 
5

Capture («Зафиксировать»)

Stores the current ADC together with the entered pH. Fresh data from the sensor and a pH from 0 to 14 are required.
 
6

pH of the second point («pH второй точки»)

The pH of the second buffer solution (4.00 by default). The ADC of the second point must differ from the first.
 
7

Calculate («Рассчитать»)

Calculates k and d from the two captured points and places them into the fields below.
 
8

Coefficient k («Коэффициент k»)

Slope: the pH change per one ADC unit. Can be entered manually.
 
9

Offset d («Смещение d»)

Offset: the pH at ADC = 0. Can be entered manually.
 
10

Save calibration («Сохранить калибровку»)

Writes k and d to the Samovar settings. The allowed range is from −100 to 100.
 
11

Message («Сообщение»)

The result of the last action: "Point 1 captured" («Точка 1 зафиксирована»), "Coefficients calculated. Save them" («Коэффициенты рассчитаны. Сохраните их»), "Calibration saved" («Калибровка сохранена») or an error text.
 
 
Calibration procedure
 
  1. Rinse the electrode, put it into the first buffer solution and wait until the ADC value stops changing. The reading is updated once a second.
  2. In the "pH of the first point" («pH первой точки») field enter the pH of the buffer (7.00 by default) and press "Capture" («Зафиксировать»). The stored ADC value appears next to it. If there is no data from the sensor or the pH is outside 0-14, the message "A fresh ADC and a pH from 0 to 14 are required" («Нужны свежий ADC и pH от 0 до 14») appears.
  3. Rinse the electrode, put it into the second buffer (4.00 by default) and capture the second point in the same way. The ADC values of the two points must differ.
  4. Press "Calculate" («Рассчитать»). The coefficients are calculated from the two points: k = (pH2 − pH1) / (ADC2 − ADC1), d = pH1 − k · ADC1 - and are placed into the "Coefficient k" («Коэффициент k») and "Offset d" («Смещение d») fields.
  5. Press "Save calibration" («Сохранить калибровку»). The coefficients are written to the Samovar settings and are kept after a reboot. In firmware with the median filter, after the coefficients change you have to wait for five new measurements: then the "Current value" («Текущее значение») line shows the pH of the buffer the electrode is in.
 
You can also enter the coefficients manually, if they are known, and save them without capturing points. The allowed range of k and d is from −100 to 100. Before the first calibration the settings hold k = 1 and d = 1: the converted value falls outside 0-14, and Samovar treats the pH as unreliable.
 
Check. After saving, put the electrode into a buffer and compare the "Current value" line with the pH of the buffer. The same value is shown on the main page of the mode and at the "Waiting for pH" stage. In firmware with the median filter, the pH is determined from five consecutive measurements one second apart. The ADC field remains the raw reading for calibration: wait for it to settle before capturing each point.
 
Attention.
When the PH-4502C is connected to LUA_PIN, voltage level matching is required; the MPX5010DP must not be connected to the same input. When an ADS1115 is used, the LUA_PIN input stays free. Diagrams and maintenance are in the section The pH sensor and how to connect it.