Author Topic: Finding accelerometer location inside a phone  (Read 537 times)

Offline haversin

  • High Voltage Enthusiast
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Finding accelerometer location inside a phone
« on: February 22, 2020, 07:23:28 PM »
     The purpose of this experiment is to find the accelerometer location inside a phone by placing the phone on a turntable and recording the accelerometer readings while the turntable is rotating. The methods found on the internet for doing this seemed overly complicated in terms of setup geometry and location calculations. The method I present here simplify both of these by placing the middle right side of the phone against the spindle of the turntable. This position of the phone on the turntable automatically aligns the accelerometer x and y axes and at the same time places the geometric center of the phone along the x axis.
 
Photo of actual setup


Accelerometer location calculations.


There are many free apps that can record the phone's accelerometer and gyro outputs and write them to a comma separated variable (csv) text file. The app I used was Phyphox. The csv file can then be plotted and analyzed. The turntable was carefully leveled to remove large oscillations on the accelerometer outputs Ax and Ay during rotation due to a component of the gravity in the x y plane.

Accelerometer and gyro Wz data for a run of the experiment.

The run starts with the turntable stationary then the turntable is turned on and speeds up to 45 RPM. The turntable is then turned off and slows down to a stop.
The accelerometer Az output is 1 g up because the accelerometer senses gravity as an acceleration in the up direction. It's noted that the accelerometer Ax and Ay outputs show bias terms of -0.27 and 0.085 m/s^2 respectively.

Here is a different run with linear acceleration and gyro Wz data plotted.

The linear acceleration terms Ax and Ay do not show bias terms but overshoot zero as the turntable is slowing down. Linear acceleration is an estimate of the actual inertial acceleration of the IMU by removing the gravity acceleration vector from the accelerometer outputs. This requires an estimate of the phones orientation in space and then calculating the components of gravity acceleration along each of the three accelerometer axes. The accuracy of this algorithm probably varies with model of phone.
It will be shown later that for my phone ( Galaxy J7 Crown SM S767VL ), using linear acceleration gave very bad accelerometer position estimates.

   The accelerometer positions calculated using accelerometer, accelerometer minus bias and linear acceleration data did not agree so an alternative method of measuring accelerometer position was used for comparison. This other method I'm calling the “null method” and involves varying the phones position on the turntable until the Ax and Ay readings go to zero while the turntable rotates. Because the spindle is in the way for free positioning of the phone, the phone is placed on a small platform above the spindle.

The null method setup is shown here.

The remote control feature of Phyphox came in very handy for this because I could start recording data after the turntable got up to full speed. With no startup transients on the graphs the scale of the plots remained small and I could clearly see the mean of Ax and Ay getting close to null. Once null was established a felt marking pen was used to trace circles on the protective glass cover of the phone. These marked circles allow the center of rotation and hence the accelerometer position to be measured.


Here is the accelerometer minus bias null position.


Linear acceleration null position.


Table of results

  The largest difference between the calculated position and the null position was seen in the linear acceleration with 1.6 cm, accelerometer was 3 mm and accelerometer minus bias was about 2 mm. Of course these results will probably vary with the type of phone.

  I found two good images of my phone's logic board on ebay. The positioning of the logic board inside the phone was estimated from a teardown video. The rear side of the board with all six accelerometer position estimates plotted to scale are shown here.

  Only three of the positions were on the logic board and only two of those landed on a chip. The IMU chip used on my phone is a LSM6DSL. The data sheet for the LSM6DSL gives it's size as 2.5 mm by 3.0 mm by 0.8 mm. This matches the size of the chip that the accelerometer minus bias position estimates fell on. I'm fairly confident that this is the accelerometer/gyro chip. The front side of logic board is shown below with the three positions estimates that landed on the board. None of these positions landed on a chip for this side of the board.
« Last Edit: February 22, 2020, 07:28:59 PM by haversin »

Offline klugesmith

  • High Voltage Engineer
  • ****
  • Posts: 296
  • Karma: +7/-0
    • View Profile
Re: Finding accelerometer location inside a phone
« Reply #1 on: September 27, 2020, 06:36:41 PM »
That's a really nice bit of work, Haversin, and well reported.

I think my starter smartphone (Samsung Galaxy A10e) might be too basic to include an accelerometer. Is there less expensive "level" sensor for it to know which phone axis is up, when held in a vertical plane?  And not too easily frustrated about the portrait/landscape decision when phone is in horizontal plane. 

Anybody seen reports from space, about how smartphones deal with their orientation in microgravity?

High Voltage Forum

Re: Finding accelerometer location inside a phone
« Reply #1 on: September 27, 2020, 06:36:41 PM »

 


* Recent Topics and Posts

post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Daniel Uhrenholt
Today at 09:41:48 AM
post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
plasma
Today at 01:46:20 AM
post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
October 24, 2020, 11:12:37 PM
post Re: CM600DU-24NF availability or substitute?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Daniel Uhrenholt
October 24, 2020, 11:07:33 PM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General Chat]
Daniel Uhrenholt
October 24, 2020, 10:45:41 PM
post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Daniel Uhrenholt
October 24, 2020, 10:12:37 PM
post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Mads Barnkob
October 24, 2020, 09:29:06 PM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General Chat]
Mads Barnkob
October 24, 2020, 09:20:37 PM
post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
October 24, 2020, 09:07:24 PM
post Re: Software for playing MIDIs
[Computers, Microcontrollers, Programmable Logic, Interfaces and Displays]
Zipdox
October 24, 2020, 07:29:57 PM
post Re: Polyphonic Interrupter with STM32F103C8T6 (Bluepill)
[Computers, Microcontrollers, Programmable Logic, Interfaces and Displays]
Zipdox
October 24, 2020, 07:02:13 PM
post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Daniel Uhrenholt
October 24, 2020, 06:38:42 PM
post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
October 24, 2020, 05:42:49 PM
post Software for playing MIDIs
[Computers, Microcontrollers, Programmable Logic, Interfaces and Displays]
Max
October 24, 2020, 04:37:26 PM
post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Daniel Uhrenholt
October 24, 2020, 03:51:52 PM
post Re: DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
October 24, 2020, 02:25:00 PM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General Chat]
Daniel Uhrenholt
October 24, 2020, 12:12:41 PM
post MOVED: DIY current transformer for scoping primary current?
[Solid State Tesla Coils (SSTC)]
Kizmo
October 24, 2020, 11:45:58 AM
post DIY current transformer for measuring primary current?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Daniel Uhrenholt
October 24, 2020, 11:22:24 AM
post Re: Ping pong (and pumpkin?) cannons - split from ferrite-core QCW topic
[Science, Research and News In Other Fields Than Electronics]
davekni
October 24, 2020, 04:16:06 AM
post Re: Ping pong (and pumpkin?) cannons - split from ferrite-core QCW topic
[Science, Research and News In Other Fields Than Electronics]
davekni
October 24, 2020, 04:07:24 AM
post Re: Ping pong (and pumpkin?) cannons - split from ferrite-core QCW topic
[Science, Research and News In Other Fields Than Electronics]
Twospoons
October 23, 2020, 11:39:35 PM
post Re: Ping pong (and pumpkin?) cannons - split from ferrite-core QCW topic
[Science, Research and News In Other Fields Than Electronics]
Hydron
October 23, 2020, 07:10:22 PM
post Re: QCW with replaceable ferrite-core primary
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
October 23, 2020, 05:36:02 PM
post Re: Ping pong (and pumpkin?) cannons - split from ferrite-core QCW topic
[Science, Research and News In Other Fields Than Electronics]
klugesmith
October 23, 2020, 05:34:39 PM
post MOVED: Ping pong (and pumpkin?) cannons - split from ferrite-core QCW topic
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
October 23, 2020, 05:27:45 PM
post Re: QCW with replaceable ferrite-core primary
[Science, Research and News In Other Fields Than Electronics]
Uspring
October 23, 2020, 03:03:28 PM
post Re: RC snubbers
[Solid State Tesla Coils (SSTC)]
davekni
October 23, 2020, 12:27:42 AM
post Re: RC snubbers
[Solid State Tesla Coils (SSTC)]
AstRii
October 22, 2020, 10:06:59 PM
post Re: RC snubbers
[Solid State Tesla Coils (SSTC)]
Mads Barnkob
October 22, 2020, 09:05:22 PM
post Re: RC snubbers
[Solid State Tesla Coils (SSTC)]
davekni
October 22, 2020, 07:17:16 PM
post Re: QCW with replaceable ferrite-core primary
[Science, Research and News In Other Fields Than Electronics]
klugesmith
October 22, 2020, 05:33:39 PM
post Re: RC snubbers
[Solid State Tesla Coils (SSTC)]
T3sl4co1l
October 22, 2020, 02:07:27 PM
post RC snubbers
[Solid State Tesla Coils (SSTC)]
AstRii
October 22, 2020, 11:42:26 AM
post Re: CM600DU-24NF availability or substitute?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
SAMGO
October 22, 2020, 11:21:19 AM
post Re: QCW with replaceable ferrite-core primary
[Science, Research and News In Other Fields Than Electronics]
johnf
October 22, 2020, 09:14:24 AM
post Re: Current transformer for narrow spaces
[Laboratories, Equipment and Tools]
klugesmith
October 22, 2020, 06:19:28 AM
post Re: Current transformer for narrow spaces
[Laboratories, Equipment and Tools]
davekni
October 22, 2020, 04:21:50 AM
post Re: Current transformer for narrow spaces
[Laboratories, Equipment and Tools]
klugesmith
October 22, 2020, 01:23:15 AM
post Re: Tesla coil circuit draws lots of current but the spark size is small.
[Solid State Tesla Coils (SSTC)]
davekni
October 21, 2020, 08:31:51 PM
post Re: QCW with replaceable ferrite-core primary
[Science, Research and News In Other Fields Than Electronics]
davekni
October 21, 2020, 08:21:55 PM
post Re: QCW with replaceable ferrite-core primary
[Science, Research and News In Other Fields Than Electronics]
Uspring
October 21, 2020, 07:17:07 PM
post Re: Tesla coil circuit draws lots of current but the spark size is small.
[Solid State Tesla Coils (SSTC)]
SalinsLV
October 21, 2020, 01:30:19 PM
post Re: QCW with replaceable ferrite-core primary
[Science, Research and News In Other Fields Than Electronics]
davekni
October 21, 2020, 05:00:34 AM
post Re: Current transformer for narrow spaces
[Laboratories, Equipment and Tools]
plasma
October 21, 2020, 04:46:55 AM
post Re: Current transformer for narrow spaces
[Laboratories, Equipment and Tools]
davekni
October 21, 2020, 04:42:19 AM
post Re: Current transformer for narrow spaces
[Laboratories, Equipment and Tools]
klugesmith
October 21, 2020, 02:29:54 AM
post Re: CM600DU-24NF availability or substitute?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Mads Barnkob
October 20, 2020, 11:50:25 PM
post CM600DU-24NF availability or substitute?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
SAMGO
October 20, 2020, 10:50:25 PM
post Variable transformer, reverse engineering of 3A electronic fuse
[Laboratories, Equipment and Tools]
Mads Barnkob
October 20, 2020, 09:38:42 PM

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 
SimplePortal 2.3.6 © 2008-2014, SimplePortal