The Project board is for sharing projects based on Silicon Labs' component with other community members. View Projects Guidelines ›

Theremin over BLE project

The following article goes over an example project for a job fair where the Silicon Labs Budapest participated.

Project Background:

The goal of this project was to create an interactive and fun Demo that would catch the attention of the public while being simple and using our hardware. A Theremin accomplishes this by being fun to play with and loud to catch people's attention while showing the capabilities of our wireless and sensor kits.

Description:

The theremin will be composed of an EFR32MG12(BRD4162A) and a Si1133/Si115x Optical Sensors Expansion Board(BRD8009A). The sound is played in a mobile phone or a tablet using the MIDI over BLE service.

Setup

Project Overview:

The following image illustrates the setup:

Diagram

  1. the Optical Sensors Expansion Board(BRD8009A) was used to control the sound, an interface was created using the Gesture mode to poll 2 of the 3 IR LEDs, left and right side. Left side channel controls the volume and right side channel the sound pitch, this is done by measuring the proximity of the hand to the irLED.

User guide for the Optical sensor board: UG163: Si1133/Si115x Optical Sensor Evaluation Board Rev 3.0 User's Guide Optical Programmer's Toolkit: Si115x_PGM_Toolkit.exe This toolkit is useful for looking at the demos and for evaluating how the part would behave in a real product. We urge customers to add their own overlays or optics to this board and then use this application to see what kind of optical signal their system would see.

  1. The sensor board communicates to the EFR32 via I2C using the Expansion connector

  2. BRD4162A contains an EFR32MG12, it is used in SoC mode as peripheral device advertising to create an application that will parse the data receive from the sensor board to the Midi protocol.

  3. The EFR32 will transmit said data to a connected device using the Midi over BLE protocol. To add this functionality the [KBA_BT_0911: Midi over BLE] (https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2019/06/19/kba_bt_0911_midioverble-ZvKw) was used.

  4. Depending on the mobile device used (Android or iOS), an app needs to be downloaded to receive the Midi data in your device. iOS: KORG Module free version app can be used. Android: MIDI BLE Connect app. This app will allow to connect to BLE Midi devices and after connecting the device can be used with any app that supports midi.

  5. In the case of android device a midi output app is needed. FluidSynth MIDI Synthesizer was used in this project, to either output to the phone speaker or to an external one via the headphone jack. For iOS devices the KORG app handles the BLE connection and the midi output.

Source files

  1. Create a soc-empty example from the SDK example projects.

  2. Copy the files attached in the project root folder and overwrite the existing files.

  3. From the Gatt configurator import the gatt.xml file that was copied into the project root folder.

  4. Copy \developer\sdks\gecko_sdk_suite\v\platform\emdrv\gpiointerrupt\src\gpiointerrupt.c to the soc-empty project

  5. Build and flash

  6. Connect to your device using a Smartphone/Tablet: *Android: download MIDI BLE Connect app and FluidSynth MIDI Synthesizer app. Connect with MIDI BLE connect and open FluidSynth MIDI Synthesizer and select the device. *iOS: download KORG module and connect via the BLE midi menu.

  7. Play with your hands over the sensor.

  • Bluetooth Low Energy
  • Projects
  • Si115x