FFT with Audio Shield and 32x32 RGB Matrix

Status
Not open for further replies.

xKiba

Member
Hello guys,

I have to build a Spectrum Analyzer for a school project.
Teensy 3.2
Audio shield
Adafruit RGB 32x32 Matrix (wich i try to connect manually and use the SmartMatrix lib)

I am very at the beginning and have to connect everything to the Teensy.
The problem is that the audio shield uses pins i want to use to connect the matrix to the controller.
Can someone tell me which pins i can use to connect the shield and/or the matrix so i can change connections and pins in the lib's.



Sorry for bad english and thanks for any kind of help!
 
Your easiest path might be to bring audio into an ADC pin and not use the shield at all. The ADC input isn't as good as the codec on the shield, but it can still work really well for this sort of project.
 
So here´s a little update: I got the matrix working great now!

The audio is still a problem for me. Even if i don´t have to preamp the signal, it will be very weak because i want to use an aux splitter, so i can hear the music.
Preamping is not an option for me since i don´t have time to do so. So i thought about just getting the audio in an ADC pin, analyze it and output the raw audio and FFT to the matrix. Would that be possible?

Thanks
 
So i thought about just getting the audio in an ADC pin, analyze it and output the raw audio and FFT to the matrix. Would that be possible?

Should be possible, if you signal is approx the right amplitude. The ADC input works with up to 1.2Vp-p. Normal consumer "line level" is approx 1Vp-p. That's also about the voltage sent to headphones turned up fairly loud.

The ADC requires a 0.6V DC bias. See the circuit in this documentation for the recommended way:

https://www.pjrc.com/teensy/gui/index.html?info=AudioInputAnalog

When you get this all up and running, I hope you'll share a quick youtube video? ;)
 
When you get this all up and running, I hope you'll share a quick youtube video? ;)

Of course. I planned on sharing my documentation of the project anyways :)

Should be possible, if you signal is approx the right amplitude. The ADC input works with up to 1.2Vp-p. Normal consumer "line level" is approx 1Vp-p. That's also about the voltage sent to headphones turned up fairly loud.

The ADC requires a 0.6V DC bias. See the circuit in this documentation for the recommended way:

https://www.pjrc.com/teensy/gui/index.html?info=AudioInputAnalog

Well. Building a circuit costs me too much time, since i dont have any of the components... Can´t i just use the audio shield ones? Rewiring to other pins than intended by the board layout isn't a problem.
I saw that the DAC outputs a DC Signal.. This confuses me a bit. Do i have to put a circuit to drive my speakers? I mean, can´t i just directly connect the DAC Signal to an aux plug?

When it comes to code, it should be simple doesn´t it?

Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputAnalog         adc1;           //xy=285,168
AudioOutputAnalog        dac1;           //xy=464,167
AudioConnection          patchCord1(adc1, dac1);
// GUItool: end automatically generated code

But can the teensy process everything fast enough to display the spectrum correctly on the matrix without artefacts or flickering?

Sorry i´m just getting really confused by what teensy does with that AudioInputAnalog and AudioOutputAnalog
 
Status
Not open for further replies.
Back
Top