# Adafruit TCA4307 Hot-Swap I2C Buffer

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/103/403/medium800/adafruit_products_TCA4307_top.jpg?1626294370)

As we've been adding [STEMMA QT connectors](https://learn.adafruit.com/introducing-adafruit-stemma-qt/what-is-stemma-qt) to our breakouts and dev boards, folks have been really enjoying the simplicity and speed of plugging in I2C sensors and devices for quick iteration and design. That's all good, but I2C wasn't _really_ designed for hot-plugging. You're kinda supposed to have everything connected once on boot and never mess with it - I2C was specified for on-board connections. And, folks who have experimented with hot-plugging I2C devices eventually have discovered that if you plug in or unplug at the wrong moment you can cause the bus to hang due to an extra SCL pulse or an unexpected capacitive load.

The **Adafruit TCA4307 Hot-Swap I2C Buffer** breakout here solves that problem. It's specifically designed to take a non-hot-swap protocol (I2C) and protect the controller from wayward peripherals messing with the bus during attach/detach.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/412/medium800/adafruit_products_TCA4307_top_header.jpg?1626361982)

Usage is super simple. Connect the left side (IN) to your main board controller - Arduino, Raspberry Pi, Feather, etc. Then connect any I2C sensors you like to OUT side. Power is connected through - this isn't a power isolator, just a bus buffer. You can use 2.3 to 5.5V DC power and logic levels.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/411/medium800/adafruit_products_TCA4307_back.jpg?1626361970)

The chip can handle up to 400KHz I2C clock rates and even has stuck bus recovery: it automatically disconnects the bus if it detects either SDAOUT or SCLOUT are low for about 40 ms. Once the bus is disconnected, the device automatically generates up to 16 pulses on SCLOUT to attempt to reset the device which is holding the bus low.

There's also an extra ENable pin, if you want to disconnect the in and out sides, and a READY pin that will let you know if the peripheral is buffer-connected to the controller (and is safe to attempt communication).

![](https://cdn-learn.adafruit.com/assets/assets/000/103/402/medium800/adafruit_products_TCA4307_STEMMA_side.jpg?1626294357)

To get you going fast, we spun up a custom-made PCB in the [**STEMMA QT** form factor](https://www.adafruit.com/?q=stemma%20qt%20sensor "STEMMA QT form factor"), making it easy to interface with. The&nbsp;[STEMMA QT connectors](https://learn.adafruit.com/introducing-adafruit-stemma-qt/what-is-stemma-qt)&nbsp;on either side are compatible with the&nbsp;[SparkFun Qwiic](https://www.sparkfun.com/qwiic)&nbsp;I2C connectors. This allows you to make solderless connections between your development board and the TCA4307 or to chain it with a wide range of other sensors and accessories using a&nbsp;[**compatible cable**](https://www.adafruit.com/?q=stemma%20qt%20cable).&nbsp;[**QT Cables are not included** , but we have a variety in the shop](https://www.adafruit.com/?q=stemma+qt+cable&sort=BestMatch).&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/103/410/medium800/adafruit_products_TCA4307_top_angle.jpg?1626361957)

# Adafruit TCA4307 Hot-Swap I2C Buffer

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/103/417/medium800/adafruit_products_TCA4307_top.jpg?1626362356)

# Power Pins

This breakout requires between 2.3V and 5.5V, and can be easily used with most microcontrollers from an Arduino to a Feather or something else. Power is connected through to both sides - this board is not a power isolator.

- **VCC** - this is the power pin.&nbsp; To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V
- **GND** - common ground for power and logic

# Logic Pins

- **SCL** - I2C clock pin, connect to your microcontrollers I2C clock line. The logic level is the same as **VCC**.
- **SDA** - I2C data pin, connect to your microcontrollers I2C data line. The logic level is the same as **VCC**.
- **[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)&nbsp;-** These connectors allow you to connect to dev boards with **STEMMA QT** connectors or to other things with&nbsp;[various associated accessories](https://www.adafruit.com/?q=JST%20SH%204).

# Other Pins

- **EN** - This is the Enable input pin. Allows you to disconnect the in and out sides when pulled low
- **RDY** - This is the Ready output pin. It will let you know if the peripheral is buffer-connected to the controller (and is safe to attempt communication).

# Adafruit TCA4307 Hot-Swap I2C Buffer

## Wiring

Connecting up the TCA4307 is super simple. Simply include it between your microcontroller and your I2C sensor or breakout as shown below.

Here is how to wire it up using STEMMA QT:

- **Board 3V** &nbsp;to **TCA4307 in VIN**
- **Board GND** &nbsp;to&nbsp; **TCA4307 in GND**
- **Board SCL** &nbsp;to&nbsp; **TCA4307 in SCL**
- **Board SDA** &nbsp;to&nbsp; **TCA4307 in SDA**
- **TCA4307 out VIN** to **breakout VIN**
- **TCA4307 out GND** to **breakout GND**
- **TCA4307 out SCL** to **breakout SCL**
- **TCA4307 out SDA** to **breakout SDA**

![adafruit_products_TCA4307_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/447/medium640/adafruit_products_TCA4307_STEMMA_bb.jpg?1626380458)

Here is how to wire it up using a solderless breadboard:

- **Board 3V** &nbsp;to **TCA4307 in VIN**
- **Board GND** &nbsp;to&nbsp; **TCA4307 in GND**
- **Board SCL** &nbsp;to&nbsp; **TCA4307 in SCL**
- **Board SDA** &nbsp;to&nbsp; **TCA4307 in SDA**
- **TCA4307 out VIN** to **breakout VIN**
- **TCA4307 out GND** to **breakout GND**
- **TCA4307 out SCL** to **breakout SCL**
- **TCA4307 out SDA** to **breakout SDA**

![adafruit_products_TCA4307_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/448/medium640/adafruit_products_TCA4307_breadboard_bb.jpg?1626380637)

Now you're ready to hot--swap your I2C breakout or sensor!

# Adafruit TCA4307 Hot-Swap I2C Buffer

## Downloads

## Files

- [TCA4307 Datasheet](https://cdn-learn.adafruit.com/assets/assets/000/103/421/original/tca4307.pdf?1626362917)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-TCA4307-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20TCA4307.fzpz)

# Schematic
![](https://cdn-learn.adafruit.com/assets/assets/000/103/422/medium800/adafruit_products_TCA4307_sch.png?1626362978)

# Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/103/423/medium800/adafruit_products_TCA4307_fab_print.png?1626363001)


## Primary Products

### Adafruit TCA4307 Hot-Swap I2C Buffer with Stuck Bus Recovery

[Adafruit TCA4307 Hot-Swap I2C Buffer with Stuck Bus Recovery](https://www.adafruit.com/product/5159)
As we've been adding &nbsp;[STEMMA QT connectors](https://learn.adafruit.com/introducing-adafruit-stemma-qt/what-is-stemma-qt) to our breakouts and dev boards, folks have been really enjoying the simplicity and speed of plugging in I2C sensors and devices for quick iteration and...

In Stock
[Buy Now](https://www.adafruit.com/product/5159)
[Related Guides to the Product](https://learn.adafruit.com/products/5159/guides)

## Related Guides

- [Working with I2C Devices](https://learn.adafruit.com/working-with-i2c-devices.md)
- [Adafruit nRF52 Pro Feather with Mynewt](https://learn.adafruit.com/adafruit-nrf52-pro-feather.md)
- [Adafruit I2C QT Rotary Encoder](https://learn.adafruit.com/adafruit-i2c-qt-rotary-encoder.md)
- [Adafruit TMAG5273 3D Hall Effect Magnetometer Breakout](https://learn.adafruit.com/adafruit-tmag5273-3d-hall-effect-magnetometer-breakout.md)
- [Adafruit TDK InvenSense ICM-20948 9-DoF IMU](https://learn.adafruit.com/adafruit-tdk-invensense-icm-20948-9-dof-imu.md)
- [4x4 Rotary Encoder MIDI Messenger](https://learn.adafruit.com/4x4-rotary-encoder-midi-messenger.md)
- [Adafruit CH334F Mini USB Hub Breakouts](https://learn.adafruit.com/adafruit-ch334f-mini-4-port-usb-hub-breakout.md)
- [Adafruit SPI FLASH Breakouts](https://learn.adafruit.com/adafruit-spi-flash-breakouts.md)
- [Adafruit HDC302x Precision Temperature & Humidity Sensor](https://learn.adafruit.com/adafruit-hdc3021-precision-temperature-humidity-sensor.md)
- [MacroPad Summer Olympics Hotkeys](https://learn.adafruit.com/macropad-olympic-hotkeys.md)
- [Adafruit CH552 QT Py](https://learn.adafruit.com/adafruit-ch552-qt-py.md)
- [Analog Devices ADT7410 Breakout](https://learn.adafruit.com/adt7410-breakout.md)
- [NES Emulator for Arcada](https://learn.adafruit.com/nes-emulator-for-arcada.md)
- [Adafruit VCNL4040 Proximity Sensor](https://learn.adafruit.com/adafruit-vcnl4040-proximity-sensor.md)
- [Adafruit TCA4307 Hot-Swap I2C Buffer](https://learn.adafruit.com/adafruit-tca4307.md)
