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

Hikari

New Member
View Badges
Joined
Aug 11, 2021
Messages
5
Reaction score
10
Location
Cocoa Beach
Rating - 0%
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
 

Attachments

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

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
OP
H

Hikari

New Member
View Badges
Joined
Aug 11, 2021
Messages
5
Reaction score
10
Location
Cocoa Beach
Rating - 0%
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.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
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.
 
OP
OP
H

Hikari

New Member
View Badges
Joined
Aug 11, 2021
Messages
5
Reaction score
10
Location
Cocoa Beach
Rating - 0%
0   0   0
Here's what I've got on connectors (if more clarification is needed lmk), will give the script adaptation a go and report back!
 

Attachments

  • unnamed.jpg
    unnamed.jpg
    213.1 KB · Views: 63
  • unnamed2.jpg
    unnamed2.jpg
    152.2 KB · Views: 65
  • unnamed5.jpg
    unnamed5.jpg
    71.2 KB · Views: 63

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
 
OP
OP
H

Hikari

New Member
View Badges
Joined
Aug 11, 2021
Messages
5
Reaction score
10
Location
Cocoa Beach
Rating - 0%
0   0   0
Here's the unplugged version. Think 63 is the onboard pH circuit and 70 is the PCA 9685 expander but could be wrong. Will further investigate and report back soon.
 

Attachments

  • unnamed6.jpg
    unnamed6.jpg
    64.7 KB · Views: 54

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 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.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
OP
H

Hikari

New Member
View Badges
Joined
Aug 11, 2021
Messages
5
Reaction score
10
Location
Cocoa Beach
Rating - 0%
0   0   0
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
View Badges
Joined
Jul 7, 2021
Messages
156
Reaction score
110
Location
Earth
Rating - 0%
0   0   0
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
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
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

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
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

Well-Known Member
View Badges
Joined
May 25, 2020
Messages
628
Reaction score
497
Rating - 0%
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

Well-Known Member
View Badges
Joined
May 25, 2020
Messages
628
Reaction score
497
Rating - 0%
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.
 

More than just hot air: Is there a Pufferfish in your aquarium?

  • There is currently a pufferfish in my aquarium.

    Votes: 30 17.3%
  • There is not currently a pufferfish in my aquarium, but I have kept one in the past.

    Votes: 28 16.2%
  • There has never been a pufferfish in my aquarium, but I plan to keep one in the future.

    Votes: 32 18.5%
  • I have no plans to keep a pufferfish in my aquarium.

    Votes: 75 43.4%
  • Other.

    Votes: 8 4.6%
Back
Top