BLE Proximity detection using rssi. Xiao nRF52840

Hi,

The question to the forum is do you think the below is possible? and is this the right way to go about solving this project?

I’m looking to make a system of devices using multiple Xiao nRF52840 boards, there will be two types of devices(different mainly by software) the first is the “parent” the second is the “child”

key design features:
Low power (must have a non human contact design life of 10+years)
Reliable
must be small and light weight, so small battery. ideally smaller than 1000mah

Firstly for the child device I wish to advertise a unique id once per second or so. However to save battery for large times of the year it can be switched to full deep sleep with no advertising at all. this switching needs to be done over BLE or Bluetooth.

secondly the Parent device will have two active modes first will be the same at the child giving unique id. the second mode will listen for the children and if the rssi indicates they are within a fixed distance of say approx. 2m then that childs id is recorded.

any further guidance and or examples of something similar would be appreciated

thanks,
Ben

Sounds like a fun Project…

Hi there, and welcome. At first blush I would say NO. to this part.
and this.

You can do this though easy enough;

That’s my .02 worth.
HTH
GL :slight_smile: PJ

Hi @PJ_Glasso,

thanks for your comments, what are the main reasons for for your two NO’s?
Xiao nRF52840 is not low power enough? or not reliable?

also

for switching modes, it’s not possible to have it listen for a message to say mode 1,2or3? this switching would likely only happen 3-4 times per year?

thanks,
Ben

Hi there,
Mainly the TEN years , have you put the numbers in the online battery life sizer?

Xiao nRF52840 is plenty Powerful enough. That’s not a concern, nothing in the scenario you provide is outside the realm of the chip.
There is no way I know of or have seen to be able to turn on a BLE receiver via the remote BLE radio. That being said you could just advertise a beacon or some such when the IO is dictating it (broadcasting if you will the data).
Typically You would start at the Sensor Node and work backwards.
The Heartbeat is good for keep alive status, adding a watchdog timer if logic goes off-line.
We had similar WIRED life Safety in the FAB’s in OR. built into the SCADA systems monitoring hydrogen and other UHP gases to a master display.
HTH
GL :slight_smile: PJ

PS.
you could institute Deep sleep and via RTC wakeup interrupt and have pre determines times & date window for system to come on-line and transmit (+/- some drift time) or connect to a central or master. The RTC batteries are closer to lasting years BTW, so that would be one approach you could take.

Getting back into this project, you don’t have any low-power simple advertising sketch example you could share do you? I have something working the is giving in the relm of 15uA when not advertising,
the issue im having is i get well spaced advertisements then nothing for about 7secs then advertiments , and that keeps repeating, Im looking to the simplist low power setup the advertises and id number ever 2 or 3 seconds.

any help would be greatly appreciated

thanks

Hi there,
Hmmm, No I don’t,
but Msfujino the power Ninja :ninja: has some threads on here with the very lowest power with payload if i’m not mistaken.
I’m pretty sure it goes like this though, use the right bootloader to begin with #1,
Be sure the right BSP 1.1.1 ish’ Then use the system on Sleep RTC to wakeup and do BLE advertisement. Rinse & repeat. or something close. He has 5uA if memory serves me.
The battery life Graph is Sweet.
I have seen that seven second thing b4 too, it’s a setting or param.
BTW, The latest Nordic BLE chip Nrf54L15 receiver supports ‘AOA’, Angle of Arrival made for indoor Beacon tracking, the demo is Bananas :banana:.
I’m hopeful for a refresh of the Nrf Xiao… :star_struck:
HTH
GL :- ) PJ :v:

Has anyone tried the Nordic distance toolbox using phase shift to increase accuracy?

Hi there,
I looked at it , mainly for proprietary setup Not supported by anyone else. Only device to device.
I believe the best way is AOA (Angle of Arrival)capable stuff in the Nrf54 Series. that allows true indoor tracking the most accurate also. It’s coming and if SEEED follows through with a refresh to the nRf54 series, lowest power and the most capabilities available today. A "Xiao Nrf54LIoT or “Xiao Elliot” will be the one everybody wants.
:star_struck:
GL :slight_smile: PJ

hey @PJ_Glasso , just wondering if you have come across a deep sleep example base on a timer, so go to deep.sleep for a set amount of time? I have found the examples for system on sleep, and dacoders examples of deep sleep but the are all wake up with imu or gpio as far as i can tell.

also looking for an example of sourcing the clock that remains on during deep sleep for an low accuracy RTC. any thoughts?

Thanks,
Ben

Hi there,
Yes. no RTC for Deep Sleep only ULP code. only certain pins can be used to reflect the wake-up interrupts for DEEP sleep. makes it trickier IMO, you look at the spreadsheet in the datasheet shows which power group the pin belongs to. starts with that. light sleep everything is available.
I’ll find the link and add it.
meanwhile the Xiao ESPc3 kinda the same but the S3 has even more options.
I want wake on BLE packet. :star_struck:
HTH
GL :slight_smile: PJ
I have a Nordic nRF52840 Dev Kit, Probably should break it out b4 it’s obsolete, and try the SDK examples. (works with the PPK2 and has built in Jlink) This and PPK2 is all a Xiao follower needs IMO. :innocent: