reef-pi :: An opensource reef tank controller based on Raspberry Pi.

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
Absolutely ! Just open a new thread and post the instructions. I did the same with my SCD30 Air Quality sensor code. I also used @robsworld78's pH code and service file as a base and he didn't have a problem with it, so I would guess that he will likely be fine with this as well. In my case I included the same LICENSE that he used for good measure.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
Hi @robsworld78 thank you again,
I've tested your instruction, I only have to add the path to Python3 in the ExecStart command:

Python:
ExecStart=/usr/bin/python3 /var/lib/reef-pi/dht22/dht22_read.py

Now everything works fine :beaming-face-with-smiling-eyes:

I ask to both of you, @Sral & @robsworld78 can I write a post as a reference guide if someone else would like to use this type of sensor?
Thank you!
Great, glad you got it working. I think it's a great idea to start a new thread explaining how to set it up, I'm sure a lot of people would appreciate it.
 

scottsmith

New Member
View Badges
Joined
Jul 21, 2021
Messages
4
Reaction score
9
Location
Australia
Rating - 0%
0   0   0
Yet another reef pi build .
Brain, doser and power board. I’ve got a fuge light on the way to.
Happy to share parts or files if anybody needs. Was tricky finding all the bits for an Australian power board.
 

Attachments

  • 65A513C6-ADE8-4864-A1DF-B42E03CE46E0.jpeg
    65A513C6-ADE8-4864-A1DF-B42E03CE46E0.jpeg
    333 KB · Views: 93
  • 0A91A114-CD95-45CB-BC27-E69167F50615.jpeg
    0A91A114-CD95-45CB-BC27-E69167F50615.jpeg
    375.5 KB · Views: 95
  • D16C0928-1410-48F2-9232-E31989B5FFA5.jpeg
    D16C0928-1410-48F2-9232-E31989B5FFA5.jpeg
    155.4 KB · Views: 93

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
Yet another reef pi build .
Brain, doser and power board. I’ve got a fuge light on the way to.
Happy to share parts or files if anybody needs. Was tricky finding all the bits for an Australian power board.
Looks gorgeous !

Makes me feel even sillier for not going for 3D printed cases and etched PCBs with SMD components ... mine looks much less sophisticated ^^

You can try to make a Build-thread, that way @Ranjib has an easier time linking those sources of information on the Website and it's a bit easier to find.
 
Last edited:

scottsmith

New Member
View Badges
Joined
Jul 21, 2021
Messages
4
Reaction score
9
Location
Australia
Rating - 0%
0   0   0
Looks gorgeous !

Makes me feel even sillier for not going for 3D printed cases and etched PCBs with SMD components ... mine looks much less sophisticated ^^

You can try to make a Build-thread, that way @Ranjib has an easier time linking those sources of information on the Website and it's a bit easier to find.
Thanks!
I’ll put up a post when I get time
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Yet another reef pi build .
Brain, doser and power board. I’ve got a fuge light on the way to.
Happy to share parts or files if anybody needs. Was tricky finding all the bits for an Australian power board.
This looks awesome :) thank you for sharing
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
Have you played around with the i2c baudrate? Those 0 values (or near zero after calibration) are from failure in i2c communication with the pH board ime. The change in 6.0 is that failed communication, instead of not showing up at all, shows up as a 0. From the graph, does a dosing pump kick on in those pH valleys? Maybe that's electrical interference from the pumps power line onto the i2c lines.

If you can't fix the communication, you can make the spikes smaller visually in the graph by putting a cutoff function in the transform function field that replaces those near zero values with a constant like 8 or whatever. That would clean up the graph, just shouldn't forget that you did that and that those aren't real readings.
 

iamdan

Community Member
View Badges
Joined
Jul 1, 2022
Messages
87
Reaction score
74
Location
Western Australia
Rating - 0%
0   0   0
Have you played around with the i2c baudrate? Those 0 values (or near zero after calibration) are from failure in i2c communication with the pH board ime. The change in 6.0 is that failed communication, instead of not showing up at all, shows up as a 0. From the graph, does a dosing pump kick on in those pH valleys? Maybe that's electrical interference from the pumps power line onto the i2c lines.

If you can't fix the communication, you can make the spikes smaller visually in the graph by putting a cutoff function in the transform function field that replaces those near zero values with a constant like 8 or whatever. That would clean up the graph, just shouldn't forget that you did that and that those aren't real readings.
Hi Elysics

I haven’t been fiddling with the i2c baud rate it’s on 10000 and for the issue to occur on two Robo tank boards on two different tanks with v6.0 and not 5.3 or older tells me it has to be a software glitch as Ranjib had stated in the GitHub post.

No dosing pump or any other functionality runs at the time of the dip. I’ve also run everything with only the ph probe connected and everything else unplugged or off and still the same thing.

When you say fiddling with the i2c value do you mean setting it lower than 10000?
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
@iamdan Looks like a strange thing your error:
Line 1645: Nov 28 23:58:36 robopi reef-pi[368]: 2022/11/28 23:58:36 ph sub-system: Probe: pH Reading: 0.16442953020134254
Line 2979: Nov 29 00:59:36 robopi reef-pi[368]: 2022/11/29 00:59:36 ph sub-system: Probe: pH Reading: 0.16442953020134254
Line 4313: Nov 29 02:00:36 robopi reef-pi[368]: 2022/11/29 02:00:36 ph sub-system: Probe: pH Reading: 0.16442953020134254
Line 5647: Nov 29 03:01:36 robopi reef-pi[368]: 2022/11/29 03:01:36 ph sub-system: Probe: pH Reading: 0.16442953020134254
Line 6975: Nov 29 04:03:36 robopi reef-pi[368]: 2022/11/29 04:03:36 ph sub-system: Probe: pH Reading: 0.16442953020134254
Line 8309: Nov 29 05:04:36 robopi reef-pi[368]: 2022/11/29 05:04:36 ph sub-system: Probe: pH Reading: 0.16442953020134254

You basically seem to get the error once per hour and its the same numerical value every time, indicating that it might be an error value of "0" (internal of due to I2C communication) that is shifted by calibration to the 0.16

I remember reading something exactly like this before, e.g. hourly errors on certain measurement values, but I can#t remember what or whom it was ...

But I guess it might already be fixed in the next update, since @Ranjib would "only" need to implement an "error mode" for sensors. Maybe a hardcoded "no Integer value of 0" would even suffice for start.

To be fair though, your pH seems jumpy even without the regular dips to 0.16 ... have you tried using something like a grounding-probe ?
 
Last edited:

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
Hi Sral thanks for the diagnosis :)

Ph is “jumpy” as is a freshwater tank with co2 injection :)
Ah good to know ! I'll hopefully be running something like that as well ^^

Although I was talking more about the spikes in the data, not the oscillating pattern from the CO2 injection:
1683310892167.png

Those are way too sharp to represent a real change in pH, but rather look like an electrically caused anomaly. Incidentally they always coincide with your lower turning point in pH, so that should be more or less when your valve shuts the CO2 supply off, right ? I guess it is actuated by a electromechanical valve with a solenoid inside that can cause a lot of disturbances when switched off.

So it seems possible that you either have a badly designed solenoid driver, or your measurement and/or I2C system is sensitive to these electrical distrubances.
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
Hi Elysics

I haven’t been fiddling with the i2c baud rate it’s on 10000 and for the issue to occur on two Robo tank boards on two different tanks with v6.0 and not 5.3 or older tells me it has to be a software glitch as Ranjib had stated in the GitHub post.

No dosing pump or any other functionality runs at the time of the dip. I’ve also run everything with only the ph probe connected and everything else unplugged or off and still the same thing.

When you say fiddling with the i2c value do you mean setting it lower than 10000?
When you say "everything else unplugged", do you mean that literally? The robotank board, the PI, and the pH Board with the pH Probe connected together and powered on with no other cable going anywhere and no other equipment powered on in the same room or at least vicinity?

Especially the solenoid as @Sral pointed out (turned off as in disconnected from a power source)
 

iamdan

Community Member
View Badges
Joined
Jul 1, 2022
Messages
87
Reaction score
74
Location
Western Australia
Rating - 0%
0   0   0
Hi Elysics, Yes i mean that literally, Unplugged and removed. Only the Pi with the Robotank board with it's inbuilt ph probe on board.

1683374557020.png


I did manage a week or two after that old pic was taken to remove further interferences - namely it was the co2 solenoid causing interference as they do. However 6.0 still shows the graph like this.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
@iamdan that's good news, what exactly did you do to remove the interference ?

Now it looks like only the error every 61 minutes remains. I personally can't tell why that happens, yet. I could adapt @robsworld78's code for flowmeter and pH, but make it disregard errors. If that works it tells us if its an I2C error.
 

iamdan

Community Member
View Badges
Joined
Jul 1, 2022
Messages
87
Reaction score
74
Location
Western Australia
Rating - 0%
0   0   0
Just mounting the robo tank and some other bits into an ikea metal cabinet as a makeshift faraday cage :squinting-face-with-tongue::squinting-face-with-tongue::squinting-face-with-tongue::squinting-face-with-tongue:

I've already run robs code i found on another post somewhere few months ago and had one of my colleagues at work who is a programmer to modify the code as you stated funnily enough and had the readings be consistently read properly on modified and unmodified code. I've just changed laptops so don't know where my saved screenshots/logs went from that.

This exact issue happens on two robo tanks on opposite ends of my house on separate systems and only with 6.0. Even happens on the extra ph modules rob makes i have plugged into i2c port on his controller as i have extra probes monitoring my co2 going into my calcium reactor etc etc.

Running a lower version screws with some of my automations and other things i have running in reef-pi etc.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I have also tried running reef-pi on another rpi 4 and connecting the pins of the separate i2c probe of rob's direct to the pins on the rpi4 and same issue in v6.
And the issues goes always with 5.3 ?
 
Back
Top