Hi,
im building a PH sensor using these schematics GitHub - mlauhalu/esphome-phsensor: ESP8266 with analog pH sensor but without the display. I also replaced the poti with a fixed voltage divider.
I get good signal from the wemos board, however i cant really get it calibrated right.
This is my setup. I measured the signal voltage at all relevant spots by wiring everything to my lab PSU.
So when I put in 5V into the probes BCN connector, I get roughly 5V out of the signal pin. The onboard calibration poti is also set correctly.
The voltage divider is therefore also getting 5V in and puts 3.3V out.
When I input 3.3V directly into the wemos signal pin ESPhome shows me the right values in the log.
I use a
- calibrate_linear:
- 0.0 -> 0.0
- 1.0 -> 14.0
to get the right signal range.
So far so good. The weird thing is just that when I connect the real probe everything seems to be reversed. The lower the PH value the higher the probe voltage gets.
Every tutorial I read describes it the other way around.
I can reverse the linear calibrate, but then the signal range is off. If I calibrate PH 7 for 2.5V and I put the probe into PH2 (measured with an external PH meter) water I get show a value of PH4.
Im not quite sure what the problem is here. Im familiar enough with ESPhome and I build some PIR sensor with the same wemos board, so I think my electronics are right. I just dont understand the probe behvior.
Cheers
F.