ablab

Hello Readers, welcome to my Blog - A Blog For Bloggers By A Blogger. I'm Arun, an entrepreneur Blogger from India.

3-axis Accelerometer Sensor-ADXL335 Interfacing with ATmega16

16603
2
Mark as Favourite

ADXL335 accelerometer sensor is a MEMS (Microelectromechanical systems) sensor which can measure static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion, shock, or vibration. The accelerometer sensor is used in mobile devices, gaming systems, disk drive protection, image stabilization, sports devices, health devices and etc. The analog outputs are ratio metric: that means that 0g measurement output is always at half of the 3.3V output (1.65V), -3g is at 0V and 3g is at 3.3V with full scaling in between. The ADXL335 accelerometer sensor gives three analog output values which correspond to three coordinate axes: – x-axis, y-axis and z-axis values.

In this project, we will learn How to interface a 3-axis accelerometer sensor-ADXL335 with AVR ATmega16 microcontroller. Here, we will measure the tilt of the accelerometer sensor or the material to which the accelerometer sensor is attached and we will display the three outputs of accelerometer sensor in a 16X2 alphanumeric LCD. But, the three outputs of 3-axis accelerometer sensor are analog in nature and microcontroller cannot process the analog signal directly. So, first it will convert the three analog outputs of ADXL335 accelerometer sensor to digital values using its analog to digital converter and then it will display the three converted digital values in the 16X2 alphanumeric LCD. Now, we will tilt the accelerometer sensor or the material to which the sensor is attached in different direction and we will see the changes in its output values in the 16×2 alphanumeric LCD.

Softwares Required

Hardwares Required

Name Quantity
AVR Trainer Board-100 with ATmega16 1pc
AVR USB Programmer 1pc
12V, 1A DC SMPS Adaptor 1pc
3-axis Accelerometer Sensor 1pc
RG1602A 16X2 Alphanumeric LCD Green 1pc
5 to 5 Connector-Female to Female-1 Meter 1pc
1 to 1 Connector-Female to Female 3pc
10 to 10 FRC Female to Female Connector 2pc

Circuit Diagram

Video

Connection Guide

The step-by-step connection guide for 3-axis Accelerometer Sensor-ADXL335 Interfacing with ATmega16 is as follows

  • Steps - 1 ( 0f 9 )

    Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

  • Steps - 2 ( 0f 9 )

    Connect PortB header with LCD data header in AVR Trainer Board-100 with a 10 to 10 FRC Female Connector.

  • Steps - 3 ( 0f 9 )

    Connect RS, RW & EN pins of LCD control header with PD0, PD1 & PD2 pins of PortD header respectively in AVR Trainer Board-100 with 1 to 1 Connectors.

  • Steps - 4 ( 0f 9 )

    Connect the 16X2 Alphanumeric LCD to the LCD header of AVR Trainer Board-100.

  • Steps - 5 ( 0f 9 )

    Connect the X, Y, Z, VCC and GND pins of 3-axis Accelerometer Sensor header with PA0, PA1, PA2, +5V and GND pins of PortA header of AVR Trainer Board-100 with 5 to 5 Connector.

  • Steps - 6 ( 0f 9 )

    Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

  • Steps - 7 ( 0f 9 )

    Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-AF Cable.

  • Steps - 8 ( 0f 9 )

    Switch on the power with the help of Power Switch of AVR Trainer Board-100.

  • Steps - 9 ( 0f 9 )

    Download 3-axis Accelerometer Sensor-ADXL335 Interfacing with ATmega16 Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

  • Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

    Steps - 1 ( 0f 9 )

  • Connect PortB header with LCD data header in AVR Trainer Board-100 with a 10 to 10 FRC Female Connector.

    Steps - 2 ( 0f 9 )

  • Connect RS, RW & EN pins of LCD control header with PD0, PD1 & PD2 pins of PortD header respectively in AVR Trainer Board-100 with 1 to 1 Connectors.

    Steps - 3 ( 0f 9 )

  • Connect the 16X2 Alphanumeric LCD to the LCD header of AVR Trainer Board-100.

    Steps - 4 ( 0f 9 )

  • Connect the X, Y, Z, VCC and GND pins of 3-axis Accelerometer Sensor header with PA0, PA1, PA2, +5V and GND pins of PortA header of AVR Trainer Board-100 with 5 to 5 Connector.

    Steps - 5 ( 0f 9 )

  • Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

    Steps - 6 ( 0f 9 )

  • Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-AF Cable.

    Steps - 7 ( 0f 9 )

  • Switch on the power with the help of Power Switch of AVR Trainer Board-100.

    Steps - 8 ( 0f 9 )

  • Download 3-axis Accelerometer Sensor-ADXL335 Interfacing with ATmega16 Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

    Steps - 9 ( 0f 9 )

Downloads

3-axis Accelerometer Sensor-ADXL335 Interfacing with ATmega16 Project File
  • 186 downloads 0 Kb

Post a Comment

    • AsmarKhan
      your ADC.h file has some error please correct it
      2017-06-21 16:03:07
      Reply
      • Arun Kumar Garg

        Plz let us know the error so that we can correct it.

        2017-07-05 16:57:52
        Reply
    • AsmarKhan
      your ADC.h file has some error please correct it
      2017-06-21 16:03:07
      Reply