Atlas Scientific Driver Development (ORP,DO, EC) for Robo-Tank/reef-pi build

Hikari

New Member
Review score
+0 /0 /-0
View Badges
Joined
Aug 11, 2021
Messages
5
Reaction score
10
Review score
+0 /0 /-0
Location
Cocoa Beach
Hello! Wish I was farther along before posting here, but alas my skills have failed me.

First off, huge shout out to Rob from Robo-Tank: couldn't have made it this far without him for sure; his insight and support have made this experience really eye-opening and incredibly fun.

As an undergraduate student, I've been attempting to create a real-time data acquisition/control system for an aquarium growing seagrasses (have included my paper if anyone's interested), which led me to reef-pi (which is so super cool it continuously melts my brain). My computer skills are not super great; any misspeaks I apologize for in advance!

My current issue is this:

Using the Whitebox T1 MkII shield, I've connected Atlas stamps pH, dissolved oxygen, oxygen reduction potential, and conductivity circuits into my Robo-Tank Rev F controller with reef-pi 5.3 loaded on. Got them in I2C mode, "created" drivers for them in the configuration tab, got them defined in connectors, and they all communicate on the interval specified in the pH tab (the circuits flash once every minute), but can't calibrate (the option is greyed out). Where should I go from here? Have attempted to use some of the sample code provided by Atlas, but that code doesn't like the Robo-Tank (still trying to mend their friendship). Should I start changing things in the reef-pi drivers library or is this completely off the mark?

Any feedback is greatly appreciated.

AJ
 

Attachments

  • No Abstract V2.pdf
    6.6 MB · Views: 35

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,660
Reaction score
16,692
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
You should be able to read those probes using the reef-pi ph module , since they all use ezo protocol. For calbration, do it outside reef-pi using atlas scientific python libraries. This process is explained here:
how to setup atlas scientific python library on pi : https://files.atlas-scientific.com/pi_sample_code.pdf
orp calibration: https://files.atlas-scientific.com/ORP_EZO_Datasheet.pdf in i2c mode.

reef-pi 's built in calibration is not the same thing as atlas' ezo board based calibration. reef-pi calibration logic is implemented in reef-pi code itself, it is not aware of the underlying driver's calibration details.

thank you for sharing your research details. it was fascinating to go through the phylogenetic analysis bits. We always loge reading through use cases.

Keep us posted and let us know if you need any help.
 
OP
H

Hikari

New Member
Review score
+0 /0 /-0
View Badges
Joined
Aug 11, 2021
Messages
5
Reaction score
10
Review score
+0 /0 /-0
Location
Cocoa Beach
Ranjib,

Thanks for responding, super stoked to get a chance to talk with you.

If I use a normal Pi that's not integrated with the Robo-Tank the Atlas sample code works without issue; when it's integrated with the Robo-Tank that's where things get dicey.
2022-05-08-162530_1920x1080_scrot.png

Still trying to figure out what's going wrong here. My guess right now is that the script doesn't like the pH circuit built into the Robo-Tank and doesn't know what to do with it. Will post more pictures of current setup when able.
 
AquaCave Logo Banner

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
338
Reaction score
404
Review score
+0 /0 /-0
Location
Germany
You could adapt the Atlas script to ignore certain addresses. Before the loop that works through all devices you could write:
Code:
ignore_list=[98]

in the loop you write:
Code:
if (device_address in ignore_list):
    continue
That skips the addresses you defined before. If that’s the problem it should solve it.

As a stopgap you could do this: I think the EZO boards save the calibration on board. You could therefore run the calibration from the working PI with the Atlas Script and then plug them into the Robo-Tank for the measurement. The calibration should be carried over.
 

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,660
Reaction score
16,692
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Here's what I've got on connectors (if more clarification is needed lmk), will give the script adaptation a go and report back!
Thank you . I am assuming the i2cdetect output is after you have connected the tentacle board . Can you power down , disconnect and run i2c detect again ? This will help me understand what are the i2c addresses specific to that board , we can then look at the script to use that specific address
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
888
Reaction score
1,176
Review score
+0 /0 /-0
Location
Edmonton, Canada
Thanks for the kind words @Hikari, nice to hear things are coming along.

I remember briefly discussing this with you, I think you changed the Atlas pH circuit to address 98 (0x62) as the onboard pH uses 99 (0x63) as shown in your scanner image.

Maybe try changing the I2C address for the onboard pH, something like 80 (0x50) should be safe. For the last hour I've been trying to update my new c++ script to change the address but it's being stubborn so hopefully the python script will run for you. Try running the following commands in the SSH terminal.

sudo 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 the 3rd command it'll say "Enter Command", type in A,80 (comma between A and 80) and press enter. If you can do this with the lid off the controller you should see the LED on the pH circuit flash 3 times. If that happens it was changed, the SSH terminal will report error 255 but it's meaningless. Next power cycle the controller so the pH circuit can read the new address, then run i2cdetect -y 1 and the 63 should now be 50.
 
Nutramar Foods

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,660
Reaction score
16,692
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
40 and 70 is shown after you detached the tentacle board ? If so both of those belong to pca9685 ic. It have two i2c addresses to control individual channel or all at once (the second i2c address ). 63 I guess is robotank ph circuit address and 20,21,22,23 are all tentacle shield i2c. I’ll suggest reconnect the tentacle shield and then create four ph controller each with those address (in decimal it’s 32, 33,34 and 35 ) and see what reading you get. Ph, orp , salinity all should give not accurate but still sane values when probes attached (and submerged in tank water )
 
OP
H

Hikari

New Member
Review score
+0 /0 /-0
View Badges
Joined
Aug 11, 2021
Messages
5
Reaction score
10
Review score
+0 /0 /-0
Location
Cocoa Beach
Sorry for the delay; had an unexpected power outage and suddenly the Robo-Tank software was loading and couldn't get reef-pi to rebind. Tried to fix it for a hot second, ended up wiping the drive and started from scratch. Got everything back set up and to this point:


Screenshot (60).png


The pH is reading correctly (have it in pH 7 calibration pouch), however haven't managed to get the ORP reading correctly. It's currently in a 225mV calibration pouch. Gonna try and get it calibrated tonight (either by implementing the script edit or by disconnecting the Pi from the Robo-Tank). Will update when done.
 

SilverBulletPRN

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Jul 7, 2021
Messages
153
Reaction score
105
Review score
+0 /0 /-0
Location
Earth
How do you guys keep your pH pouches? I got some from Atlas Scientific and they're one giant pouch with no way to close them up, seems like a waste to just toss the rest of them
 
www.dinkinsaquaticgardens.com

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
338
Reaction score
404
Review score
+0 /0 /-0
Location
Germany
How do you guys keep your pH pouches? I got some from Atlas Scientific and they're one giant pouch with no way to close them up, seems like a waste to just toss the rest of them
I bought those in 250 ml bottles from Amazon because I was worried about the same thing.

You could probably try to store the rest in some clean container, I got some small 100ml test containers with lids from my drug store as Test containers. Looks like they are made for Urin samples, but that’s probably exactly what you want ^^

Not sure though how stable the pH solution will be if you store small-ish quantities in a container with quite a bit of air. When you do that you should probably cross check that with a fresh pouch over the first few months, just to be sure.
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
338
Reaction score
404
Review score
+0 /0 /-0
Location
Germany
How do you guys keep your pH pouches? I got some from Atlas Scientific and they're one giant pouch with no way to close them up, seems like a waste to just toss the rest of them
BTW another thing: every bit of different fluid, like aquarium water will slowly work towards derailing that pH buffer solution off of their designed value. So you should probably wash your probe with destilled or RO water before putting it into the solution, especially if you want to store if for future use.
 

OfficeReefer

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 25, 2020
Messages
434
Reaction score
377
Review score
+0 /0 /-0
Hello! Wish I was farther along before posting here, but alas my skills have failed me.

First off, huge shout out to Rob from Robo-Tank: couldn't have made it this far without him for sure; his insight and support have made this experience really eye-opening and incredibly fun.

As an undergraduate student, I've been attempting to create a real-time data acquisition/control system for an aquarium growing seagrasses (have included my paper if anyone's interested), which led me to reef-pi (which is so super cool it continuously melts my brain). My computer skills are not super great; any misspeaks I apologize for in advance!

My current issue is this:

Using the Whitebox T1 MkII shield, I've connected Atlas stamps pH, dissolved oxygen, oxygen reduction potential, and conductivity circuits into my Robo-Tank Rev F controller with reef-pi 5.3 loaded on. Got them in I2C mode, "created" drivers for them in the configuration tab, got them defined in connectors, and they all communicate on the interval specified in the pH tab (the circuits flash once every minute), but can't calibrate (the option is greyed out). Where should I go from here? Have attempted to use some of the sample code provided by Atlas, but that code doesn't like the Robo-Tank (still trying to mend their friendship). Should I start changing things in the reef-pi drivers library or is this completely off the mark?

Any feedback is greatly appreciated.

AJ
@Hikari

Yes, I built and complied a solution for mine with a touchscreen during Covid19 lockdowns. It runs on Windows 10 IoT core and has a touchscreen. It also controls dosing pumps as I built my own Alkatronic to go with it.

The cost of all of it was an ApexEL but it was fun. I have it sitting on my desk now, what would you like to know?
 

OfficeReefer

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 25, 2020
Messages
434
Reaction score
377
Review score
+0 /0 /-0
Ranjib,

Thanks for responding, super stoked to get a chance to talk with you.

If I use a normal Pi that's not integrated with the Robo-Tank the Atlas sample code works without issue; when it's integrated with the Robo-Tank that's where things get dicey.
2022-05-08-162530_1920x1080_scrot.png

Still trying to figure out what's going wrong here. My guess right now is that the script doesn't like the pH circuit built into the Robo-Tank and doesn't know what to do with it. Will post more pictures of current setup when able.
For your IDE, I'm going to recommend VS as this is what their devs use.
 

Let’s talk about stuffing: How full is your tank?

  • My tank is overcrowded.

    Votes: 73 14.0%
  • My tank is nearly full/full but not overcrowded.

    Votes: 175 33.7%
  • My tank is just getting started and growing.

    Votes: 240 46.2%
  • I take a minimalist approach with my tank.

    Votes: 32 6.2%
CORALS ANONYMOUS BLACK FRIDAY SUPER SALE
Top