How to connect a Accelerometer MMA7631 to Raspberry Pi

This project uses a MMA7631 Accelerometer Board and ADS1115 A/D Converter.

The MMA7361L is a low power, low profile capacitive micromachined accelerometer featuring signal conditioning, a 1-pole low pass filter, temperature compensation, self test, 0g-Detect which detects linear freefall, and g-Select which allows for the selection between 2 sensitivities. Zero-g offset and sensitivity are factory set and require no external devices. The MMA7361L includes a Sleep Mode that makes it ideal for handheld battery powered electronics.

Accelerometer Board Pins are VCC(5V or 3.3V),GND,X, Y, and Z analog Output.
ADS1115 is an Analog to Digital Converter 16-Bit – 4-Kanal with PGA.

  1. On raspberry Pi install Adafruit ADS1x15 Library
  2. On Raspberry Pi Create a directory
  3. downloadchartlib  MMA7631_Accelerometer  RotaryKnobLib and unzip them in that folder
  4. you will see two files rotarylib.py and Test_RotaryEncoder
  5. On Raspberry Pi under Menu Programming select Thonny Python IDE
  6. from menu file open file MMA7631_Accelerometer.py
  7. Connect MMA7631 to ADS1x15 Board
  8. run the Python file


download:  chartlib MMA7631_Accelerometer RotaryKnobLib MMA7361L MMA7631_Accelerometer Fritzing

 

Leave a Reply

Your email address will not be published. Required fields are marked *