Skip to main content
2 of 7
Added #define example
slash-dev
  • 2k
  • 14
  • 12

The schematic only shows one trim pot (R23), and it does, as you suspect, set a level for the LED to illuminate. More of a GOOD/BAD indicator.

The other trim pot is not on the schematic. Is it marked on the board? R6, R7, R8 or R9 maybe? It probably controls the gain on p_AOUT.

t_AOUT is an analog temperature voltage, and appears to measure the temperature of the board.

According to my secret source, you are supposed to put the probe in the pH 7.0 reference solution and, with Offset defined to be 0.0, run the program and display the calculated pH value. You may need to decrease the trim pot gain to get smaller (the smallest?) numbers. Now take that displayed value and modify the Offset constant in the sketch to be 7.0 minus the displayed value. If the displayed value is 8.1,

#define Offset (-1.1)

Build and upload the modified sketch. This time, put the probe in your pH 4.0 reference solution and adjust the gain pot until the displayed value is as close to 4.0 as you can get. This will calibrate it for mostly acidic solutions. If you are measuring basic solutions, do the same procedure with reference solutions of pH 7.0 (of course) and something basic.

Voilà!

slash-dev
  • 2k
  • 14
  • 12