3

Some applications are available for measuring frequencies of alternating currents up to 200 Hz using magnetometers and designed for iPhones.

I collected data from Iphone 5s magnetometers and the minimum average value of the acquisition period I recorded was about 0,02 sec, in other words the average sampling frequency was 50 Hz.
In my opinion and in this case, it's possible to measure only upto 25 Hz. How is possible to measure alternating current up to 200 Hz?
Did I write something wrong?
Is there a trick to decrease the acqusition period?

Jeff 974
  • 69
  • 1
  • 4
  • your tasks sounds like am industrial battery consuming beast, do you think you might need a more specific hardware rather than a random mobile phone from the market? – holex Jun 21 '16 at 08:11
  • Holex, I'm a newbie with swift and my task is only to improve my knowledge with sensors (magnetometer, accelerometer...) not to develop an application at this moment. – Jeff 974 Jun 21 '16 at 11:13
  • I'm not sure where you got the 25Hz from... but in theory if you could reduce the sampling period down to `0.005` secs, that is pretty much gives you desired 200Hz preciosity; only one question remained then: whether the hardware supports such accurate and precise sampling, or you'd waste resources only – but correct me anytime if I'm wrong. :) – holex Jun 21 '16 at 12:03
  • In general, to preserve the information in the signal, it is necessary to sample at twice the maximum frequency of the signal, hence the 25 Hz value. – Jeff 974 Jun 21 '16 at 13:13
  • In general, to preserve the information in the signal, it is necessary to sample at twice the maximum frequency of the signal, hence the 25 Hz value. I don't project to develop such an application but understand how is possible to measure a 200 Hz current using iphone's magnetometer. – Jeff 974 Jun 21 '16 at 13:33

2 Answers2

3

Since the iPhone 6, Apple has actually included two separate accelerometers. It appears that one has a refresh rate of 2000hz, and the other is 4000hz. Here's an article detailing the capabilities of the two chips. http://www.macrumors.com/2014/09/26/iphone-6-6-plus-two-accelerometers/

1

Try experimenting with the CMMotionManager's property magnetometerUpdateInterval, which is in units of seconds. Like others have said: I'm not sure what the actual sensor's data frequency is, you could also run into energy issues with such a high call rate. Let us know how it goes, happy experimenting!

Sean
  • 377
  • 3
  • 12
  • I used CMMotionManager, the minimum acquisition period ranges between 15ms and 17ms with an iPhone 5s (Magnetometer data). – Jeff 974 Jun 21 '16 at 17:23
  • 1
    Is there another way to modify the sampling rate instead of using the magnetometerUpdateInterval? I can't figure out how some applications designed for iPhone 4 are able to measure electricity grid frequency. (50-60 Hz) and claim the possibility to measure up to 200 Hz. – Jeff 974 Jun 21 '16 at 17:50