3-axis-accelerometer DMARD03

Well i sometime buy stuff from dealextreme (mostly adruino stuff) but there is an problem. I mean it does get schipped to the Netherlands no problems with that, but there no manuals attached ;-).

In this case its a 3 axis accelerometer:

On the chip is says:

But its name is:

Its only 7 dollars so a bought it 🙂 but how to hook it up to an arduino ? i had now idea after some googleing (is that a word) i found a blog (in chinese) from Cooper Maa that uses the same chip that was on my board and even better had a nice little library (thanks) and diagram. It was not Arduino 1.0 ready but that was a easy fix. With help from the data sheet i could make it work on my board.

Diagram below (not sure about the 3V3 voltage hookup i think it needs a level shifter like a 74 HC 4050 , but it seems to work, again not invented here 😉):

Program (also included in de lib) (again not my work but from Cooper Maa):

 * DMT_G_Sensor.pde:  DMARD03 

#include                 //  DMARD03 

                                    // DMARD03  gSensor 
DMARD03 gSensor(2, 3);            // dataPin = 2, clockPin = 3

void setup()
  Serial.begin(9600);                //  Serial port,  9600 bps

void loop()
  DMARD03_results results;          //  DMARD03_results  result 
  gSensor.readXYZ(results);         // (Accerleration) 
  // X, Y,Z  (Accerleration)  Serial Port
  Serial.print("X = "); Serial.print(results.X); Serial.print(", ");
  Serial.print("Y = "); Serial.print(results.Y); Serial.print(", ");
  Serial.print("Z = "); Serial.println(results.Z);  


Sources for the Arduino lib:
DMARD03 Datasheet V2.3
Original blog post that helpt me a lot:

2 thoughts on “3-axis-accelerometer DMARD03

  1. Den

    Nice. Simple and straightforward. One question – what does Z axis measure? X axis measure tilt angle forward/backward, Y axis measure tilt angle left/right, but does Z axis measure rotation angle clockwise/countercw or rising up/lowering down?


Leave a Reply