The KX134 is a high-performance, low-power 3-axis accelerometer designed by Kionix, a subsidiary of ROHM Semiconductor. This sensor is capable of measuring acceleration with a full-scale range of ±8g, ±16g, ±32g, and ±64g. It is commonly used in applications such as motion detection, vibration monitoring, and dynamic orientation detection in devices like smartphones, gaming controllers, and vehicle navigation systems.
Pin Number | Pin Name | Description |
---|---|---|
1 | VDD | Power supply voltage |
2 | GND | Ground |
3 | SCL/SPC | Serial Clock for I2C/SPI Clock |
4 | SDA/SDI | Serial Data for I2C/SPI Data Input |
5 | SDO | SPI Data Output (optional) |
6 | CS | Chip Select for SPI (active low) |
7 | INT1 | Interrupt 1 (configurable) |
8 | INT2 | Interrupt 2 (configurable) |
#include <Wire.h>
// KX134 I2C address (assuming SDO pin is connected to GND)
const int KX134_I2C_ADDRESS = 0x1E;
void setup() {
Wire.begin(); // Initialize I2C
Serial.begin(9600); // Start serial communication at 9600 baud rate
// Setup KX134 (write appropriate configuration registers)
// This is a placeholder for actual configuration code
}
void loop() {
// Read acceleration data from KX134
// This is a placeholder for actual data reading code
// Process and output the acceleration data
// This is a placeholder for actual data processing and output
}
Note: The above code is a template and does not include specific register addresses or data processing. Users must refer to the KX134 datasheet for detailed register descriptions and configure the device accordingly.
Q: Can the KX134 operate in both I2C and SPI modes? A: Yes, the KX134 can operate in either I2C or SPI mode, but the mode must be selected correctly through the pin connections and configuration settings.
Q: What is the purpose of the INT1 and INT2 pins? A: These pins can be configured to output interrupt signals for various events such as motion detection, free-fall, or data ready notifications.
Q: How do I change the sensing range of the KX134? A: The sensing range can be changed by writing to the appropriate configuration registers. Refer to the datasheet for the specific register settings.
Q: Is the KX134 suitable for battery-powered applications? A: Yes, with its low-power consumption in standby and operating modes, the KX134 is suitable for battery-powered applications.
For more detailed information, please refer to the KX134 datasheet provided by Kionix.