cancel
Showing results for 
Search instead for 
Did you mean: 

LSM330DLC problem

matias
Associate
Posted on July 17, 2014 at 17:33

Hi guys,

I'm using the LSM330DLC on a weareable device, but while testing I noticed that while measuring the gravity I get values on Z axis around 1380 counts (0x0564 hex raw data coming from the ic).

The configuration is set to:

Normal Mode (tried both enabling and disabling high resolution in CTR_REG4)

Full Scale +-16G

Sampling rate 100Hz.

So my question is:

Datasheets says that normal mode high resolution involves a 12bit data conversion (table 9 page 20). If so, measuring gravity should give us around 128 counts and while measuring 16g we should get 0x0fff (16bit coming out of the spi/i2c interphase).

This means that we are not working with 12 bits definitely. So making some numbers it makes no sense to obtain values around 1400 counts while measuring gravity (without moving the device). Because this number times 16 does not match full scale for any word length (not even 14, 15 or 16 bits conversions).

16*1400 = 22400

while 

2^13=8092

2^14=16384

2^15=32768

Besides this we are getting samples over 16G this should not be possible (samples on the 25300 counts range, corresponding to 20G). Shouldn't the accelerometer clamp the signal at 16G.

I tried this in over 6 different chips obtaining the same result.

What am I doing wrong? are my numbers wrong or am I missing something?

Attached are some images displaying the raw values taken from the sensor showing what I'm saying

Thanks for the help.

Cheers,

Matias

#lsm330dlc #lsm330-lsm330dlc
1 REPLY 1
sergey
Associate
Posted on September 25, 2014 at 14:34

Hi

It seems like accelerometer in LSM330DLC has  right justiï¬�ed data format.

Bit 11

Bit 10

Bit 9

Bit 8

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

x

x

x

x

.ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 {border-collapse:collapse;border:solid 0px;font-family:Tahoma;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 tr.telerik-reTableHeaderRow-3 {margin:10px;padding:10px;color:#3a4663;text-align:left;font-size:10pt;font-style:normal;font-family:Verdana;text-transform:capitalize;font-weight:normal;border-spacing:10px;vertical-align:top;background-color:#C4D1E3;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableHeaderFirstCol-3 {padding:0in 5.4pt 0in 5.4pt;color:#3a4663;line-height:14pt;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableHeaderLastCol-3 {padding:0in 5.4pt 0in 5.4pt;color:#3a4663;line-height:14pt;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableHeaderOddCol-3 {padding:0in 5.4pt 0in 5.4pt;color:#3a4663;line-height:14pt;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableHeaderEvenCol-3 {padding:0in 5.4pt 0in 5.4pt;color:#3a4663;line-height:14pt;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 tr.telerik-reTableOddRow-3 {color:#666666;vertical-align:top;font-size:10pt;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 tr.telerik-reTableEvenRow-3 {color:#666666;vertical-align:top;font-size:10pt;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableFirstCol-3 {padding:0in 5.4pt 0in 5.4pt;background-color:#E7EBF7;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableLastCol-3 {padding:0in 5.4pt 0in 5.4pt;background-color:#E7EBF7;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableOddCol-3 {padding:0in 5.4pt 0in 5.4pt;background-color:#F7F3F7;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableEvenCol-3 {padding:0in 5.4pt 0in 5.4pt;background-color:#E7EBF7;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 tr.telerik-reTableFooterRow-3 {background-color:#C4D1E3;color:#3a4663;font-weight:normal;font-size:10pt;font-family:Verdana;line-height:11pt;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableFooterFirstCol-3 {padding:0in 5.4pt 0in 5.4pt;text-align:left;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableFooterLastCol-3 {padding:0in 5.4pt 0in 5.4pt;text-align:left;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableFooterOddCol-3 {padding:0in 5.4pt 0in 5.4pt;text-align:left;} .ExternalClass4E6B864409B9472DA86EB1E2012D2DED .telerik-reTable-3 td.telerik-reTableFooterEvenCol-3 {padding:0in 5.4pt 0in 5.4pt;text-align:left;}

Where bit 11 is the sign bit.

Linear acceleration sensitivity in datashet (12 mg/digit for 16g full scale)

means the weight of

bit 0.

So, real bit weight for you will be 12/2^4=0.75 mg/digit.