Hello Forum,
I googled a lot and couldn’t find any good knowledge about the AliExpress ph sensor with esp32 boards and home assistant. First I will sum up what I could find out and then I ask you all of it for help
Alright here we go: Well the Aliexpress PH sensor works with 2-5V and the Output from the Sensor is also a 0-5V Range. This means you can’t use the ESP32 Analog Pins and need to use a AnalogtoDigital Converter. I used a ADS1115 BreakoutBoard (ADS1115 Sensor — ESPHome) cause there is also Documentation on the ESPHome Website. The communication works via i2c.
So I connected everything the right way and getting some signal, but the voltage is stable at 4.931V. If I out the PH probe into water it should actually read 2.5V, but it doesn’t.
Now I have no idea what’s wrong. Somebody had that same issue once?
Yeah I know you can but as you said because of the non linear extremes and the resolution it’s better to use the ADC. Ok well I think at least I connected it the right way and I used a lot of different source to double check but I will sketch you my setup real quick (maybe im missing something):
With this code I get readings in my HA and when I plug the Voltage Output of the PH Board to the 2.5V Source I get 3.xxV readings. So I recognises the change at least.
one extra note: the schematic form the PH Board with the real board does not match. The schematic has 7 pins but the real one only 6. the schematic is the one on their AliExpress site.
hi, I’m doing the same project but with ESP8266, in my case the voltage variation goes from 3,2v to 3,8v measuring in continuous, I don’t know if it is normal or not… Do you have the same variation? did you write the calibration to put as PH?
I am using this exact same sensor with an ESP32. I am using a simple voltage divider circuit to bring the signal down to 0 - 3.3V. I have even managed to calibrate the sensor but it gives incorrect values for different solutions.
i’ve read that ADS1115 compare Ax Input voltages with its VCC voltage.
Because of this, if your ESP Vin is not stable, then measurement will have variation issues.
It is recommanded to place a 0.1µF capacitor between gnd and VCC pins.
see the ADS1115 datasheet on page5 last line of the table :
Fluctuation is only about 0,05 pH which is very accurate…
To be clear I’m using it with ESP32 and ADS1115 (with 0.1µF capacitor between GND and VCC as hinted above).
More info about DFRobot Gravity Analog pH Sensor here: