measuring temperature with DS18B20 and ph-module

This is probably a late reply to this topic, but as those pH sensors are being sold dirt cheap on Ali and because I bought 4 of them and got tinkering with them I'm still going to give my two cents :wink:

As is common with buying stuff from those online vendors, support isn't their cup of tea. ie, none at all...
I searched around on the net and couldn't find any references to these modules until I began to look at the similarities between these cheap 'analogue' sensors and for instance the more expensive DFRobot Gravity: Analog pH Sensor v1. The parts used and output generated where very similar, but the code written for these modules was very clumsy. But at least it had a Wiki page :slight_smile:

Soon after this I discovered that DFRobot also made a newer version. This 'new' version had quite a bit more support and even had an Arduino Library written for it, but the hardware was quite different. Input between 3 and 5.5V so it was more versatile between platforms (ie, you could now use it on a ESP8266 derivative), but the output was changed to 3V in stead of the 5V the El Cheapo's from Ali and v1 from DFRobot outputs.

Now comes the kicker... The library was written so nicely that it actually was a piece of cake to change the calculations for an output of 5V and the library even supports temperature compensation for the measurements... Nice

For those of you out there that have such a cheap module I'll attach the altered library with a new example. This example is written for an Arduino device, but when my ADS1115 comes in I'm going to try it on an NodeMCU. Don't know if I'm going to need an I²C Level convertor for this as the NodeMCU is 3.3V and the Analogue pH sensor needs 5V, but hey... That's what tinkering is all about :wink:

Regards,

Billie

DFRobot_PH.zip (117 KB)