perjantai 15. kesäkuuta 2018

Bluetooth LE


I've been playing around with a new Bluetooth module kit, and specifically BLE (Bluetooth low energy) lately. At first entire bluetooth system - nevermind new LE-specific features - seem really daunting, but after essentially diving in it is becoming easier - piece by piece.
All the profiles, advertisements and whatnot seemed overwhelming at first, but when I got to tackling them one by one - essentially by playing around with this developer kit first, then doing some reading, then some coding - things get much easier. Although a "big picture" view, when getting started, might have helped a lot.

Main point of BLE is there, right in the name - low energy. Peripheral devices, whatever they might be, are supposed to do everything and anything to keep their power consumption low, by spending most of their time doing what they do best: absolutely nothing. This is how all electronics with extremely low power usage work - you want to do absolutely nothing as much as you can, only waking up every now and then to do as much works as is needed, as quickly as possible, then going back to sleep.

100mA power consumption in active mode may seem a lot, but when you only spend, say, 1 millisecond in active mode and remainder of a second in deep sleep (where current consumption might be just microamp or so), the overall figure is still pretty good, although still dominated by that short burst of current usage. Therefore you'll do anything and everything to keep time being awake as short as possible and as infrequent as possible. Can you do energy-intensive actions only every 10 seconds or so, instead of every second?

Counter-intuitively this also means that your MCU (or BLE module) should run at highest possible clock rate for the short duration there is work to be done, then go back to sleep.

Now, the MCU or controller or BLE module you're using is not the only part of the circuit. In order to reach that minimal current consumption, you must also design rest of the circuit so that, too, takes as little power to run as possible, especially in deep sleep. After all, it doesn't really help to have your MCU at sleep, taking only 1uA, when rest of your circuit takes 1mA on top of that!

This part can be very challenging though. In case of my idea the circuit needs to both be always active (so every short event is noted; MCU can sleep, but remaining circuit needs to stay active) and highly tolerant to external interference (which in this case requires higher currents to be used in measurement part). A bit of a conundrum, that. At the moment I don't have a good solution to this at hand, but I do have some solutions - not great, each with some drawbacks, but nevertheless, I can make this to work. Not at optimal level, but it's still better than none at all.







Ei kommentteja:

Lähetä kommentti