The Adafruit TLV493D is a compact 3-axis magnetic sensor module capable of sensing magnetic fields in three dimensions. It is based on the TLV493D-A1B6 magnetic sensor chip from Infineon Technologies, which offers high precision and low power consumption. This module is ideal for applications such as position tracking, compassing, and gesture detection. It communicates with microcontrollers like the Arduino UNO via the I2C interface, making it a versatile component for hobbyists and professionals alike.
Pin Number | Name | Description |
---|---|---|
1 | VDD | Power supply (2.7V to 3.6V) |
2 | GND | Ground connection |
3 | SDA | I2C Data line |
4 | SCL | I2C Clock line |
5 | ADDR | I2C Address selection (connect to GND or VDD) |
6 | SDAI | Interrupt (not used in default operation) |
#include <Wire.h>
#include <Adafruit_TLV493D.h>
// Create sensor instance
Adafruit_TLV493D tlv = Adafruit_TLV493D();
void setup() {
Serial.begin(9600);
// Wait for serial monitor to open
while (!Serial) { delay(10); }
// Initialize the sensor
if (!tlv.begin()) {
Serial.println("Failed to find TLV493D sensor");
while (1) { delay(10); }
}
Serial.println("TLV493D sensor found!");
}
void loop() {
tlv.read(); // Read the sensor
// Print out the X, Y, and Z axis values
Serial.print("X: "); Serial.print(tlv.x, 4); Serial.print(" mT");
Serial.print("\tY: "); Serial.print(tlv.y, 4); Serial.print(" mT");
Serial.print("\tZ: "); Serial.print(tlv.z, 4); Serial.println(" mT");
delay(500); // Delay between readings
}
Q: Can the TLV493D sensor be used with a 5V microcontroller? A: Yes, but ensure that the sensor's VDD is connected to a 3.3V supply, and use level shifters for the I2C lines if the microcontroller operates at 5V.
Q: How can I change the I2C address of the sensor? A: The I2C address can be changed by connecting the ADDR pin to either GND or VDD.
Q: What is the default I2C address of the TLV493D? A: The default I2C address is 0x5E when the ADDR pin is connected to GND.
Q: How do I calibrate the sensor? A: Calibration procedures can vary; refer to the TLV493D datasheet for detailed instructions.
For further assistance, consult the Adafruit TLV493D datasheet and the support forums.