-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative firmwares for nrf51822, nrf52810 and nrf52832 #120
Comments
Hello, Thanks for the info, if I ever have time I can include this as an alternative in the documentation. Does your firmware support changing keys/mac? Kind Regards, |
Sounds great. Did you happen to take measurements of the power consumption? I had the problem with the firmware that the power consumption was significantly higher with changing keys. By significant I mean about 10-15 times shorter lifetime compared to 1 key to several. This was probably due to the wake up (key - Mac change) and I couldn't solve this with the Nordic forum either. That's why I no longer use my firmware, because changing the battery every month is annoying and expensive |
Not at the moment -- still looking for a chance to get my hands on an oscilloscope :) I didn’t run any calculations, but there’s a malloc() issue causing RAM clogging: uint8_t setAdvertisementKey(const char *key, uint8_t **bleAddr, uint8_t **data) These allocations are never freed. Also, the keys are stored in RAM instead of being marked as constant, which can cause more frequent resets due to memory faults. Plus, increased RAM usage leads to higher power consumption since more RAM blocks stay powered during sleep. That could be part of the issue. |
I did, with the Nordic Power Profiler Kit 2 :) The HolyIoT YJ-16013 (nRF52832) sitting on my table right now is running with an average current draw of 14 µA (2000 ms Advertising Interval, 4 dBm, 80 Keys, 900 sec. rotation interval). I tried setting it to the external 32 KHz oscillator, which I heard could reduce the power consumption even further. However when I edit the sdk_config.h the SoC crashes with
The HolyIoT 17095 (nRF52832) averages at around 20 µA with the same settings as the 16013. It doesn't have an XTAL. A HolyIoT 21014 (nRF52810) with 60 keys (rotating every 900 secs) advertising every 3000 ms takes around 10 µA. I also haven't tested using the XTAL instead of the internal source with this model yet. The no-name beacon with an nRF51822 that I have draws 18 µA with the internal RC circuit and 16 µA with the XTAL in use. (2000 ms, 4 dBm, 40 keys, 900 secs rotation) |
I think I tried something like that and failed too.
If you have optimized settings XTAL settings for the HolyIoT (or other), I could add the relevant board headers and flags on the project to build them more easily. That would be great 👍 |
NRF51/52 has switching DC-DC regulator (to efficiently convert input voltage into lower voltage the microcontroller uses), it does reduce power consumption greatly if input voltage is more than 2 volts (in comparison with default LDO regulator). It saves much more power than installing 32.768kHz quartz, but requires inductor and few capacitors on the board. Most of boards have the inductor, so you have just enable the DCDC regulator to lower power consumption significally. |
FYI: I added dcdc build variants (I didn't enable it for yj17024 as low power consumption may not be the target for this board, I might be proven wrong) I used this:
Is that enough ?
|
Ugh, not sure how you set it in old nrf52 sdk, sorry. For zephyr SDK this is "CONFIG_BOARD_ENABLE_DCDC=y" in prj.conf at compile time. Probably, "#define POWER_CONFIG_DEFAULT_DCDCEN 1" for enabling by default. |
Hi, shameless plug here: https://github.com/pix/heystack-nrf5x
I managed to convert an old Tile tag (with an nrf52810) to Haystack.
I used alcatrava's firmware as a base too and fixed some potential memory leaks and updated the SDK / Makefiles.
The code is running since two days, without problems for now.
The text was updated successfully, but these errors were encountered: