Audio Mezzanine Board

Skill LevelArea of FocusOperating SystemCloud Service/Platform
IntermediateAlexa Voice Service,
Bluetooth,
IoT, Sensors
LinuxAWS IoT

This project uses the 96Boards Audio Mezzanine Board and Alexa Voice Services to highlight the audio functionality of the DragonBoard™ 410c.

To showcase audio use cases and functionality of the DragonBoard 410c, the project captures audio from the headset microphone jack on the audio mezzanine board (AMB), then uses Alexa Voice Services for voice recognition, and then plays an audio response to a Bluetooth-paired speaker.

The audio mezzanine board includes:

  • 6 Grove ports:
    • 2x I2C
    • 1x UART
    • 3x GPIO
  • USB to UART conversion for access to the DragonBoard 410c system console
  • Access to the analog audio on the DragonBoard 410c
    • 3.5mm headset jack
    • Analog Mic
    • Digital Mic
    • Speaker connection
  • Access to the low-speed expansion connector with level shifting
  • Power, reset, and volume control buttons

Use Case 1 – Uses a Grove color sensor connected to the audio mezzanine board and audio output via wireless speakers. When the sensor detects one of four different colors, an audio response is triggered. Each color has a particular song associated with it, so once a sensor identifies a color (e.g., blue), a specific song should be played (e.g., a blues song).

Use Case 2 – Uses a Grove color sensor connected to the audio mezzanine board and audio output via wireless speakers. When the sensor detects one of four different colors, an audio response is triggered in the form of a voice service audibly identifying what color has been detected (e.g., “the color is blue would be heard through the speaker).

Use Case 3 – Uses an audio input via a microphone attached to the audio mezzanine board. A user asks a question into the microphone, which then triggers the Amazon Alexa voice service to initiate a cloud-based Internet search on that topic, resulting in an audio reply to the query via the Bluetooth connected speaker.

Materials Required / Parts List / Tools

Source Code

Hardware Connections:

  1. The DragonBoard 410c that comes with the Arrow DragonBoard 410c Audio Kit should already include the audio pin header:
    DragonBoard 410c with audio pin header
  2. Connect the Audio Mezzanine Board to the DragonBoard 410c
    Audio Mezzanine Board
  3. Insert the headset to headphone / microphone splitter into the headset jack on the Audio Mezzanine Board
    Audio jack on Audio Mezzanine Board
  4. Connect the microphone to the microphone jack on the splitter
  5. Connect the HDMI monitor to the DragonBoard 410c HDMI port
  6. Connect the USB keyboard/mouse to one of the DragonBoard 410c USB ports
  7. Connect the Grove Color Sensor to the I2C0 port on the Audio Mezzanine Board using the Grove I2C cable
    I2C0 port on Audio Mezzanine Board
  8. Set Switch 1 (SW1) on the Audio Mezzanine Board to the ON position, and set Switch 2 (SW2) on the Audio Mezzanine Board to the 5V position
    Settings for Switch 1 (ON) and Switch 2 (5V) on Audio Mezzanine Board
  9. Set Switch 6-3 (SW6-3) underneath the DragonBoard 410c to the ON position (USB HOST)
    Switch 3 setting (ON) on back of DragonBoard 410c

Software Installation:

  1. Follow the directions at 96boards.org to install the Debian Linux OS on the DragonBoard 410c. Be sure to use version 16.06. (If you use the SD Card method, download the boot image dragonboard410c_sdcard_install_debian-110.zip, and be sure to set the Switch 6-2 (SW6-2) on the back of the DragonBoard 410c to OFF before rebooting.) The DragonBoard 410c included in the Audio Kit from Arrow should already have the correct version of Linux installed for you.
  2. Insert the power cable to the DragonBoard 410c and boot the DragonBoard 410c to get to the desktop on the monitor
  3. Connect to a Wi-Fi network by clicking on the Network icon in the taskbar
  4. Open a terminal by navigating: [Start] -> [System Tools] -> [LXTerminal]
  5. Download the necessary supporting packages by running the following commands in the LXTerminal:

    sudo apt-get update
    sudo apt-get -y install espeak
    sudo apt-get -y install libttspico0
    sudo apt-get -y install libttspico-utils
    sudo apt-get -y install libpulse-dev
    sudo apt-get -y install vlc

  6. Add the i2c group to the Linaro user to access I2C devices: sudo usermod -a -G i2c linaro
  7. Download and build the AMB Demo by running the following commands in the LXTerminal: mkdir Projects
    cd Projects
    git clone https://github.com/DBOpenSource/amb_demo
    cd amb_demo
    make clean && make
  8. Install the MP3 songs (such as from a USB thumbdrive) into the AMB Demo project: mkdir songs
    cp /media/linaro/<USB_thumbdrive_name>/<song_name>.mp3 songs/Red.mp3
    cp /media/linaro/<USB_thumbdrive_name>/<song_name>.mp3 songs/Blue.mp3
    cp /media/linaro/<USB_thumbdrive_name>/<song_name>.mp3 songs/Green.mp3
    cp /media/linaro/<USB_thumbdrive_name>/<song_name>.mp3 songs/Yellow.mp3
  9. Install the Amazon AWS client under the ~/Projects directory by following the instructions in the Amazon Alexa Voice Control Services Setup Instructions for the DragonBoard410c 
  10. Reboot the DragonBoard 410c
  11. Open a terminal by navigating to: [Start] -> [System Tools] -> [LXTerminal]
  12. Go to the AMB Demo project directory: cd ~/Projects/amb_demo
  13. Pair a Bluetooth speaker to the DragonBoard 410c by clicking on the Bluetooth icon in the taskbar and select Setup New Device…
  14. Select the Bluetooth speaker:
    1. Navigate to [Start] -> [Sound & Video] -> [PulseAudio Volume Control]
    2. Click on the [Output Devices] tab
    3. Click on the Enable button of the Bluetooth speaker
    4. NOTE: The Enable button is the one with the icon of a checkmark in a green circle
    5. Close the Volume Control window

    Running the Audio Mezzanine Board-based Program

    • From the ~/Projects/amb_demo directory:
      ./amb_demo
    • Follow the directions in section 2.10 of the Amazon Alexa Voice Control Services Setup Instructions for the DragonBoard410c  to enable the AWS service
    • Select one of the five available demos by selecting the number preceding it and pressing Enter
      • NOTE: See the individual demo descriptions below for details on how to run them
    • Press a and Enter to start the demo
    • Press b and Enter to stop the demo
    • Press x and Enter to exit the AMB Demo program
    • After stopping a demo, a new demo can be selected

    Color to Music Demo

    • Start the demo
    • Place a blue, red, green, or yellow color paper flush against the cylinder of the Grove sensor and wait for several seconds
    • The song corresponding to the color should begin to play over the Bluetooth speaker
    • After removing the paper, the song should continue to play
    • Place a different colored paper to change the song
    • Stop the demo

    Color to Local TTS Demo

    • Start the demo
    • Place a blue, red, green, or yellow color paper flush against the cylinder of the Grove sensor and wait for several seconds
    • The color of the paper should be identified over the Bluetooth speaker
    • Place a different colored paper to repeat
    • Stop the demo

    Color to Pico TTS Demo

    • Start the demo
    • Place a blue, red, green, or yellow color paper flush against the cylinder of the Grove sensor and wait for several seconds
    • The color of the paper should be identified over the Bluetooth speaker
    • Place a different colored paper to repeat
    • Stop the demo

    AWS Voice Recognition Demo

    • Start the demo
    • Press the [Start Recognition] button
    • Speak into the microphone with a request for AWS (ignore the audible tone that emits over the Bluetooth speaker)
    • The response should come over the Bluetooth speaker
    • Press the [Start Recognition] button to repeat
    • Stop the demo

    Voice Test Demo

    • Start the demo
    • Speak into the microphone
    • The audio should be looped back to the Bluetooth speaker
    • Stop the demo