Bluetooth or possibly Bluetooth Low Energy (BLE) was the groups decided method of communication between a phone with an app specific to the project and the instrument itself. As a direct connection between two devices, BLE can be a relatively inexpensive, in the sense of processing power and energy consumption, method of communication.
3.7.1 Research
Bluetooth and BLE are communication standards set by IEEE. Bluetooth is short-range communication sent between the 2400-2483.5 MHz short-range with 79 channels 1 MHz in bandwidth [30]. Bluetooth LE is the same communication range but the interaction between the devices is what uses less energy. BLE is better for communications that don’t require constant connections or are low amounts of data. Considering how small the MIDI communication packets are, BLE works for the project. This reduction in power helps retain battery life of the device while it is connected to a phone utilizing an app.
As it stands, there are libraries from not just free open-source sharing networks, but well-documented libraries from many available different devices to handle BLE communication. With the more updated versions of Bluetooth communication in newer chips, BLE v5 has increased capabilities. Some of these powerful new abilities include a higher throughput of almost 2 Mbps, a longer range, although at reduced throughput, and improved interference avoidance [31]. The newest version, 5.1 allows for location and positioning. Although using Bluetooth v5 or v5.1 would use cutting-edge technology, most of the features that sets it above v4.2 aren’t pertinent to this project. By recognizing that the group isn’t limited to v5 and above, and that v4.2 devices are still the most common, and therefore cheaper, the group has more possible options as far as Bluetooth capable devices. Most importantly, v4.2 helps satisfy the distance requirement of the project, able to connect well beyond the 3 feet, up to almost 30 feet.
3.7.2 Technology Comparison
Originally, the group investigated selecting chips that were Bluetooth-specific, that the only job the Bluetooth chip had was to handle the communication between the phone app and the instrument. However, after some research on the communication process between a chip and some other processing chip within the device, the solution appeared to be to instead pick a chip that included Bluetooth and handled all communication natively.
In the process of deciding how to approach what was wanted and needed for the Bluetooth module, necessary in communicating wirelessly to an application, research was completed as a comparison of two different modules. This comparison is summarized in Table 25 and explained in a much larger breakdown following the table. The below comparison is what changed the groups decision from using a small Bluetooth specific chip to a larger, more robust device that could handle both the processing of the device and the communication between the instrument and a phone.
Table 25 Bluetooth Comparison Chart
BL651 453-00005 Laird ESP32-SOLO-1 Espressif
Cost $4.99 $3.40
RoHS ✔ ✔
GPIO Pins 32 32
Supply Voltage 1.7 – 3.6 V 3.0– 3.6 V
Power Consumption 2.1 mA–7.0 mA peak 28 mA – 240 mA
ADC 8 channels 8 channels
MCU – Storage 192K 448K
MCU – RAM 24K 520 K
MCU ARM Cortex M4
[64MHz]
Xtensa 32-bit LX6[40MHz]
Size 14 mm x 10 mm x 2.1 mm
25.5 mm x 18 mm x 3.1 mm
Bluetooth Protocol v5.0 v4.2
The Bluetooth Module from Espressif is very dynamic and would have helped the project by taking some of the processing from the device’s main MCU and could have potentially replaced the need for any MCU. The on-module storage would have helped to keep information running smoothly and fast between the device and whatever the app might be. This part is cheaper as well, helping keep costs down as the team may require multiple Bluetooth modules in the event that some fail during testing. This specific model also has the capability of Wi-Fi, with 802.11 b/g/n protocols. Espressif also offers a large GitHub wealth of open-source software to help users with their projects, including an Audio Development Framework. The largest downsides to this specific part are the energy draw and the large board footprint.
As one of the specifications requires the device to run off a battery, this is an egregious amount of power to be taken up by a single component. Even if the
module does not pull that much power all the time, it still could cause a large draw on the battery. The size of the Espressif module would have posed a threat to the specification regarding size. The module is nearly twice as large as the BL651 module, and its antenna would take up much more nothing space on the PCB to accommodate the required space. This is another area that will rack up cost, as building the PCB to accommodate the module footprint and blank space for the antenna would have added up to more costs.
Even though a few of the BL651 modules for testing and prototyping created more cost during the project, the much smaller footprint and antenna space would have saved costs on the final PCB and keep it smaller overall. The device can run as not only a lower voltage, but a much smaller energy consumption than the Espressif module. This module is also programmable using JTAG.
Table 26 ESP32-SOLO-1 vs ESP32-WROOM-32D
ESP32-WROOM-32D ESP32-SOLO-1
Cost $3.80 $3.40
RoHS ✔ ✔
GPIO Pins 36 36
Supply Voltage 3.0 – 3.6 V 3.0– 3.6 V
Power Consumption 28 mA – 240 mA 28 mA – 240 mA
ADC 8 channels 8 channels
MCU – Storage 448K 448K
MCU – RAM 520K 520 K
MCU Dual-core Xtensa 32-bit
LX6 [40MHz]
Xtensa 32-bit LX6 [40MHz]
Size (mm) 25.5 x 18 x 3.1 25.5 x 18 x 3.1
Bluetooth Protocol v4.2 v4.2
Both modules have 32 GPIO pins, which wasn’t enough to potentially control the laser diodes if the app were given control over the device, but at a minimum was able to read the values from the chosen light-sensitive sensors for the project. The modules are also capable of multiple forms of communication to the MCU, equipped with UART, I2C, and SPI, and have the option for ADC pins to give more flexibility in other places of the project.
After a comparison of the ESP32 devices to other competitors on the Bluetooth LE marketplace, such as TI, Dialog Semiconductor, Nordic Semiconductor and Silicon Labs, the Espressif ESP32 modules appeared to have the better size, storage, and capabilities for their price. In Table 26, two different Espressif ESP32 modules
are compared, the ESP32-SOLO-1 and the ESP32-WROOM-32D. Although by the table these parts look nearly identical, the largest difference is that for only $0.40 more, the WROOM has a dual core. The largest benefit to this was the ability to use one core for communication processing and the other for handling MIDI file creation when the device is being played and communicating to an app. The devices require the same consumption for RF communications, and although 240 mA is listed at the higher end of the consumption on the table, BLE only draws up to about 130 mA. The average consumption for the WROOM is listed at only 80 mA per its datasheet. Both modules have v4.2 Bluetooth and BLE, which was sufficient for this project.
3.7.3 Part Selection
For easier testing, a development kit for ESP32-WROOM-32D was purchased.
This chip is what the team chose moving forward, so the team purchased development boards with circuit protection, communication using USB-mini to flash programs, and pins to connect the board to components on a breadboard.
These chip safety features were useful in testing without as much risk to the chip.
The features of the board made changing memory, programs and other software easier until all software was finalized. Having multiple development kits helped to save the project, as team members were able to develop at home when the team could no longer meet on campus. Singular chips were purchased for when testing beyond basic programming and testing was completed to be soldered to the PCB.