Introduction: How to Wire the KIONIX SPI/i2C- KX224 1053 Tri-axis Digital Accelerometer

About: something about yourself so our community can get to know you! ??

The KX224 1053 is a microelectromechanical ±8g, ±16g or ±32g Tri-axis Digital Accelerometer an integrated 2048-byte buffer chip, with orientation directional tap, double-tap, movement detection, and free-fall sensing. The KX224 algorithm is developed and fabricated by KIONIX plasma micromachining process technology. The KX224-1053 sensing is based on the principle of a differential capacitance from the acceleration-induced motion of the sense element which is additionally utilized by mode cancellation to decrees errors from process variation, temperature, and environmental stress. however, an integrated separate ASIC (Application-specific integrated circuit) sensing package inside of the chip provides a signal conditioning and intelligent user-programmable application that can sense any variations.

ASIC Integration This integrated ASIC (Application-specific integrated circuit) device is responsible for sensing all the signal conditioning and communication with the sensor. The complete measurement chain is composed of a low-noise capacitance to the voltage amplifier which converts the differential capacitance of the MEMS (Micro-Electro-Mechanical Systems) sensor into an analog voltage that it will send through the analog-to-digital converter. The acceleration will be accessed through SPI or I2C communication provided by the ASIC (Application-specific integrated circuit). Also, the ASIC contains all the logic that enables you to choose the data rates, g-ranges, filter settings, interrupt logic, and the two programmable state machines which allow you to create a unique embedded function based on variations, changes in accelerations. KX224-1053 Working Voltage

This chip works on 1.7v to 3.6v DC. However, this sensor requires a regulator for constant internal operating voltage over the range of input supply voltage. This will occur in a stable operating characteristic over the range of the input supply voltages. This device communicates with i2c or SPI protocol used for communication through the chip orientations such as directional tap, double-tap, and free-fall detection and any activity monitoring sensing. The KX224-1053 can be used in automotive applications, home appliances, industrial equipment, automation, robotics, drones, or any devices that need movement sensing. For more technical details please refer to the datasheet below. Particularly for the protocol communication address.The Diagram below is using ATMEGA4809 development board. however, you can also implement the diagram using SONY ESPRESENSE, ESP82, ESP32, NodeMCU, ESPDuino, Teensy 3, MSP430 Launchpad, Flora, Metro, Trinket, Pro Trinket, please note that each development board has its different pin-out mapping.

Step 1: Required Components & Alternatives

SONY SPRESENSE Development BoardPlease refer to this linkESPRESSIF ESP8266 12, 12E, ESP32, ESP8266 NodeMCU, ESPDuinoMicrochipATMEGA4809 Curiosity Nano, ChipKIT DP32, chipKIT WF32,ARDUINOMKR WAN, MK, MKR, PRO, FIO, NANO, EVERY, UNO, MINI, MEGA, PRO MINI, LEO, BT, DUE, ETHERNET,LILYPAD, ATMEGA328 16/12, ATMEGA32u4 16/8/ MHz, ESP8266,ATMEGA250 16 MHz, ATSAM3x8E, STM32,Note: For AVR (please see the flash size of the MCU and respective pin-outs & bus configuration )Note: The Diagram below is using ATMEGA328TQFP & ATMEGA4809. (please refer to each MCU’s respective pin-outs & bus configuration)OthersTeensy 3, MSP430 Launchpad, Flora, Metro, Trinket, Pro Trinket, LinkItOne.KIONIX KX224 Tri-axis Digital Accelerometer Sensor or ModuleResistors (See below-required values)Capacitor(See below-required values)

Step 2: Required Components & Alternatives

#include
#include KX224 KXSENSE(KX224_DEVICE_ADDRESS_1E); void setup() { byte rc; Serial.begin(9600); Serial.println("14CORE | KX224 Test Code"); Serial.prinln("initializing ............"); delay(2000); while (!Serial); Wire.begin(); rc = KXSENSE.init(); if (rc != 0) { Serial.println(F("Initialization failed. Check data com")); delay(500); Serial.flush(); } } void loop() { byte rc; float acc[3]; rc = KXSENSE.get_val(acc); if (rc == 0) { Serial.write("(X) Value = "); Serial.print(acc[0]); Serial.println(" [g]"); Serial.write("(Y) Value = "); Serial.print(acc[1]); Serial.println(" [g]"); Serial.write("(Z) Value = "); Serial.print(acc[2]); Serial.println(" [g]"); Serial.println(); } delay(500);

}

* You can download the source here & the Source Code Library

* For the KX224 KXSENSE Technical Details and Datasheet please refer it here.