Hi guys,
I apologize in advance for this stupid question. My knowledge with electronics is pretty basic.
I'm trying to write a simple app that would convert the analog input to G force(to identify the acceleration on x,y ,and z axis of course)
I have a problem identifying the pins of this module.http://www.dx.com/p/stm32-mma7455l-acceleration-sensor-module-blue-218883#.U3nHgh-fNAM
could somebody please help me , I'm stuck for days already and I couldn't find any references to this specific model(which was purchased by my professor by the way).
So far I have identified that pin 1 is the voltage input and pin 5 is Ground. and i currently feed 3.3V to pin 1.
I've tried to analogRead() all the other pins but i get inconclusive data. when i Tried to digitalRead() the pins returns 0.
I'm both using Arduino UNO and DUE for this school project.
any help would be much appreciated.
thanks in advance. XD
.
That doesn't appear to be an analog device. Your problem starts there. Go and read the datasheet.
I couldn't find any references to this specific model
Is google broken in your country ?
http://www.freescale.com/files/sensors/doc/data_sheet/MMA7455L.pdf
The particular module that you have, I am unfamiliar with. It uses the same chip as the Parallax one, but the PCB layout is different. And the pins on yours do not seem to be labelled, which is unusual. And the two rows of pins together, are unsual. Easy enough to solder to something, difficult to mount in a temporary breadboard.
I am starting to understand your problem with the pins. You have 8 pins ?
There will be
(1) a ground
(2) a power supply ( sometimes 2 )
(3) 2 pins for I2C
(4) maybe a third pin for Spi in addition to I2c
(5) maybe an interrupt out from the device
(6) maybe some kind of sleep pin
(7) maybe some kind of I2c address select pin.
Here's what I would do.
Write a list of the actual pins on the actual sensor chip ( from the freescale datasheet ).
Read the instructions of the parallax device using the same chip, and make notes of what the module connection pins on that
device are, your set of pins is probably the same or almost the same.
Examine the pins on this module, which also uses the same chip. Your pins are probably the same.
http://arduino-info.wikispaces.com/accelerometer-MMA7455
Examine your module with a magnifying glass, try to see which pins are connected to which pins on the actual chip.
Look at the description of this device
http://playground.arduino.cc/Main/MMA7455
Look at the description of this device
http://numato.com/mma7455-3-axis-digital-accelerometer-module
Is there a voltage regulator chip on your module ? The connections of that will tell you something.
Good luck. Be methodical. Try not to blow it up.
IT IS NOT AN ANALOG DEVICE. You need I2C to communicate with it.
michinyon:
I am starting to understand your problem with the pins. You have 8 pins ?
There will be
(1) a ground
(2) a power supply ( sometimes 2 )
(3) 2 pins for I2C
(4) maybe a third pin for Spi in addition to I2c
(5) maybe an interrupt out from the device
(6) maybe some kind of sleep pin
(7) maybe some kind of I2c address select pin.
Here's what I would do.
Write a list of the actual pins on the actual sensor chip ( from the freescale datasheet ).
Read the instructions of the parallax device using the same chip, and make notes of what the module connection pins on that
device are, your set of pins is probably the same or almost the same.
Examine the pins on this module, which also uses the same chip. Your pins are probably the same.
http://arduino-info.wikispaces.com/accelerometer-MMA7455
Examine your module with a magnifying glass, try to see which pins are connected to which pins on the actual chip.
Look at the description of this device
http://playground.arduino.cc/Main/MMA7455
Look at the description of this device
http://numato.com/mma7455-3-axis-digital-accelerometer-module
Is there a voltage regulator chip on your module ? The connections of that will tell you something.
Good luck. Be methodical. Try not to blow it up.
IT IS NOT AN ANALOG DEVICE. You need I2C to communicate with it.
hi michinyon,
as, I've mention I i have very little knowledge in Electronics... I had a lot to absorb in a sort amount of time. My post was out of frustration. anyway thanks for the help... I got it working already.
I somehow given up and started reading more... apparently the pin description given to me was wrong and i had to analyze the module like you've said..
pins were:
1-GRD
2-VCC
4 - CS
3 -INT 2
5 and 6 -SCK and SDA
7-SDO
8 INT 1
got it working fine with uno... but cant get the same readings with DUE..
I had modified the Wire.h for the DUE I2C to work but the readings seems to be off
It's unlikely that "the readings will be off", with an I2C device. The communications either work, or they don't.
Check if your unit requires a range setting, many such devices require you to select between +/-2g or +/- 8 g.
You might also think about 3V/5V issues.
hi michinyon,
Thanks for the reply, yes it has been configured... i think the problem was caused by the built-in pullup resistors by the arduino due on pins 20,21. As far as the schematic of Due goes, i found out that it has 1.5k built-in pullup resistors attached to the voltage regulator(3.3V) connected to 20,21. I'm not sure if the pull up keeps affecting my readings in DUE since UNO does not have a pull up resistor by default on pins A4,A5.
I've also tested using pins SCL1 and SDA1 (2nd I2C of due without pull ups) on DUE but it wont detect the mma7455L without an external pull up.
so far with the built-in pullups of DUE i somehow get fluctuating readings. while on UNO i get a stable reading. forgive me if i ask such questions. but should the pullups be giving 2.4V based on the module's specs "low voltage operation: 2.4V3.6V" ? currently the builtin 1.5k pullups are giving me a default of 3.3V.
If the due and the module are both low voltage devices ( are they ? I'm not sure, you should check ), then you won't be having the sort of problem that occurs trying to connect 3.3 and 5 V devices together.
I2C works by having both the clock line and the data line at 3.3V and the microcontroller and the sensor communicate by trying to pull the line down towards ground voltage.
If the resistance of the pull-up resistor is too low, it gets too hard for the devices to pull the voltage in the line down. If the resistance is too high, it takes too long for the voltage to rise again.
The normal voltage in the two I2C lines should be whatever your Vcc voltage is. Say, 3.3V. It should not be 2.4V unless you have a 2.4V system voltage.
hi michinyon,
Thank you that was by far the clearest explanation i have read so far. 
now I understand how it operates... is all boils down to the right size of resistor for the pull ups.
Thank you for pointing me to the right direction.
Update:
i was able to resolve my problem due to your explanation on how I2C works. did some code changes as the i2c reads the default 8-bit value as 255. the x-axis movement towards -X(left) was from 0-127 and the movement to the +X(right) was 255-128.

Hi, I have a how-to page on that chip HERE:
You pinout/connections look different than THIS: which is the one I used. Checkl that out carefully. Only 8 pins 
DISCLAIMER: Mentioned stuff from my own shop...