Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.

BLE for wireless sensor connectivity?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BLE for wireless sensor connectivity?

by johnd2 on Sat Apr 03, 2021 2:33 pm

Any thoughts please on the best CP-supported wireless solution for a battery-powered wireless sensor? I'm thinking that BLE might be a good option, but maybe there are better choices.

The context is weather sensors which obviously need to be away from buildings etc but which report to a (mains-powered) base station located in a nearby building for further processing. Required range would be 10-100m/yds - the further the better of course, but 10m is probably a minimum useful range. The sensor transmitter must be battery powered with a current draw as low as possible. Data transmissions would be eg 10 bytes every 2-3 seconds so data rates are absolutely no concern. The MCU would need to deep-sleep between transmissions so as to maximise battery life and so waking up to broadcast a new data packet should be as quick as possible.

I'm familiar (in general terms at least) with using chips like the TI CC1100 series (eg for this sort of application and where they work well (eg 6 months battery life from a CR123 lithium battery and 300m line-of-sight range), but can't spot these in as readily available in any maker type boards. Hence I'm wondering if BLE could be a viable alternative?

Posts: 4
Joined: Tue Feb 16, 2021 8:32 am

Re: BLE for wireless sensor connectivity?

by andreas_johnsen on Tue Apr 06, 2021 6:35 pm


Both BLE and LoRa can be good candidates for transmission. CP supports both and there are several boards to choose from. LoRa is usually better for longer distances (due to lower frequency), but BLE can do 10-100 meters. But radio propagation loss is not only dependant of distance in meters. The radio loss is also affected by interference, buildings, trees and even the weather, and more.

You can activate deep sleep by code in CP. And wake from sleep by internal timer or external pin activation (possible connected to a HW timer). Not all boards supports the alarm module. See the CircuitPython support matrix for current support. You can probable also use a hardware only solution for deep sleep with an external timer circuit.

Can the base station be outside the building (at least the antenna)?

Do you really have to transmit the measurements every 2-3 seconds? This sounds like a battery killer. I live in a country with much weather but I have never considered an update frequency near your requirement. If you increase to 20-30 sec you have increased the life of the battery x10 (a bit simplified). Can you sample several measurements and batch-transmit to base station? Can you skip transmissions if the measurements do not change between samples? (You should always transmit after a defined timeout so the base station can detect if something is wrong.)

For these kind of applications you should always send battery status

Posts: 11
Joined: Sun Apr 19, 2020 1:42 pm

Please be positive and constructive with your questions and comments.