SPI Library and UART conflicting

Alright, so, my partner and I are trying to combine Atlas Scientific’s Tentacle Shield (Conductivity, pH, and Dissolved Oxygen sensors) and Blue Robotic’s temperature and depth sensors for a project. The plan is to have them send data to an SD card, so we can later collect our data.

Our issue comes up when we run the Atlas Scientific in UART mode. We’re able to run the Blue Robotics sensors with the Atlas Scientific together, however, we find that the Tentacle Shield stops outputting any data. We aren’t entirely sure why, but after narrowing it down, our best guess is that the SPI pins are conflicting with the Tentacle Shield.

We tried to run the Tentacle Shield in I2C, but there was then a conflict with the Blue Robotics sensors (runs only off I2C) and the Tentacle Shield. The data from the Tentacle Shield either becomes garbled and unreadable or simply doen’t output.

Does anyone know any solutions to this sort of problem? We’ve considered having to manually mess with the Ardunio Uno SPI pins to combat these issues, but it would be quite time consuming, and while we technically have til June for this to be completed, we want this done by the middle of next month. If there’s no way to fix this software-wise, of course we’ll have to go that route. Any and all support/help would be appreciated.

Thanks!

Tentacle_Code_I2C_12-13-19.ino (8.39 KB)

If you don't mind a baud rate 9600, you can use SoftwareSerial library for serial communication.

We tried to run the Tentacle Shield in I2C, but there was then a conflict with the Blue Robotics sensors (runs only off I2C) and the Tentacle Shield. The data from the Tentacle Shield either becomes garbled and unreadable or simply doen’t output.

I would fix that problem.

Does anyone know any solutions to this sort of problem? We’ve considered having to manually mess with the Ardunio Uno SPI pins to combat these issues, but it would be quite time consuming, and while we technically have til June for this to be completed, we want this done by the middle of next month. If there’s no way to fix this software-wise, of course we’ll have to go that route. Any and all support/help would be appreciated.

The Atlas Scientific board is not connect to the UNO UART pins. The “UART” mode uses the pins 10 and 11 as a SoftwareSerial to the 4 sensors, pin 6 and 7 select the corresponding sensor. Theoretically you can disable that connection if you set pin 4 or 5 (depending on jumper 3) to HIGH.

Hi @Stockbridge_InvenTeam

Designer/Manufacturer of the Tentacle Shield here (it is made by Whitebox Labs, Atlas is a reseller).

First of all - have you read through the Tentacle docs? https://www.whiteboxes.ch/docs/tentacle/t1/#/
Especially check out the jumper settings.

Also make sure you read through the EZO Circuits datasheets - because your code will interact with the EZO circuits, not the Tentacle Shield. The shield is an isolation layer but has no logic in itself.

In your case I would also suggest to use I2C (actually, there is little sense in using the UART at all, especially when you use I2C anyway. UART is more complex to use IMHO).

pylon:
Theoretically you can disable that connection if you set pin 4 or 5 (depending on jumper 3) to HIGH.

Actually, it's even simpler. To disable the UART multiplexer and free up all pins (except the I2C pins), just remove the "Channel Group Jumper". https://www.whiteboxes.ch/docs/tentacle/t1/#/pinout?id=i2c-only

I2C debugging:

  • make the Tentacle work without the Blue Robotics with I2C
  • use the above code and add the Blue Robotics shield (without code for it!). Does it still work? If not, there could be a problem with both shields adding Pull-Ups to the I2C line. Normally not a problem, but possible.
  • make sure all I2C addresses are unique. The EZO circuits addresses can be changed by code in case of a conflict.
  • repeat for the Blue Robotics: make the Blue Robotics work without the Tentacle with I2C
  • Once you got them both working individually, start combining code for both shields