Skip to main content

ADXL 355 Accelerometer

A few days ago I went to get components for a project I was building. and came across a 3-axis accelerometer. So I decided to test it and make a post to give you an idea of things work and how you can use it.
ADXL 355


                 


The accelerometer I have is ADXL 355 v2.0 board. there is are 5 headder pins, ground, 5V supply, X-axis output,Y-axis output and Z-axis output. It is quite compact. The one I have measured around 15mm x 15mm. These sensors are low cost. And can be incorporated in Projects or robots we build. The ADXL 355 board I have has an onboard Red led (smd) for the indication of power. The accelerometer has a wide range of applications. ADXL 355 is a basic accelerometer which gives analog values for all the three axis depending upon the position of the IC. ADXL 345 is an advanced accelerometr which can detect free-fall,activity,tap,double tap and communicates via I2C. The ADXL is a a ultra-lowpower as it consumes only 25 uA in measurement mode. the ADXL 355 IC alone requires an iput between the range 1.8 V - 3.6 V only. I hooked up the ADXL 355 to the ARDUINO to read those analog values.

Code:
/*
 ADXL355/3xx
 Reads an Analog Devices ADXL355/xx accelerometer and communicates the
 acceleration to the computer


The pin connectioms:

 analog 0: accelerometer self test pin
 analog 1: z-axis
 analog 2: y-axis
 analog 3: x-axis
 analog 4: Vcc
 analog 5: ground

*/

const int vcc = 18;          
const int gnd = 19;              
const int x = A3;                
const int y = A2;                  
const int z= A1;                

void setup()
{

  Serial.begin(9600);

  pinMode(vcc, OUTPUT);
  pinMode(gnd, OUTPUT);
  digitalWrite(gnd, LOW); 
  digitalWrite(vcc, HIGH);

}

void loop()
{

  Serial.print(analogRead(x)); 
  Serial.print("\t");
  Serial.print(analogRead(y));
  Serial.print("\t");
  Serial.print(analogRead(z));
  Serial.println();

  delay(200);
}

upload the code to the arduino.
now open the serial monitor and read the analog values.

you can connect the sensor to the rasperry pi also. I am planning to interface the accelerometer to the rasperry pi and make the screen rotate depending upon the direction the board is placed. We can make sensors to measure angle, inclination etc. Your imagination is the limit to the possibilities you can do with this.I am working on a new project using the accelerometer, come back again and check for new posts to see the developments and get an idea for your next project.

Comments

Popular posts from this blog

Switch debouncer using SR Latch

We use switch in our day to day life to switch ON/OFF a bulb or a fan or  any electrical devices. But when we use switches in digital circuits, we observe a phenomenon called bouncing. This occurs because, when we turn the switch, the mechanical parts vibrate. i.e It toggles between ON and OFF state for some time until the mechanical contact attain equilibrium. this vibrations are minute and are not at all noticeable in electrical circuit. where as in digital circuits, these vibrations create pulses. which are detected by circuits which results in an error.               In the above circuit, there is a switch connected to VCC. You can toggle it between terminal 'a' and terminal 'b'. which as a voltage drop of 'Va' and 'Vb' respectively. In digital circuits if you can observe, it takes a finite amount of time to toggle between terminal 'a' and 'b'. which might approximately take 15ns. Now let us consider the terminal is at 'a'. we...

Latch using JK Flip Flop

In this post we will learn how to use JK flip flop as a latch. i.e. for one pulse, the circuit continues to stay in the ON state until the next pulse. and the circuit continues to be in the OFF state till the next pulse. This can be achieved by using toggle mode in JK flip flop. TRUTH TABLE: IC 7476 J       k       set '      reset'        Q      Q' 1       1        1            1               Toggle IC CD4026 J       k       set       reset         Q      Q' 1       1        0           0               Toggle Note: Set is referred as PRE or preset. Reset is referred as CLR or clear. Refer the Datasheet of the JK flip flop you are using ...