You'll need the following hardware for this guide:
The microphone will be hooked up to an analog input of the Teensy 3.0 which will sample audio and use the neo pixels as a display.
To setup the hardware you'll want to make the following connections:
  • Connect the microphone output to pin 14 (analog input) on the Teensy.
  • Connect pin 3 (digital output) on the Teensy to the input pin on a Flora RGB neo pixel.
  • Connect the output of the neo pixel to the input of another neo pixel. Continue chaining the neo pixel outputs to inputs for all the pixels.
  • Connect all power and grounds.
  • Connect a 5 volt power source (such as 3x alkaline AAA batteries) to VIN and ground on the Teensy.
Look at the diagram and photo on the left for an example of how I setup my hardware in a compact single row (good for turning into a wearable device).

Don't worry about the exact pin connections to the Teensy. If necessary you can adjust in the code the analog input pin for the microphone, and the digital output pin for the neo pixels.

Finally, turn up the gain on the microphone amplifier to its maximum (about 1V peak to peak output) by turning the small trim potentiometer on the back all the way to the left.

Why Teensy 3.0?

This guide uses the Teensy 3.0 microcontroller for a couple reasons. Teensy 3.0 is a very powerful device that runs a full 32-bit ARM Cortex-M4 processor at 48 mhz. With such a powerful processor it's easy to sample audio and run an FFT in real time without resorting to low-level commands outside the Arduino/Teensyduino programming library. Furthermore the ARM Cortex-M4 core on the Teensy has native support for running Fourier transforms and other signal processing functions with the CMSIS DSP math library.

However you can still apply the principles and code from this guide to other microcontrollers like Arduino. Look for existing FFT libraries to give you the code you need for running a Fourier transform, and be aware of how quickly you can sample audio with the microcontroller. This tiny music visualizer guide is a great example of running an FFT and analyzing audio in real time on an Arduino.

Continue on to get the software necessary for this guide.

This guide was first published on Oct 03, 2013. It was last updated on Oct 03, 2013.

This page (Hardware) was last updated on Sep 27, 2013.

Text editor powered by tinymce.