This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Light Switch Design

We are working on the BLE Smart Switch.  The requirements are pretty generic:

  • Low Power consumption
  • To be used by multiple smartphones within the house

The obvious configuration is to have the smartphone as the Client and the NRF device (i.e. the switch) as the server.  Because we are still new to BLE technology, we are wondering:

    When a Smartphone is nearby, should the mobile App connect to the devices automatically and stay "Connected" (with the BLE connection)?

The problem with "staying connected" is that:

  • Staying connected will probably cause the device to consume more power than necessary.
  • How can multiple smartphones connect to the same switch at the same time?

I suppose all BLE switches would have these same issues.  So I would assume someone else must have already solved this.

The only solution we can think of is to have the switches stay unconnected, and will only connect when the user clicks "On" or "Off" in the mobile app.  This means the mobile app would have to first connect, then update the specific characteristic.  Wouldn't this cause a longer delay to switch the light on or off?

Any advise would be greatly appreciated!

Joe

Parents Reply Children
  • First, thank you for the insightful explanations and new information about multiple central connection that I didn't know before.  You provided exactly the information that I need.

    In our use case, allowing multiple phones to access our device any time is important.  Using the algorithm in the example you gave is helpful, but it will not save any power used by our device because the device needs to keep on advertising in order to allow other Centrals to connect any time.  In some cases, it will be probably use more power to maintain the connections of the connected devices.  Of course, have Centrals already connected should speed up the time it takes to read or update a characteristic.

    From our tests, follow my original described algorithm that when access the device, the mobile client will first connect > then retrieve the list of services > then read/set the characteristic > then disconnected.  The whole process takes anywhere from 1.5 seconds to 5 seconds, depending on range and on interference from other devices.  We think that the response time is acceptable.  Measuring the power usage of the device using PPK, it averages 55uA while advertising at adv interval of 250m, which is not bad.

    Anyway, we will think about the two approaches a little bit more, before deciding which way to go.  Power vs Simplicity vs Response Time.  At least, I think I now have all the information for the analysis.

Related