0

Understanding Which to Use: Bluetooth or RF
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Understanding Which to Use: Bluetooth or RF

by caveman_techie on Mon Jan 07, 2019 1:21 pm

I am planning an Arduino-based, wireless, lighting control project for an automobile. These are aftermarket LED banks that are not connected to the vehicle electronics.

The switching box will have a receiver, a micro-controller, a relay board, buss, and fuses.
I will have a handheld remote to control the system, but I am having a difficult time understanding what communication system to use: Bluetooth or RF.

Here is what I think I understand: (please correct anything that I have wrong)
1. If I use Bluetooth, I must use an Android or iOS mobile device and write an app to control the lights.
2. If I use RF, I can create my own handheld controller or re-use a remote control (such as TV remote).

What I don't know and would like help understanding:
1. How do I decide between Bluetooth and RF?
2. Can I make my own Bluetooth handheld instead of using a mobile device app?

caveman_techie
 
Posts: 8
Joined: Mon Dec 10, 2018 3:17 pm

Re: Understanding Which to Use: Bluetooth or RF

by franklin97355 on Mon Jan 07, 2019 2:58 pm

What I don't know and would like help understanding:
1. How do I decide between Bluetooth and RF?
Either will work, it's just up to how much work you want to put in to making them do what you need. And how comfortable you are working with each protocol.
2. Can I make my own Bluetooth handheld instead of using a mobile device app?
You can if you put in the effort and research.

franklin97355
 
Posts: 19712
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Understanding Which to Use: Bluetooth or RF

by caveman_techie on Mon Jan 07, 2019 3:14 pm

Thank you for your reply.

I have never used either method. This is my first wireless project.

Do you have a recommendation? ...or at least some considerations that make either unique from the other?

caveman_techie
 
Posts: 8
Joined: Mon Dec 10, 2018 3:17 pm

Re: Understanding Which to Use: Bluetooth or RF

by grantbt on Wed Jan 09, 2019 6:33 pm

How complicated is the command set you plan on using? I have some LEDs that are controlled from an IR (infrared) remote. You can probably buy IR or RF remotes and receiver modules. If you need to move a lot of data, then probably Bluetooth is better.

grantbt
 
Posts: 28
Joined: Mon Dec 10, 2018 7:45 pm

Re: Understanding Which to Use: Bluetooth or RF

by caveman_techie on Wed Jan 09, 2019 9:10 pm

Thanks for the reply, @grantbt.
The commands should be simple.
- High/low to set output pins to trigger optocoupler relays.
- I am considering to add a temperature sensor in the relay box, so I will need to send that data back to the hand set.
- I am also considering sending blinking pattern information (high/low, delays, timing patterns), although these will probably be preprogrammed. In that case on need to send a “trigger” value.

caveman_techie
 
Posts: 8
Joined: Mon Dec 10, 2018 3:17 pm

Re: Understanding Which to Use: Bluetooth or RF

by p2w on Thu Jan 10, 2019 11:08 am

If I may...

Just investigate the differences between RF and BT before starting the project and deciding upon the protocol to use. Just to give you a head-start:

1. RF is a broad term that refers to "Radio Frequency". Bluetooth (or the low-energy variant "BLE") strictly speaking also is an RF protocol - it uses radio signals to communicate. However, in IoT and similar applications, often (but not always) the term RF describes a simple radio protocol that uses free (non-licensed) radio bands to send information.

2. BT uses frequency hopping on 2.4 GHz, RF usually uses a fixed frequency at 433 MHz or something like that (sometimes 900 MHz, sometimes something in between)

3. BT by definition implements 2-way communication, RF (as used in KlikAanKlikUit or similar control systems) often implements one-way communication only

Okay, for your application, there is little need for 2-way communication (since there's always a human that can see if the signal was received by the apparatus you want to control). At first sight, the obvious choice therefore would be to go with RF. However. Since the transmission protocols (the "language" the remote control and the receiver use to communicate) is not fixed, you most likely will need to implement both sides (transmitter and receiver) to make sure they understand each other. In bluetooth, both sides by default "speak" the same protocol.

Personally, I would probably choose BLE for this application since it's light on battery-usage and still powerful enough to easily enhance with your new requirements. The downside is that BLE has a steeper learning curve than RF. Luckily, there's plenty of hard- and software around to make things easier (like the bluefruit libraries or the Adafruit Bluefruit LE UART Friend which provides a AT-commandset through BLE, actually hiding most of the BT stuff from your efforts).

So, to sum it up, you initial questions:
1. How to decide between the two options is up to you. Do you just want to quick and dirty solution or do you want to use this case as an introduction in the technology? In case of the latter, choose BLE. If it's just your goal to get this particular case solved, either use BLE UART friend or use RF.

2. Can you make your own bluetooth handset? Yes, you can!

p2w
 
Posts: 55
Joined: Fri Dec 15, 2017 5:29 am

Re: Understanding Which to Use: Bluetooth or RF

by caveman_techie on Thu Jan 10, 2019 11:57 am

Thank you @b2w.

p2w wrote:So, to sum it up, you initial questions:
1. How to decide between the two options is up to you. Do you just want to quick and dirty solution or do you want to use this case as an introduction in the technology? In case of the latter, choose BLE. If it's just your goal to get this particular case solved, either use BLE UART friend or use RF.


Very good information. Based on learning the technology, and low power consumption benefits, I will go with BLE.

I have researched the BLE options and I don't understand what the effective difference is between these 2 options:
Adafruit Bluefruit LE UART Friend - Bluetooth Low Energy (BLE) and Adafruit Bluefruit LE SPI Friend - Bluetooth Low Energy (BLE)
For a novice, the information available does not help me. All descriptions assume you have a good working knowledge of UART & SPI.
Can you help me understand the differences at a novice level?

caveman_techie
 
Posts: 8
Joined: Mon Dec 10, 2018 3:17 pm

Re: Understanding Which to Use: Bluetooth or RF

by p2w on Tue Jan 15, 2019 11:50 am

caveman_techie wrote:I have researched the BLE options and I don't understand what the effective difference is between these 2 options:
Adafruit Bluefruit LE UART Friend - Bluetooth Low Energy (BLE) and Adafruit Bluefruit LE SPI Friend - Bluetooth Low Energy (BLE)
For a novice, the information available does not help me. All descriptions assume you have a good working knowledge of UART & SPI.
Can you help me understand the differences at a novice level?


Sure. Whilst both, UART and SPI are used to send data in a serial format, there are some pretty specific features that distinguish the two.

The term UART is an acronym for "Universal Asynchronous Receiver Transmitter". A UART typically consists of a shift register where bits are sent through a transmit line (often referred to as "TxD") and received through euhm... a receive line (RxD). It is asynchronous, meaning timing is used to determine when each bit begins and when it ends. A UART typically sends a start bit that indicates the start of the transmission and ends with one or more stop bit. Speeds vary greatly, depending on the purpose the UART is used for. Since it does not describe the physical layer (see "OSI model"), it may be possible to transmit at speeds of up to a couple of Mbit/s. Usually though, possible baudrates are a fixed set between 9600 to 115200 bits per second. High speeds may require extra control signals like CTS and RTS to indicate the state of the transmission endpoints.

SPI is a synchronous protocol - it's an acronym for "Serial Peripheral Interface". Like the UART, it also uses a transmit- and a receive lines (though these are named differently: MOSI and MISO respectively), but these are always accompanied by a clock line ("SCLK")). Data is synchronised to this clock - hence the name "synchronous". In addition, there usually (but not always) is a slave select signal that activates the remote device. SPI, as the name suggests, is meant to be used for communication between chips residing on the same board. In the real world short off-board distances won't pose any problems though. Speeds are limited by the clock, which can reach speeds of up to 100 MHz.

On a higher level, SPI specifies strict master and a slave roles. The master (usually the uC) controls SS and CLK lines, the slave can only answer to requests made by the master. UART does not specify such a relationship.

There are other differences, but I guess for this purpose the above description suffices. Thus, to summarize:
- UART is asynchronous, features no master / slave relationship and does not specify the electrical characteristics from the connection. It's not exceptionally fast. It does not specify any semantics of the data it transfers - syntax and semantics are defined in the application of all involved parties. It primarily is meant to transfer data to/fro off-board resources.

- SPI is clock synchronous, defines strict master- and slave roles and is tied to pretty specific electrical characteristics. SPI requires more hardware but it is more reliable and usually significantly exceeds UART communication speeds. The semantics of the messages used are defined by the slave device it connects to. It primarily is designed to connect devices on the same PCB.

For both buses (and many others), wikipedia is a great source to start learning about both buses in detail.

p2w
 
Posts: 55
Joined: Fri Dec 15, 2017 5:29 am

Re: Understanding Which to Use: Bluetooth or RF

by caveman_techie on Tue Jan 15, 2019 12:49 pm

Thank you, @p2w. Great information.

caveman_techie
 
Posts: 8
Joined: Mon Dec 10, 2018 3:17 pm

Please be positive and constructive with your questions and comments.