Issue calibrating pH-4502C with ESP32

Hey I'm days away from presenting my final project which is a prototype of a system that can monitor and control parameters that allow the correct performance of a pool. I'm working with an ESP32 wroom. I obviously have other sensors, but I'm currently focusing on the pH sensor, since it's the last component that I incorporated into my system and I only have a few days to make it work.

I've spent more than a month trying to calibrate it with no success at all, and mainly stuck on 3.3v or ADC: 4095 while adjusting the potentiometer. I have watched many YouTube videos of Arduino and esp32 users, but I'm still unable to calibrate the module. I'm sure that the problem is not the electrode, since I got to try it with a chemistry equipment that allowed me to make pH measurements using the electrode. I have read that the ESP32 only works with 3.3 volts, so I bought a converter that could turn that voltage into 5v, but still I haven't been able to calibrate. Right now I'm thinking about going ahead with other protocols or even investigate further on the ESP32's ADC.

This is the pH probe:


And this is the whole set for the pH sensor:

The only documentaton that came in with the sensor was the following:

I would really appreciate it if I could get some help, especially if you've faced similar issues and your were able to solve them. Feel free to answer in Spanish if that’s easier for you.

I'm tried using the following sketch to callibrate the module with the potentiometer:

int pH_Value; 
float Voltage;
 
void setup() 
{ 
  Serial.begin(115200);
  pinMode(pH_Value, INPUT); 
} 
 
void loop() 
{ 
  pH_Value = analogRead(35); 
  Voltage = pH_Value * (3.3 / 4095.0); 
  Serial.println(Voltage); 
  delay(500); 
}

I have also used this sketch to calibrate while reading the values from the ACD

int rawValue;        // valor crudo del ADC (0–4095)
float voltage;       // voltaje calculado en el pin ADC

void setup() {
  Serial.begin(115200);
}

void loop() {
  // Leer el pin ADC (ejemplo GPIO35)
  rawValue = analogRead(35);

  // Convertir a voltaje (máx 3.3V en ESP32)
  voltage = rawValue * (3.3 / 4095.0);
  //voltage = rawValue * (5 / 1023.0);

  // Mostrar resultado
  Serial.print("ADC raw: ");
  Serial.print(rawValue);
  Serial.print("  |  Voltaje: ");
  Serial.print(voltage, 3); // 3 decimales
  Serial.println(" V");

  delay(500);
}```

For informed help, please post a complete circuit diagram, with all pins, parts and connections clearly labeled (hand drawn is preferred), links to the module data sheets or product pages, and a detailed description of the problems you are having.

Posting instructions can be found in the "How to get the best out of this forum" post, linked at the head of every forum category.

Welcome to forum!

It would be more relevant to know details about your sensor module than anything else.

Hi, I just edited the post so I could provide more details about the sensor!

Please post LINKS to the documents and product pages, rather than illegible photos or screenshots. Going by the photo of the one-page product documentation, this was not a very wise purchase decision.

We need to see a wiring diagram.

Edit: I found the thing on Amazon. The product description is nonsensical, and the complaints by reviewers indicate major problems.

Choose a pH sensor from a supplier that supports their products, has a decent customer base and reviews, and offers intelligible assembly and operating instructions. Consider the DFRobot series, which comes with good instructions and calibration solutions.

Have a look if you find help from this:

have a look at Atlas pH sensors
work OK with ESP32 microcontrollers

Converter of what?
First , you need to power the module by 5v and the easiest way is using a 5v power supply rather than "converter". Next, you have to convert module output from 0-5 to 0-3.3v range and it can be achieved with resistor delimiter.

Please show a detailed wiring diagram of your connection. Some photos of setup also could be useful. Also please indicate what is your esp32 board.

Hey, as I mentioned, I don't have much time left to buy a new sensor. I have to find a way to make this one work.

Hey, thanks for replying. I already checked out that video and tried it, but I'm still unable to calibrate.

Hey, I'm using the ESP32-WROOM-32 board. This is the wiring diagram for my project. I'm using the GPIO 35 for the pH sensor.

You have lot of stuff powered from 5V with outputs connected to Esp32. Esp gpios are not 5V tolerant.

What do you suggest?

As I wrote in #8, in case of pH-meter you can use a resister delimiter for convert 0-5v analog signal to 0-3.3v range, compatible with ESP32 gpio.

Use multimeter / voltage meter to measure output voltage. If you are not able to adjust the output with potentiometer, you likely have bad board.