Need help processing audio with an Arduino Uno

Hello,

Currently I am trying to create a circuit that will take in audio data from a simple TRRS 3.5mm audio jack (SparkFun TRRS 3.5mm Jack Breakout - BOB-11570 - SparkFun Electronics), split the frequencies with an MSGEQ7 Graphic Equalizer (Graphic Equalizer Display Filter - MSGEQ7 - COM-10468 - SparkFun Electronics) to separate the low bass frequencies, and use the output to power a bunch of simple vibration motors.
As a layman, the main issues I am coming across are as follows:

  • From what I understand, I will need to amplify the input somehow to revolve around 2.5V in order to stay in between the 0V-5V window. How do I accomplish this? Is this a problem I address with circuitry or with programming?

  • In a lot of the resources and circuit diagrams that I have looked at (here) I need a voltage divider and a DC Offset which I do not really the function of. User Grumpy_Mike recommended an envelope follower to indicate volume which is would be nice to implement as well. Should I experiment with this?

  • Not understanding the function of the pins of the MSGEQ7 component. According to this
    data sheet, there are pins that reset a multiplexor, a strobe and a clock oscillator pin which I have no idea what they would even be referring to. A description of what each of the these pins function is and how I am supposed to use them would be extremely helpful.

  • Is using a MSGEQ7 this optimal way to do what I am trying to accomplish? Is there an easier way to do what I am trying to do?

  • Lastly, I understand that I need to read the data as analog but User DVDdoug warned about shorting the left and right channels together. For this project I don't really need to separate both channels, is it possible to have the output be read as mono or would I have to implement that somehow? Do I need to create a mixer or can I just take the audio from one channel and use that to power the motor?

Currently, I am experimenting with components in Fritzing so if you have any recommendations on how to make this circuit or any additional components I may need feel free to post them below. Thank you for your time.

From what I understand, I will need to amplify the input somehow to revolve around 2.5V in order to stay in between the 0V-5V window. How do I accomplish this? Is this a problem I address with circuitry or with programming?

You can make an amplifier with an op-amp, but you may have enough signal as-is. With the MSGEQ7 you can try switching to the optional [u]1.1V ADC reference[/u] for more sensitivity.

In a lot of the resources and circuit diagrams that I have looked at (here) I need a voltage divider and a DC Offset which I do not really the function of. User Grumpy_Mike recommended an envelope follower to indicate volume which is would be nice to implement as well. Should I experiment with this?

You don't need the DC offset with the MSGEQ7, and with an envelope follower you'd loose all frequency information, and it's not needed with the MSGEQ7.

Not understanding the function of the pins of the MSGEQ7 component. According to this
data sheet, there are pins that reset a multiplexor, a strobe and a clock oscillator pin which I have no idea what they would even be referring to.

Look at the timing diagram at the bottom of the datasheet.

First, you write a negative-going Reset pulse to start the sequence.

Then you write a negative-going Strobe pulse.

After the 1st Strobe (negative edge) you are reading the 63Hz band. If all you want is the bass you can stop there and read the analog output.

If you send another Strobe you'll read the 160Hz band, etc.

Is using a MSGEQ7 this optimal way to do what I am trying to accomplish? Is there an easier way to do what I am trying to do?

You could try a simple [u]low-pass RC filter[/u] or you can make a better filter (a filter that more-sharply chops-off the higher frequencies) with an op-amp. With either of those options you'd need to DC-bias (offset) the Arduino's input.

Lastly, I understand that I need to read the data as analog but User DVDdoug warned about shorting the left and right channels together. For this project I don't really need to separate both channels, is it possible to have the output be read as mono or would I have to implement that somehow? Do I need to create a mixer or can I just take the audio from one channel and use that to power the motor?

You can use just one channel. In virtually all commercial musical recordings the bass is "mono" (identical in both channels).

Or, you can put a 10K resistor in series with each signal-line and tie the resistors together at the MSGEQ7 input (or at the Arduino input). The resistors make a "passive mixer" that essentially averages both channels. (If you have a left-only or right-only sound, the level will be cut in half.)

Or if you decide to make an op-amp amplifier, you can turn a regular inverting amplifier into a (inverting) [u]summing amplifier[/u] by adding one resistor.

Hi,
Have you googled MSGEQ7 arduino or googled MSGEQ7 arduino library ?

There is an immense array of examples of how to use the MSGEQ7, I have a feeling you are over thinking the outcomes of your project.

The library for the MSGEQ7 will make you coding easier to implement and it comes with example codes.

Can you tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom... :slight_smile: