• I'm looking for the lowest power way to build something like a bluetooth remote.

    Right now I'm updating a service/characteristic every time the button is pressed or released, and my PC-side C# app subscribes to those events. I had seen the North Focals controller do this, and that seems to get a large amout of battery life out of a tiny battery for its usecase (significantly fewer presses per minute than a mouse or keyboard).

    When the PC is subscribed, it seems to draw a steady (and higher than baseline advertising) current. Before I go experiment with many things and probably draw the wrong conclusions with my imperfect measuring equipment, is there a best practice/even lower power way of doing this? Putting events in advertising packets and pushing them realtime? Is the HID system better?

  • I felt guilting for asking, so I naively tested what I could, and found the following current draw (tested on an Espruino MDBT42Q Breakout, post flash+reset, with setWatch on 5 pins):

    Service+Characteristic:
    Idle: ~0.2mA
    Connected: ~0.43mA

    Keyboard HID:
    Idle: ~0.2mA
    Connected: ~0.43mA

    My ammeter isn't good enough to know how much power is used for sending key presses or service update notifications, but I assume it's similar. Based on the numbers being the same, using a GATT Characteristic seems much better for my case because I can control the connection programmatically on the PC side, and differentiate between senders more easily, but would love insight from others if you know better (I'm still curious about send the characteristic changes without the active connection, because I don't care about exclusivity)

  • There are a few power figures here: https://www.espruino.com/MDBT42Q#power-cĀ­onsumption

    But basically it shouldn't make too much difference. Behind the scenes, HID is just notifying on a characteristic anyway, just like you would be.

    What will be hurting you is the connection/advertising interval though. That's how fast packets are sent. Best bet is:

    // For when you're connected
    NRF.setConnectionInterval(200); // in milliseconds - you can go even higher than this
    // For when disconnected
    NRF.setAdvertising({}, {interval:500}); // default is ~300. Higher values use less power, but make connecting slower/more difficult
    

    Hope that helps! When connected with a low connection interval you should be able to get down to 0.04mA or so

  • Thank you! I had slowed advertising, but I hadn't realized just how dramatic the setConnectionInterval change would be - with that and some timers to adjust its range to suit, my current draw is now below the range of my current measuring equipment's ability to detect, which is good enough for now - thanks again :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Lowest power way to send button presses to a PC in realtime

Posted by Avatar for gmurphy @gmurphy

Actions