measuring temperature with DS18B20 and ph-module

am using DS18B20 with a ph module that I bought, following the tutorials like this one I understand that I can make the DS18B20 works by attaching 4.7 kohm resistor as explained in this tutorial:

however, I don't want to do that, instead I want to use the feature of my ph module to measure the temprature:

this is my simple circut:

I am using DS18B20 with a ph module that I bought, following the tutorials like this one I understand that I can make the DS18B20 works by attaching 4.7 kohm resistor as explained in this tutorial:

enter image description here

however, I don't want to do that, instead I want to use the feature of my ph module to measure the temprature:

this is my simple circut:

enter image description here

Its not clear but its simply connection the GND, VCC and the signal from the temprature sensor. afte that the ph module has a temprature output that goes to the arduino.

here is the closes picture I can find for my module on the internet, its not the same but the closeset:

I am using DS18B20 with a ph module that I bought, following the tutorials like this one I understand that I can make the DS18B20 works by attaching 4.7 kohm resistor as explained in this tutorial:

enter image description here

however, I don't want to do that, instead I want to use the feature of my ph module to measure the temprature:

this is my simple circut:

enter image description here

Its not clear but its simply connection the GND, VCC and the signal from the temprature sensor. afte that the ph module has a temprature output that goes to the arduino.

here is the closes picture I can find for my module on the internet, its not the same but the closeset:

enter image description here

for the code I used the onewire library and dallas temprature as follows:

 #include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices 
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
}


void loop(void)
{
  // call sensors.requestTemperatures() to issue a global temperature
  // request to all devices on the bus
  Serial.print(" Requesting temperatures...");
  sensors.requestTemperatures(); // Send the command to get temperatures
  Serial.println("DONE");

  Serial.print("Temperature for Device 1 is: ");
  Serial.print(sensors.getTempCByIndex(0)); // Why "byIndex"? 
    // You can have more than one IC on the same bus. 
    // 0 refers to the first IC on the wire

}

my output is always -127 Celsius.

my question is, is this ph module works that same way(does it have the internal 4.7Kohm ), what am I missing out

thanks

Post a link to the PH module or tell us where you bought it and the part number.
Referring to the picture, I see at least 12 wires of various colors leaving the picture. Where do they go? What do they connect to?

sabirmgd:
can make the DS18B20 works by attaching 4.7 kohm resistor ............. my output is always -127 Celsius.

= sensor not connected

What pH module? You have omitted any link to its datasheet or product page.

MarkT:
What pH module? You have omitted any link to its datasheet or product page.

this is the problem! they don't have a proper documentation, I just managed to find the product on:

https://www.aliexpress.com/store/product/PH-value-acquisition-sensor-module-pH-sensor-monitoring-and-control-MCU-source-code/1964138_32791328178.html?aff_platform=aaf&cpt=1492135209078&sk=zj6qB6AIM&aff_trace_key=96af465cd055439da4daaba80038abf1-1492135209078-07043-zj6qB6AIM

756E6C:
Post a link to the PH module or tell us where you bought it and the part number.
Referring to the picture, I see at least 12 wires of various colors leaving the picture. Where do they go? What do they connect to?

the 3 wires together are mainly to connect the sensor (the one in the jst socket on the side): VCC, SENSOR SIGNAL, GND (RED,YELLOW and BLACK):

the other wires are also GND, VCC and the claimed temprature output T1 goint to the arduino:

GND <=> GND
VCC <=> VCC
T1(module temprature output) <=> D2 in arduino

.!

Nick_Pyner:
= sensor not connected

when I checked its analog value, its always 5 volt.

sabirmgd:
when I checked its analog value, its always 5 volt.

The DS18B20 has no analog output.

Try one of the other onewire examples which should give you the address of the DS18B20. If there's no address, then it isn't connected properly (or it isn't a onewire sensor.)

instead I want to use the feature of my ph module to measure the temprature

What feature? The ph module doesn't measure temperature, it measures ph.
Even if the ph module has an ADC on it, the DS18B20 is purely a digital device which does not have any way of generating an analog temperature reading.

Its not clear but its simply connection the GND, VCC and the signal from the temprature sensor. afte that the ph module has a temprature output that goes to the arduino.

Even if it could be done, using the ph sensor to read a DS18B20 is an awfully expensive way to read temperature especially when you have absolutely no information about how to use the ph sensor.

You need to give more information. You are talking about two completely different devices. You post a wiring diagram of a DS18B20 and a photo of the ph sensor but nothing which shows how they are both wired to the Arduino.

Pete

To my eyes the picture of the pH sensor shows two TO-92 cased temperature sensors and two outputs labelled T1 and T2.

Those sensors could be DS18B20 or they could be LM335Z or anything.

The link to Ali Express shows a different pH sensor which doesn't have the same connections.

Hi!

I have the same pH meter, and I have to tell you it does not have a temperature sensor on it. The T0 and D0 pins are INPUTS in my opinion - waiting for temp inputs, so the logic on the board can adjust the pH output voltage accordingly.

Either that, or they want me to measure temperature with a TL431A, because that's what's stamped on it:D

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)

BillieBricks:
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

I created an account only to say Thank You