Joy-IT SEN-MMA5482Q 3 Axsis Digital Acceleration Sensor Module Instruction Manual
- June 4, 2024
- JOY-It
Table of Contents
- GENERAL INFORMATION
- COMMISSIONING WITH THE RASPBERRY PI
- Distributed with a free-will license.
- Use it any way you want, profit or free, provided it fits in the licenses of
- associated works.
- Get I2C bus
- MMA8452Q address, 0x1D(28)
- Select Control register, 0x2A(42)
- 0x00(00) StandBy mode
- MMA8452Q address, 0x1D(28)
- Select Control register, 0x2A(42)
- 0x01(01) Active mode
- MMA8452Q address, 0x1D(28)
- Select Configuration register, 0x0E(14)
- 0x00(00) Set range to +/- 2g
- MMA8452Q address, 0x1D(28)
- Read data back from 0x00(0), 7 bytes
- Status register, X-Axis MSB, X-Axis LSB, Y-Axis MSB, Y-Axis LSB, Z-Axis MSB,
- Convert the data
- Output data to screen
- COMMISSIONING WITH THE ARDUINO
- ADDITIONAL INFORMATION
- SUPPORT
- Documents / Resources
SEN-MMA5482Q 3-Axis Digital
Acceleration Sensor Module
Instruction Manual
GENERAL INFORMATION
Dear customer,
Thank you very much for choosing our product. In the following, we will show
you what you need to consider during commissioning and use.
Should you unexpectedly encounter problems during use, please do not hesitate
to contact us.
COMMISSIONING WITH THE RASPBERRY PI
Wiring:
Raspberry Pi | MMA8452Q |
---|---|
GND (Pin 6) | GND |
3v3 (Pin 1) | VCC |
SDA (Pin 3) | SDA |
SCL (Pin 5) | SCL |
Installation:
To be able to use the ADC, you have to enable I2C.
Enter the following command: sudo raspi-config
Now navigate to the point Interfacing Options -> I2C and enable the I2C
interface.|
Now create a file with the extension “.py” and copy the code example into it.
Then execute this file with the console command shown below: sudo python file-
name.py
You should now see the values of the three axes as a console output.
Code example:
Distributed with a free-will license.
Use it any way you want, profit or free, provided it fits in the licenses of
its
associated works.
import smbus
import time
Get I2C bus
bus = smbus.SMBus(1)
MMA8452Q address, 0x1D(28)
Select Control register, 0x2A(42)
0x00(00) StandBy mode
bus.write_byte_data(0x1D, 0x2A, 0x00)
MMA8452Q address, 0x1D(28)
Select Control register, 0x2A(42)
0x01(01) Active mode
bus.write_byte_data(0x1D, 0x2A, 0x01)
MMA8452Q address, 0x1D(28)
Select Configuration register, 0x0E(14)
0x00(00) Set range to +/- 2g
bus.write_byte_data(0x1D, 0x0E, 0x00)
time.sleep(0.5)
MMA8452Q address, 0x1D(28)
Read data back from 0x00(0), 7 bytes
Status register, X-Axis MSB, X-Axis LSB, Y-Axis MSB, Y-Axis LSB, Z-Axis MSB,
Z-Axis LSB
data = bus.read_i2c_block_data(0x1D, 0x00, 7)
Convert the data
xAccl = (data[1] 256 + data[2]) / 16
if xAccl > 2047 :
xAccl -= 4096
yAccl = (data[3] 256 + data[4]) / 16
if yAccl > 2047 :
yAccl -= 4096
zAccl = (data[5] * 256 + data[6]) / 16
if zAccl > 2047 :
zAccl -= 4096
Output data to screen
print “Acceleration in X-Axis : %d” %xAccl
print “Acceleration in Y-Axis : %d” %yAccl
print “Acceleration in Z-Axis : %d” %zAccl
COMMISSIONING WITH THE ARDUINO
Wiring:
ARD-Uno | MMA8452Q |
---|---|
3.3V | VCC |
GND | GND |
A4 (SDA) | SDA |
A5 (SCL) | SCL |
To use the sensor with the Arduino, you must first install a library.
Go to Tools - > Manage libraries...
Now enter mma8452q in the search box above and install the library SparkFun MMA8452Q Accelerometer.
You can now select one of the example files under File -> Examples -> SparkFun
MMA8452Q Accelerometer and upload it to your Arduino.
Go to Tools and make sure you selected the correct board and port.
ADDITIONAL INFORMATION
Our information and take-back obligations according to the Electrical and
Electronic Equipment Act (ElektroG)
**The symbol on electrical and electronic equipment:**
This crossed-out dustbin means that electrical and electronic appliances do
not belong in the household waste. You must return the old appliances to a
collection point.
Before handing over waste batteries and accumulators that are not enclosed by
waste equipment must be separated from it.
Return options:
As an end user, you can return your old device (which essentially fulfills
the same function as the new device purchased from us) free of charge for dis-
post when you purchase a new device.
Small appliances with no external dimensions greater than 25 cm can be
disposed of in normal household quantities independently of the purchase of a
new appliance.
Possibility of return at our company location during opening hours:
SIMAC Electronics GmbH, Pascalstr. 8, D-47506 Neukirchen-Vluyn, Germany
Possibility of return in your area:
We will send you a parcel stamp with which you can return the device to us
free of charge. Please contact us by e-mail at Service@joy-
it.net or by telephone.
SUPPORT
If there are still any issues pending or problems arising after your purchase,
we will support you by e-mail, telephone, and with our ticket support system.
E-Mail: service@joy-it.net
Ticket system: http://support.joy-it.net
Telephone: +49 (0)2845 9360—50 (9:30-17:30 o‘clock)
www.joy-it.net
SIMAC Electronics GmbH
Pascalstr. 8, 47506 Neukirchen-Vluyn
Documents / Resources
| Joy-
IT SEN-MMA5482Q 3 Axsis Digital Acceleration Sensor
Module
[pdf] Instruction Manual
SEN-MMA5482Q, 3 Axsis Digital Acceleration Sensor Module, SEN-MMA5482Q 3 Axsis
Digital Acceleration Sensor Module, Digital Acceleration Sensor Module,
Acceleration Sensor Module, Sensor Module, Module
---|---
References
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>