ArduinoTroubleshooting

No value from PH Sensor UN0161 V2.0

userHead Jimmy.Deriter 2023-10-08 21:33:16 186 Views1 Replies

Hello everyone, PH sensor with Arduino UNO.  What I tried so far. 

 

- Upload original test code from DFROBOT. - Tried reset EEPROM with DFROBOT code. Serial monitor showed 0:255
  1:255 2:255 3:255 4:255 5:255 6:255 7:255  - Tried again DFROBOT test code. Got this. _neutralVoltage:nan, _acidVoltage:nan
           temperature:25.0^C  pH:nan - Tried to change code of DFRobot_PH::DFRobot_PH() function. It seems to work for many but not for me. 

void DFRobot_PH::begin()
{   if (EEPROM.get(PHVALUEADDR, this->_neutralVoltage) == 0) {
       this->_neutralVoltage = 1500.0;  // new EEPROM, write typical voltage
       EEPROM.put(PHVALUEADDR, this->_neutralVoltage);
   };

   Serial.print("_neutralVoltage:");
   Serial.println(this->_neutralVoltage);

   if (EEPROM.get(PHVALUEADDR+4, this->_acidVoltage) == 0) {
       this->_acidVoltage = 2032.44;  // new EEPROM, write typical voltage
       EEPROM.put(PHVALUEADDR+4, this->_acidVoltage);
   };
      Serial.print("_acidVoltage:");
   Serial.println(this->_acidVoltage);

}

 

-  With the sensor in a glass of tap water, i get a calculated voltage between 1362 and 1372 but PH is        pH:nan

 

I try to calibrate using PH 4 solution and enterph but it does not recognize the solution.

 

Any other suggestions?  Thank you.
 

 
2023-10-08 22:06:47

PROBLEM SOLVED!

I deleted the library «DFROBOT PH and reinstall it to test with all original code.

it seems that reset EEPROM with DFROBOT suggested code work. Also, to help others, when everything is connected and you upload the test code for the first time, put the sensor in the PH 4 solution. If you try with just tap water it does not work. I was able to calibrate the 4 and 7 PH.

Not I am going to try to use the sensor with my ESP32 which I planned to use.

userHeadPic Jimmy.Deriter