The Level Shifter Breakout STEMMA QT (Adafruit 5637) is a compact and versatile level shifter breakout board designed to facilitate communication between devices operating at different logic voltage levels. It is particularly useful for interfacing 3.3V logic devices with 5V logic devices, ensuring compatibility and reliable data transfer. The board features a bi-directional level shifting circuit and includes STEMMA QT connectors for easy plug-and-play integration.
The Adafruit 5637 breakout board has the following pinout:
Pin Name | Description |
---|---|
VIN | Power input for the high-side voltage (typically 5V). |
GND | Ground connection. |
LV | Power input for the low-side voltage (typically 3.3V). |
HV | High-side voltage reference for level shifting (connect to VIN). |
A1, A2, A3, A4 | Low-side logic pins for bi-directional level shifting. |
B1, B2, B3, B4 | High-side logic pins corresponding to A1, A2, A3, and A4. |
STEMMA QT IN | I2C input connector for easy daisy-chaining with other STEMMA QT devices. |
STEMMA QT OUT | I2C output connector for chaining additional devices. |
Power Connections:
Logic Connections:
STEMMA QT Integration:
Below is an example of how to use the Adafruit 5637 to interface a 3.3V sensor with a 5V Arduino UNO via I2C.
#include <Wire.h>
// I2C address of the 3.3V sensor
#define SENSOR_ADDRESS 0x40
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Start serial communication for debugging
// Check if the sensor is connected
Wire.beginTransmission(SENSOR_ADDRESS);
if (Wire.endTransmission() == 0) {
Serial.println("Sensor detected!");
} else {
Serial.println("Sensor not detected. Check connections.");
}
}
void loop() {
// Example: Read data from the sensor
Wire.beginTransmission(SENSOR_ADDRESS);
Wire.write(0x00); // Command to read data (depends on the sensor)
Wire.endTransmission();
Wire.requestFrom(SENSOR_ADDRESS, 2); // Request 2 bytes of data
if (Wire.available() == 2) {
int data = Wire.read() << 8 | Wire.read(); // Combine two bytes
Serial.print("Sensor Data: ");
Serial.println(data);
}
delay(1000); // Wait 1 second before the next read
}
No Communication Between Devices:
I2C Devices Not Detected:
Unstable or Intermittent Communication:
Q: Can I use this board for SPI communication?
A: Yes, the Adafruit 5637 supports SPI communication. Connect the SPI lines (MOSI, MISO, SCK, CS) to the appropriate A and B pins.
Q: What is the maximum data rate supported?
A: The board supports data rates up to 400kHz for I2C and similar speeds for other protocols, depending on the circuit design.
Q: Can I daisy-chain multiple level shifters?
A: Yes, you can daisy-chain multiple level shifters using the STEMMA QT connectors for I2C communication.
Q: Is this board compatible with 1.8V logic?
A: Yes, the board supports logic levels as low as 1.8V on the low side. Ensure proper voltage is supplied to the LV pin.