Puck initiating data transfer on a timer

Posted on
  • I am working on a way to track test equipment in our lab. I only need to know daily if something that is supposed to be in the room is no longer in the room. My idea was to the the Puck self identify every 6 hours to a central client and if 24hrs have passed without a ping then I am notified of a missing item.

    Not sure how to interface from the Puck side and a way to make the battery last >1 year.

    Any ideas?

  • Hi!

    By default Bluetooth devices send out an 'advertisement' to say they're there (and allow them to be connected to). It sounds like it's pretty much exactly what you want.

    By default Puck.js advertises every 375ms in such a way that it can be connected to - this draws 40uA (full info here: https://www.espruino.com/Puck.js#power-c­onsumption)

    Just doing NRF.setAdvertising({},{connectable:false­, scannable:false}); drops that to 22uA though

    And telling it to advertise only every 2 seconds with NRF.setAdvertising({},{connectable:false­, scannable:false, interval:2000}); drops the power usage very low below 10uA. 200mA/10uA = 20,000 hours (over 2 years hopefully)

    There are diminishing returns in power usage from lowering the advertising interval further, and since an advertisement isn't guaranteed to get through it helps to have a lot more of them sent out than you need.

    There's some info on receiving those advertisements on different things at https://www.espruino.com/BLE+Advertising­ as well.

    Hopefully that should be a good start!

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

Puck initiating data transfer on a timer

Posted by Avatar for user149186 @user149186