You are on page 1of 7

AN001

DMT Application Note Rev1, 06/2010

Application Circuit Examples and Basic Operations of DMARD03

Introduction
This application note serves as a jump start for customers to quickly apply DMT's DMARD03 for field
test. Application circuit examples and basic operations and settings under several scenarios are
presented as a hint for further customization. DMARD03 has the configuration flexibility to meet user's
demand in various situations. Please refer to the DMARD03 datasheet for more information.

Application Circuit Examples


This section provides recommendation for wiring the DMARD03 to a typical MCU. Specific
applications may need further modifications. Please refer to the DMARD03 datasheet for more
information.

Using I2C Interface


In I2C mode, DMARD03 has the option of selecting one of two slave addresses by setting SDO
(pin#17) to high or low. Figure 1 and Figure 2 show the schematic examples of setting the slave
address to 38h and 3Ah respectively.

Figure 1: I2C schematic example: slave address 38h

Figure 2: I2C schematic example: slave address 3Ah

On the MCU side, in addition to I2C's SCL and SDA pins, 3 extra GPIOs are shown: 2 are for the

1
© Domintech Co., Ltd., 2010. All right reserved.
AN001
DMT Application Note Rev1, 06/2010
g-sensor interrupt signals and 1 for the g-sensor enable (CE). These three GPIOs are optional. They
serve as a full control and usage of the DMARD03's functionalities. The interrupt pins (pin#6, #18) can
be left floating if the built-in interrupt functions are not used. In the situation that the power
consumption is not a major concern, D03 can be hard-wired to normal working mode by connecting
the enable pin (pin#12) to VCC. Such minimum configuration is shown in Figure 3, where only the
SCL/SDA IOs of MCU are present.

Figure 3: I2C schematic example: slave address 38h, minimum MCU


configuration with 2-wire I2C interface only

In another case the MCU may operate at a different lower voltage level than DMARD03. D03 can
operate at voltage range from 2.4 to 3.6 V while supporting interface voltage from 1.7 to 3.6 V. If the
MCU is operating at lower voltage than 2.4V, which is the minimum operation voltage of D03, we may
refer to the Figure 4 for such different operating voltage configuration.

Figure 4: I2C schematic example: slave address 38h, DMARD03


and MCU has different operation voltage

Using SPI Interface


DMARD03 supports a 4-wire SPI slave interface, as shown in the Figure 5 the schematic example.
On the MCU side, in addition to SPI's 4 pins, 3 extra GPIOs are shown: 2 are for the g-sensor interrupt
signals and 1 for the g-sensor enable (CE). These three GPIOs are optional. They serve as a full
control and usage of the DMARD03's functionalities. The interrupt pins (pin#6, #18) can be left floating
if the built-in interrupt functions are not used. In the situation that the power consumption is not a major
concern, D03 can be hard-wired to normal working mode by connecting the enable pin (pin#12) to
2
© Domintech Co., Ltd., 2010. All right reserved.
AN001
DMT Application Note Rev1, 06/2010
VCC. Such minimum configuration is shown in Figure 6, where only SPI IOs of MCU are present.

Figure 5: SPI (4-wire) schematic example

Figure 6: SPI (4-wire) schematic example: minimum MCU


configuration with SPI interface only

In another case the MCU may operate at a different lower voltage level than DMARD03. D03 can
operate at voltage range from 2.4 to 3.6 V while supporting interface voltage from 1.7 to 3.6 V. If the
MCU is operating at lower voltage than 2.4V, which is the minimum operation voltage of D03, we may
refer to the Figure 7 for such different operating voltage configuration.

Figure 7: SPI (4-wire) schematic example: DMARD03


and MCU have different operation voltage

3
© Domintech Co., Ltd., 2010. All right reserved.
AN001
DMT Application Note Rev1, 06/2010
In some case there may be only 3-wire SPI master available at MCU. Although D03 does not
support 3-wire SPI directly, the wiring is still possible as illustrated in the Figure 8. Note it is advised to
double check the timing for possible delay because of the bridge resistance.

Figure 8: SPI (3-wire) schematic example

Basic Operations
Standby to Normal Mode Initialization
The initialization steps of DMARD03 are summarized in the follows. Please note when D03 returns
from the standby mode to the normal operation, all registers are restored to the default values.

1. Enable D03 to the normal operation by set enable pin (pin#12) to high. All registers are restored
to the default values.

2. Set appropriate sampling mode: the default mode is of ADC sampling frequency 342 Hz and
moving average order 8. User may change the sampling frequency and moving average order by
properly setting the register bits 08h[2:0]. Please refer to Table 1 and Table 2 (reproduced from
Table 6 and 7 of D03 datasheet) for possible setup values.

Tms Sampling Period Sampling Frequency


(08h: bit2) (ms) (Hz)
0 2.925 342
1 1.462 684
Table 1: Sampling Period Table

N[1] N[0]
Average Order
(08h: bit1) (08h: bit0)
0 0 8
0 1 4
1 0 2
1 1 1
Table 2: Moving Average Length Table

4
© Domintech Co., Ltd., 2010. All right reserved.
AN001
DMT Application Note Rev1, 06/2010
Reading Accelerations
DMARD03 senses the acceleration and converts it to an 11-bit value to be stored across two register
bytes. Data representation is 2's compliment, i.e. the MSB is the sign bit. Users may get the
acceleration by reading the data registers. The data register map is shown in the Table 3.

Table 3: Data Register Map

User can get continuous acceleration readings by continuous polling DMARD03 data registers.
Please note D03 does not support data-ready interrupt, so the continuous timing must be implemented
at the MCU side.

The acceleration reading procedure is summarized below.

1. Read data registers 02h~07h for XYZ acceleration

2. Combine two bytes to get the 11-bit acceleration representation, Table 4

3. 2's complement conversion of the 11-bit value to get XYZ acceleration in code, see Figure 9
examples

4. Divide the acceleration in code by 256 to get the acceleration in g (1g = 9.8m/s2)

Table 4: 11-bit Acceleration Representation from Two Register Bytes

Table 5: Examples of the Acceleration 11-bit Data to Code Conversion

5
© Domintech Co., Ltd., 2010. All right reserved.
AN001
DMT Application Note Rev1, 06/2010
Typical Acceleration Readouts
Typical acceleration readings when the device positions in the 6 stationary orientations are shown in
the Figure 9. Please notice that users may observe different values from the typical readouts. That
may indicate the presence of the zero-g offset. For the zero-g offset effect, please refer to AN002 for
more information.

Figure 9: Typical Readouts from 6 Stationary Orientations

6
© Domintech Co., Ltd., 2010. All right reserved.
AN001
DMT Application Note Rev1, 06/2010
Document History and Modification

Revision No. Date

Rev1 2010/06

7
© Domintech Co., Ltd., 2010. All right reserved.

You might also like