The Adafruit Standalone 5-Pad Capacitive Touch Sensor Breakout - AT42QT1070 is a versatile and user-friendly breakout board that incorporates a capacitive touch sensor controller capable of detecting touch inputs on up to five individual pads. This component is ideal for adding touch input functionality to a wide range of electronic projects, including interactive installations, custom keyboards, and control panels. Its ease of use and small form factor make it suitable for hobbyists and professionals alike.
Pin Number | Name | Description |
---|---|---|
1 | VDD | Power supply (2.0V to 5.5V) |
2 | GND | Ground connection |
3 | SDA | I2C Data line |
4 | SCL | I2C Clock line |
5 | OUT | Interrupt output (active low) |
6-10 | KEY0-KEY4 | Capacitive touch input pads |
#include <Wire.h>
// AT42QT1070 I2C address
#define AT42QT1070_I2C_ADDR 0x1B
// Register addresses
#define KEY_STATUS 0x03
void setup() {
Wire.begin(); // Initialize I2C
Serial.begin(9600); // Start serial communication
}
void loop() {
Wire.beginTransmission(AT42QT1070_I2C_ADDR);
Wire.write(KEY_STATUS); // Point to the key status register
Wire.endTransmission();
Wire.requestFrom(AT42QT1070_I2C_ADDR, 1); // Request 1 byte
if(Wire.available()) {
byte status = Wire.read(); // Read the key status
Serial.print("Touch Status: ");
Serial.println(status, BIN); // Print the status in binary format
}
delay(100); // Wait for 100 ms
}
Q: Can I use this sensor with a 3.3V microcontroller? A: Yes, the AT42QT1070 can operate at voltages as low as 2.0V, making it compatible with 3.3V systems.
Q: How do I calibrate the touch sensitivity? A: The AT42QT1070 has built-in calibration capabilities. Refer to the datasheet for detailed calibration procedures.
Q: What should I do if the I2C communication is not working? A: Check the connections and ensure that the correct pull-up resistors are in place. Also, verify that no other device on the I2C bus has a conflicting address.
Q: Can I use the OUT pin without an interrupt on my microcontroller? A: Yes, the OUT pin can be polled in your main loop to detect touch events, but using it as an interrupt allows for more efficient and responsive designs.
Remember to consult the AT42QT1070 datasheet for more detailed information and advanced configurations.