The Core Electronics product page says that
“The onboard voltage regulator chip is compatible with both 5V and 3.3V logic from the main control board.” ESP32 is running 3.3v and the analogue to digital converter pins read return a value between 0 and 4095.
However, the DF robot product page says,
"Please use an external switching power supply,and keep the voltage as close as possible to the +5.00V. The more accurate the voltage, the more accruate your reading is! "
Can you provide a link to the DF Robot product page that you are quoting? The one I can find states the specifications as 3.3V to 5V, and the same thing appears in the product Wiki. I notice that other sites for a similar product (Farnell, Faranux, Ali) do mention the 5V requirement. However that appears to refer to the V1 model. It looks like one change between V1 and V2 has been to add an on-board boost regulator which simultaneously provides a stable 5V reference and allows for a supply of 3.3V~5V.
I don’t think the Pro version is what you are after here. Having a quick look at the board’s schematic I’m not sure it will function properly of 3.3V. THe V2 on the other hand is happy to, the change in the code that is needed to get that working comes from the voltage calculation in the main loop.
voltage = analogRead(PH_PIN)/1024.0*5000; // read the voltage
5000 is in mV for an Arduino’s logic level, if you change this to 3300 it should work like a charm.
Power the pH sensor at 5V from an external source.
Connect the sensor’s output directly to the ADC pin on the ESP32-C3. You can connect the pH sensor’s VCC to a stable 5V supply while using the sensor’s signal output (0-3V range) with the ESP32-C3 ADC, this would give you optimal performance. The ESP32-C3 ADC can safely read up to 3.3V without additional resistors or voltage dividers on the signal line.