Sensing Low-g Acceleration Using the ADXL345 Digital Accelerometer Connected to the ADuC7024 Precision Analog Microcontroller (cn0133)
The ADXL345 is a small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement up to ±16 g. Digital output data is formatted as 16-bit twos complement and is accessible through either an SPI (3- or 4-wire) or I2C digital interface.
The ADXL345 is well suited for mobile device applications. It measures the static acceleration of gravity in tilt-sensing appli-cations, as well as dynamic acceleration resulting from motion or shock. Its high resolution (4 mg/LSB) enables measurement of inclination changes of about 0.25°. Using a digital output accelerometer such as the ADXL345 eliminates the need for analog-to-digital conversion, reducing system cost and real estate. Additionally, the ADXL345 includes a variety of built-in features. Activity/inactivity detection, tap/double-tap detection, and free-fall detection are all done internally with no need for the host processor to perform any calculations. A built-in 32-stage FIFO memory buffer reduces the burden on the host processor, allowing algorithm simplification and power savings. Additional system level power savings can be implemented using the built-in activity/inactivity detection and by using the ADXL345 as a “motion switch” to turn the whole system off when no activity is felt and on when activity is sensed again.
The ADXL345 communicates via I2C or SPI interface. The circuits described in this document demonstrate how to implement communication via these protocols.
Figure 1. ADXL345 and ADuC7024 in 4-Wire SPI Configuration (Simplified Schematic: Decoupling and All Connections Not Shown)
Figure 2. ADXL345 and ADuC7024 in I2C Configuration (Simplified Schematic: Decoupling and All Connections Not Shown)
Схемы и диаграммы
Быстро получите общее представление о схемотехнике решения