Tentacle Documentation

Tentacle T3 for Raspberry Pi

Model T3.17

An add-on board for Raspberry Pi to host and individually isolate up to 5 devices from Atlas Scientific to measure PH, Dissolved Oxygen, Electric Conductivity (E.C.) and Oxidation-Reduction Potential (ORP), CO2 and more

  • 2 isolated EZO channels
  • 1 additional EZO channel
  • 2 I2C channels for 5pin-sensors and 3rd-party I2C devices
  • Compatible with Raspberry Pi 2 and 3

Quickstart

I2C only

The Tentacle for Raspberry works with EZO circuits in i2c-mode only. Before using your circuits with the Tentacle T3, switch them to i2c manually. The process is described here Switch to I2C

Preparing the Raspberry Pi

  1. Download a recent version of Raspbian (this Tutorial was made with Jessie, Release 2017-03-02, but any later version should work):
    https://www.raspberrypi.org/downloads/raspbian/
  2. Burn the img-file to an SD card, e.g. using Etcher (for Windows, OSX, Linux)
  3. Boot your Pi (don’t attach the Tentacle board yet)
  4. Enable I2C using raspi-config
    1. In the Pi’s terminal, type
      sudo raspi-config
    2. In the menu, find the option to activate I2C. At the time of writing this is under 5 Interfacing Options > P5 I2C

    3. Reboot your Pi
  5. Upgrade system packages. Run this in the Pi’s terminal:
    sudo apt-get update
    
    sudo apt-get upgrade
  6. Install necessary I2C tools:
    sudo apt-get install python-smbus
    
    sudo apt-get install i2c-tools
  7. Reboot your Pi

Prepare the hardware

  1. All your EZO devices must be in I2C mode  (How to switch to I2C)
  2. Plug your EZO circuits into the Tentacle board. Mind the orientation and double check the pin labels.
  3. Mount the included metal standoffs to the Tentacle board. This greatly helps with physical stability.
  4. Plug the Tentacle onto the RaspberryPi (your Pi is OFF)
  5. Power up the Ri

Test I2C

  1. In the Pi’s terminal, type
    sudo i2cdetect -y 1
  2. In the resulting table, you should find all your attached EZO devices (your actual addresses might differ):

Code

A good place to start is Atlas Scientifics I2C example for Raspberry Pi. It gives you an console to interact with all attached EZO devices:

https://github.com/AtlasScientific/Raspberry-Pi-sample-code/blob/master/i2c.py

or get the complete (incl USB etc) documentation:

git clone https://github.com/AtlasScienti c/Raspberry-Pi-sample-code.git

If using the Tentacle, only the I2C part of the above repository is relevant. Run the I2C code:

sudo python i2c.py

You’ll be presented with an interactive console:

To list attached devices, type:

List_addr

(Standard addresses: pH: 99, ORP: 98, DO: 97, EC: 100, RTD: 102)

To directly connect to a certain circuit, type ADDRESS,xx (xx is the address of the circuit):

ADDRESS,99

You’re now connected to the circuit at address 99. To take a reading, type “R”. To get information about the circuit, type “i”. Refer to the datasheet of your circuit for a complete list of commands for your circuits.

To continuously poll the reading of a circuit, type “Poll,x.xx”. x.xx is the delay between readings in seconds.

Poll,1.50

5 Channels

Channel 1 + 2:

  • EZO circuit form-factor
  • Individually isolated to prevent noise, cross-talk, interference
  • best suited for EZO pH, EZO E.C., EZO Dissolved Oxygen, EZO ORP
  • isolated Voltage: 5V
  • isolated I2C bus

Channel 3

  • EZO circuit form-factor
  • non-isolated for devices without sensitivity for electrical noise
  • best suited for EZO RTD
  • easily add temperature compensation to your other channels
  • Voltage: 3.3V
  • I2C bus

Channel 4 + 5

  • Pin header form-factor (e.g. to connect Molex connector)
  • perfect for 5-pin devices from Atlas Scientific (e.g. CO2 sensor and future products)
  • can be used as a generic additional I2C connectors
  • I2C only
  • non-isolated

Channel 4+ 5 Pinout:

  • INT (2x) – both INT pins are internally connected. Some devices from Atlas Scientific provide additional functionality (Interrupts, programming, etc) to this pin. The second INT pin lets you connect a jumper wire to a GPIO pin of the Raspberry at your liking.
  • 3V3 – non-isolated, from Raspberry 3.3V to power external devices
  • GND – non-isolated, from Raspberry GND
  • SDA – non-isolated I2C
  • SCL – non-isolated I2C

Compatibility

  • The Tentacle T3 is COMPATIBLE with Raspberry Pi 2 and Raspberry Pi 3.
  • The Tentacle Mini is compatible with all EZOTM type circuits from Atlas Scientific that support I2C mode. The Mini will not work with older sensor circuits that support UART only.

Buy

From our storewe ship worldwide

or from one of our Distributors

Tentacle Shield for Arduino

Models T1.15A, T1.16

An Arduino shield to host and individually isolate up to 4 sensor circuits from Atlas Scientific to measure PH, Dissolved Oxygen, Electric Conductivity (E.C.) and Oxidation-Reduction Potential (ORP).

  • 4 channels
  • 5V only

Quickstart

  1. Set the jumpers like in the above image. This is the standard setting the Tentacle is shipped with.
  2. Plug your Atlas Scientific circuits into the Tentacle Shield.
    You need at least one sensor circuit. There’s no predefined order for the circuits, you can put them in arbitrary order. Just make sure the orientation is correct.
  3. Mount the Tentacle shield to your Arduino
  4. Power up the Arduino
  5. Load the Tentacle Setup sketch to your Arduino
  6. Open the Arduino IDE serial monitor @9600 baud.
  7. type scan and press ENTER:
    Starting scan... this might take up to a minute.
  8. You should see the details of all your circuits listed
  9. Connect to a circuit by typing it’s channel number followed by “Enter”. E.g. 0<ENTER>
  10. Whatever you type now, is directly sent to the circuit on serial channel 0. For example, type r to get the latest reading.
    > r
  11. The answer from the circuit is printed to the console:
    < 176.12
    < *OK
  12. Congratulations, you’re all set to configure and use your Atlas Scientific circuits! (if it didn’t work as expected, check out our troubleshooting section below).
    Why not try to switch your circuits to I2C mode and benefit from its advantages?

Example Code

Mode of operation

The Tentacle Shield adds an isolation layer which results in very accurate measurements, not influenced by electrical noise or cross-talk between the sensors. However, the Tentacle does not add any logic between the Arduino and the EZO circuits. Thus, there is no difference in the code to talk to the EZO circuits wether you have the Tentacle or not. Our example code will work without a Tentacle, and other code for the EZO circuits will also work with the Tentacle.

Grab the datasheets for the correct version of your circuits. The datasheets teach you about all the commands the circuits can process.

Jumper Settings

Each of the 4 channels on the Tentacle Shield must have it’s bus type select jumpers set. Each channel needs two jumpers, one for each communication line (RX/TX or SDL/SCL).

Note, just changing the jumpers will not change the mode of the circuit: These jumpers must be set manually to the bus type which is configured in the circuit itself. If you want to change the bus type of a circuit, configure the circuit accordingly. Then, set the jumpers to match the circuits configuration. The process of changing the bus mode of a circuit is explained here: I2C or UART?

If your EZO circuit is in UART mode, set your jumpers like this

If your EZO circuit is in I2C mode, set your jumpers like this

In case any of your circuits are connected in UART / serial mode, you need to set this jumper to either position. The jumper defines what serial channel numbers this shield is using. If you’re using two stacked Tentacle shields, set this jumper to a different position for each shield. If you’re using  I2C circuits only, you can remove this jumper – this will free arduino pins 4,5,6,7,10 and 11.

This shield has serial channels 0-3:

This shield has serial channels 4-7:

This shield will have no serial channels. Arduino pins 4, 5, 6, 7, 10 and 11 will be free for other uses.

I2C and UART modes

The Tentacle Shield (4-channels) is compatible with both EZO modes: I2C and UART. You can even mix and match modes on the same shield. Each channel can either be UART or I2C.

  • Channels in UART mode are communicated with via the channel number printed on the Tentacle PCB.
  • Channels in I2C mode are communicated with via their I2C address set in the circuits configuration.

Please see our dedicated page I2C or UART? for more details on how to know what mode your circuits are in, and how to switch the mode.

Pinout

The Tentacle Shield connects to 5V, GND, SCL, SDA. In addition some I/O pins are used for the UART multiplexer. The pins used by the Tentacle are marked black on the silkscreen of the Tentacle PCB, right outside the Arduino header.

If you remove the channel group jumper, you will free up some pins – but your circuits will only work in I2C mode.

UART 0-3 enabled

The channel group jumper is placed in the 0-3 position.

  • SCL: I2C
  • SDA: I2C
  • 10: TX
  • 11: RX
  • 7: MUX S0
  • 6: MUX S1
  • 5: MUX ENABLE 1
  • 4: free

UART 4-7 enabled

The channel group jumper is placed in the 4-7 position.

  • SCL: I2C
  • SDA: I2C
  • 10: TX
  • 11: RX
  • 7: MUX S0
  • 6: MUX S1
  • 5: free
  • 4: MUX ENABLE 2

 UART disabled

The channel group jumper is removed.

  • SCL: I2C
  • SDA: I2C
  • 10: free
  • 11: free
  • 7: free
  • 6: free
  • 5: free
  • 4: free

Serial / UART Multiplexer

The on-board UART multiplexer allows to communicate to 4 EZO circuits in UART mode using only one serial line on the Arduino. Upstream UART to Arduino are pins 11 and 10, RX and TX. You can use SoftSerial to talk to all circuits via these pins. It’s important to know that you can talk only to one circuit at a time. But by configuring the multiplexer with the respective pins, you decide which EZO circuit you currently talk to.

Pins 7 (S0) and 6 (S1) are used to configure the multiplexer. Depending on the combination of setting HIGH/LOW of these two pins, a different EZO channel is “connected” to the Arduino.

Pins 5 and 4 are used to enable/disable the multiplexer. This is important if you stack two Tentacle shields. With two shields, you can access up to 8 EZO circuits in UART mode. The multiplexer is EITHER enabled by pin 5, OR by pin 4. If the channel group select jumper is in the 0-3 position, the multiplexer will be enabled via pin 5. If the jumper is in 4-7 position, the multiplexer is enabled via pin 4. You enable only pin 5 OR pin 4 at one time, but not both.

Like this you can cycle through all your circuits. Some code might help you understand the logic better:

const int s0 = 7; //Arduino pin 7 to control pin S0
const int s1 = 6; //Arduino pin 6 to control pin S1
const int enable_1 = 5; //Arduino pin 5 to control pin E on shield 1
const int enable_2 = 4; //Arduino pin 4 to control pin E on shield 2

void change_serial_mux_channel() {           // configures the serial muxers depending on channel.

  switch (channel) {                         //Looking to see what channel to open

    case 0:                                  //If channel==0 then we open channel 0
      digitalWrite(enable_1, LOW);           //Setting enable_1 to low activates primary channels: 0,1,2,3
      digitalWrite(enable_2, HIGH);          //Setting enable_2 to high deactivates secondary channels: 4,5,6,7
      digitalWrite(s0, LOW);                 //S0 and S1 control what channel opens
      digitalWrite(s1, LOW);                 //S0 and S1 control what channel opens
      break;                                 //Exit switch case

    case 1:
      digitalWrite(enable_1, LOW);
      digitalWrite(enable_2, HIGH);
      digitalWrite(s0, HIGH);
      digitalWrite(s1, LOW);
      break;

    case 2:
      digitalWrite(enable_1, LOW);
      digitalWrite(enable_2, HIGH);
      digitalWrite(s0, LOW);
      digitalWrite(s1, HIGH);
      break;

    case 3:
      digitalWrite(enable_1, LOW);
      digitalWrite(enable_2, HIGH);
      digitalWrite(s0, HIGH);
      digitalWrite(s1, HIGH);
      break;

    case 4:
      digitalWrite(enable_1, HIGH);
      digitalWrite(enable_2, LOW);
      digitalWrite(s0, LOW);
      digitalWrite(s1, LOW);
      break;

    case 5:
      digitalWrite(enable_1, HIGH);
      digitalWrite(enable_2, LOW);
      digitalWrite(s0, HIGH);
      digitalWrite(s1, LOW);
      break;

    case 6:
      digitalWrite(enable_1, HIGH);
      digitalWrite(enable_2, LOW);
      digitalWrite(s0, LOW);
      digitalWrite(s1, HIGH);
      break;

    case 7:
      digitalWrite(enable_1, HIGH);
      digitalWrite(enable_2, LOW);
      digitalWrite(s0, HIGH);
      digitalWrite(s1, HIGH);
      break;

    default:
      digitalWrite(enable_1, HIGH);		//disable soft serial
      digitalWrite(enable_2, HIGH);		//disable soft serial
  }
}

Compatibility

Arduino

The 4-channel Tentacle Shield feeds 5V to the Arduino I/O pins. But not all Arduino models are 5V tolerant.

Compatible Boards

  • Arduino / Genuino Uno (R3)
  • Arduino / Genuino Mega 2560 (R3)
  • Arduino / Genuino Leonardo
  • Arduino / Genuino Yun
  • Arduino  / Genuino 101 (with some Limitations. If all your EZO addresses are known, there is no issue. However, I2C scanning does not work. )
  • and all Arduino / Genuino compatible boards which are 5V tolerant on their I/O pins

Incompatible Boards:

  • Arduino  / Genuino Zero
  • Arduino  / Genuino Due
  • and Arduino  / Genuino compatible boards that are NOT 5V tolerant on their I/O pins

If you need 3.3V compatibility, check out the Tentacle Mini

EZO Circuits

The Tentacle Shield is compatible with all types and version of Atlas Scientific circuits (except the Flow Meters).

Compatible Circuits

  • pH EZO, V5.0, V4.0, V3.0
  • EC EZO, V3.0
  • DO EZO, V6.0, V5.0
  • ORP EZO, V4.0, V3.0
  • RTD EZO

Incompatible circuits

  • EZO Flow Meter Totalizer

Troubleshooting

My circuit can't be detected

Try connecting to your sensor circuit after each of these steps:

  • Have you tried the Tentacle Setup sketch from the Quickstart tutorial? There’s a good chance it can auto-detect your circuit.
  • Check if your Jumper Settings are correct. For V3.0 – V6.0 sensor circuits, set the jumpers to “serial”. For EZO type circuits, set them to “serial” if the LED is green. If the LED is blue, set them to I2C.
  • Try a putting your circuit into a different channel slot on the shield
  • Some EZO circuits were shipped with a very high default serial baudrate set. Sometimes, this baudrate can’t be handled by Arduino SoftSerial. Manually switch your circuit to I2C as described in “I2C or UART?“. Now your circuit can be auto-detected by the Tentacle Setup sketch (download from the Quickstart tutorial). From the serial console, send serial,38400 to switch it back to serial mode. It can be detected in UART mode now, too.

My sensor shows inaccurate readings

  • Use the Tentacle Setup Sketch to calibrate your circuit, following the procedure described in the circuits datasheet
  • Don’t touch the Atlas Scientific circuits, the Tentacle Shield and the metal BNC connectors. Touching these can make the readings inaccurate for several minutes. Wait a moment and see if the issue persists.
  • The first couple of readings are inaccurate after waking the circuits from sleep. This is an expected behavior of some Atlas Scientific devices and you should account for it in your code.
  • Make sure your probe is clean and in good condition.
  • Use good quality probes.
  • Ensure that the Tentacle Shield solder joints are free of dirt, dust, humps of flux residue. This is most important around the BNC connectors and the pin headers for the circuits. Make sure the Arduino and Tentacle Shield don’t touch anything conductive.
  • Read the troubleshooting sections of your circuits datasheet

I can't connect the SCL/SDA pins

If you’re using an older Arduino (prior to R3 layout, 1.0 pinout) it doesn’t have the independent SCL and SDA pins next to the AREF pin needed by the Tentacle shield for I2C. Older Arduinos have their I2C pins on different locations. Many boards use A4 for SDA pin and A5 or SCL. For other boards, see the Arduino Wire documentation.

Use jumper wires to patch the Tentacle I2C pins to the respective pins on your Arduino to make I2C work.

Note: same applies if you’re using another shield which doesn’t have the R3 layout and uses the ICSP header directly on the Arduino (like some Ethernet shields). Just bypass the shield with some jumper wire.

Can I use the Tentacle Shield with a Raspberry Pi or some other controller?

Using a 5v/3.3v level converter, yes. The 4-channel Tentacle shield uses 5V on the I/O pins (RX/TX, SCL/SDA) and must not be connected to the Pi directly. Your microcontroller must be 5V tolerant on the I/O or could be damaged otherwise.

Check out

 

Open Source Hardware

The Tentacle Shield is certified Open Source Hardware. Schematics and layout are licensed under Creative Commons BY-SA 4.0. Silkscreen graphics and the trade mark “Tentacle” are intellectual property of Whitebox Labs

Buy

From our storewe ship worldwide

or from one of our Distributors

Tentacle Mini for Arduino

Model T2.16

An Arduino shield to host and individually isolate up to 2 sensor circuits from Atlas Scientific to measure PH, Dissolved Oxygen, Electric Conductivity (E.C.) and Oxidation-Reduction Potential (ORP).

  • 2 channels
  • 3.3V and 5V compatible

Quickstart

 I2C only

The Tentacle Mini works with EZO circuits in i2c-mode only. Before using your circuits with the Tentacle Mini, switch them to i2c manually. The process is described here Switch to I2C

  1. Set your EZO circuits to i2c manually. The process is described here Switch to I2C
  2. Plug your Atlas Scientific circuits into the Tentacle Shield. You need at least one sensor circuit. There’s no predefined order for the circuits, you can put them in arbitrary order. Just make sure the orientation is correct.
  3. Mount the Tentacle shield to your Arduino
  4. Power up the Arduino
  5. Load the Tentacle Setup sketch to your Arduino
  6. Open the Arduino IDE serial monitor @9600 baud.
  7. type scani2c and press ENTER:
    Starting scan... this might take up to a minute.
  8. You should see the details of all your circuits listed
  9. Connect to a circuit by typing it’s ID followed by ENTER. E.g. 99
  10. Whatever you type now, is directly sent to the circuit on serial channel 99. For example, type r to get the latest reading.
    > r
  11. The answer from the circuit is printed to the console:
    < 176.12
    < *OK
  12. Congratulations, you’re all set to configure and use your Atlas Scientific circuits!

Example Code

Mode of operation

The Tentacle Mini adds an isolation layer which results in very accurate measurements, not influenced by electrical noise or cross-talk between the sensors. However, the Tentacle does not add any logic between the Arduino and the EZO circuits. Thus, there is no difference in the code to talk to the EZO circuits wether you have the Tentacle or not. Our example code will work without a Tentacle, and other code for the EZO circuits will also work with the Tentacle.

Grab the datasheets for the correct version of your circuits. The datasheets teach you about all the commands the circuits can process. For example, attach the BNC sensor and follow the guide in the datasheet to calibrate your circuits.

Pinout

The Tentacle connects to pins 5V, GND, IOREF, SCL, SDA. No other I/O pins are used by the Mini.

Two power rails

If you’re using a standard Arduino, you don’t need to worry about this – however, if you hook up the shield to another microcontroller (or an Arduino without the R3 Pinout), you’ll need to understand the use of 5V and IOREF on the Tentacle Mini:

  • 5V
    The 5V-rail is used to power the isolated DC/DC converters. Most Arduinos will provide the expected 5V from the 5V pin. In some battery-powered situations you might not have 5V available (but only 3.7V or similar). Although it’s out of spec, you still might be lucky and it maybe works – no guarantee however.
  • IOREF
    The IO-reference pin of an Arduino is mostly 3.3V or 5V, depending on the Arduino model. The voltage applied to the Tentacle IOREF pin is used for the isolated I2C lines – this voltage is applied to the SCL/SDA pins. On a standard Arduino, this just works. If you’re using another microcontroller, you’ll need to connect the IOREF pin to a voltage that is tolerated by your controller’s I/O pins (probably 5V or 3.3V).

I2C

For I2C communication the Tentacle Mini uses the dedicated SCL and SDA pins on the Arduino R3 pinout. No other I/O pins are used.

Compatibility

Arduino

The Tentacle Mini is compatible with 3.3V and 5V Arduinos.

Compatible Boards

  • Arduino / Genuino Uno (R3)
  • Arduino / Genuino Mega 2560 (R3)
  • Arduino / Genuino Leonardo
  • Arduino / Genuino Yun
  • Arduino  / Genuino Zero
  • Arduino  / Genuino Due
  • Arduino  / Genuino 101 (with some Limitations. If all your EZO addresses are known, there is no issue. However, I2C scanning does not work. )
  • and most Arduino / Genuino compatible boards

EZO Circuits

The Tentacle Mini is compatible with all types and of Atlas Scientific EZO circuits (except the Flow Meters).

Compatible Circuits

  • pH EZO
  • EC EZO
  • DO EZO
  • ORP EZO
  • RTD EZO

Incompatible circuits

  • EZO Flow Meter Totalizer
  • all pre-EZO circuits and all UART-only circuits

Troubleshooting

My circuit can't be detected

Try connecting to your sensor circuit after each of these steps:

  • Have you tried the Tentacle Setup sketch from the Quickstart tutorial? There’s a good chance it can auto-detect your circuit.
  • Check if your Jumper Settings are correct. For V3.0 – V6.0 sensor circuits, set the jumpers to “serial”. For EZO type circuits, set them to “serial” if the LED is green. If the LED is blue, set them to I2C.
  • Try a putting your circuit into a different channel slot on the shield
  • Some EZO circuits were shipped with a very high default serial baudrate set. Sometimes, this baudrate can’t be handled by Arduino SoftSerial. Manually switch your circuit to I2C as described in “I2C or UART?“. Now your circuit can be auto-detected by the Tentacle Setup sketch (download from the Quickstart tutorial). From the serial console, send serial,38400 to switch it back to serial mode. It can be detected in UART mode now, too.

My sensor shows inaccurate readings

  • Use the Tentacle Setup Sketch to calibrate your circuit, following the procedure described in the circuits datasheet
  • Don’t touch the Atlas Scientific circuits, the Tentacle Shield and the metal BNC connectors. Touching these can make the readings inaccurate for several minutes. Wait a moment and see if the issue persists.
  • The first couple of readings are inaccurate after waking the circuits from sleep. This is an expected behavior of some Atlas Scientific devices and you should account for it in your code.
  • Make sure your probe is clean and in good condition.
  • Use good quality probes.
  • Ensure that the Tentacle Shield solder joints are free of dirt, dust, humps of flux residue. This is most important around the BNC connectors and the pin headers for the circuits. Make sure the Arduino and Tentacle Shield don’t touch anything conductive.
  • Read the troubleshooting sections of your circuits datasheet

I can't connect the SCL/SDA pins

If you’re using an older Arduino (prior to R3 layout, 1.0 pinout) it doesn’t have the independent SCL and SDA pins next to the AREF pin needed by the Tentacle shield for I2C. Older Arduinos have their I2C pins on different locations. Many boards use A4 for SDA pin and A5 or SCL. For other boards, see the Arduino Wire documentation.

Use jumper wires to patch the Tentacle I2C pins to the respective pins on your Arduino to make I2C work.

Note: same applies if you’re using another shield which doesn’t have the R3 layout and uses the ICSP header directly on the Arduino (like some Ethernet shields). Just bypass the shield with some jumper wire.

Can I use the Tentacle Mini with a Raspberry Pi or some other controller?

Check out

But, yes, in fact you can connect the Tentacle Mini to a Raspberry Pi or other microcontrollers. Connect pins

  • Tentacle 5V -> RPi 5V
  • Tentacle IOREF -> RPi 3.3V
  • Tentacle GND -> RPi GND
  • Tentacle SCL -> RPi SCL
  • Tentacle SDA -> RPi SDA

More details can be found in the blog post How to use the Tentacle Mini with a Raspberry Pi

You can use the I2C sample codes for Raspberry Pi provided by Atlas Scientific. For example, pH circuit Raspberry Pi I2C Sample Code

Open Source Hardware

The Tentacle Mini is certified Open Source Hardware. Schematics and layout are licensed under Creative Commons BY-SA 4.0. Silkscreen graphics and the trade mark “Tentacle” are intellectual property of Whitebox Labs

Buy

From our storewe ship worldwide

or from one of our Distributors

What to use and how to configure

The Tentacle and the Atlas Scientific circuits are shipped to communicate via the serial bus. However, all EZO type circuits support both serial (UART) and I2C communication modes. Older versions of the circuits speak UART only. The Tentacle Shield (4-channel) supports both modes (UART/serial and I2C). The Tentacle Mini (2-channel) supports I2C mode only.

Unless you’re using legacy (V3.0 – V6.0) versions of the circuits, we suggest you configure your circuits for I2C. It’s faster, more reliable and occupies less pins on your Arduino. Communication between the Arduino and the computer is serial/USB for both sensor bus types.

Serial / UART

The Tentacle Mini (2-channel) and the Tentacle T3 for Raspberry Pi are not compatible with UART / serial.

The Tentacle shield (4-channel) uses Arduino pins 10 and 11 to connect to the on-board UART multiplexer via the SoftSerial library.

The physical location of the circuit defines its channel ID in code. Each physical channel has 2 numbers printed next to it on the board. Channels on the first shield are IDs 0 – 3, on the second shield IDs 4 – 7. See Tentacle Shield documentation for detailed instructions.

I2C

I2C uses the pins SCL and SDA pins, located next to the AREF pin on the Arduino.
In I2C mode, the physical location on the Tentacle Shield has no influence on the channel ID. Make sure each circuit has a unique ID. The printed channel numbers on the PCB have no relevance for I2C.

Green LED: UART mode
Blink / fade to Cyan: taking a reading (every second in continuous mode) 

Blue LED: I2C mode
Cyan LED: taking a reading

Pros:

  • Works with legacy versions of Atlas Scientific circuits (V3.0 – V6.0)
  • Factory default for both Tentacle and Atlas Scientific circuits

Pros

  • Fast
  • Reliable
  • Needs only 2 pins on the Arduino
  • simpler & less code
  • Works with all Tentacle shield models including Mini

Cons

  • Uses Pins  4, 5, 6, 7, 10 and 11 on the Arduino
  • Can not be used with the Tentacle Mini (2-channel) shield

Cons

  • Does not work with legacy circuits (V3.0 – V6.0)
  • Limited connection / cable length

Switch between bus types

With the Tentacle Shield for Arduino and the Setup sketch

This only works if you have a T1 Tentacle Shield (with 4 channels). If you have a Tentacle Mini or the T3 for Raspberry, scroll down to the manual method.

  1. Load the Tentacle Setup sketch to your Arduino and connect to it via the serial monitor @9600
  2. Type the ID of the circuit and press enter. Try ‘scan’, if you don’t know the ID of your circuit.
  3. to switch to I2C mode, type
    i2c,111
    111 is the new ID and can be can be between 9-127

    to switch to serial mode
    , type
    serial,9600
    9600 is the new baudrate. Check the datasheet of your circuit for supported baudrates
  4. Tentacle Shield (4-channel): Change both bus type jumpers for this channel to the new bus type
  5. you are able to connect to the new channel ID immediately, no need  to restart the Arduino

Manually switch between UART and I2C

This procedure switches the circuit between UART/serial and I2C. If the device is in UART mode, this procedure will switch it to I2C. If the device is in I2C mode, it will switch it to UART/serial.

When switched to I2C, this will reset the circuit ID to factory default:

  • DO: 97 (0x60)
  • ORP: 98 (0x61)
  • pH: 99 (0x63)
  • EC: 100 (0x64)
  • RTD: 102 (0x66)

When switching to UART, this will reset the circuit baudrate to factory default of 9600 baud.

  1. Remove circuit from Tentacle shield
  2. Put the circuit into a breadboard
  3. For pH, DO, ORP and EC: Short the PGND pin to the TX pin using a jumper wire
    For RTD (temperature): Short the PRB pin to the TX pin using a jumper wire
  4. Power the device (GND, +5V)
  5. Wait for LED to change from green to blue (UART->I2C) or from blue to green (I2C->UART).
  6. Remove the jumper wire from the PGND (or PRB respectively) pin to the TX pin (Do this before removing power!)
  7. Remove power (5V)
  8. Apply power (5V)
  9. The device is now in the new mode (repeat 1-8 to switch back to the other mode)

Need more help?  Contact us