Go Down

Topic: Read 3.5mm audio jack volume values with Arduino UNO. (Read 1 time) previous topic - next topic

Grumpy_Mike

#30
Jun 06, 2019, 06:45 am Last Edit: Jun 06, 2019, 06:51 am by Grumpy_Mike
I am wondering if your expectations are a bit high, both from what you can expect from a simple circuit and what you can expect from a bass visualisation?

First off understand that to get a full value signal from the analogue to digital converter you need a signal that is 5V ( full scale ) + 0.7V ( voltage to overcome the diode's forward voltage = 5.7V. And that is just the positive part of the waveform so in terms of peak to peak voltage you need 11.4Vptp.

Now a standard personal music player's line signal is likely to be about 2Vptp so to get a full signal you need about a times 10 amplifier, a bit more if you don't want to run it at full blast. Also it is not always the base frequencies in any tune that defines the beat.

Have a look at this video, it uses a chip that splits the audio spectrum into 7 bands and displays them as bars. In fact there are two chips one for each stereo channel. The circuit was for the Raspberry Pi but there is no reason why you could not use an Arduino and strip LEDs.
https://vimeo.com/manage/167914646/general

Later on I used this setup to let music control the movement of dancing skeletons. The two base bands you saw in the previous video define the vertical and horizontal movement of the whole skeleton, where as the higher frequencies define the angle of rotation of the limbs.
 
https://vimeo.com/manage/184643867/general

My wife did say "those limb movements are a bit unrealistic", to which I replied, "we are talking about dancing skeletons here!".

Pay attention to the base frequencies and how that does not always define the beat.

Also with your code try displaying the values in the serial plot window rather than the serial monitor window, you might make more sense of the values you are getting than just looking at the numbers.

Go Up