Shop OBEX P1 Docs P2 Docs Learn Events
Accellorometer troubles — Parallax Forums

Accellorometer troubles

PhilldapillPhilldapill Posts: 1,283
edited 2009-03-10 02:54 in Propeller 1
I recently ordered some samples of ST's LIS3LV02DL Accellorometer chips. They are three axis, 16-bit chips. Sparkfun sells a breakout board for a similiar chip, LIS3LV02DQ. The datasheets for these chips are nearly identical. I've made my own little PCB, laid out as per the datasheet/sparkfun's design. I am using Tim Moore's OBEX object for the board that sparkfun sells. Here is my problem...

When I connect my board to the propeller using pins 0 and 1(instead of Tim's pin 28/29), I think I can get the chip to "talk" to the propeller. I think this is happening, because after the I2CScan command, the program stops hanging. If I don't have anything connected, the program hangs on that command until I plug the PCB in, then it goes from there. Does this mean that the I2C interface is finding the chip? After this, the values that the object fetches from the chip are not accurate at all.... Always "256" for each X, Y, and Z axis. Also, when I look at the SDA and SCL lines, I see bursts of activity... It's nearly 1am and I need help. [noparse]:([/noparse]

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-03-07 07:13
    Philldapill,

    Without looking at your code, it's hard to tell what the problem is.

    Common mistakes... Are the SDA and SCL lines swapped? Are you using pull-up resistors on the SDA and SCL lines?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-03-07 16:55
    Sorry. The code is actually the code straight out of the OBEX. The only file I have changed is the listest.spin. I've attached the files anyway for easy reference.

    And no, Beau, I've tried flipping the SDA and SCL. This is the only combination that allows anything to happen in the program. I have a pull-up on CS, as per the datasheet/Tim's documentation/sparkfun's board. No pull-ups on SDA and SCL currently, but with them on there, the same result happens... Like I said, there is some kind of data on the SDA and SCL lines when I look at it on the scope, but it comes in bursts.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-03-08 04:58
    Philldapill,

    "When I connect my board to the propeller using pins 0 and 1(instead of Tim's pin 28/29), I think I can get the chip to "talk" to the propeller" - as a sanity check, can you get it to communicate using pins 28 and 29?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-03-09 03:18
    Whoohoo! Looks like my problem was my method of soldering the QFN chip... Just a note to others - Using a clothes iron flipped upside down to heat the board with solder paste on it works GREAT! I smeared a thin layer of solder past on my PCB, where the chip goes, then put this on the clothes iron(set on high - no idea what temp, but over 350F). The solder paste "melted" and grabbed the chip into alignment. I now have a display on my TV screen of the acceleration... Next problem...

    Now, for some reason, the output of the chip is in multiples of 256. My assumption is that the configuration is somehow set to 16-bit, but the chip is outputting 8-bit or vise versa?
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2009-03-09 06:18
    According to Tim's lis302dlobject, the LIS302DL is 8bit. It's the LIS3LV02DQ that is 16bit. Your first message mangles both versions names enough that deciding which one you have is problematic.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-03-09 13:45
    You're right, Fred. The chip I have is the LIS3LV02DL. I must have messed up some of the original code. I re-downloaded the code from the OBEX and the chip works perfectly now! 16-bit resolution!

    I looked at the datasheet, and it seems the LIS3LV02DQ and LIS3LV02DL are virtually identical - just different packages. The LIS302DL is in fact an 8-bit version(not the chip I have). Sorry about that bad description - it was late at night, and I had a a killer cold coming on.
  • Old man EarlOld man Earl Posts: 46
    edited 2009-03-09 22:56
    how about some pictures. I have some 28 pin qfn 2 axis gyros and am interested in your soldering method. What paste, where to buy, etc.
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2009-03-10 02:54
    Phil, Har! That's one problem down. I spent all day with an 'uh-oh, did I write something stupid again?' thought...
Sign In or Register to comment.