Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Whitebox T1 MkII to connect Robo-Tank with Atlas Scientific Stamps
#1
Hello!



Was hoping to have a little bit more done on my build before posting, but whatever here goes!



First off, massive thanks to Rob for being so supportive, wouldn't have gotten this far had it not been for your help. 



I've been working on a design using Robo-Tank RevF and reef-pi for growing seagrass, with desired functionality supporting Atlas Scientific pH, Dissolved Oxygen, Oxygen Reduction Potential, and Conductivity Stamps. Since the embedded circuits are sensitive, I decided to use a Whitebox T1 MkII Shield for easy "plug-and-play" setup. 



After getting the stamps out of their default UART configuration into I2C and running 'sudo i2cdetect -y 1', it became apparent that the Atlas pH stamp and the built-in pH circuit were fighting over having the same address. However, running the sample i2c.py script provided by Whitebox (to change the address of the pH stamp) resulted in an IOError: [Errno 121] Remote I/O error (which to my understanding is just the Pi being like 'what do you mean things are connected to the I2C pins I don't see anything connected there'), which I thought was reasonable enough given the fact two things wanted the same address. So I hooked up the shield up to another Pi (no Robo-Tank) and was able to change the address without issue.



The real issue starts now: after plugging the shield back into the Robo-Tank, the same error still occurs. My thoughts are that the i2c.py script is finding other I2C connections besides the Atlas stamps, doesn't know what to do with them, then returns the error code. My Python skills are not up to the task (yet....!) to be able to modify the script so that it only looks for the Atlas circuits (maybe that's not even the right thought process, idk), so I was wondering if anyone had any wisdom on how to proceed from here. If not, no worries, will post when I figure it out.




Best,



AJ
Reply to top
#2
Hi AJ, I think you're close, the pH was using the same address and now I'm thinking the new address for the Atlas circuit needs to be updated in the python circuit. At the top you should see the address for each of the circuits, change that and the error should go away. I'm not sure what code you're using, if you post a link or code I can try and spot it.
Reply to top
#3
(05-06-2022, 06:29 PM)Rob F Wrote: Hi AJ, I think you're close, the pH was using the same address and now I'm thinking the new address for the Atlas circuit needs to be updated in the python circuit. At the top you should see the address for each of the circuits, change that and the error should go away. I'm not sure what code you're using, if you post a link or code I can try and spot it.

Rob,

Here's a link to the code:

https://github.com/whitebox-labs/whitebo...ter/i2c.py

Thanks again, your help is greatly appreciated!!!!!
Reply to top
#4
Thanks, just to verify when you had things connected to the backup Pi were you able to read them, you could see output in the SSH terminal for each of them?

I just tried running that script and get the same error when I try to run it so I don't even see the list of options to choose from. Is that the case with yours when you have Atlas shield connected to controller? The code looks like it has a scanner built in to detect Atlas circuits but yeah something is not working as either my pH circuit is confusing it or something else. I don't have any Atlas circuits so can't fully test it.
Reply to top
#5
I'm able to fully interact with them through the i2c.py script; haven't plugged probes in yet so can't read from them, but have been able to change all of their addresses and run various commands so it should be safe to assume (*knock on wood*) that they're operational. Hadn't thought to try and connect the two Pi's together over SSH, will give it a go and get back to you.
Reply to top
#6
    Update: Still haven't tried to connect over SSH, but started working with a different branch found here: https://github.com/AtlasScientific/Raspb...d2e0708ded#, the png provided is a screenshot of the errors during debug.
Reply to top
#7
Unfortunately I don't know what's going on there or what address 32, 33, 34 or 35 would be. I'll have to write a script as I don't know what's going on in these. I'll try and get it posted later tonight or tomorrow for sure. Just to clarify what circuits do you have connected?
Reply to top
#8
32, 33, 34, and 35 are pH, Oxygen Reduction Potential, Dissolved Oxygen, and Conductivity, respectively. I changed all their addresses in an attempt to fix the issue, but no dice. Can change back to their default address without issue.

    Also, a screenshot of all circuits successfully taking a single reading on the back-up pi (idk if this is helpful but here it is?)
Reply to top
#9
Ah yes those addresses make sense now, they can be anything so that's ok. What is the "i" command for? I know the R is to read it.

Have you tried adding extra ph-Ezo drivers in reef-pi for the other circuits? For sure you can read from the Atlas circuit with reef-pi, add a driver with that address (decimal value not hex), then add an analog connector using that driver, then go to admin tab and press reload button then add it to the pH tab and see if you get a reading. Reef-pi send "R" to pH so in theory it should return something from all the circuits, not sure why I didn't suggest this first.

The one I'm really unsure about is the EC as that circuit puts out 4 parameters so maybe reef-pi only pulls in the first and discard the remaining. If the others work we can setup extra script just for EC.
Reply to top
#10
The i command gives device information; it'll output the device type and firmware version.

That's a good idea, I'll give it a shot and lyk
Reply to top
#11
Sounds good, that's probably how the script determines if it's an EZO circuit.
Reply to top
#12
Update: Still a work in progress, started a Reef2Reef discussion as well:

https://www.reef2reef.com/threads/atlas-...ld.923467/

Got the circuits communicating with reef-pi using the file driver, hopefully more information soon!
Reply to top
#13
Glad to hear you're making progress, I'll be following along.
Reply to top


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using powerbar with 3rd party hardware dcartier 1 2,035 01-28-2022, 12:32 PM
Last Post: Rob F

Forum Jump:

Current time: 03-29-2024, 09:10 AM