OpenHaystack beacon to be tracked via Apple's massive "Find My" network #3159
Replies: 7 comments
-
Posted at 2021-07-15 by sebi Below are some power measurements (current @ 3V) of the Puck.js programmed using this code made using my NORDIC Power Profiler Kit II: Current shape when switching from being connected to the IDE to restarting the BLE stack to act as a beaconAverage current consumption of the beacon over a minute ~ 6.30uAAverage current and shape of the beacon while sleeping ~2.10uAAverage current while broadcasting ~ 2.91mATL;DRThe Puck.js running this code is very energy efficient: 230/0.00630 = 36507 hours = 1521 days = 4.16 years |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-07-15 by sebi The 8s interval spikes (see above post) might be due to Espruino or Puck.js's hardware themselves as they don't occur when running the OpenHaystack (ultra low power) alternative firmware on a nRF51822 (see measurement N51-XTAL-LDO in this post on GitHub). Note that, despite those 8s interval spikes, it seems the nRF52832 is more power efficient than the nRF51822 (6.30uA vs 7.60uA). There is no external low-frequency 32,768kHz crystal available on the Puck.js, thus the internal low-frequency RC oscillator used instead that requires regular clock calibration, might be responsible for the 8s interval spikes. On the nRF51822, clock calibration when using the internal RC circuit seems to be more erratic though (see measurement N51-RC-LDO). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-07-15 by sebi After further analysis it seems the spikes on N51-RC-LDO in this post on GitHub are not as erratic as I thought: Those are 4s interval spikes and are certainly due to the clock calibration involved when using the internal low-frequency RC oscillator (as there is no such spikes when enabling the external low-frequency 32.768kHz crystal) (see N51-XTAL-LDO). Thus the 8s interval spikes on the nRF52832 might be due to clock calibration as well (at half the frequency though). As the Puck.js is not equipped with an external low-frequency 32,768kHz crystal, I cannot enable it and thus clock calibration is mandatory. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-07-26 by @gfwilliams Nice! Thanks for posting up the code! This is the kind of thing that'd be quite cool in https://www.espruino.com/apps I guess - then users could just post in the code they get from OpenHaystack (maybe OpenHaystack could even be modified to post up a URL that would automatically load up a Puck) But yes, those spikes may well be due to clock calibration. What do you think the average power draw from them is? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-07-26 by sebi Indeed I am planning to submit you a pull request with the code on GitHub. To compute the extra average current consumption due to clock calibration, data is taken from the above measurements (@3V):
Thus, alternating calibration for 0.001864s and deep sleep for 8-0.001864 = 7.998136s every 8s, the average current required for such cycles can be computed as a weighted arithmetic mean: ( 386.580.001864 + 2.147.998136 ) / 8 = 2.23uA The additional average current consumption due to clock calibration (mandatory when using the internal RC oscillator) with respect to a board that deep sleeps only (thus equipped with an external low-frequency crystal) is: 2.23 - 2.14 = 0.09uA This represents 0.09 / 2.14 = 0.042 = 4.2% more PS: Could you move this thread to Home / Projects in the Forum? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-07-27 by @gfwilliams Thanks! That's really interesting - so it is definitely more, but 0.09uA is not something crazy. On a Puck it's not going to make a huge difference to battery life. And sure - I'll move it :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-07-15 by sebi
Below is some code to make a Puck.js (or Pixl.js or MDBT42) act as a beacon to be tracked via Apple's massive Find My network ...act as an Apple AirTag equivalent if you will. Thus you can find your Puck.js if you lose it.
An Apple Mac computer is required though.
It is some Espruino code to mimic the beacon code of the OpenHaystack framework. It is based on Eric Betts original code.
The code:
...yields:
Beta Was this translation helpful? Give feedback.
All reactions