AnsweredAssumed Answered

LSM303DLHC non-linear scale?

Question asked by tatara.leszek on Jun 3, 2014
Latest reply on Sep 20, 2014 by marchant.ross

I'm trying to obtain correct data using I2C interface from magnetometer lsm303dlhc, which is included on mu stm32f3discovery board. I've configured device for continous conversion mode, 30Hz data output rate and scale 1.3 Gauss. My aim is to get simple information about placement from north (angle from north pole). To make this real i'm counting angle beetwen measured values of y and x dimension [atan2(mag_y, mag_x)]. Unfortunatelly i'm getting unexpected results - i.e. rotating 90 degrees equal 120 degrees or 60 deegress, depends on board placement (boards is lying on the table all the time). This results are repeatable, so i think that device is working with some kind of non-linear scale, which i can't determine. Weird is fact that this is board from st and imo it should work with any problems. I programmed my second board and situation is simmilar. What should i do to make this device work properly? Have anybody had this problem before?