Project guidance, Bluetooth thermostat

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
southernatheart
 
Posts: 79
Joined: Tue Mar 22, 2011 10:54 pm

Project guidance, Bluetooth thermostat

Post by southernatheart »

I’ve used several of your feather sense boards in projects, and they’ve served me very well in MIDI BLE mode. Now I have a project which would need 2 pieces of hardware, and wondering if the following scenario is possible:

There would be 2 Adafruit Feather nRF52 Bluefruit LE - nRF52832
One feather in my project (a heater), mounted on a custom PCB controlling a couple of relays,
One feather in a small enclosure that would set on my desk, which would send the current temperature to the first one via Bluetooth, once or twice a minute.
The one in the heater would also need to communicate with my iPhone (Bluetooth), with your Bluefruit connect app, so I could send commands from my phone if I wanted to change some settings like on/off time, or temp preferences.

Is it possible for the Adafruit Feather nRF52 Bluefruit LE - nRF52832 to communicate with my phone, and also another Adafruit Feather nRF52 Bluefruit LE - nRF52832 sending data? I’m hoping this is what is described in the dual mode section, but thought I’d ask before buying a couple to practice with.
Thanks.

User avatar
southernatheart
 
Posts: 79
Joined: Tue Mar 22, 2011 10:54 pm

Re: Project guidance, Bluetooth thermostat

Post by southernatheart »

Ps, there’s also the Adafruit Feather 32u4 Bluefruit LE

This one is listed in the section about building your own iPhone app, which would interest me.
Im not sure the difference between the
Adafruit Feather 32u4 Bluefruit LE
Versus
Adafruit Feather nRF52

I’ve used the feather sense, which I could program directly from arduino IDE

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Project guidance, Bluetooth thermostat

Post by adafruit_support_mike »

southernatheart wrote: Sat Nov 19, 2022 6:10 pm Is it possible for the Adafruit Feather nRF52 Bluefruit LE - nRF52832 to communicate with my phone, and also another Adafruit Feather nRF52 Bluefruit LE - nRF52832
Nope.

Bluetooth separates devices into 'central' and 'peripheral' categories. Central devices initiate and control all data connections. Peripherals emit packets to let nearby central devices know they exist, but otherwise sit and wait for a central to open a connection and tell them what to do. That arrangement puts most of the cost and complexity in the central device, allowing peripherals to be simpler, smaller, cheaper, less power hungry, etc.

The nRF52832 doesn't have enough processing power to run the BLE central code stack, so it only works as a peripheral. Peripherals can't talk to each other, and aside for some low-level error checking to avoid radio interference, peripherals don't even know other peripherals exist.

The nRF52840 does have enough processing power to work as a central device, but Bluetooth is almost always a bad choice for peer-to-peer communication between microcontrollers. The protocol was originally designed to be a wireless replacement for a USB cable, and has a lot of assumptions about one-way/one-to-one communication that make peer-to-peer communication unnecessarily difficult.. in the arrangement you described, the nRF52832 controlling the heater would have to interact with two different central devices (your phone and the desk-mounted device) which would be a major headache in terms of pairing.

For peer-to-peer communication, packet radio is among the simplest ways to pass general data back and forth:

https://www.adafruit.com/?q=packet+radio&sort=BestMatch

Wifi is also good, and sits on the TCP/IP network model which has tons of existing code support. That does add complexity though, so Wifi connections generally use more involved code than packet radio connections.

User avatar
southernatheart
 
Posts: 79
Joined: Tue Mar 22, 2011 10:54 pm

Re: Project guidance, Bluetooth thermostat

Post by southernatheart »

Ok, thanks, so much! I’ll look into just a simple packet radio for the thermostat to send data to the heater, and then use the Bluetooth connection from the heater to my phone.
Is the Adafruit Feather 32u4 Bluefruit LE the older model, and
Adafruit Feather nRF52 Bluefruit LE The newer model?
I’d like to order the newest one. Looking at the details, they both look about the same.
I’ve used the feather sense a couple times already so I’ll go with the Adafruit Feather nRF52 Bluefruit LE, unless the 32u4 is newer and better?
Thanks

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Project guidance, Bluetooth thermostat

Post by adafruit_support_mike »

The 32u4 Bluefruit LE uses an nRF51822 module, which isn't programmable from the Arduino IDE. The microcontroller for that board is the ATmega32u4, which sends commands to the nRF51822 over the SPI bus.

The nRF52832 and nRF52840 Feathers let you program the BLE module directly. The nRF52832 can only operate as a peripheral, while the nRF52840 can operate as both a central and a peripheral.

(BLE is still an awful choice for peer-to-peer communication between boards though)

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”