pH sensor not working

swisschris104

Community Member
View Badges
Joined
Mar 19, 2021
Messages
65
Reaction score
57
Location
Palos Hills
Rating - 0%
0   0   0
Hi,

I am using the reef-pi board, and have the sensor plugged in, however whenever i go to calibrate I get the following error.

1616878111323.png


I am also not getting any current reading from it. It does this with the sensor plugged in and unplugged.

Here are my settings for the input
1616878196526.png


1616878218716.png

1616878465038.png


Here is pictures of everything plugged in.
1616878500130.png

1616878522278.png
 
OP
OP
S

swisschris104

Community Member
View Badges
Joined
Mar 19, 2021
Messages
65
Reaction score
57
Location
Palos Hills
Rating - 0%
0   0   0
Typical error i get without calibrating.
1616881102535.png


Also used the PH-Board driver and got no reading, but got no error. issue seem to be with the ph-ez0 driver? Any idea how i can fix .

1616881175272.png

(this is what i get when using phboard driver)
 
Last edited:

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
If you run i2cdetect -y 1 in the Pi terminal do you get a 63 in the list?

If not open the lid and you'll see a jumper pad and LED. With the controller running short out those two pads for about 5 seconds, the LED will flash 3 times when it resets. After that unplug power from the controller, power back up and it should be working.
 

Attachments

  • top_reset.jpg
    top_reset.jpg
    187.6 KB · Views: 47

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
I ram the command and did not get expected results. I will try that later when I am back home. Thanks!
If that command didn't print out a list then the I2C isn't configured on the Pi or you don't have i2ctools installed but it would say that. Don't bother with a reset just yet as its not likely that.

In your config.txt I didn't see the line that enables i2c, only the baud rate but it should be high up in the file. You should have this in there.

dtparam=i2c_arm=on

You can also comment out or delete the dtoverlay=pwm2-chan line, that's not needed.
 
OP
OP
S

swisschris104

Community Member
View Badges
Joined
Mar 19, 2021
Messages
65
Reaction score
57
Location
Palos Hills
Rating - 0%
0   0   0
Aha, Thanks
If that command didn't print out a list then the I2C isn't configured on the Pi or you don't have i2ctools installed but it would say that. Don't bother with a reset just yet as its not likely that.

In your config.txt I didn't see the line that enables i2c, only the baud rate but it should be high up in the file. You should have this in there.

dtparam=i2c_arm=on

You can also comment out or delete the dtoverlay=pwm2-chan line, that's not needed.
Aha, thanks! That did it sorta. but now i am getting another error

UI
ERROR{"error":"Failed to json decode. Error: json: unsupported value: NaN"} | HTTP 500
1616896766662.png


Performed the rest and got the same error
 
Last edited:
OP
OP
S

swisschris104

Community Member
View Badges
Joined
Mar 19, 2021
Messages
65
Reaction score
57
Location
Palos Hills
Rating - 0%
0   0   0
- I reset the db and just added driver, connector and ph and got the same error.
- rebooted pi multiple times
- verified i had no other connectors setup on pin 0
- tried 2 different PH probes, and tried it with no probe
- attempted from accessing http://localhost directly from the pi
- I have one temperature probe plugged in and it works on problem, same goes with controlling power outlets
 
Last edited:

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
That looks good, circuit is working, it's 63. Stupid question, when you made the connector and selected pin 0 did you select the pH driver first?
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
To verify the hardware run the following commands.

Run the following commands.

This downloads a script to read pH circuit

wget -c https://www.robo-tank.ca/Robo-Tank_pH_Script.zip

sudo unzip Robo-Tank_pH_Script.zip

python Robo-Tank_pH_Script.py


After you run the 3rd command you will see.

Enter command:

Type in (must be capital letter) and press enter.

R

It should print out a pH value.
 
OP
OP
S

swisschris104

Community Member
View Badges
Joined
Mar 19, 2021
Messages
65
Reaction score
57
Location
Palos Hills
Rating - 0%
0   0   0
Thanks, yeah I couldn't add pin until i selected driver. Ran that script and it is giving the output of "NaN" So I guess the error makes a bit more sense now.

1616911923997.png


I ran the script with PH probe plugged in and unplugged and got the same results.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Unbelievable, I don't know why it's doing that, I don't think I've seen it. Try that reset jumper again, after doing that power cycle the controller. If that doesn't work I'll have to send you a replacement.
 
OP
OP
S

swisschris104

Community Member
View Badges
Joined
Mar 19, 2021
Messages
65
Reaction score
57
Location
Palos Hills
Rating - 0%
0   0   0
Just tried to reset it again, and reinstalled raspberry os onto a different SD card and ran your script and got the same results of NAN

1616947511314.png
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Thanks for trying that. NAN means "not a number" so not sure what's going on there, sorry about this. The forum is catching all my pH issues lol, I promise you it's really not that bad. Out of 273 controllers there's only been 4 with unknown issues, this is one of them, thankfully the other pH issues I have fixed now. I'll get a replacement shipped out tomorrow, are you ok to remove the board from case and drop in the new one?
 
OP
OP
S

swisschris104

Community Member
View Badges
Joined
Mar 19, 2021
Messages
65
Reaction score
57
Location
Palos Hills
Rating - 0%
0   0   0
Thanks for trying that. NAN means "not a number" so not sure what's going on there, sorry about this. The forum is catching all my pH issues lol, I promise you it's really not that bad. Out of 273 controllers there's only been 4 with unknown issues, this is one of them, thankfully the other pH issues I have fixed now. I'll get a replacement shipped out tomorrow, are you ok to remove the board from case and drop in the new one?

No, worry, it happens. I'll be able to remove and reinstall the board into the enclosure. It's just a few screws. Thanks for the replacement. I will shoot you a email with just a link to this thread, so whenever you ship you can provide tracking. Once the new board arrives I will be able to ship you the one with the error bac. we can discuss via email. Thanks!
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
No, worry, it happens. I'll be able to remove and reinstall the board into the enclosure. It's just a few screws. Thanks for the replacement. I will shoot you a email with just a link to this thread, so whenever you ship you can provide tracking. Once the new board arrives I will be able to ship you the one with the error bac. we can discuss via email. Thanks!
Sounds good and thanks for understanding. I'll be sure to cover shipping back the bad, I would like to see if it's component or programming didn't go right.
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 32 15.9%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 11 5.5%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.5%
  • I wear reef gear primarily to relax where I live.

    Votes: 26 12.9%
  • I don’t wear gear from reef brands.

    Votes: 118 58.7%
  • Other.

    Votes: 13 6.5%
Back
Top