Shop OBEX P1 Docs P2 Docs Learn Events
Help with MMA7260 Accelerometer — Parallax Forums

Help with MMA7260 Accelerometer

CrackCrack Posts: 2
edited 2012-05-17 18:57 in Propeller 1
Hey everyone I only recently got my hands on a propeller demo board after playing around with the arduino for quite awhile.

My problem: I can't find a way to extract the X and Y data from the MMA7260 accelerometer.

The closest I have to come to an example for this is from here: https://sites.google.com/site/parallaxinretailstores/home/memsic-2125-dual-axis-accelerometer however using this with the accelerometer I have does not show values which appear to be correct and the values don't always update when I'm moving the accelerometer.

The Arduino equivalent:
int sensorValue = analogRead(A7);

I could then use sensorValue to do whatever I like. Eg. Print to serial terminal.

Any help with this would me much appreciated I have spent hours searching for examples and following spin tutorials.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-17 18:47
    I think you need three analog to digital channels. Either using a ADC chip or delta-sigma ADC with passives close to the Prop's pins.

    I beleive the MMA7260 outputs analog voltages.

    Apparently there can be problems with its calibration.
  • kwinnkwinn Posts: 8,697
    edited 2012-05-17 18:57
    The accelerometer chip you are using has 3 voltage outputs that are proportional to the force and requires an adc to convert that to a binary value.

    The memsic accelerometer outputs a pulse with a width that is proportional to the force for each of the 2 axis.

    What if any adc are you using?
  • CrackCrack Posts: 2
    edited 2012-05-17 18:57
    Thanks for the reply.

    I'll look into ADC when I get back from class.

    I saw that article about the calibration problem, thanks for the heads up.
    kwinn wrote: »
    The accelerometer chip you are using has 3 voltage outputs that are proportional to the force and requires an adc to convert that to a binary value.

    The memsic accelerometer outputs a pulse with a width that is proportional to the force for each of the 2 axis.

    What if any adc are you using?

    I don't think I was using any ADC so that seems to be my problem.
Sign In or Register to comment.