pH sensor on UNO VS MKR 1010 sensor reading problem

userHead Runar.van Geffen 2023-03-17 21:37:58 351 Views1 Replies

Hi!
im trying to use a Gravity: Analog pH Sensor / Meter Pro Kit For Arduino.
when i connect it to a arduino UNO i get good results with the example code given on DF Robot
but when i connect the sensor to a Arduino MKR 1010 i get values that are too high.
The pins are connected exactly the same as shown in the wiring diagram above. both use 5V, GND and A0 as the analog pin.
does anybody know what the problem could be?

 

Serial monitor readout from MKR wifi 1010
Voltage:3.17 pH value: 11.10

 

Serial monitor readout from Uno
Voltage:2.06 pH value: 7.22

2023-03-17 22:03:21

olved!

the mkr 1010 only supports 3,3volt on analog read.

i changed: 

 

voltage = avergearray(pHArray, ArrayLenth)*5.0/1024;

 

to

 

voltage = avergearray(pHArray, ArrayLenth)*3.3/1024;

and now i get the correct values :smiley:

userHeadPic Runar.van Geffen