This project aims to demonstrate the various possibilities of using the audio analog header on the DragonBoard410c. In this particular project I'll be focusing on the mic input and how that can be used to input audio with Line-In from another audio source like a HiFi system. That line-in signal then gets used to drive the NeoPixels connected to an Arduino.
- 96Boards Dragonboard 410c
- 5v 2A USB Power Bank
- 2x 22uF Bipolar Capacitors
- 4x 2.7KOhm Resistors
- 2x 22KOhm Resistors
- 1x Arduino Nano
- 1x Logic Level Shifter
- 12x NeoPixels in strip or stick
- [1x Stereo Audio Socket of choice]
- Miscellaneous: Quantity as per required:
- Connecting wires
- Soldering Kit
- Screwdriver Set
- Double sided tape
- Arduino Setup
Arduino Nano | Level Shifter HV | <-> | Level Shifter LV | DB410c LS | NeoPixels |
---|---|---|---|---|---|
A5 (SCL) | HV1 | <-> | LV1 | 15 (I2C0_SCL) | |
A4 (SDA) | HV2 | <-> | LV2 | 17 (I2C0_SDA) | |
5V | HV | <-> | LV | 35 (1v8) | 5v |
GND | GND | <-> | GND | GND | GND |
D6 | NA | DI |
-
DragonBoard410c Audio Input Setup
-
Since the analog header is designed for Mic input level, we need to tone down the line input. To do that we'll be using a simple circuit:
Values for the Components are as follow:
- R1: 22KOhm
- R2 & R3: 2.7KOhm
- C1: 22uF (Bipolar)
-
For the stereo input we are using the following pins:
- CDC_MIC2_P: Pin 6
- CDC_MIC1_P: Bottom Right pin on the GM1 (Underside of the Low-speed Connector)
-
- Latest Linaro Debian Release Build
- Python SMBus Module
$ sudo apt install python-smbus
- Flash
src/neopixel.ino
using the Arduino IDE.
- Setup Alsa for stereo input:
$ sudo ./src/setup_alsa.sh
- Run the Python code
$ sudo arecord -D plughw:0,2 -r 48000 -f S16_LE -c 2 | python src/visual.py