Some Bluetooth questions

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I use a controller to control lights in a room. It has switch plates as inputs and dimmers/relays as outputs. I wish to use Bluetooth on mobile to control the lights.  I expect that I connect a Bluetooth transceiver to room controller via a serial link.  My Questions: -

  1. What will be the mode of operation? Given that only few bytes need to be exchanged, I assume that it should be BLE. Do mobiles have options to select between BLE or BR/EDR mode of operation?
  2. Given that there may be more mobiles in the room, what kind of operation topology I shall expect i.e. Master-Slave. I believe that Bluetooth device can change roles. The command data, at most of time, will originate from mobile.
  3. Any idea about the Bluetooth transceiver chip-set that I can use to connect to room controller.
  4. Does the latest mesh net in Bluetooth comes to rescue? I believe it’s meant for sensors etc.

My knowledge on Bluetooth is limited so please bear with me. Also, I have not thought of how app will be developed, I thought that I shall first establish basic Bluetooth concepts. The Wi-Fi option is not considered since it could well mean creating another Wi-Fi network. Any inputs are welcome. Thanks in advance .

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

systemteqavr wrote:
Do mobiles have options to select between BLE or BR/EDR mode of operation?
Some yes, some no

Some Bluetooth modules are dual-mode (Bluetooth 2 or 3 and 4 or 5, iow BR/EDR and BLE)

systemteqavr wrote:
Given that there may be more mobiles in the room, what kind of operation topology I shall expect i.e. Master-Slave.
Central-Peripheral

Bluetooth has piconet (1:7 max) with Bluetooth 5 adding peer-to-peer (many:many)

Topology Options | Bluetooth Technology Website

systemteqavr wrote:
Any idea about the Bluetooth transceiver chip-set that I can use to connect to room controller.
choices ... choices

Mouser's been adding several or more Bluetooth 5 modules as new products recently.

Might browse Qualified Bluetooth Mesh Products | Bluetooth Technology Website

 

systemteqavr wrote:
Does the latest mesh net in Bluetooth comes to rescue?
Yes

 

P.S.

systemteqavr wrote:
What will be the mode of operation? Given that only few bytes need to be exchanged, 
fyi, transparent UART (iow wireless serial port) at up to 10Kbps is the default mode for Microchip's inexpensive BLE modules.

These modules are up to Bluetooth 5 but aren't in the mesh network capable list.

Arduino with RN4870/1 | Martyn Currey

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

systemteqavr wrote:
Also, I have not thought of how app will be developed,
MIT App Inventor has a Bluetooth API and is one possible first start in lieu of Apple Xcode, Google Android Studio, Microsoft Visual Studio, Microsoft Visual Studio Code, ...

About Us | Explore MIT App Inventor

via app inventor | Martyn Currey

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman

 

Many thanks. There is some very useful feedback.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You seem to be reinventing the same old wheel all over again.

You may of course if you want to, but why would you?

 

What is wrong with setting op a new WiFi network?

An USD 5 ESP8266 and some example code of the 'net is all you need, and it works in the "arduino" environment if that is what you want.

(Wemos D1 Mini is a nice starter board for ESP8266. It is among the smallest and cheapest boards which can be plugged directly into USB).

The SonSoff switches also have an ESP8266 in them. The S20 is a complete box with a wall plug for around EUR 10 and you can get smaller boxes with screw headers for around EUR 5.

http://www.aliexpress.com/wholesale?SearchText=SonOff

Be carefull with mains voltage if you want to open these boxes to reflash the firmware.

 

For a small wireless network there are plenty of radio's which fit better than Bluetooth.

RFM69 is my choice, beause of popularity, plenty of example code, small price and built in AES128.

CC1101 is another radio that could be nice, but I haven't tried it.

I did try the nRF24L01+ and I did get it to work eventually, but I really dislike that chip. Nordic's 6- pipe model is just plain horrible.

RFM69 has much better features for fine tuning the radio and a simple single FiFo for the data, which seems straightforward to use.

Platformio has around 10 libraries for the RFM69 and if that is not enough you can find more on github.

 

If you want to connect from a phone / tablet / E-book / other existing gadget and you really want to use bluetooth you could look into ESP32.

ESP32 is the bigger brother of the ESP8266.

You could use that to bridge the gap between your Bluetooth device and your mesh network of small radio's.

 

You should also consider using a small Linux box as a gateway between Bluetooth / Wifi and your mesh network.

This opens the world of OpenHab, MQTT, and lots of other "home automation" applications and can be accessed from any PC with a web browser.

 

MQTT is a protocol you should really look into.

MQTT collects data from small nodes. (For example a battery fed temperature sensor on your balcony) and puts this data in a database and makes it available for other nodes.

So your temperature sensor almost always sleeps, but wakes up for 10ms, does a temperature reading, sends it to MQTT, and then goes back to sleep for a minute or an hour.

MQTT collects the temperature for availability to web interfaces, thermostats, or your alarm clock if you need to get 10 minutes earlier out of your bed to defrost your car window when it freezes.

 

Then there is also Node Red.

Node Red is a click and drag interface to connect all those building blocks together.

It seems to be quite powerfull.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

fyi, transparent UART (iow wireless serial port) at up to 10Kbps is the default mode for Microchip's inexpensive BLE modules.

Texas Instruments UART Bluetooth 4 bridge defaults its baud to an order of magnitude greater than 10Kbps with a how to for use of the the heap to buffer between the arm Cortex-M3 UART and Bluetooth 4.2; follow on products have Bluetooth 5 so the throughput is improved.

Texas Instruments

UART to Bluetooth low energy (BLE) Bridge Design Guide

(page 4)

Baud Rate

(page 7)

2.2.6 Optimizing Data Throughput

TI Serial Port Service (SPS)

both via TIDC-SPPBLE-SW-RD UART to Bluetooth® Low Energy (BLE) Bridge Reference Design | TI.com

 

"Dare to be naïve." - Buckminster Fuller